]> granicus.if.org Git - strace/commitdiff
2004-12-20 Dmitry V. Levin <ldv@altlinux.org>
authorRoland McGrath <roland@redhat.com>
Wed, 2 Feb 2005 04:44:57 +0000 (04:44 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 2 Feb 2005 04:44:57 +0000 (04:44 +0000)
* 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.

configure.ac
defs.h
strace.c

index 91000376221dcc4bbe10585102060a02af036a8f..749b8c54a716a558ec09497652897e89b3b53ed6 100644 (file)
@@ -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 fd3a3800ca610de3f90f117857464b6a34ea9a0b..76ea61970d79158d73c7c46a9c7d33fb37a2fef0 100644 (file)
--- a/defs.h
+++ b/defs.h
  *     $Id$
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef linux
 #include <features.h>
 #endif
 # endif
 #endif
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 /* configuration section */
 #ifndef MAX_QUALS
 #if defined(LINUX) && defined(MIPS)
index 70efbb5cd1a1a345ceb4502e34c14224df814def..de962969570dd843be47dea21d994e9f4845bf5d 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -30,9 +30,9 @@
  *     $Id$
  */
 
-#include <sys/types.h>
 #include "defs.h"
 
+#include <sys/types.h>
 #include <signal.h>
 #include <errno.h>
 #include <sys/param.h>