aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-08-26 10:56:26 +0100
committerNick Clifton <nickc@redhat.com>2015-08-26 10:56:26 +0100
commit2a7f4fa91ffc8ad3ad195f7ac02a4c97bc96b791 (patch)
treefadcb2758c470416039e10e3b1ea485619de587d
parent7c61d651fd0e42b8f68840a3735ed7e46d4fd083 (diff)
downloadbinutils-2a7f4fa91ffc8ad3ad195f7ac02a4c97bc96b791.zip
binutils-2a7f4fa91ffc8ad3ad195f7ac02a4c97bc96b791.tar.gz
binutils-2a7f4fa91ffc8ad3ad195f7ac02a4c97bc96b791.tar.bz2
Add asprintf to the list of functions whose decls are checked at configure time.
PR gas/18842 * configure.ac (AS_CHECK_DECLS): Add asprintf. * configure: Regenerate. * config.in: Regenerate.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config.in4
-rwxr-xr-xgas/configure10
-rw-r--r--gas/configure.ac2
4 files changed, 22 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 02d94ad..c595d51 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2015-08-26 Nick Clifton <nickc@redhat.com>
+
+ PR gas/18842
+ * configure.ac (AS_CHECK_DECLS): Add asprintf.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
2015-08-25 Jose E. Marchesi <jose.marchesi@oracle.com>
* config/tc-sparc.c (priv_reg_table): New privileged register
diff --git a/gas/config.in b/gas/config.in
index a2d62f4..e92edb1 100644
--- a/gas/config.in
+++ b/gas/config.in
@@ -53,6 +53,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 `free', and to 0 if you don't.
*/
#undef HAVE_DECL_FREE
diff --git a/gas/configure b/gas/configure
index 143b940..62bf039 100755
--- a/gas/configure
+++ b/gas/configure
@@ -14311,6 +14311,16 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_VSNPRINTF $ac_have_decl
_ACEOF
+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
diff --git a/gas/configure.ac b/gas/configure.ac
index 3f75704..4a98ca7 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -812,7 +812,7 @@ GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
-AC_CHECK_DECLS([free, getenv, malloc, mempcpy, realloc, stpcpy, strstr, vsnprintf])
+AC_CHECK_DECLS([free, getenv, malloc, mempcpy, realloc, stpcpy, strstr, vsnprintf, asprintf])
BFD_BINARY_FOPEN