PR binutils/14028
authorNick Clifton <nickc@redhat.com>
Fri, 11 May 2012 14:25:30 +0000 (14:25 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 11 May 2012 14:25:30 +0000 (14:25 +0000)
* configure.in: Invoke ACX_HEADER_STRING.
* configure: Regenerate.
* config.in: Regenerate.
* sysdep.h: If STRINGS_WITH_STRING is defined then include both
string.h and strings.h.

18 files changed:
binutils/ChangeLog
binutils/configure
binutils/configure.in
binutils/sysdep.h
gas/ChangeLog
gas/as.h
gas/configure
gas/configure.in
ld/ChangeLog
ld/config.in
ld/configure
ld/configure.in
ld/sysdep.h
opcodes/ChangeLog
opcodes/config.in
opcodes/configure
opcodes/configure.in
opcodes/sysdep.h

index c5b85c065c08a7da6d8dbcbd1887aedb371ab611..f620fe02a6c8fe19171f466f0241f61477e9d4bb 100644 (file)
@@ -1,12 +1,21 @@
+2012-05-11  Daniel Richard G.  <skunk@iskunk.org>
+
+       PR binutils/14028
+       * configure.in: Invoke ACX_HEADER_STRING.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+       * sysdep.h: If STRINGS_WITH_STRING is defined then include both
+       string.h and strings.h.
+
 2012-05-10  Jakub Jelinek  <jakub@redhat.com>
 
        * dwarf.c (read_and_display_attr_value): Don't look up tag from
        abbrev for DW_FORM_ref_addr.
 
 2012-05-08  Sean Keys  <skeys@ipdatasys.com>
-       
+
        * binutils/MAINTAINERS: Added my entry to the maintainers secion.
+
 2012-05-08  Cary Coutant  <ccoutant@google.com>
 
        * doc/binutils.texi (objcopy): Add --strip-dwo, --extract-dwo options.
index 656918125f5aa476573025c241bdc2be51540139..e7f03c5f13f114168bdaf0839006ae6a6ff4fcba 100755 (executable)
@@ -12491,6 +12491,7 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
 
 fi
 
+ACX_HEADER_STRING
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
index 9ba8c77723d076c9360cf979d3db9cbe8bf81c05..0d037428c9c94563a623183cdbd8a7356497a8e6 100644 (file)
@@ -91,6 +91,7 @@ AC_SUBST(DEMANGLER_NAME)
 
 AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h)
 AC_HEADER_SYS_WAIT
+ACX_HEADER_STRING
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll setlocale)
 AC_CHECK_FUNC([mkstemp],
index 0e1d502fcdc72cf937acec413cfbbcf713651d01..5164e791c55c790448d4cdf0e09fdf2f1fb77c65 100644 (file)
@@ -46,6 +46,10 @@ extern int errno;
 #include <unistd.h>
 #endif
 
+#ifdef STRING_WITH_STRINGS
+#include <string.h>
+#include <strings.h>
+#else
 #ifdef HAVE_STRING_H
 #include <string.h>
 #else
@@ -56,6 +60,7 @@ extern char *strchr ();
 extern char *strrchr ();
 #endif
 #endif
+#endif
 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
index 82ef7b7dee00f97644073208ee1e3ec1ce68d89c..5eb6d0ae6a89618efaad5d8229ffc33cd37fe60f 100644 (file)
@@ -1,3 +1,12 @@
+2012-05-11  Daniel Richard G.  <skunk@iskunk.org>
+
+       PR binutils/14028
+       * configure.in: Invoke ACX_HEADER_STRING.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+       * as.h: If STRINGS_WITH_STRING is defined then include both
+       string.h and strings.h.
+
 2012-05-11  Georg-Johann Lay  <avr@gjlay.de
 
        PR target/13503
index 5408e1a96e7f5204431f6a7d05e8a48b6c2dca48..f2214e8135e64296c5ac2faac36594146bb09105 100644 (file)
--- a/gas/as.h
+++ b/gas/as.h
@@ -1,6 +1,6 @@
 /* as.h - global header file
    Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
 /* System include files first...  */
 #include <stdio.h>
+
+#ifdef STRING_WITH_STRINGS
+#include <string.h>
+#include <strings.h>
+#else
 #ifdef HAVE_STRING_H
 #include <string.h>
 #else
@@ -49,6 +54,8 @@
 #include <strings.h>
 #endif
 #endif
+#endif
+
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
index 9f81627c1261eb5ab1a28a12cc210034c51bbc83..c20a890ea35287cbaca04ee8dbd764de08183fdf 100755 (executable)
@@ -13180,6 +13180,7 @@ fi
 
 done
 
+ACX_HEADER_STRING
 
 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
 # people who are not cross-compiling but are compiling cross-assemblers.
index 618095cce20a65f64df52287c6e315eee47f99fc..280fc701fe81e646ae22dba2a0d62685999149e4 100644 (file)
@@ -634,6 +634,7 @@ AM_CONDITIONAL(GENINSRC_NEVER, false)
 AC_EXEEXT
 
 AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h errno.h sys/types.h limits.h locale.h time.h sys/stat.h)
+ACX_HEADER_STRING
 
 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
 # people who are not cross-compiling but are compiling cross-assemblers.
index fb6392cc8bd7d46faedc2d3e0aeaf168f7f6f48d..7c1aef675446be295c77cc860e076488de3e2aba 100644 (file)
@@ -1,3 +1,12 @@
+2012-05-11  Daniel Richard G.  <skunk@iskunk.org>
+
+       PR binutils/14028
+       * configure.in: Invoke ACX_HEADER_STRING.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+       * sysdep.h: If STRINGS_WITH_STRING is defined then include both
+       string.h and strings.h.
+
 2012-05-08  Alan Modra  <amodra@gmail.com>
 
        * Makefile.am (check_DEJAGNU): Export LC_ALL=C in place of other
index 0a3219e4c0dde08b341665d3c9cce20d4708768a..bb4f5fa5168ad79f29003a2ae7db770f4a54c3b6 100644 (file)
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* Define if you can safely include both <string.h> and <strings.h>. */
+#undef STRING_WITH_STRINGS
+
 /* Use b modifier when opening binary files? */
 #undef USE_BINARY_FOPEN
 
index d0876051d0e51a37f923d972a73c7e95c4921d30..85e78ef5aad3cd97aa287dd6585a9d005e2a0c1a 100755 (executable)
 
 done
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
+$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
+if test "${gcc_cv_header_string+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+#include <strings.h>
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gcc_cv_header_string=yes
+else
+  gcc_cv_header_string=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5
+$as_echo "$gcc_cv_header_string" >&6; }
+if test $gcc_cv_header_string = yes; then
+
+$as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h
+
+fi
+
 for ac_func in glob mkstemp realpath sbrk setlocale waitpid
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
index b29923ccc89e877c1e7125df7a125a7e611b6992..160a060e6dbf807f6cd651eed24ee3ec5c272a2e 100644 (file)
@@ -164,6 +164,7 @@ AC_SUBST(NATIVE_LIB_DIRS)
 
 AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h elf-hints.h limits.h locale.h sys/param.h)
 AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h)
+ACX_HEADER_STRING
 AC_CHECK_FUNCS(glob mkstemp realpath sbrk setlocale waitpid)
 AC_CHECK_FUNCS(open lseek close)
 AC_HEADER_DIRENT
index b7d5b88a857bf3053127053c5a3dc0898fcf452d..eadee88217a2c0bd202d37552d12718865ea489d 100644 (file)
@@ -1,5 +1,5 @@
 /* sysdep.h -- handle host dependencies for the GNU linker
-   Copyright 1995, 1996, 1997, 1999, 2002, 2003, 2005, 2007
+   Copyright 1995, 1996, 1997, 1999, 2002, 2003, 2005, 2007, 2012
    Free Software Foundation, Inc.
 
    This file is part of the GNU Binutils.
 #include <sys/stat.h>
 #include <stdarg.h>
 
+#ifdef STRING_WITH_STRINGS
+#include <string.h>
+#include <strings.h>
+#else
 #ifdef HAVE_STRING_H
 #include <string.h>
 #else
@@ -39,6 +43,7 @@ extern char *strchr ();
 extern char *strrchr ();
 #endif
 #endif
+#endif
 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
index c1cc70b6c38eedb4527c5ff0650c87b1bd025e63..37f67a3f41693c57a22cd3908e6962d13f12a4d5 100644 (file)
@@ -1,3 +1,12 @@
+2012-05-11  Daniel Richard G.  <skunk@iskunk.org>
+
+       PR binutils/14028
+       * configure.in: Invoke ACX_HEADER_STRING.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+       * sysdep.h: If STRINGS_WITH_STRING is defined then include both
+       string.h and strings.h.
+
 2012-05-11  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/14006
index fab2a5120f603a5d692544ac28f786df39e23dfc..4eec821b30b4ac8e7d70acf60ad02912c436ceba 100644 (file)
@@ -73,6 +73,9 @@
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* Define if you can safely include both <string.h> and <strings.h>. */
+#undef STRING_WITH_STRINGS
+
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
index ec7434683e83c22af3a33dd26c1a6853206d5711..1613ae055e3b77f258c1edc6dabb94bc9dca1059 100755 (executable)
 
 done
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
+$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
+if test "${gcc_cv_header_string+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+#include <strings.h>
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gcc_cv_header_string=yes
+else
+  gcc_cv_header_string=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5
+$as_echo "$gcc_cv_header_string" >&6; }
+if test $gcc_cv_header_string = yes; then
+
+$as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h
+
+fi
+
 
 ac_fn_c_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default"
 if test "x$ac_cv_have_decl_basename" = x""yes; then :
index 999379a3b25f377d7777be5852f7d2639d5a559b..1d3f2d9ca687a42cf68fef5f4770f93a1670317a 100644 (file)
@@ -67,6 +67,7 @@ AC_SUBST(HDEFINES)
 AC_PROG_INSTALL
 
 AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h)
+ACX_HEADER_STRING
 
 AC_CHECK_DECLS([basename, stpcpy])
 
index 2ca393506752481b9f699d2650fa910164cb8dac..91c53ca9c9f67e0aedcf26589b1218599499b625 100644 (file)
@@ -1,5 +1,5 @@
 /* Random host-dependent support code.
-   Copyright 1995, 1997, 2000, 2005, 2007 Free Software Foundation, Inc.
+   Copyright 1995, 1997, 2000, 2005, 2007, 2012 Free Software Foundation, Inc.
    Written by Ken Raeburn.
 
    This file is part of the GNU opcodes library.
 #include <stdlib.h>
 #endif
 
+#ifdef STRING_WITH_STRINGS
+#include <string.h>
+#include <strings.h>
+#else
 #ifdef HAVE_STRING_H
 #include <string.h>
 #else
@@ -42,6 +46,7 @@
 #include <strings.h>
 #endif
 #endif
+#endif
 
 #if !HAVE_DECL_STPCPY
 extern char *stpcpy (char *__dest, const char *__src);
This page took 0.046199 seconds and 4 git commands to generate.