[avahi] -D _GNU_SOURCE or AC_GNU_SOURCE

Sebastien Estienne sebastien.estienne at gmail.com
Thu Jun 30 17:12:50 PDT 2005


hello, i propose to use AC_GNU_SOURCE instead of -D _GNU_SOURCE
it adds the following in config.h:
/* Enable GNU extensions on systems that have them.  */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif

if you can validate that it's ok to use it, i would commit.

Index: avahi-dnsconfd/Makefile.am
===================================================================
--- avahi-dnsconfd/Makefile.am  (revision 158)
+++ avahi-dnsconfd/Makefile.am  (working copy)
@@ -21,7 +21,6 @@

 AM_CFLAGS= \
        -I$(top_srcdir) \
-       -D_GNU_SOURCE \
        -DAVAHI_DNSCONF_SCRIPT=\"$(pkgsysconfdir)/dnsconf.action\"

 # GLIB 2.0
Index: avahi-daemon/Makefile.am
===================================================================
--- avahi-daemon/Makefile.am    (revision 158)
+++ avahi-daemon/Makefile.am    (working copy)
@@ -22,7 +22,6 @@

 AM_CFLAGS= \
        -I$(top_srcdir) \
-       -D_GNU_SOURCE \
        -DAVAHI_SERVICE_DIRECTORY=\"$(servicedir)\" \
        -DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi.conf\"

Index: configure.ac
===================================================================
--- configure.ac        (revision 158)
+++ configure.ac        (working copy)
@@ -35,6 +35,7 @@

 # Checks for programs.
 AC_PROG_CC
+AC_GNU_SOURCE
 AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_LN_S
Index: avahi-client/Makefile.am
===================================================================
--- avahi-client/Makefile.am    (revision 157)
+++ avahi-client/Makefile.am    (working copy)
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.

-AM_CFLAGS=-I$(top_srcdir) -D_GNU_SOURCE
+AM_CFLAGS=-I$(top_srcdir)

 # GLIB 2.0
 AM_CFLAGS+=$(GLIB20_CFLAGS)
Index: avahi-discover/Makefile.am
===================================================================
--- avahi-discover/Makefile.am  (revision 157)
+++ avahi-discover/Makefile.am  (working copy)
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.

-AM_CFLAGS=-I$(top_srcdir) -D_GNU_SOURCE
+AM_CFLAGS=-I$(top_srcdir)

 AM_CFLAGS+=$(GLIB20_CFLAGS) $(GTK20_CFLAGS) $(GLADE20_CFLAGS)
 AM_LDADD=$(GLIB20_LIBS) $(GTK20_LIBS) $(GLADE20_LIBS)
Index: avahi-common/Makefile.am
===================================================================
--- avahi-common/Makefile.am    (revision 157)
+++ avahi-common/Makefile.am    (working copy)
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.

-AM_CFLAGS=-I$(top_srcdir) -D_GNU_SOURCE
+AM_CFLAGS=-I$(top_srcdir)

 # GLIB 2.0
 AM_CFLAGS+=$(GLIB20_CFLAGS)
Index: avahi-core/Makefile.am
===================================================================
--- avahi-core/Makefile.am      (revision 157)
+++ avahi-core/Makefile.am      (working copy)
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.

-AM_CFLAGS=-I$(top_srcdir) -D_GNU_SOURCE
+AM_CFLAGS=-I$(top_srcdir)

 # GLIB 2.0
 AM_CFLAGS+=$(GLIB20_CFLAGS)

-- 
Sebastien Estienne


More information about the avahi mailing list