From d42c52e86271b102cbc2fd94a99350364393e705 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 14 Mar 2013 18:00:17 +0100 Subject: 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. --- Makefile | 2 +- lib.c | 2 -- lnode.c | 2 -- main.c | 2 -- ncache.c | 2 -- netfs.c | 2 -- node.c | 2 -- options.c | 2 -- pattern.c | 2 -- stow.c | 2 -- ulfs.c | 2 -- update.c | 2 -- 12 files changed, 1 insertion(+), 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 #include #include 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 #include #include 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 #include #include 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 #include #include 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 #include #include 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 #include #include 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 #include 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 #include #include 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 #include 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 #include #include 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 #include -- cgit v1.2.3