* Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
authorHans-Peter Nilsson <hp@axis.com>
Thu, 5 May 2005 03:42:02 +0000 (03:42 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Thu, 5 May 2005 03:42:02 +0000 (03:42 +0000)
* configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
* configure, config.in, Makefile.in: Regenerate.
* sysdep.h (stpcpy): Revert last change.

bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/config.in
bfd/configure
bfd/configure.in
bfd/sysdep.h

index 204ad1b..87ec00d 100644 (file)
@@ -1,5 +1,12 @@
 2005-05-05  Hans-Peter Nilsson  <hp@axis.com>
 
+       * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
+       * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
+       * configure, config.in, Makefile.in: Regenerate.
+       * sysdep.h (stpcpy): Revert last change.
+
+2005-05-05  Hans-Peter Nilsson  <hp@axis.com>
+
        * sysdep.h (stpcpy): Wrap declaration in parentheses.
 
 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
index 88278a8..c476a21 100644 (file)
@@ -598,7 +598,7 @@ BFD_LIBS = @bfd_libs@
 BFD_MACHINES = @bfd_machines@
 TDEFAULTS = @tdefaults@
 
-INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
+INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
 
 # C source files that correspond to .o's.
 SOURCE_CFILES = \
index e1c73a7..0043b29 100644 (file)
@@ -839,7 +839,7 @@ BFD_BACKENDS = @bfd_backends@
 BFD_LIBS = @bfd_libs@
 BFD_MACHINES = @bfd_machines@
 TDEFAULTS = @tdefaults@
-INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
+INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
 
 # C source files that correspond to .o's.
 SOURCE_CFILES = \
index b716983..6bdbb6a 100644 (file)
 /* Version number of package */
 #undef VERSION
 
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const
 
index 06e04ca..a852b86 100755 (executable)
@@ -5138,6 +5138,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+
+
 ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw"
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
index 0443d37..b27e820 100644 (file)
@@ -70,6 +70,7 @@ bfd_default_target_size=32
 # host stuff:
 
 AC_PROG_CC
+AC_GNU_SOURCE
 
 ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw"
 CY_GNU_GETTEXT
index d9469ef..a9ea6b4 100644 (file)
@@ -126,9 +126,7 @@ extern PTR realloc ();
 #endif
 
 #if !HAVE_DECL_STPCPY
-/* With glibc, not exposed without -D__USE_GNU, but some old versions
-   (2.2.5-34 on RH 7.3) still expose the macro.  */
-extern char *(stpcpy) (char *__dest, const char *__src);
+extern char *stpcpy (char *__dest, const char *__src);
 #endif
 
 #if !HAVE_DECL_STRSTR