Skip to content

Commit 81b065a

Browse files
committed
8326714: Make file-local functions static in src/java.base/unix/native/libjava/childproc.c
Reviewed-by: djelinski, rriggs
1 parent 4fcae1a commit 81b065a

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

src/java.base/unix/native/libjava/childproc.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
const char * const *parentPathv;
3838

39-
int
39+
static int
4040
restartableDup2(int fd_from, int fd_to)
4141
{
4242
int err;
@@ -50,7 +50,7 @@ closeSafely(int fd)
5050
return (fd == -1) ? 0 : close(fd);
5151
}
5252

53-
int
53+
static int
5454
isAsciiDigit(char c)
5555
{
5656
return c >= '0' && c <= '9';
@@ -65,7 +65,7 @@ isAsciiDigit(char c)
6565
#define FD_DIR "/proc/self/fd"
6666
#endif
6767

68-
int
68+
static int
6969
closeDescriptors(void)
7070
{
7171
DIR *dp;
@@ -103,7 +103,7 @@ closeDescriptors(void)
103103
return 1;
104104
}
105105

106-
int
106+
static int
107107
moveDescriptor(int fd_from, int fd_to)
108108
{
109109
if (fd_from != fd_to) {
@@ -209,7 +209,7 @@ initVectorFromBlock(const char**vector, const char* block, int count)
209209
* misfeature, but compatibility wins over sanity. The original support for
210210
* this was imported accidentally from execvp().
211211
*/
212-
void
212+
static void
213213
execve_as_traditional_shell_script(const char *file,
214214
const char *argv[],
215215
const char *const envp[])
@@ -232,7 +232,7 @@ execve_as_traditional_shell_script(const char *file,
232232
* Like execve(2), except that in case of ENOEXEC, FILE is assumed to
233233
* be a shell script and the system default shell is invoked to run it.
234234
*/
235-
void
235+
static void
236236
execve_with_shell_fallback(int mode, const char *file,
237237
const char *argv[],
238238
const char *const envp[])
@@ -256,7 +256,7 @@ execve_with_shell_fallback(int mode, const char *file,
256256
* JDK_execvpe is identical to execvp, except that the child environment is
257257
* specified via the 3rd argument instead of being inherited from environ.
258258
*/
259-
void
259+
static void
260260
JDK_execvpe(int mode, const char *file,
261261
const char *argv[],
262262
const char *const envp[])

src/java.base/unix/native/libjava/childproc.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,11 @@ typedef struct _SpawnInfo {
128128
extern const char * const *parentPathv;
129129

130130
ssize_t writeFully(int fd, const void *buf, size_t count);
131-
int restartableDup2(int fd_from, int fd_to);
132131
int closeSafely(int fd);
133-
int isAsciiDigit(char c);
134-
int closeDescriptors(void);
135-
int moveDescriptor(int fd_from, int fd_to);
136132

137133
int magicNumber();
138134
ssize_t readFully(int fd, void *buf, size_t nbyte);
139135
void initVectorFromBlock(const char**vector, const char* block, int count);
140-
void execve_as_traditional_shell_script(const char *file,
141-
const char *argv[],
142-
const char *const envp[]);
143-
void execve_with_shell_fallback(int mode, const char *file,
144-
const char *argv[],
145-
const char *const envp[]);
146-
void JDK_execvpe(int mode, const char *file,
147-
const char *argv[],
148-
const char *const envp[]);
149136
int childProcess(void *arg);
150137

151138
#ifdef DEBUG

0 commit comments

Comments
 (0)