Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] build: Use AC_USE_SYSTEM_EXTENSIONS for POSIX/C extensions
@ 2012-08-30 13:19 Anderson Lizardo
  2012-08-30 15:08 ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Anderson Lizardo @ 2012-08-30 13:19 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

Using this macro in configure.ac enables certain extensions that BlueZ
currently depends on. The macro is recommended instead of defining
_GNU_SOURCE on each C file.
---
 configure.ac      |    2 ++
 src/adapter.c     |    1 -
 src/event.c       |    1 -
 src/sdp-xml.c     |    1 -
 src/textfile.c    |    1 -
 tools/ciptool.c   |    1 -
 tools/hciattach.c |    1 -
 tools/rfcomm.c    |    1 -
 8 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7d9a34d..6c897d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,8 @@ AM_MAINTAINER_MODE
 
 PKG_PROG_PKG_CONFIG
 
+AC_USE_SYSTEM_EXTENSIONS
+
 AC_INIT_BLUEZ
 
 COMPILER_FLAGS
diff --git a/src/adapter.c b/src/adapter.c
index 50779fd..e400603 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -26,7 +26,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
diff --git a/src/event.c b/src/event.c
index 1586293..3b49dce 100644
--- a/src/event.c
+++ b/src/event.c
@@ -26,7 +26,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
diff --git a/src/sdp-xml.c b/src/sdp-xml.c
index 52df285..1aca776 100644
--- a/src/sdp-xml.c
+++ b/src/sdp-xml.c
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <ctype.h>
diff --git a/src/textfile.c b/src/textfile.c
index 9d88fbc..b6a7e1f 100644
--- a/src/textfile.c
+++ b/src/textfile.c
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <ctype.h>
diff --git a/tools/ciptool.c b/tools/ciptool.c
index edce9da..e240f38 100644
--- a/tools/ciptool.c
+++ b/tools/ciptool.c
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
diff --git a/tools/hciattach.c b/tools/hciattach.c
index d19fa33..e166730 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -27,7 +27,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
diff --git a/tools/rfcomm.c b/tools/rfcomm.c
index e8bdd0f..affdbc7 100644
--- a/tools/rfcomm.c
+++ b/tools/rfcomm.c
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-31 16:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-30 13:19 [PATCH BlueZ] build: Use AC_USE_SYSTEM_EXTENSIONS for POSIX/C extensions Anderson Lizardo
2012-08-30 15:08 ` Marcel Holtmann
2012-08-30 15:26   ` Anderson Lizardo
2012-08-30 20:02     ` Lucas De Marchi
2012-08-31 16:02       ` Marcel Holtmann
2012-08-31 16:11         ` Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox