]> git.puffer.fish Git - mirror/frr.git/commitdiff
[autoconf] GNU_SOURCE can be defined twice, through AC_FUNC_STRNLEN
authorPaul Jakma <paul.jakma@sun.com>
Thu, 10 May 2007 16:53:04 +0000 (16:53 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Thu, 10 May 2007 16:53:04 +0000 (16:53 +0000)
2007-05-10 Paul Jakma <paul.jakma@sun.com>

* configure.ac: Use AC_GNU_SOURCE to define _GNU_SOURCE, rather
  than having lib/zebra.h do it.
  AC_FUNC_STRNLEN has side-effects with latest autoconf, use
  AC_CHECK_FUNC on strnlen instead.
* lib/zebra.h: Don't try define _GNU_SOURCE, autoconf should do it.

ChangeLog
configure.ac
lib/ChangeLog
lib/zebra.h

index 9d90f51899e64624a81a782453d4899cc80b20a2..4de8e87e6123cffa37c7a3fc84644ab356173fcd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 
        * configure.ac: Add back check for inet_aton, which got dropped
          somehow in previous jumbo patch.
+         Use AC_GNU_SOURCE to define _GNU_SOURCE, rather than having
+         lib/zebra.h do it.
+         AC_FUNC_STRNLEN has side-effects with latest autoconf, use 
+         AC_CHECK_FUNC on strnlen instead.
 
 2007-05-09 Paul Jakma <paul.jakma@sun.com>
 
index f4966d80612b0195ff922eaf814a823fa0076136..fe127a477855531394aab5e20234f70d6d4c25d7 100755 (executable)
@@ -163,10 +163,11 @@ AC_CACHE_CHECK([if ${MAKE-make} is GNU make], [quagga_cv_gnu_make],
        ]
 )
 
-dnl ---------
-dnl AIX check
-dnl ---------
+dnl -----------------
+dnl System extensions
+dnl -----------------
 AC_AIX
+AC_GNU_SOURCE
 
 dnl -------
 dnl libtool
@@ -640,7 +641,10 @@ AC_FUNC_REALLOC
 AC_FUNC_STAT
 AC_FUNC_SELECT_ARGTYPES
 AC_FUNC_STRFTIME
-AC_FUNC_STRNLEN
+dnl Avoid AC_FUNC_STRNLEN because it pulls in AC_SYSTEM_EXTENSIONS which
+dnl can lead to strange side effects.  So we just check for strnlen
+dnl directly, see below.
+dnlAC_FUNC_STRNLENdnl
 AC_FUNC_VPRINTF
 
 dnl -------------------------------
@@ -665,7 +669,7 @@ dnl ---------------
 dnl other functions
 dnl ---------------
 AC_CHECK_FUNCS([dup2 ftruncate getcwd gethostbyname getpagesize gettimeofday \
-       inet_ntoa inet_aton \
+       inet_ntoa inet_aton strnlen \
        memchr memmove memset select socket \
        strcasecmp strchr strcspn strdup strerror \
        strncasecmp strndup strrchr strspn strstr \
index 5666cbad7e4481891143b45436200d9ef40434cd..4360c8332c4fbf375468e10b75624305262f9e0d 100644 (file)
@@ -1,3 +1,7 @@
+2007-05-10 Paul Jakma <paul.jakma@sun.com>
+
+       * zebra.h: Don't try define _GNU_SOURCE, autoconf should do it.
+
 2007-05-03 Paul Jakma <paul.jakma@sun.com>
 
        * memtypes.c: Add MTYPE_ATTR_EXTRA and MTYPE_BGP_ROUTE_EXTRA
index 3c01aec3a9413cd95d162f11443a8d171fe3c361..2451dbed5b88e42d6c34764acef50d302d085c45 100644 (file)
@@ -25,10 +25,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef GNU_LINUX
-#define _GNU_SOURCE
-#endif /* GNU_LINUX */
-
 #ifdef SUNOS_5
 #define _XPG4_2
 #define __EXTENSIONS__