Rely on the autoconf AC_USE_SYSTEM_EXTENSIONS macro so set whatever macros are required for each specific system, instead of hardcoding a list ourselves.
We do not remove the _XOPEN_SOURCE=600 macro, as this is not being set by the autoconf macro, and if it is set it would currently take a value of 500. --- configure.in | 4 +++- gwlib/gw_uuid.c | 8 -------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/configure.in b/configure.in index af8b6961..0a402430 100644 --- a/configure.in +++ b/configure.in @@ -85,6 +85,8 @@ AC_SUBST(GW_VERSION) AC_CONFIG_SECTION([Configuring for Kannel gateway version $VERSION]) +AC_USE_SYSTEM_EXTENSIONS + AM_INIT_AUTOMAKE(Kannel,$VERSION) AC_LANG_C AC_DISABLE_STATIC @@ -145,7 +147,7 @@ case "$host" in #LIBTOOL="libtool -static -o" ;; *-linux-*) - CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE" + CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600" LDFLAGS="$LDFLAGS -rdynamic" ;; *-*-openbsd* | *-*-freebsd*) diff --git a/gwlib/gw_uuid.c b/gwlib/gw_uuid.c index 102cb502..af429652 100644 --- a/gwlib/gw_uuid.c +++ b/gwlib/gw_uuid.c @@ -9,14 +9,6 @@ * %End-Header% */ -/* - * Force inclusion of SVID stuff since we need it if we're compiling in - * gcc-wall wall mode - */ -#ifndef _SVID_SOURCE -#define _SVID_SOURCE -#endif - #include "gw-config.h" #ifdef HAVE_UNISTD_H -- 2.43.0