From 6eaa49faddeef5ec086ad7c58e0cd591fb4400dc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Apr 2009 18:51:12 +0100 Subject: [PATCH] Use AC_GNU_SOURCE in daemon. Don't need _GNU_SOURCE in C files any more. --- daemon/configure.ac | 3 +++ daemon/file.c | 2 -- daemon/stubs.c | 2 +- daemon/tune2fs.c | 2 -- src/generator.ml | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/daemon/configure.ac b/daemon/configure.ac index e8aebc9..e0ff7ce 100644 --- a/daemon/configure.ac +++ b/daemon/configure.ac @@ -33,6 +33,9 @@ AC_ARG_ENABLE([debug-command], [AC_DEFINE_UNQUOTED([ENABLE_DEBUG_COMMAND],[1],[Enable the 'debug' command])], []) +dnl For strchrnul(3), asprintf(3), futimens(2) and getline(3). +AC_GNU_SOURCE + dnl Check for basic C environment. AC_PROG_CC AC_PROG_INSTALL diff --git a/daemon/file.c b/daemon/file.c index 2439833..f910b94 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -18,8 +18,6 @@ #include -#define _GNU_SOURCE /* for futimens(2) and getline(3) */ - #include #include #include diff --git a/daemon/stubs.c b/daemon/stubs.c index 526a861..e51349a 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -19,7 +19,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE // for strchrnul +#include #include #include diff --git a/daemon/tune2fs.c b/daemon/tune2fs.c index adf2a98..742a7d9 100644 --- a/daemon/tune2fs.c +++ b/daemon/tune2fs.c @@ -18,8 +18,6 @@ #include -#define _GNU_SOURCE // for strchrnul - #include #include #include diff --git a/src/generator.ml b/src/generator.ml index d2be559..29b0ecd 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2560,7 +2560,7 @@ and generate_daemon_actions_h () = and generate_daemon_actions () = generate_header CStyle GPLv2; - pr "#define _GNU_SOURCE // for strchrnul\n"; + pr "#include \n"; pr "\n"; pr "#include \n"; pr "#include \n"; -- 1.8.3.1