+2014-03-14 Meador Inge <meadori@codesourcery.com>
+
+ * configure.in: Add strnlen to AC_CHECK_DECLS.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * sysdep.h (strnlen): Add prototype.
+
2014-03-14 Alan Modra <amodra@gmail.com>
* elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
*/
#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 `strstr', and to 0 if you don't.
*/
#undef HAVE_DECL_STRSTR
#define HAVE_DECL_VSNPRINTF $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
+
# Link in zlib if we can. This allows us to read compressed debug sections.
# This is used only by compress.c.
AC_CHECK_DECLS(strstr)
AC_CHECK_DECLS(snprintf)
AC_CHECK_DECLS(vsnprintf)
+AC_CHECK_DECLS(strnlen)
# Link in zlib if we can. This allows us to read compressed debug sections.
# This is used only by compress.c.
#endif
#endif
+#if !HAVE_DECL_STRNLEN
+size_t strnlen (const char *, size_t);
+#endif
+
/* Define offsetof for those systems which lack it */
#ifndef offsetof
+2014-03-14 Meador Inge <meadori@codesourcery.com>
+
+ * dwarf.c (strnlen): Move prototype ...
+ * sysdep.h (strnlen): ... to here.
+
2014-03-12 Nick Clifton <nickc@redhat.com>
PR binutils/16652
#include "dwarf.h"
#include "gdb/gdb-index.h"
-#if !HAVE_DECL_STRNLEN
-size_t strnlen (const char *, size_t);
-#endif
-
static const char *regname (unsigned int regno, int row);
static int have_frame_base;
extern int vsnprintf(char *, size_t, const char *, va_list);
#endif
+#if !HAVE_DECL_STRNLEN
+size_t strnlen (const char *, size_t);
+#endif
+
#ifndef O_RDONLY
#define O_RDONLY 0
#endif