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

Re: Breakage (?) in configure and git_vsnprintf()

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 12, 2011, 21:56 UTC
Message-ID
<20111212215645.GA3024@elie.hsd1.il.comcast.net>
In-Reply-To
<20111212064305.GA16511@sigill.intra.peff.net>
Jeff King wrote:
Show 7 quoted lines
> I'll leave the issue of "-std=c89" triggering SNPRINTF_RETURNS_BOGUS to
> people who know and care about autoconf. My gut is to say "don't do
> that". Git is not actually pure c89. We typically target systems that
> are _at least_ c89, but it's more important to match and run well on
> real-world systems than what was defined in the standard. So we don't
> depend on c99, but we do depend on quirks and features that were
> prominent in mid-90's Unix variants.

Using vsnprintf isn't even wrong from the standards-pedant point of view --- vsnprintf has been in POSIX for a long time. The problem is that the configure script is not setting appropriate feature test macros such as _XOPEN_SOURCE (like git-compat-util.h does) during its feature tests.

Maybe it would be possible to hook the appropriate magic into AC_LANG_PROGRAM.

Previous: Michael Haggerty
Message 10 of 10 in “Breakage (?) in configure and git_vsnprintf()”
  1. Michael HaggertyDec 11, 2011
  2. Jeff KingDec 12, 2011
  3. Johannes SixtDec 12, 2011
  4. Jeff KingDec 12, 2011
  5. Junio C HamanoDec 12, 2011
  6. Andreas SchwabDec 12, 2011
  7. Jeff KingDec 12, 2011
  8. Brandon CaseyDec 12, 2011
  9. Michael HaggertyDec 12, 2011
  10. Jonathan NiederDec 12, 2011

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.