Use AC_GNU_SOURCE in daemon. Don't need _GNU_SOURCE in C files any more.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 23 Apr 2009 17:51:12 +0000 (18:51 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 23 Apr 2009 17:51:12 +0000 (18:51 +0100)
daemon/configure.ac
daemon/file.c
daemon/stubs.c
daemon/tune2fs.c
src/generator.ml

index e8aebc9..e0ff7ce 100644 (file)
@@ -33,6 +33,9 @@ AC_ARG_ENABLE([debug-command],
   [AC_DEFINE_UNQUOTED([ENABLE_DEBUG_COMMAND],[1],[Enable the '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
 dnl Check for basic C environment.
 AC_PROG_CC
 AC_PROG_INSTALL
index 2439833..f910b94 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <config.h>
 
 
 #include <config.h>
 
-#define _GNU_SOURCE            /* for futimens(2) and getline(3) */
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 526a861..e51349a 100644 (file)
@@ -19,7 +19,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE // for strchrnul
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
index adf2a98..742a7d9 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <config.h>
 
 
 #include <config.h>
 
-#define _GNU_SOURCE // for strchrnul
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index d2be559..29b0ecd 100755 (executable)
@@ -2560,7 +2560,7 @@ and generate_daemon_actions_h () =
 and generate_daemon_actions () =
   generate_header CStyle GPLv2;
 
 and generate_daemon_actions () =
   generate_header CStyle GPLv2;
 
-  pr "#define _GNU_SOURCE // for strchrnul\n";
+  pr "#include <config.h>\n";
   pr "\n";
   pr "#include <stdio.h>\n";
   pr "#include <stdlib.h>\n";
   pr "\n";
   pr "#include <stdio.h>\n";
   pr "#include <stdlib.h>\n";