git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Conditionally define _GNU_SOURCE in mailinfo.c
@ 2006-04-30 18:19 Art Haas
  2006-04-30 21:51 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Art Haas @ 2006-04-30 18:19 UTC (permalink / raw)
  To: Junio C Hamano, git

Hi.

Place the '#define _GNU_SOURCE' within an #ifndef/#endif block testing
if '_GNU_SOURCE' is already defined.

Signed-off-by: Art Haas <ahaas@airmail.net>

---

 mailinfo.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-- 
1.3.1.g66ae

-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Conditionally define _GNU_SOURCE in mailinfo.c
  2006-04-30 18:19 [PATCH] Conditionally define _GNU_SOURCE in mailinfo.c Art Haas
@ 2006-04-30 21:51 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2006-04-30 21:51 UTC (permalink / raw)
  To: Art Haas; +Cc: git

"Art Haas" <ahaas@airmail.net> writes:

> 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...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-30 21:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-30 18:19 [PATCH] Conditionally define _GNU_SOURCE in mailinfo.c Art Haas
2006-04-30 21:51 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).