{"thread":{"id":"4012","subject":"[PATCH] Conditionally define _GNU_SOURCE in mailinfo.c","startedAt":"2006-04-30T18:19:31Z","lastAt":"2006-04-30T21:51:52Z","messageCount":2,"participants":["Art Haas","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"19299","messageId":"20060430181931.GE6626@artsapartment.org","threadId":"4012","inReplyTo":null,"subject":"[PATCH] Conditionally define _GNU_SOURCE in mailinfo.c","fromName":"Art Haas","fromEmail":"ahaas@airmail.net","sentAt":"2006-04-30T18:19:31Z","receivedAt":"2006-04-30T18:19:31Z","isPatch":true,"sender":{"key":"ahaas@airmail.net","avatar":null},"body":"Hi.\n\nPlace the '#define _GNU_SOURCE' within an #ifndef/#endif block testing\nif '_GNU_SOURCE' is already defined.\n\nSigned-off-by: Art Haas <ahaas@airmail.net>\n\n---\n\n mailinfo.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\nd3932a8fca2faac8ed14bfd0e65c1f0135dc1d4b\ndiff --git a/mailinfo.c b/mailinfo.c\nindex b276519..4b99ccf 100644\n--- a/mailinfo.c\n+++ b/mailinfo.c\n@@ -2,7 +2,9 @@\n  * Another stupid program, this one parsing the headers of an\n  * email to figure out authorship and subject\n  */\n+#ifndef _GNU_SOURCE\n #define _GNU_SOURCE\n+#endif\n #include <stdio.h>\n #include <stdlib.h>\n #include <string.h>\n-- \n1.3.1.g66ae\n\n-- \nMan once surrendering his reason, has no remaining guard against absurdities\nthe most monstrous, and like a ship without rudder, is the sport of every wind.\n\n-Thomas Jefferson to James Smith, 1822\n"},{"id":"19307","messageId":"7vodyiybnr.fsf@assigned-by-dhcp.cox.net","threadId":"4012","inReplyTo":"20060430181931.GE6626@artsapartment.org","subject":"Re: [PATCH] Conditionally define _GNU_SOURCE in mailinfo.c","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-04-30T21:51:52Z","receivedAt":"2006-04-30T21:51:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Art Haas\" <ahaas@airmail.net> writes:\n\n> Place the '#define _GNU_SOURCE' within an #ifndef/#endif block testing\n> if '_GNU_SOURCE' is already defined.\n>\n> d3932a8fca2faac8ed14bfd0e65c1f0135dc1d4b\n> diff --git a/mailinfo.c b/mailinfo.c\n> index b276519..4b99ccf 100644\n> --- a/mailinfo.c\n> +++ b/mailinfo.c\n> @@ -2,7 +2,9 @@\n>   * Another stupid program, this one parsing the headers of an\n>   * email to figure out authorship and subject\n>   */\n> +#ifndef _GNU_SOURCE\n>  #define _GNU_SOURCE\n> +#endif\n\nHmph....  I understand that this makes any difference only if\nyou use -D_GNU_SOURCE in CFLAGS, which implies there are _other_\nthings you need to have \"#define _GNU_SOURCE\" to compile for\nyour setup.  I wonder what it is...\n"}]}