Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/src/kernel32/environ.cpp

    r21355 r21916  
    4141//list of important OS/2 environment variables that must not be removed
    4242//when creating a new process
    43 static char *lpReservedEnvStrings[] = {
     43static const char *lpReservedEnvStrings[] = {
    4444"HOSTNAME",
    4545"TZ",
     
    7676  //TEMP is a standard environment variable in Windows, but is not always
    7777  //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)
    7979  {
    8080      if(GetEnvironmentVariableA("TMP", szVar, sizeof(szVar)) == 0) {
     
    8585  }
    8686}
     87
     88extern "C" {
     89
    8790//******************************************************************************
    8891//******************************************************************************
     
    226229 *             If the function fails, the return value is zero
    227230 * Remark    :
    228  * Status    : 
     231 * Status    :
    229232 *
    230233 *****************************************************************************/
     
    254257            if ((p = strchr( src + 1, '%' )) != NULL)
    255258            {
    256                 len = p - src - 1;  /* Length of the variable name */   
     259                len = p - src - 1;  /* Length of the variable name */
    257260                if ((var = ENV_FindVariable( GetEnvironmentStringsA(),
    258261                                             src + 1, len )) != NULL)
     
    309312 *             If the function fails, the return value is zero
    310313 * Remark    :
    311  * Status    : 
     314 * Status    :
    312315 *
    313316 *****************************************************************************/
     
    330333  return ret;
    331334}
     335
     336} // extern "C"
     337
    332338//******************************************************************************
    333339// Create a new process environment block based on input from the application
     
    340346    char *tmpenvnew, *newenv;
    341347    int newsize = 0, len;
    342        
     348
    343349    dprintf(("New environment:"));
    344350    while(*tmpenvold) {
     
    374380        tmpenvold += len+1;
    375381    }
     382    int i;
    376383    for(i=0;i<sizeof(lpReservedEnvStrings)/sizeof(char *);i++) {
    377384        if(!ENV_FindVariable(lpEnvironment, lpReservedEnvStrings[i], strlen(lpReservedEnvStrings[i]))) {
Note: See TracChangeset for help on using the changeset viewer.