OSDN Git Service

build-sys: Define _GNU_SOURCE in config.h
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 5 Dec 2012 11:22:49 +0000 (09:22 -0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 5 Dec 2012 15:17:36 +0000 (17:17 +0200)
Instead of defining _GNU_SOURCE in each source file (and potentially
forgetting in some), tell the build system we use extensions and let it
define _GNU_SOURCE in config.h.

12 files changed:
configure.ac
monitor/btsnoop.c
monitor/sdp.c
profiles/input/hog_device.c
src/adapter.c
src/mgmt.c
src/sdp-xml.c
src/textfile.c
tools/btsnoop.c
tools/ciptool.c
tools/hciattach.c
tools/rfcomm.c

index c97d403..48e2817 100644 (file)
@@ -3,6 +3,7 @@ AC_INIT(bluez, 5.x)
 
 AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
 AM_CONFIG_HEADER(config.h)
+AC_USE_SYSTEM_EXTENSIONS
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
index 9f4e5f3..04a6dff 100644 (file)
@@ -26,7 +26,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
index 5812098..45ee59b 100644 (file)
@@ -26,7 +26,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 8fdc3c6..a873eac 100644 (file)
@@ -27,7 +27,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdlib.h>
 #include <stdbool.h>
 #include <errno.h>
index 658e83a..c313503 100644 (file)
@@ -26,7 +26,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
index 95b7433..81b0494 100644 (file)
@@ -26,7 +26,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
index 32eeaea..7d5f626 100644 (file)
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <ctype.h>
index 9d88fbc..b6a7e1f 100644 (file)
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <ctype.h>
index 0a01adf..dcb4a26 100644 (file)
@@ -26,7 +26,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
index edce9da..e240f38 100644 (file)
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
index 09aed24..e1e80af 100644 (file)
@@ -27,7 +27,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
index e8bdd0f..affdbc7 100644 (file)
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>