[Bug] wrapper.c uses unportable unsetenv
- From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
- Date
- Oct 29, 2021, 20:14 UTC
- Message-ID
- <012301d7cd01$90428960$b0c79c20$@nexbridge.com>
The unsetenv()/setenv(overwrite) calls are not 100% portable - as in not on all POSIX implementations. It breaks the build on some of the NonStop platforms. This will change in a year or two but I really don't want to fall behind on git releases.
This was introduced at 3540c71 but I was on vacation when it happened so did not catch it during reviews - my apologies for that.
Is it critical that this be called or can we #ifdef it away if it isn't supported for a build? The #if is exactly this:
wrapper.c@150
+ #if (_TANDEM_ARCH_ > 3 || (_TANDEM_ARCH_ == 3 && __L_Series_RVU >= 2010))
if (setenv(name, value, overwrite))
die_errno(_("could not setenv '%s'"), name ? name :
"(null)");
+ #endifwrapper.c@154
+ #if (_TANDEM_ARCH_ > 3 || (_TANDEM_ARCH_ == 3 && __L_Series_RVU >= 2010))
if (!unsetenv(name))
die_errno(_("could not unsetenv '%s'"), name ? name :
"(null)");
+ #endif-Randall