mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
Merge branch 'EnvControl-fixes'
This commit is contained in:
commit
e7ec2a4bdd
1 changed files with 20 additions and 0 deletions
|
@ -424,6 +424,10 @@ _DtEnvControl(
|
||||||
_postDtEnvironment.binPath = XtMalloc(bytes_needed);
|
_postDtEnvironment.binPath = XtMalloc(bytes_needed);
|
||||||
#ifdef sun
|
#ifdef sun
|
||||||
if (ptr = strstr(tempString, "/usr/openwin/bin"))
|
if (ptr = strstr(tempString, "/usr/openwin/bin"))
|
||||||
|
#elif defined(CSRG_BASED)
|
||||||
|
if (ptr = strstr(tempString, "/usr/X11R6/bin"))
|
||||||
|
#elif defined(linux)
|
||||||
|
if (ptr = strstr(tempString, "/usr/bin"))
|
||||||
#else
|
#else
|
||||||
if (ptr = strstr(tempString, "/usr/bin/X11"))
|
if (ptr = strstr(tempString, "/usr/bin/X11"))
|
||||||
#endif
|
#endif
|
||||||
|
@ -817,6 +821,10 @@ static void _EnvAdd
|
||||||
{
|
{
|
||||||
_DtSvcProcessLock();
|
_DtSvcProcessLock();
|
||||||
if (envBitVector & bv_flag) {
|
if (envBitVector & bv_flag) {
|
||||||
|
#if defined(CSRG_BASED) || defined(linux)
|
||||||
|
setenv(envVar, envVarSetting + strlen(envVar) + 1, 1);
|
||||||
|
#else
|
||||||
|
|
||||||
register int i;
|
register int i;
|
||||||
size_t envVarLen = strlen(envVar);
|
size_t envVarLen = strlen(envVar);
|
||||||
char *envPtr = NULL;
|
char *envPtr = NULL;
|
||||||
|
@ -850,6 +858,7 @@ static void _EnvAdd
|
||||||
/* This should never happen */
|
/* This should never happen */
|
||||||
putenv(strdup(envVarSetting));
|
putenv(strdup(envVarSetting));
|
||||||
}
|
}
|
||||||
|
#endif /* linux || CSRG_BASED */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
putenv(strdup(envVarSetting));
|
putenv(strdup(envVarSetting));
|
||||||
|
@ -919,6 +928,16 @@ _DtEnvRemove(
|
||||||
&& ( p[len] == '=' )
|
&& ( p[len] == '=' )
|
||||||
&& !strncmp(p, str, len))
|
&& !strncmp(p, str, len))
|
||||||
{
|
{
|
||||||
|
#if defined(linux) || defined(CSRG_BASED)
|
||||||
|
/* JET - 2/19/99
|
||||||
|
It seems much safer to let libc worry about this
|
||||||
|
rather than try to do it ourselves.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (str)
|
||||||
|
unsetenv(str);
|
||||||
|
#else
|
||||||
|
|
||||||
freeMe = pEnviron2[index];
|
freeMe = pEnviron2[index];
|
||||||
|
|
||||||
/* just move the last one into the gap - any
|
/* just move the last one into the gap - any
|
||||||
|
@ -930,6 +949,7 @@ _DtEnvRemove(
|
||||||
pEnviron2[count - 1] = NULL;
|
pEnviron2[count - 1] = NULL;
|
||||||
|
|
||||||
XtFree (freeMe);
|
XtFree (freeMe);
|
||||||
|
#endif /* linux || CSRG_BASED */
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
pEnviron++;
|
pEnviron++;
|
||||||
|
|
Loading…
Reference in a new issue