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

Re: [PATCH] Conditionally define _GNU_SOURCE in mailinfo.c

From
Junio C Hamano <junkio@cox.net>
Date
Apr 30, 2006, 21:51 UTC
Message-ID
<7vodyiybnr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060430181931.GE6626@artsapartment.org>
"Art Haas" <ahaas@airmail.net> writes:
Show 15 quoted lines
> Place the '#define _GNU_SOURCE' within an #ifndef/#endif block testing
> if '_GNU_SOURCE' is already defined.
>
> d3932a8fca2faac8ed14bfd0e65c1f0135dc1d4b
> diff --git a/mailinfo.c b/mailinfo.c
> index b276519..4b99ccf 100644
> --- a/mailinfo.c
> +++ b/mailinfo.c
> @@ -2,7 +2,9 @@
>   * Another stupid program, this one parsing the headers of an
>   * email to figure out authorship and subject
>   */
> +#ifndef _GNU_SOURCE
>  #define _GNU_SOURCE
> +#endif

Hmph.... I understand that this makes any difference only if you use -D_GNU_SOURCE in CFLAGS, which implies there are _other_ things you need to have "#define _GNU_SOURCE" to compile for your setup. I wonder what it is...

Previous: Art Haas
Message 2 of 2 in “Conditionally define _GNU_SOURCE in mailinfo.c”
  1. Conditionally define _GNU_SOURCE in mailinfo.cArt Haas, Apr 30, 2006
  2. Junio C HamanoApr 30, 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.