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

Re: [PATCH 6/10] Fix header breakage with _XOPEN_SOURCE.

From
Junio C Hamano <junkio@cox.net>
Date
Aug 2, 2006, 07:46 UTC
Message-ID
<7vpsfjvaul.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<00b601c6b5cf$7d54b940$c47eedc1@ramsay1.demon.co.uk>
"Ramsay Jones" <ramsay@ramsay1.demon.co.uk> writes:
Show 8 quoted lines
> convert-objects.c sets _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED before
> including <time.h>, in order to get the declaration of strptime().
> This leads to breakage in cache.h, due to S_ISLNK and S_IFLNK no longer
> being defined by <sys/stat.h>.  These definitions are protected by the
> __USE_BSD symbol, which is not set when _XOPEN_SOURCE is set.  Moving
> the #defines and #include <time.h> below all other #includes does not
> fix the problem, however, since now _USE_XOPEN, which protects the
> declaration of strptime(), is now not defined (don't ask!).

Wouldn't including "cache.h" and friends first and including <time.h> last solve the problem, then?

This kind of change tends to fix one system while potentially breaking another, and we would need to be careful. Will queue for post 1.4.2 and have people scream if it breaks somebody, I guess.

Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 5 in “Fix header breakage with _XOPEN_SOURCE.”
  1. 6/10 Fix header breakage with _XOPEN_SOURCE.Ramsay Jones, Aug 2, 2006
  2. Junio C HamanoAug 2, 2006
  3. Ramsay JonesAug 2, 2006
  4. Johannes SchindelinAug 4, 2006
  5. Ramsay JonesAug 5, 2006

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.