* environ.cc (environ_init): Issue an error if GetEnvironmentStrings fails and
return.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | ||||
| 2005-09-16  Christopher Faylor  <cgf@timesys.com> | ||||
|  | ||||
| 	* environ.cc (environ_init): Issue an error if GetEnvironmentStrings | ||||
| 	fails and return. | ||||
|  | ||||
| 2005-09-15  Christopher Faylor  <cgf@timesys.com> | ||||
|  | ||||
| 	* pinfo.h (EXITCODE_SET): Move out of range of Windows error. | ||||
|   | ||||
| @@ -752,7 +752,13 @@ environ_init (char **envp, int envc) | ||||
|  | ||||
|   /* Allocate space for environment + trailing NULL + CYGWIN env. */ | ||||
|   lastenviron = envp = (char **) malloc ((4 + (envc = 100)) * sizeof (char *)); | ||||
|  | ||||
|   rawenv = GetEnvironmentStrings (); | ||||
|   if (!rawenv) | ||||
|     { | ||||
|       system_printf ("GetEnvironmentStrings returned NULL, %E"); | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|   /* Current directory information is recorded as variables of the | ||||
|      form "=X:=X:\foo\bar; these must be changed into something legal | ||||
|   | ||||
		Reference in New Issue
	
	Block a user