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

Re: [PATCH RFC] CYGWIN: avoid implicit declaration warning

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Nov 24, 2014, 23:04 UTC
Message-ID
<5473B999.2050604@ramsay1.demon.co.uk>
In-Reply-To
<xmqqlhn0usbq.fsf@gitster.dls.corp.google.com>
On 24/11/14 22:50, Junio C Hamano wrote:
Show 28 quoted lines
> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
> 
>> ...
>> Although I have not done an actual diff of the various cdef.h files, they
>> do appear to be more or less the same. In other words, I no longer think
>> that the change results from a 'change in priority of _XOPEN_SOURCE'. The
>> issue is simply that in the old <string.h> header these functions were
>> declared unconditionally; in the new headers the are contained within
>> preprocessor conditionals using the __GNU_VISIBLE and __BSD_VISIBLE macros
>> which are not set when _XOPEN_SOURCE is set (despite _GNU_SOURCE and
>> _BSD_SOURCE being set).
> 
> So I can take your version [*1*], drop this bit from the log:
> 
>     This seems to be caused by a change to the system headers which
>     results in the _XOPEN_SOURCE macro now having prioity over the
>     _GNU_SOURCE and _BSD_SOURCE macros (they are simply ignored).
>     This in turn leads to the declarations of the above functions
>     to be suppressed.
> 
> and replace it with something like:
> 
>     <string.h> on Cygwin used to always declare the above functions,
>     but a recent version of it no longer make them visible when
>     _XOPEN_SOURCE is set (even if _GNU_SOURCE and _BSD_SOURCE is
>     set).
> 
> and keep the rest, I think.

Perfect! Thanks! (actually, another minor typo: the second warning message, indent the ^ by two spaces - it should be pointing to the = symbol).

ATB, Ramsay Jones

Previous: Junio C HamanoNext: Jonathan Nieder
Message 14 of 17 in “CYGWIN: avoid implicit declaration warning”
  1. CYGWIN: avoid implicit declaration warningTorsten Bögershausen, Nov 23, 2014
  2. Ramsay JonesNov 23, 2014
  3. Junio C HamanoNov 23, 2014
  4. Ramsay JonesNov 23, 2014
  5. Torsten BögershausenNov 24, 2014
  6. Torsten BögershausenNov 24, 2014
  7. t5000 on Windows: do not mistake "sh.exe" as "sh"Johannes Sixt, Nov 24, 2014
  8. Torsten BögershausenNov 24, 2014
  9. Ramsay JonesNov 24, 2014
  10. Junio C HamanoNov 24, 2014
  11. Ramsay JonesNov 24, 2014
  12. Ramsay JonesNov 24, 2014
  13. Junio C HamanoNov 24, 2014
  14. Ramsay JonesNov 24, 2014
  15. Jonathan NiederNov 24, 2014
  16. Torsten BögershausenNov 24, 2014
  17. Ramsay JonesNov 24, 2014

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.