aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/config.in4
-rwxr-xr-xbfd/configure10
-rw-r--r--bfd/configure.ac2
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/config.in4
-rwxr-xr-xbinutils/configure10
-rw-r--r--binutils/configure.ac2
8 files changed, 40 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 96bd8ff..d96cc78 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * configure.ac: Check for strnlen declaration.
+ * configure, config.in: Regenerate.
+
2021-07-07 Nick Clifton <nickc@redhat.com>
PR 28051
diff --git a/bfd/config.in b/bfd/config.in
index 6d46ea7..f54a3ca 100644
--- a/bfd/config.in
+++ b/bfd/config.in
@@ -56,6 +56,10 @@
*/
#undef HAVE_DECL_STPCPY
+/* 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 `vasprintf', and to 0 if you
don't. */
#undef HAVE_DECL_VASPRINTF
diff --git a/bfd/configure b/bfd/configure
index daa5124..24171d0 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -12890,6 +12890,16 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_VASPRINTF $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" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNLEN $ac_have_decl
+_ACEOF
diff --git a/bfd/configure.ac b/bfd/configure.ac
index 07a75ed..fec067b 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -260,7 +260,7 @@ AC_CHECK_HEADERS(fcntl.h sys/file.h sys/resource.h sys/stat.h sys/types.h \
AC_CHECK_FUNCS(fcntl fdopen fileno fls getgid getpagesize getrlimit getuid \
sysconf)
-AC_CHECK_DECLS([basename, ffs, stpcpy, asprintf, vasprintf])
+AC_CHECK_DECLS([basename, ffs, stpcpy, asprintf, vasprintf, strnlen])
BFD_BINARY_FOPEN
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 77b7ac7..be5fd77 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * configure.ac: Check for strnlen declaration.
+ * configure, config.in: Regenerate.
+
2021-07-05 Alan Modra <amodra@gmail.com>
PR 28047
diff --git a/binutils/config.in b/binutils/config.in
index e79967c..e6fa66f 100644
--- a/binutils/config.in
+++ b/binutils/config.in
@@ -55,6 +55,10 @@
*/
#undef HAVE_DECL_STPCPY
+/* 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 <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
diff --git a/binutils/configure b/binutils/configure
index bf6461d..82640b8 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -13642,6 +13642,16 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STPCPY $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" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNLEN $ac_have_decl
+_ACEOF
# Link in zlib if we can. This allows us to read compressed debug
diff --git a/binutils/configure.ac b/binutils/configure.ac
index b8ab642..b2d0be0 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -265,7 +265,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([asprintf, environ, getc_unlocked, sbrk, stpcpy])
+AC_CHECK_DECLS([asprintf, environ, getc_unlocked, sbrk, stpcpy, strnlen])
# Link in zlib if we can. This allows us to read compressed debug
# sections. This is used only by readelf.c (objdump uses bfd for