diff options
author | Nick Clifton <nickc@redhat.com> | 2012-05-11 14:25:30 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2012-05-11 14:25:30 +0000 |
commit | 208a4923edd990535a9bbf73bf39a8609771aec3 (patch) | |
tree | 03814f8704619ced31086f6b9e5bd345889fab33 /opcodes | |
parent | bde24c0a34fd79fb9ee6c7a355a46917cd866d26 (diff) | |
download | gdb-208a4923edd990535a9bbf73bf39a8609771aec3.zip gdb-208a4923edd990535a9bbf73bf39a8609771aec3.tar.gz gdb-208a4923edd990535a9bbf73bf39a8609771aec3.tar.bz2 |
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.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 9 | ||||
-rw-r--r-- | opcodes/config.in | 3 | ||||
-rwxr-xr-x | opcodes/configure | 32 | ||||
-rw-r--r-- | opcodes/configure.in | 1 | ||||
-rw-r--r-- | opcodes/sysdep.h | 7 |
5 files changed, 51 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index c1cc70b..37f67a3 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -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 diff --git a/opcodes/config.in b/opcodes/config.in index fab2a51..4eec821 100644 --- a/opcodes/config.in +++ b/opcodes/config.in @@ -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 diff --git a/opcodes/configure b/opcodes/configure index ec74346..1613ae0 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -12089,6 +12089,38 @@ fi 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 : diff --git a/opcodes/configure.in b/opcodes/configure.in index 999379a..1d3f2d9 100644 --- a/opcodes/configure.in +++ b/opcodes/configure.in @@ -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]) diff --git a/opcodes/sysdep.h b/opcodes/sysdep.h index 2ca3935..91c53ca 100644 --- a/opcodes/sysdep.h +++ b/opcodes/sysdep.h @@ -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. @@ -35,6 +35,10 @@ #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); |