forked from Imagelibrary/binutils-gdb
Avoid compilation warning on MinGW in xstrndup
libiberty/ChangeLog:
2017-05-31 DJ Delorie <dj@redhat.com>
* configure.ac (strnlen): Add to AC_CHECK_DECLS.
* configure: Likewise.
* config.in: Add HACE_DECL_STRNLEN.
(cherry picked from commit 5b4a1ff337)
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2017-05-31 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
|
* configure.ac (strnlen): Add to AC_CHECK_DECLS.
|
||||||
|
* configure: Likewise.
|
||||||
|
* config.in: Add HACE_DECL_STRNLEN.
|
||||||
|
|
||||||
2017-05-31 Eli Zaretskii <eliz@gnu.org>
|
2017-05-31 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
* waitpid.c (wait) [__MINGW32__]: Define as a macro
|
* waitpid.c (wait) [__MINGW32__]: Define as a macro
|
||||||
|
|||||||
@@ -79,6 +79,10 @@
|
|||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_SNPRINTF
|
#undef HAVE_DECL_SNPRINTF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_STRNLEN
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't.
|
/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't.
|
||||||
*/
|
*/
|
||||||
#undef HAVE_DECL_STRTOL
|
#undef HAVE_DECL_STRTOL
|
||||||
|
|||||||
21
libiberty/configure
vendored
21
libiberty/configure
vendored
@@ -5864,6 +5864,16 @@ fi
|
|||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE_DECL_STRTOULL $ac_have_decl
|
#define HAVE_DECL_STRTOULL $ac_have_decl
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
|
||||||
|
if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else
|
||||||
|
ac_have_decl=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_STRNLEN $ac_have_decl
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
|
$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
|
||||||
@@ -7003,6 +7013,17 @@ fi
|
|||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE_DECL_STRVERSCMP $ac_have_decl
|
#define HAVE_DECL_STRVERSCMP $ac_have_decl
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
|
||||||
|
if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else
|
||||||
|
ac_have_decl=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_STRNLEN $ac_have_decl
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether canonicalize_file_name must be declared" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether canonicalize_file_name must be declared" >&5
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ if test "x" = "y"; then
|
|||||||
table times tmpnam \
|
table times tmpnam \
|
||||||
vasprintf vfprintf vprintf vsprintf \
|
vasprintf vfprintf vprintf vsprintf \
|
||||||
wait3 wait4 waitpid)
|
wait3 wait4 waitpid)
|
||||||
AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf, vsnprintf, strtol, strtoul, strtoll, strtoull])
|
AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf, vsnprintf, strtol, strtoul, strtoll, strtoull, strnlen])
|
||||||
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
|
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
|
||||||
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
|
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
|
||||||
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
|
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
|
||||||
@@ -689,6 +689,7 @@ if test -z "${setobjs}"; then
|
|||||||
AC_CHECK_DECLS([calloc, getenv, getopt, malloc, realloc, sbrk])
|
AC_CHECK_DECLS([calloc, getenv, getopt, malloc, realloc, sbrk])
|
||||||
AC_CHECK_DECLS([strtol, strtoul, strtoll, strtoull])
|
AC_CHECK_DECLS([strtol, strtoul, strtoll, strtoull])
|
||||||
AC_CHECK_DECLS([strverscmp])
|
AC_CHECK_DECLS([strverscmp])
|
||||||
|
AC_CHECK_DECLS([strnlen])
|
||||||
libiberty_NEED_DECLARATION(canonicalize_file_name)
|
libiberty_NEED_DECLARATION(canonicalize_file_name)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user