build: don't define _GNU_SOURCE manually

Now that we're using gnulib in earnest, any manual definition
would provoke a redefinition warning.
* fish/fish.c (_GNU_SOURCE): Don't define.
* fish/destpaths.c (_GNU_SOURCE): Likewise.
* src/guestfs.c (_GNU_SOURCE): Likewise.
* bootstrap (modules): Add asprintf, strchrnul, strerror, strndup
and vasprintf.
* fish/fish.c (main): Set argv[0] to sanitized program_name, so
functions like getopt_long that use argv[0] use the clean name.
This commit is contained in:
Jim Meyering
2009-08-21 19:44:36 +02:00
parent b9a691af0f
commit 8817709009
4 changed files with 6 additions and 6 deletions

View File

@@ -50,6 +50,7 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
(cd daemon && mkdir -p tests lib && ../$gnulib_tool --update)
modules='
asprintf
closeout
gitlog-to-changelog
gnu-make
@@ -58,8 +59,12 @@ ignore-value
maintainer-makefile
manywarnings
progname
warnings
strchrnul
strerror
strndup
vasprintf
vc-list-files
warnings
'
$gnulib_tool \

View File

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

View File

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

View File

@@ -19,7 +19,6 @@
#include <config.h>
#define _BSD_SOURCE /* for mkdtemp, usleep */
#define _GNU_SOURCE /* for vasprintf, GNU strerror_r, strchrnul */
#include <stdio.h>
#include <stdlib.h>