summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.i>2013-03-14 17:00:17 (GMT)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-03-15 01:20:45 (GMT)
commitd42c52e86271b102cbc2fd94a99350364393e705 (patch)
tree239637c6a46387428695e447f2b1e9f58d2ff93e
parent0b890f927fa2e377be72384d94f42d607b896c4a (diff)
Define _GNU_SOURCE at Makefile level
Provide the _GNU_SOURCE define at the CFLAGS, instead of repeating it in every source. * Makefile (CFLAGS): Add -D_GNU_SOURCE. * lib.c (_GNU_SOURCE): Remove define. * lnode.c (_GNU_SOURCE): Likewise. * main.c (_GNU_SOURCE): Likewise. * ncache.c (_GNU_SOURCE): Likewise. * netfs.c (_GNU_SOURCE): Likewise. * node.c (_GNU_SOURCE): Likewise. * options.c (_GNU_SOURCE): Likewise. * pattern.c (_GNU_SOURCE): Likewise. * stow.c (_GNU_SOURCE): Likewise. * ulfs.c (_GNU_SOURCE): Likewise. * update.c (_GNU_SOURCE): Likewise.
-rw-r--r--Makefile2
-rw-r--r--lib.c2
-rw-r--r--lnode.c2
-rw-r--r--main.c2
-rw-r--r--ncache.c2
-rw-r--r--netfs.c2
-rw-r--r--node.c2
-rw-r--r--options.c2
-rw-r--r--pattern.c2
-rw-r--r--stow.c2
-rw-r--r--ulfs.c2
-rw-r--r--update.c2
12 files changed, 1 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index 8f58759..9801dbf 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@
CPP = gcc -E -x c
MIGCOM = mig -cc cat - /dev/null
-CFLAGS += -Wall -g -O2 -D_FILE_OFFSET_BITS=64 -std=gnu99 \
+CFLAGS += -Wall -g -O2 -D_FILE_OFFSET_BITS=64 -std=gnu99 -D_GNU_SOURCE \
-DDEBUG
LDFLAGS += -lnetfs -lfshelp -liohelp -lpthread \
-lports -lihash -lshouldbeinlibc -lhurdbugaddr
diff --git a/lib.c b/lib.c
index 05c2da0..e7f3aa9 100644
--- a/lib.c
+++ b/lib.c
@@ -17,8 +17,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA. */
-#define _GNU_SOURCE
-
#include <pthread.h>
#include <error.h>
#include <dirent.h>
diff --git a/lnode.c b/lnode.c
index 10d32ca..427bc3c 100644
--- a/lnode.c
+++ b/lnode.c
@@ -20,8 +20,6 @@
/* `light node' management. See unionfs.h for an explanation of light
nodes. */
-#define _GNU_SOURCE
-
#include <pthread.h>
#include <error.h>
#include <stdlib.h>
diff --git a/main.c b/main.c
index 69a73df..bd25e30 100644
--- a/main.c
+++ b/main.c
@@ -17,8 +17,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA. */
-#define _GNU_SOURCE
-
#include <hurd/netfs.h>
#include <argp.h>
#include <argz.h>
diff --git a/ncache.c b/ncache.c
index 2ebad57..32bdda9 100644
--- a/ncache.c
+++ b/ncache.c
@@ -17,8 +17,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA. */
-#define _GNU_SOURCE
-
#include <hurd/netfs.h>
#include <error.h>
#include <stdlib.h>
diff --git a/netfs.c b/netfs.c
index 74fe8aa..974d309 100644
--- a/netfs.c
+++ b/netfs.c
@@ -18,8 +18,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA. */
-#define _GNU_SOURCE
-
#include <hurd/netfs.h>
#include <error.h>
#include <argz.h>
diff --git a/node.c b/node.c
index 6e1b849..19228f6 100644
--- a/node.c
+++ b/node.c
@@ -19,8 +19,6 @@
/* node management. */
-#define _GNU_SOURCE
-
#include <hurd/netfs.h>
#include <stdlib.h>
#include <error.h>
diff --git a/options.c b/options.c
index 37b5d4a..b1f1620 100644
--- a/options.c
+++ b/options.c
@@ -19,8 +19,6 @@
/* Argument parsing. */
-#define _GNU_SOURCE
-
#include <argp.h>
#include <error.h>
diff --git a/pattern.c b/pattern.c
index 7ec94e1..409ed23 100644
--- a/pattern.c
+++ b/pattern.c
@@ -19,8 +19,6 @@
/* Pattern list management. */
-#define _GNU_SOURCE
-
#include <hurd/netfs.h>
#include <stdlib.h>
#include <fnmatch.h>
diff --git a/stow.c b/stow.c
index fa52e66..cf6366e 100644
--- a/stow.c
+++ b/stow.c
@@ -20,8 +20,6 @@
/* Stow mode for unionfs. */
-#define _GNU_SOURCE
-
#include <argp.h>
#include <error.h>
diff --git a/ulfs.c b/ulfs.c
index c0a1464..50affa6 100644
--- a/ulfs.c
+++ b/ulfs.c
@@ -19,8 +19,6 @@
/* Underlying filesystem management. */
-#define _GNU_SOURCE
-
#include <stdlib.h>
#include <error.h>
#include <string.h>
diff --git a/update.c b/update.c
index cba9924..113b25c 100644
--- a/update.c
+++ b/update.c
@@ -20,8 +20,6 @@
/* Update thread: A clean way to solve locking issues of
root node update. */
-#define _GNU_SOURCE
-
#include <errno.h>
#include <string.h>