From 0763ee9d8324d1a0c1a26057e90719f21a13e826 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 16 Jul 2000 20:06:11 +0000 Subject: * environ.cc: Use new definition of "environ" throughout. (environ_init): Explicitly initialize __cygwin_environ. (cur_environ): New function. Detects when user has updated their environment. * exec.cc: Use 'environ' define throughout rather than __cygwin_environ. * spawn.cc: Ditto. * winsup.h: Declare cur_environ, main_environ, environ. --- winsup/cygwin/exec.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/exec.cc') diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc index 0ba3ead..d549378 100644 --- a/winsup/cygwin/exec.cc +++ b/winsup/cygwin/exec.cc @@ -44,7 +44,7 @@ execl (const char *path, const char *arg0, ...) while (argv[i++] != NULL); va_end (args); MALLOC_CHECK; - return _execve (path, (char * const *) argv, __cygwin_environ); + return _execve (path, (char * const *) argv, environ); } extern "C" @@ -52,7 +52,7 @@ int execv (const char *path, char * const *argv) { MALLOC_CHECK; - return _execve (path, (char * const *) argv, __cygwin_environ); + return _execve (path, (char * const *) argv, environ); } /* the same as a standard exec() calls family, but with NT security support */ @@ -85,7 +85,7 @@ sexecl (HANDLE hToken, const char *path, const char *arg0, ...) va_end (args); MALLOC_CHECK; - return sexecve (hToken, path, (char * const *) argv, __cygwin_environ); + return sexecve (hToken, path, (char * const *) argv, environ); } extern "C" @@ -131,7 +131,7 @@ sexeclp (HANDLE hToken, const char *path, const char *arg0, ...) va_end (args); MALLOC_CHECK; - return sexecvpe (hToken, path, (const char * const *) argv, __cygwin_environ); + return sexecvpe (hToken, path, (const char * const *) argv, environ); } extern "C" @@ -163,7 +163,7 @@ int sexecv (HANDLE hToken, const char *path, const char * const *argv) { MALLOC_CHECK; - return sexecve (hToken, path, argv, __cygwin_environ); + return sexecve (hToken, path, argv, environ); } extern "C" @@ -171,7 +171,7 @@ int sexecp (HANDLE hToken, const char *path, const char * const *argv) { MALLOC_CHECK; - return sexecvpe (hToken, path, argv, __cygwin_environ); + return sexecvpe (hToken, path, argv, environ); } /* -- cgit v1.1