Use AC_GNU_SOURCE in daemon. Don't need _GNU_SOURCE in C files any more.

This commit is contained in:
Richard W.M. Jones
2009-04-23 18:51:12 +01:00
parent b189610555
commit 6eaa49fadd
5 changed files with 5 additions and 6 deletions

View File

@@ -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

View File

@@ -18,8 +18,6 @@
#include <config.h>
#define _GNU_SOURCE /* for futimens(2) and getline(3) */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -19,7 +19,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#define _GNU_SOURCE // for strchrnul
#include <config.h>
#include <stdio.h>
#include <stdlib.h>

View File

@@ -18,8 +18,6 @@
#include <config.h>
#define _GNU_SOURCE // for strchrnul
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View File

@@ -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 <config.h>\n";
pr "\n";
pr "#include <stdio.h>\n";
pr "#include <stdlib.h>\n";