Add asprintf to the list of functions whose decls are checked at configure time.
authorNick Clifton <nickc@redhat.com>
Wed, 26 Aug 2015 09:56:26 +0000 (10:56 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 26 Aug 2015 09:56:26 +0000 (10:56 +0100)
PR gas/18842
* configure.ac (AS_CHECK_DECLS): Add asprintf.
* configure: Regenerate.
* config.in: Regenerate.

gas/ChangeLog
gas/config.in
gas/configure
gas/configure.ac

index 02d94ade14c249cabf489cd1805ad8269522f780..c595d51e2742105215cdd7b527a77ca006e2fea6 100644 (file)
@@ -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
index a2d62f4e20bea06ae124cabcfe1df39185353709..e92edb1503e0ac6e456b83eb3ea8cbaa080d9b85 100644 (file)
    */
 #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
index 143b9403f9fd2f941621e88db08b5e910705ea35..62bf039d20b4048b189615a53744952ac5d4e2c3 100755 (executable)
 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
 
 
 
index 3f757046c787ca40bc061608acf69b8d5bbff669..4a98ca7ce85c3294188d0d443880637b6425d3bf 100644 (file)
@@ -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