Changeset 21730 for branches/gcc-kmk/src/kernel32/environ.cpp
- Timestamp:
- Oct 21, 2011, 4:52:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/kernel32/environ.cpp
r21355 r21730 41 41 //list of important OS/2 environment variables that must not be removed 42 42 //when creating a new process 43 static c har *lpReservedEnvStrings[] = {43 static const char *lpReservedEnvStrings[] = { 44 44 "HOSTNAME", 45 45 "TZ", … … 76 76 //TEMP is a standard environment variable in Windows, but is not always 77 77 //present in OS/2, so make sure it is. 78 if(GetEnvironmentVariableA("TEMP", szVar, sizeof(szVar)) == 0) 78 if(GetEnvironmentVariableA("TEMP", szVar, sizeof(szVar)) == 0) 79 79 { 80 80 if(GetEnvironmentVariableA("TMP", szVar, sizeof(szVar)) == 0) { … … 226 226 * If the function fails, the return value is zero 227 227 * Remark : 228 * Status : 228 * Status : 229 229 * 230 230 *****************************************************************************/ … … 254 254 if ((p = strchr( src + 1, '%' )) != NULL) 255 255 { 256 len = p - src - 1; /* Length of the variable name */ 256 len = p - src - 1; /* Length of the variable name */ 257 257 if ((var = ENV_FindVariable( GetEnvironmentStringsA(), 258 258 src + 1, len )) != NULL) … … 309 309 * If the function fails, the return value is zero 310 310 * Remark : 311 * Status : 311 * Status : 312 312 * 313 313 *****************************************************************************/ … … 340 340 char *tmpenvnew, *newenv; 341 341 int newsize = 0, len; 342 342 343 343 dprintf(("New environment:")); 344 344 while(*tmpenvold) { … … 374 374 tmpenvold += len+1; 375 375 } 376 int i; 376 377 for(i=0;i<sizeof(lpReservedEnvStrings)/sizeof(char *);i++) { 377 378 if(!ENV_FindVariable(lpEnvironment, lpReservedEnvStrings[i], strlen(lpReservedEnvStrings[i]))) {
Note:
See TracChangeset
for help on using the changeset viewer.