diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-03-03 14:14:35 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-03-06 11:42:30 +1030 |
commit | 1f5345a614203185f7fdacbf4b000d2676de26dd (patch) | |
tree | 67228625c61b837baa2e0f176eabf2589445eb51 | |
parent | 62e755d208d7359e722a248df3e74278779272c8 (diff) | |
download | gdb-1f5345a614203185f7fdacbf4b000d2676de26dd.zip gdb-1f5345a614203185f7fdacbf4b000d2676de26dd.tar.gz gdb-1f5345a614203185f7fdacbf4b000d2676de26dd.tar.bz2 |
binutils: Fix warning on platforms that don't have asprintf
* configure.ac (AC_CHECK_DECLS): Add asprintf.
* config.in: Regenerate.
* configure: Regenerate.
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/config.in | 4 | ||||
-rwxr-xr-x | binutils/configure | 10 | ||||
-rw-r--r-- | binutils/configure.ac | 2 |
4 files changed, 21 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4ed3bb0..4e3f78a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2017-03-06 Sam Thursfield <sam.thursfield@codethink.co.uk> + + * configure.ac (AC_CHECK_DECLS): Add asprintf. + * config.in: Regenerate. + * configure: Regenerate. + 2017-03-02 Nick Clifton <nickc@redhat.com> * readelf.c (print_gnu_build_attribute_description): Use global diff --git a/binutils/config.in b/binutils/config.in index 5174d3e..6a63e2d 100644 --- a/binutils/config.in +++ b/binutils/config.in @@ -35,6 +35,10 @@ */ #undef HAVE_ALLOCA_H +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#undef HAVE_DECL_ASPRINTF + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #undef HAVE_DECL_ENVIRON diff --git a/binutils/configure b/binutils/configure index fc9b976..48fa906 100755 --- a/binutils/configure +++ b/binutils/configure @@ -13518,6 +13518,16 @@ $as_echo "#define HAVE_GOOD_UTIME_H 1" >>confdefs.h fi +ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" +if test "x$ac_cv_have_decl_asprintf" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ASPRINTF $ac_have_decl +_ACEOF ac_fn_c_check_decl "$LINENO" "environ" "ac_cv_have_decl_environ" "$ac_includes_default" if test "x$ac_cv_have_decl_environ" = x""yes; then : ac_have_decl=1 diff --git a/binutils/configure.ac b/binutils/configure.ac index 2f3fca9..fbd366a 100644 --- a/binutils/configure.ac +++ b/binutils/configure.ac @@ -198,7 +198,7 @@ if test $bu_cv_header_utime_h = yes; then AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?]) fi -AC_CHECK_DECLS([environ, fprintf, getc_unlocked, getenv, +AC_CHECK_DECLS([asprintf, environ, fprintf, getc_unlocked, getenv, sbrk, snprintf, stpcpy, strnlen, strstr, vsnprintf]) # Link in zlib if we can. This allows us to read compressed debug |