Changeset a00aa7 in git for resources


Ignore:
Timestamp:
Nov 10, 2021, 2:54:38 PM (2 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
8ad2935b9f03ca7820942e4018d26497779d34e5
Parents:
314f6db51fc43d6de9f441fe21423a1b4513303d
Message:
move setting PATH to system("sh",..)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • resources/feResource.cc

    r314f6db ra00aa7  
    1818
    1919VAR char* feArgv0 = NULL;
    20 
    21 #ifdef AIX_4
    22 #ifndef HAVE_PUTENV
    23 #define HAVE_PUTENV 1
    24 #endif
    25 #endif
    26 
    27 #if defined(HPUX_10) || defined(HPUX_9)
    28 #ifndef HAVE_SETENV
    29 extern "C" int setenv(const char *name, const char *value, int overwrite);
    30 #endif
    31 #endif
    32 
    3320
    3421//char* feResource(const char id, int warn = -1);
     
    194181  feResource('s',0);
    195182  feResource('P');
    196 
    197 #if defined(HAVE_SETENV) || defined(HAVE_PUTENV)
    198   char* path = feResource('p');
    199 #ifdef RESOURCE_DEBUG
    200   printf("feInitResources(argv0): setting path with '%s'\n", path);
    201 #endif
    202 #ifdef HAVE_PUTENV
    203   if (path != NULL) { char *s=(char *)malloc(strlen(path)+6);
    204                       sprintf(s,"PATH=%s",path);
    205                       putenv(s);
    206                     }
    207 #else
    208   if (path != NULL) setenv("PATH", path, 1);
    209 #endif
    210 #endif
    211183}
    212184
Note: See TracChangeset for help on using the changeset viewer.