diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-02-09 23:06:54 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-02-09 23:06:54 +0000 |
commit | e57fc6bbb2e98f9ef3336db698dc7dd260dfc502 (patch) | |
tree | d525aa4fb8a13d6459c6339e4543c840b415e636 /libc/unistd | |
parent | 56139d5a7109db33a7f3e951595a45a0f7f12cd4 (diff) |
Use __environ instead of the GNU extension environ.
-Erik
Diffstat (limited to 'libc/unistd')
-rw-r--r-- | libc/unistd/execl.c | 4 | ||||
-rw-r--r-- | libc/unistd/execlp.c | 3 | ||||
-rw-r--r-- | libc/unistd/execv.c | 5 | ||||
-rw-r--r-- | libc/unistd/execvp.c | 4 |
4 files changed, 4 insertions, 12 deletions
diff --git a/libc/unistd/execl.c b/libc/unistd/execl.c index 531c2ee60..a05867ef8 100644 --- a/libc/unistd/execl.c +++ b/libc/unistd/execl.c @@ -3,8 +3,6 @@ #include <unistd.h> #include <stdarg.h> -extern char **environ; - int execl(__const char *path, __const char *arg, ...) { const char *shortargv[16]; @@ -42,7 +40,7 @@ int execl(__const char *path, __const char *arg, ...) va_end(args); - i = execve(path, (char *const *) argv, environ); + i = execve(path, (char *const *) argv, __environ); if (argv != shortargv) free(argv); diff --git a/libc/unistd/execlp.c b/libc/unistd/execlp.c index 50fb4a032..fef10d376 100644 --- a/libc/unistd/execlp.c +++ b/libc/unistd/execlp.c @@ -3,7 +3,6 @@ #include <unistd.h> #include <stdarg.h> -extern char **environ; extern int execvep(const char *path, char *__const argv[], char *__const envp[]); int execlp(__const char *file, __const char *arg, ...) @@ -43,7 +42,7 @@ int execlp(__const char *file, __const char *arg, ...) va_end(args); - i = execvep(file, (char *const *) argv, environ); + i = execvep(file, (char *const *) argv, __environ); if (argv != shortargv) free(argv); diff --git a/libc/unistd/execv.c b/libc/unistd/execv.c index 6c8ba0d97..486f53745 100644 --- a/libc/unistd/execv.c +++ b/libc/unistd/execv.c @@ -1,9 +1,6 @@ - #include <unistd.h> -extern char **environ; - int execv(__const char *path, char *__const argv[]) { - return execve(path, argv, environ); + return execve(path, argv, __environ); } diff --git a/libc/unistd/execvp.c b/libc/unistd/execvp.c index 943303332..e7e496063 100644 --- a/libc/unistd/execvp.c +++ b/libc/unistd/execvp.c @@ -1,10 +1,8 @@ - #include <unistd.h> -extern char **environ; extern int execvep(const char *path, char *__const argv[], char *__const envp[]); int execvp(__const char *path, char *__const argv[]) { - return execvep(path, argv, environ); + return execvep(path, argv, __environ); } |