diff options
author | tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-10 09:45:00 +0000 |
---|---|---|
committer | tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-10 09:45:00 +0000 |
commit | d968efeac356364c01445013a1a3660e5087cb15 (patch) | |
tree | 47693e80839cdf20848a33e1f839ec66894b68fc /include | |
parent | ad28f8e501f875bc3eefacb4570d03421c505f6d (diff) | |
download | gcc-d968efeac356364c01445013a1a3660e5087cb15.tar.gz |
[PR lto/61334] Declare prototype for strnlen, if needed.
include/
* libiberty.h [defined (HAVE_DECL_STRNLEN) &&
!HAVE_DECL_STRNLEN] (strnlen): New prototype.
gcc/
* configure.ac: Use gcc_AC_CHECK_DECLS to check for strnlen
prototype.
* config.in: Regenerate.
* configure: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 6 | ||||
-rw-r--r-- | include/libiberty.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index ff33d291e74..1cda0dc02b1 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,9 @@ +2014-06-10 Thomas Schwinge <thomas@codesourcery.com> + + PR lto/61334 + * libiberty.h [defined (HAVE_DECL_STRNLEN) && + !HAVE_DECL_STRNLEN] (strnlen): New prototype. + 2014-05-21 John Marino <gnugcc@marino.st> * liberty.h: Use basename function on DragonFly. diff --git a/include/libiberty.h b/include/libiberty.h index 7fd07036b75..56b8b43cb88 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -636,6 +636,10 @@ extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3; extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3,0); #endif +#if defined (HAVE_DECL_STRNLEN) && !HAVE_DECL_STRNLEN +extern size_t strnlen (const char *, size_t); +#endif + #if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP /* Compare version strings. */ extern int strverscmp (const char *, const char *); |