From 2c671f66e28ac079ae1148f5135c9a52129cc807 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 9 Apr 2015 00:31:26 +0000 Subject: [PATCH 1/1] add _DEFAULT_SOURCE wherever _BSD_SOURCE was used --- src/functional/string.c | 3 ++- src/math/j0.c | 1 + src/math/j0f.c | 1 + src/math/j1.c | 1 + src/math/j1f.c | 1 + src/math/jnf.c | 1 + src/math/lgamma.c | 1 + src/math/lgamma_r.c | 1 + src/math/lgammaf.c | 1 + src/math/lgammaf_r.c | 1 + src/math/lgammal.c | 1 + src/math/scalb.c | 1 + src/math/scalbf.c | 1 + src/math/y0.c | 1 + src/math/y0f.c | 1 + src/math/y1.c | 1 + src/math/y1f.c | 1 + src/math/yn.c | 1 + src/regression/daemon-failure.c | 1 + src/regression/dn_expand-empty.c | 3 ++- src/regression/dn_expand-ptr-0.c | 3 ++- src/regression/mkdtemp-failure.c | 1 + src/regression/mkstemp-failure.c | 1 + 23 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/functional/string.c b/src/functional/string.c index 1d159f4..682a1c7 100644 --- a/src/functional/string.c +++ b/src/functional/string.c @@ -1,4 +1,5 @@ -#define _BSD_SOURCE +#define _DEFAULT_SOURCE 1 +#define _BSD_SOURCE 1 #include #include #include "test.h" diff --git a/src/math/j0.c b/src/math/j0.c index f937ab4..7a455ea 100644 --- a/src/math/j0.c +++ b/src/math/j0.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _XOPEN_SOURCE 700 #include diff --git a/src/math/j0f.c b/src/math/j0f.c index 18a8463..c8af0b7 100644 --- a/src/math/j0f.c +++ b/src/math/j0f.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/j1.c b/src/math/j1.c index 677dc2d..76af0a3 100644 --- a/src/math/j1.c +++ b/src/math/j1.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _XOPEN_SOURCE 700 #include diff --git a/src/math/j1f.c b/src/math/j1f.c index 17119ae..38e6ab9 100644 --- a/src/math/j1f.c +++ b/src/math/j1f.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/jnf.c b/src/math/jnf.c index 5bdf52f..c595d4c 100644 --- a/src/math/jnf.c +++ b/src/math/jnf.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/lgamma.c b/src/math/lgamma.c index 381e2d3..8de729f 100644 --- a/src/math/lgamma.c +++ b/src/math/lgamma.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _XOPEN_SOURCE 700 #include diff --git a/src/math/lgamma_r.c b/src/math/lgamma_r.c index 0324815..d9fa1ac 100644 --- a/src/math/lgamma_r.c +++ b/src/math/lgamma_r.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/lgammaf.c b/src/math/lgammaf.c index d20176b..6789717 100644 --- a/src/math/lgammaf.c +++ b/src/math/lgammaf.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _XOPEN_SOURCE 700 #include diff --git a/src/math/lgammaf_r.c b/src/math/lgammaf_r.c index 278bfcf..301b7b5 100644 --- a/src/math/lgammaf_r.c +++ b/src/math/lgammaf_r.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/lgammal.c b/src/math/lgammal.c index 9050913..5a95266 100644 --- a/src/math/lgammal.c +++ b/src/math/lgammal.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _XOPEN_SOURCE 700 #include diff --git a/src/math/scalb.c b/src/math/scalb.c index 901b20c..4346cf5 100644 --- a/src/math/scalb.c +++ b/src/math/scalb.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/scalbf.c b/src/math/scalbf.c index 309ff8d..f042058 100644 --- a/src/math/scalbf.c +++ b/src/math/scalbf.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/y0.c b/src/math/y0.c index 6684822..7470c43 100644 --- a/src/math/y0.c +++ b/src/math/y0.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _XOPEN_SOURCE 700 #include diff --git a/src/math/y0f.c b/src/math/y0f.c index cbe22b8..7bd78a6 100644 --- a/src/math/y0f.c +++ b/src/math/y0f.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/y1.c b/src/math/y1.c index 6bf5135..8af2a17 100644 --- a/src/math/y1.c +++ b/src/math/y1.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _XOPEN_SOURCE 700 #include diff --git a/src/math/y1f.c b/src/math/y1f.c index 6c9ab8a..41afb3a 100644 --- a/src/math/y1f.c +++ b/src/math/y1f.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _GNU_SOURCE 1 #include diff --git a/src/math/yn.c b/src/math/yn.c index 29eda08..3ac3214 100644 --- a/src/math/yn.c +++ b/src/math/yn.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #define _XOPEN_SOURCE 700 #include diff --git a/src/regression/daemon-failure.c b/src/regression/daemon-failure.c index 2cd9c3f..275d635 100644 --- a/src/regression/daemon-failure.c +++ b/src/regression/daemon-failure.c @@ -4,6 +4,7 @@ // daemon should not fork in case of failure of chdir or open, but // since setsid and fork may still fail after fork this behaviour // is not very useful +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #include #include diff --git a/src/regression/dn_expand-empty.c b/src/regression/dn_expand-empty.c index 8ff2670..2afe634 100644 --- a/src/regression/dn_expand-empty.c +++ b/src/regression/dn_expand-empty.c @@ -1,5 +1,6 @@ // dn_expand should accept empty name (single \0) -#define _BSD_SOURCE +#define _DEFAULT_SOURCE 1 +#define _BSD_SOURCE 1 #include #include "test.h" diff --git a/src/regression/dn_expand-ptr-0.c b/src/regression/dn_expand-ptr-0.c index beca2d3..cb19557 100644 --- a/src/regression/dn_expand-ptr-0.c +++ b/src/regression/dn_expand-ptr-0.c @@ -1,5 +1,6 @@ // dn_expand should handle offset pointer to 0 byte -#define _BSD_SOURCE +#define _DEFAULT_SOURCE 1 +#define _BSD_SOURCE 1 #include #include #include "test.h" diff --git a/src/regression/mkdtemp-failure.c b/src/regression/mkdtemp-failure.c index 61d7ae6..fa54c13 100644 --- a/src/regression/mkdtemp-failure.c +++ b/src/regression/mkdtemp-failure.c @@ -2,6 +2,7 @@ // commit: 382584724308442f03f3d29f7fc6de9e9d140982 2011-06-12 // commit: c4685ae429a0cce4b285859d62a71fe603f0a864 2013-08-02 // mkdtemp should return -1 on bad template +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #include #include diff --git a/src/regression/mkstemp-failure.c b/src/regression/mkstemp-failure.c index 762f1fc..5afec5f 100644 --- a/src/regression/mkstemp-failure.c +++ b/src/regression/mkstemp-failure.c @@ -1,6 +1,7 @@ // commit: 2e6239dd064d201c6e1b0f589bae9ff27949d2eb 2011-02-19 // commit: 382584724308442f03f3d29f7fc6de9e9d140982 2011-06-12 // mkstemp should return -1 on bad template +#define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #include #include -- 2.20.1