Remove some HPUX leftovers.

Resolves #185
This commit is contained in:
wolfbeast 2019-04-01 00:09:12 +02:00 committed by Roy Tam
commit fdc5d93422
4 changed files with 2 additions and 36 deletions

View file

@ -662,7 +662,7 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue
JSAutoByteString value(cx, valstr);
if (!value)
return false;
#if defined XP_WIN || defined HPUX || defined OSF1 || defined SCO
#if defined XP_WIN || defined SCO
{
char* waste = JS_smprintf("%s=%s", name.ptr(), value.ptr());
if (!waste) {
@ -670,16 +670,7 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue
return false;
}
rv = putenv(waste);
#ifdef XP_WIN
/*
* HPUX9 at least still has the bad old non-copying putenv.
*
* Per mail from <s.shanmuganathan@digital.com>, OSF1 also has a putenv
* that will crash if you pass it an auto char array (so it must place
* its argument directly in the char* environ[] array).
*/
free(waste);
#endif
}
#else
rv = setenv(name.ptr(), value.ptr(), 1);