RE: [Bug] wrapper.c uses unportable unsetenv
- From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
- Date
- Oct 29, 2021, 21:10 UTC
- Message-ID
- <013a01d7cd09$72d91cb0$588b5610$@nexbridge.com>
- In-Reply-To
- <013501d7cd06$8c8281e0$a58785a0$@nexbridge.com>
On October 29, 2021 4:50 PM, I wrote:
Show 7 quoted lines
> To: 'Junio C Hamano' <gitster@pobox.com> > Cc: git@vger.kernel.org > Subject: RE: [Bug] wrapper.c uses unportable unsetenv > > On October 29, 2021 4:35 PM, Junio C Hamano: > > <rsbecker@nexbridge.com> writes: > >
<snip>
Show 6 quoted lines
> > There are compat/setenv.c and compat/unsetenv.c to be used when > > NO_SETENV and NO_UNSETENV are defined. Is that how you built your Git > > earlier since 2007, perhaps? > > We have defined NO_SETENV and NO_UNSETENV since I have been maintaining > it, so I don't get how we are getting into this situation. I was planning
on
Show 5 quoted lines
> removing NO_SETENV when the OS caught up for that on our minimum support > builds next year. NO_UNSETENV needs to stick around for bit longer. The > setenv() code is actually fine. It is unsetenv() that is causing problems. > Should not git-compat-util.h be included in wrapper.c so that we reference > gitunsetenv?
The actual issue is this:
if (!unsetenv(name))
^
"/home/ituglib/randall/git/wrapper.c", line 156: error(134): expression
must have arithmetic or pointer typeThis is with NO_UNSETENV = YesPlease. It makes no sense to me why this isn't compiling.