* environ.cc (environ_init): Protect with a 'myfault' in case
GetEnvironmentStrings misbehaves. * environ.cc (environ_init): Add debugging output with value returned from GetEnvironmentStrings.
This commit is contained in:
parent
4dc2cfe588
commit
541ea31352
|
@ -1,3 +1,13 @@
|
||||||
|
2005-09-16 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* environ.cc (environ_init): Protect with a 'myfault' in case
|
||||||
|
GetEnvironmentStrings misbehaves.
|
||||||
|
|
||||||
|
2005-09-16 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* environ.cc (environ_init): Add debugging output with value returned
|
||||||
|
from GetEnvironmentStrings.
|
||||||
|
|
||||||
2005-09-16 Christopher Faylor <cgf@timesys.com>
|
2005-09-16 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* environ.cc (environ_init): Issue an error if GetEnvironmentStrings
|
* environ.cc (environ_init): Issue an error if GetEnvironmentStrings
|
||||||
|
|
|
@ -706,6 +706,10 @@ environ_init (char **envp, int envc)
|
||||||
bool envp_passed_in;
|
bool envp_passed_in;
|
||||||
bool got_something_from_registry;
|
bool got_something_from_registry;
|
||||||
static char NO_COPY cygterm[] = "TERM=cygwin";
|
static char NO_COPY cygterm[] = "TERM=cygwin";
|
||||||
|
myfault efault;
|
||||||
|
|
||||||
|
if (efault.faulted ())
|
||||||
|
api_fatal ("internal error reading the windows environment - too many environment variables?");
|
||||||
|
|
||||||
static int initted;
|
static int initted;
|
||||||
if (!initted)
|
if (!initted)
|
||||||
|
@ -759,6 +763,7 @@ environ_init (char **envp, int envc)
|
||||||
system_printf ("GetEnvironmentStrings returned NULL, %E");
|
system_printf ("GetEnvironmentStrings returned NULL, %E");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
debug_printf ("GetEnvironmentStrings returned %p - \"%s\"", rawenv, rawenv);
|
||||||
|
|
||||||
/* Current directory information is recorded as variables of the
|
/* Current directory information is recorded as variables of the
|
||||||
form "=X:=X:\foo\bar; these must be changed into something legal
|
form "=X:=X:\foo\bar; these must be changed into something legal
|
||||||
|
|
Loading…
Reference in New Issue