aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2014-06-10 11:45:00 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2014-06-10 11:45:00 +0200
commit35fa894ae37dc5efdaf05db965e65a0621f5beee (patch)
tree47693e80839cdf20848a33e1f839ec66894b68fc /gcc
parent1685ecf3bf96cba4840ea4ef7b0f87b4f92b4898 (diff)
downloadgcc-35fa894ae37dc5efdaf05db965e65a0621f5beee.zip
gcc-35fa894ae37dc5efdaf05db965e65a0621f5beee.tar.gz
gcc-35fa894ae37dc5efdaf05db965e65a0621f5beee.tar.bz2
[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. From-SVN: r211401
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config.in7
-rwxr-xr-xgcc/configure2
-rw-r--r--gcc/configure.ac2
4 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4841582..5d55985 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2014-06-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR lto/61334
+ * configure.ac: Use gcc_AC_CHECK_DECLS to check for strnlen
+ prototype.
+ * config.in: Regenerate.
+ * configure: Likewise.
+
2014-06-10 Jan Hubicka <hubicka@ucw.cz>
* ipa-reference.c (is_proper_for_analysis): Exclude addressable and public
diff --git a/gcc/config.in b/gcc/config.in
index fb7bf95..0897bd4 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -888,6 +888,13 @@
#endif
+/* Define to 1 if we found a declaration for 'strnlen', otherwise define to 0.
+ */
+#ifndef USED_FOR_TARGET
+#undef HAVE_DECL_STRNLEN
+#endif
+
+
/* Define to 1 if we found a declaration for 'strsignal', otherwise define to
0. */
#ifndef USED_FOR_TARGET
diff --git a/gcc/configure b/gcc/configure
index 6c35041..9ece243 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -10525,7 +10525,7 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
saved_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
- strsignal strstr stpcpy strverscmp \
+ stpcpy strnlen strsignal strstr strverscmp \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
free basename getopt clock getpagesize ffs clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
do
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 2cec62a..a1cf901 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1170,7 +1170,7 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
saved_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd \
- strsignal strstr stpcpy strverscmp \
+ stpcpy strnlen strsignal strstr strverscmp \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
free basename getopt clock getpagesize ffs gcc_UNLOCKED_FUNCS, , ,[
#include "ansidecl.h"