diff options
author | Eli Zaretskii <eliz@gnu.org> | 2020-01-05 09:50:27 +0400 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2020-01-05 09:50:27 +0400 |
commit | 3a657c600bde2d3bd84870f75968622bbdb69ce8 (patch) | |
tree | d1ecb4e2a6921df85de3f4521a93ecd7701424d1 /libctf/config.h.in | |
parent | 7fddfece829ebeb4f8496667260e3f421189b621 (diff) | |
download | binutils-3a657c600bde2d3bd84870f75968622bbdb69ce8.zip binutils-3a657c600bde2d3bd84870f75968622bbdb69ce8.tar.gz binutils-3a657c600bde2d3bd84870f75968622bbdb69ce8.tar.bz2 |
libctf: Add configure check for asprintf (for MinGW)
This commit fixes a compilation warning when compiling libctf
on MinGW:
libctf/ctf-dump.c:118:8: warning: implicit declaration of function
'asprintf'; did you mean 'vasprintf'? [-Wimplicit-function-declaration]
if (asprintf (&bit, " %lx: [slice 0x%x:0x%x]",
^~~~~~~~
vasprintf
MinGW doesn't provide that function, so we depend on the one provided
by libiberty. However, the declaration is guarded by HAVE_DECL_ASPRINTF,
which we do not have in libctf's config.h.
libctf/ChangeLog:
PR binutils/25155:
* configure.ac: Add AC_CHECK_DECLS([asprintf]).
* configure, config.h.in: Regenerate.
Diffstat (limited to 'libctf/config.h.in')
-rw-r--r-- | libctf/config.h.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libctf/config.h.in b/libctf/config.h.in index 4c8be4a..264cbc3 100644 --- a/libctf/config.h.in +++ b/libctf/config.h.in @@ -9,6 +9,10 @@ /* Define to 1 if you have the <byteswap.h> header file. */ #undef HAVE_BYTESWAP_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 <dlfcn.h> header file. */ #undef HAVE_DLFCN_H |