git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat-util: add _DEFAULT_SOURCE define
@ 2014-09-14  5:33 Sergey Senozhatsky
  2014-09-15 19:02 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2014-09-14  5:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Sergey Senozhatsky

glibc has deprecated the use of _BSD_SOURCE define

  warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

To make it easier to maintain a cross platform source code, that
warning can be suppressed by _DEFAULT_SOURCE.

Define both _BSD_SOURCE, _DEFAULT_SOURCE and cleanup the build.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
 git-compat-util.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/git-compat-util.h b/git-compat-util.h
index 4e7e3f8..08a9ee2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -82,6 +82,7 @@
 #define _ALL_SOURCE 1
 #define _GNU_SOURCE 1
 #define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
 #define _NETBSD_SOURCE 1
 #define _SGI_SOURCE 1
 
-- 
2.1.0.350.g8b25fe0

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

end of thread, other threads:[~2014-09-17  3:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-14  5:33 [PATCH] compat-util: add _DEFAULT_SOURCE define Sergey Senozhatsky
2014-09-15 19:02 ` Junio C Hamano
2014-09-17  3:54   ` Sergey Senozhatsky

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