From: Roland McGrath Date: Wed, 2 Feb 2005 04:44:57 +0000 (+0000) Subject: 2004-12-20 Dmitry V. Levin X-Git-Tag: v4.5.18~439 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=795edb11488dd47c4598e2228e3b5431de7ed46d;p=strace 2004-12-20 Dmitry V. Levin * configure.ac: Use AC_GNU_SOURCE macro instead of changing CFLAGS. * defs.h [HAVE_CONFIG_H]: Include config.h first. * strace.c: Include "defs.h" first. Fixes RH#143370. --- diff --git a/configure.ac b/configure.ac index 91000376..749b8c54 100644 --- a/configure.ac +++ b/configure.ac @@ -121,8 +121,7 @@ AM_CONDITIONAL([SVR4], [test x$opsys = xsvr4]) AM_CONDITIONAL([FREEBSD], [test x$opsys = xfreebsd]) AC_PROG_CC -dnl That set the default CFLAGS value, which we don't want to diddle first. -CFLAGS="-D_GNU_SOURCE $CFLAGS" +AC_GNU_SOURCE AC_INCLUDEDIR diff --git a/defs.h b/defs.h index fd3a3800..76ea6197 100644 --- a/defs.h +++ b/defs.h @@ -29,6 +29,10 @@ * $Id$ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef linux #include #endif @@ -40,10 +44,6 @@ # endif #endif -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - /* configuration section */ #ifndef MAX_QUALS #if defined(LINUX) && defined(MIPS) diff --git a/strace.c b/strace.c index 70efbb5c..de962969 100644 --- a/strace.c +++ b/strace.c @@ -30,9 +30,9 @@ * $Id$ */ -#include #include "defs.h" +#include #include #include #include