git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [Bug] wrapper.c uses unportable unsetenv
@ 2021-10-29 20:14 rsbecker
  2021-10-29 20:35 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: rsbecker @ 2021-10-29 20:14 UTC (permalink / raw)
  To: git

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)");
+ #endif

wrapper.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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-29 21:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 20:14 [Bug] wrapper.c uses unportable unsetenv rsbecker
2021-10-29 20:35 ` Junio C Hamano
2021-10-29 20:49   ` rsbecker
2021-10-29 21:10     ` rsbecker
2021-10-29 21:42       ` Junio C Hamano
2021-10-29 21:50         ` Johannes Schindelin
2021-10-29 21:57           ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).