From: Hans-Peter Nilsson Date: Thu, 5 May 2005 03:42:02 +0000 (+0000) Subject: * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a2a2686740b09cb3a7e2947f08ba8d638949329;p=binutils-gdb.git * 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 204ad1b302f..87ec00da0af 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2005-05-05 Hans-Peter Nilsson + + * 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 * sysdep.h (stpcpy): Wrap declaration in parentheses. diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 88278a87372..c476a21473b 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -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 = \ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index e1c73a7332e..0043b297f4d 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -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 = \ diff --git a/bfd/config.in b/bfd/config.in index b716983b91c..6bdbb6aa2a1 100644 --- a/bfd/config.in +++ b/bfd/config.in @@ -337,6 +337,11 @@ /* 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 diff --git a/bfd/configure b/bfd/configure index 06e04ca8376..a852b869276 100755 --- a/bfd/configure +++ b/bfd/configure @@ -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. diff --git a/bfd/configure.in b/bfd/configure.in index 0443d37d7dd..b27e8200e9e 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -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 diff --git a/bfd/sysdep.h b/bfd/sysdep.h index d9469ef0b93..a9ea6b41c94 100644 --- a/bfd/sysdep.h +++ b/bfd/sysdep.h @@ -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