git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 type

This is with NO_UNSETENV = YesPlease. It makes no sense to me why this isn't compiling.

Previous: rsbecker@nexbridge.comNext: Junio C Hamano
Message 4 of 7 in “[Bug] wrapper.c uses unportable unsetenv”
  1. rsbecker@nexbridge.comOct 29, 2021
  2. Junio C HamanoOct 29, 2021
  3. rsbecker@nexbridge.comOct 29, 2021
  4. rsbecker@nexbridge.comOct 29, 2021
  5. Junio C HamanoOct 29, 2021
  6. Johannes SchindelinOct 29, 2021
  7. Junio C HamanoOct 29, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.