* 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.
This commit is contained in:
Christopher Faylor
2000-07-16 20:06:11 +00:00
parent b4e59f5f14
commit 0763ee9d83
5 changed files with 42 additions and 17 deletions

View File

@@ -477,7 +477,9 @@ win_env * __stdcall getwinenv (const char *name, const char *posix = NULL);
void __stdcall update_envptrs ();
char * __stdcall winenv (const char * const *, int);
extern char **__cygwin_environ;
extern char **__cygwin_environ, ***main_environ;
extern char __stdcall **cur_environ ();
#define environ (cur_environ ())
/* The title on program start. */
extern char *old_title;