{"thread":{"id":"37555","subject":"[PATCH] compat-util: add _DEFAULT_SOURCE define","startedAt":"2014-09-14T05:33:35Z","lastAt":"2014-09-17T03:54:50Z","messageCount":3,"participants":["Sergey Senozhatsky","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"249376","messageId":"1410672815-2555-1-git-send-email-sergey.senozhatsky@gmail.com","threadId":"37555","inReplyTo":null,"subject":"[PATCH] compat-util: add _DEFAULT_SOURCE define","fromName":"Sergey Senozhatsky","fromEmail":"sergey.senozhatsky@gmail.com","sentAt":"2014-09-14T05:33:35Z","receivedAt":"2014-09-14T05:33:35Z","isPatch":true,"sender":{"key":"sergey.senozhatsky@gmail.com","avatar":null},"body":"glibc has deprecated the use of _BSD_SOURCE define\n\n  warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n\nTo make it easier to maintain a cross platform source code, that\nwarning can be suppressed by _DEFAULT_SOURCE.\n\nDefine both _BSD_SOURCE, _DEFAULT_SOURCE and cleanup the build.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\n---\n git-compat-util.h | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 4e7e3f8..08a9ee2 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -82,6 +82,7 @@\n #define _ALL_SOURCE 1\n #define _GNU_SOURCE 1\n #define _BSD_SOURCE 1\n+#define _DEFAULT_SOURCE 1\n #define _NETBSD_SOURCE 1\n #define _SGI_SOURCE 1\n \n-- \n2.1.0.350.g8b25fe0\n"},{"id":"249447","messageId":"xmqq61go7lme.fsf@gitster.dls.corp.google.com","threadId":"37555","inReplyTo":"1410672815-2555-1-git-send-email-sergey.senozhatsky@gmail.com","subject":"Re: [PATCH] compat-util: add _DEFAULT_SOURCE define","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-09-15T19:02:33Z","receivedAt":"2014-09-15T19:02:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sergey Senozhatsky <sergey.senozhatsky@gmail.com> writes:\n\n> glibc has deprecated the use of _BSD_SOURCE define\n>\n>   warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n>\n> To make it easier to maintain a cross platform source code, that\n> warning can be suppressed by _DEFAULT_SOURCE.\n>\n> Define both _BSD_SOURCE, _DEFAULT_SOURCE and cleanup the build.\n\nI can see you defined DEFAULT_SOURCE, but where did you do \"cleanup\nthe build\"?  Or did you mean \"define both (in order) to clean up\"?\n\nJust making sure we are not only seeing a patch half eaten by mail\ntransport somewhere.\n\n>\n> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\n> ---\n>  git-compat-util.h | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index 4e7e3f8..08a9ee2 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -82,6 +82,7 @@\n>  #define _ALL_SOURCE 1\n>  #define _GNU_SOURCE 1\n>  #define _BSD_SOURCE 1\n> +#define _DEFAULT_SOURCE 1\n>  #define _NETBSD_SOURCE 1\n>  #define _SGI_SOURCE 1\n"},{"id":"249584","messageId":"20140917035450.GA881@swordfish","threadId":"37555","inReplyTo":"xmqq61go7lme.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] compat-util: add _DEFAULT_SOURCE define","fromName":"Sergey Senozhatsky","fromEmail":"sergey.senozhatsky@gmail.com","sentAt":"2014-09-17T03:54:50Z","receivedAt":"2014-09-17T03:54:50Z","isPatch":true,"sender":{"key":"sergey.senozhatsky@gmail.com","avatar":null},"body":"Hello,\n\nOn (09/15/14 12:02), Junio C Hamano wrote:\n> Date: Mon, 15 Sep 2014 12:02:33 -0700\n> From: Junio C Hamano <gitster@pobox.com>\n> To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\n> Cc: git@vger.kernel.org\n> Subject: Re: [PATCH] compat-util: add _DEFAULT_SOURCE define\n> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)\n> \n> Sergey Senozhatsky <sergey.senozhatsky@gmail.com> writes:\n> \n> > glibc has deprecated the use of _BSD_SOURCE define\n> >\n> >   warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n> >\n> > To make it easier to maintain a cross platform source code, that\n> > warning can be suppressed by _DEFAULT_SOURCE.\n> >\n> > Define both _BSD_SOURCE, _DEFAULT_SOURCE and cleanup the build.\n> \n> I can see you defined DEFAULT_SOURCE, but where did you do \"cleanup\n> the build\"?  Or did you mean \"define both (in order) to clean up\"?\n\nyes. sorry, I meant \"in order to clean up\". otherwise, the build is\na bit noisy:\n\n[..]\n    CC base85.o\n    CC bisect.o\n    * new link flags\n    * new prefix flags\n    CC branch.o\n    CC blob.o\nIn file included from /usr/include/unistd.h:25:0,\n                 from git-compat-util.h:98,\n                 from cache.h:4,\n                 from blob.c:1:\n/usr/include/features.h:148:3: warning: #warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\" [-Wcpp]\n # warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n   ^\nIn file included from /usr/include/unistd.h:25:0,\n                 from git-compat-util.h:98,\n                 from branch.c:1:\n/usr/include/features.h:148:3: warning: #warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\" [-Wcpp]\n # warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n   ^\nIn file included from /usr/include/unistd.h:25:0,\n                 from git-compat-util.h:98,\n                 from cache.h:4,\n                 from base85.c:1:\n/usr/include/features.h:148:3: warning: #warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\" [-Wcpp]\n # warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n   ^\nIn file included from /usr/include/unistd.h:25:0,\n                 from git-compat-util.h:98,\n                 from cache.h:4,\n                 from bisect.c:1:\n/usr/include/features.h:148:3: warning: #warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\" [-Wcpp]\n # warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n   ^\n\n[..]\n\n> Just making sure we are not only seeing a patch half eaten by mail\n> transport somewhere.\n\nsure.\n\n\t-ss\n\n> >\n> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\n> > ---\n> >  git-compat-util.h | 1 +\n> >  1 file changed, 1 insertion(+)\n> >\n> > diff --git a/git-compat-util.h b/git-compat-util.h\n> > index 4e7e3f8..08a9ee2 100644\n> > --- a/git-compat-util.h\n> > +++ b/git-compat-util.h\n> > @@ -82,6 +82,7 @@\n> >  #define _ALL_SOURCE 1\n> >  #define _GNU_SOURCE 1\n> >  #define _BSD_SOURCE 1\n> > +#define _DEFAULT_SOURCE 1\n> >  #define _NETBSD_SOURCE 1\n> >  #define _SGI_SOURCE 1\n> \n"}]}