From 123cd4632d459a06603371d65579e92ba844b41b Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Sat, 12 Nov 2011 21:39:59 +0000 Subject: [PATCH] re PR bootstrap/51094 (Bootstrap failure at revision 181279 on non-ELF targets) PR bootstrap/51094 * gcc/configure.ac: Check for stpcpy declaration. * system.h: Declare it if not. * config.in, configure: Regenerate. From-SVN: r181326 --- gcc/ChangeLog | 7 +++++++ gcc/config.in | 7 +++++++ gcc/configure | 2 +- gcc/configure.ac | 2 +- gcc/system.h | 4 ++++ 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c6c20a2fbcff..e9aa80a77882 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-11-12 Dimitrios Apostolou + + PR bootstrap/51094 + * gcc/configure.ac: Check for stpcpy declaration. + * system.h: Declare it if not. + * config.in, configure: Regenerate. + 2011-11-12 Richard Henderson * config/rs6000/rs6000.md (fix_truncsi2_stfiwx): Use diff --git a/gcc/config.in b/gcc/config.in index 3950e289b7c4..18dde6f1855d 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -815,6 +815,13 @@ #endif +/* Define to 1 if we found a declaration for 'stpcpy', otherwise define to 0. + */ +#ifndef USED_FOR_TARGET +#undef HAVE_DECL_STPCPY +#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 99334ce44fd1..d8654121837b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -10453,7 +10453,7 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" saved_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include" for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ - strsignal strstr strverscmp \ + strsignal strstr stpcpy strverscmp \ errno snprintf vsnprintf vasprintf malloc realloc calloc \ free basename getopt clock getpagesize 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 c7654259c4ae..af5b748b0f56 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1102,7 +1102,7 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" saved_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include" gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd \ - strsignal strstr strverscmp \ + strsignal strstr stpcpy strverscmp \ errno snprintf vsnprintf vasprintf malloc realloc calloc \ free basename getopt clock getpagesize gcc_UNLOCKED_FUNCS, , ,[ #include "ansidecl.h" diff --git a/gcc/system.h b/gcc/system.h index 7c7d07ea3eef..0a943a3a3fe9 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -442,6 +442,10 @@ extern void *sbrk (int); extern char *strstr (const char *, const char *); #endif +#if defined (HAVE_DECL_STPCPY) && !HAVE_DECL_STPCPY +extern char *stpcpy (char *, const char *); +#endif + #ifdef __cplusplus } #endif -- 2.47.2