Commit 297c364d by John David Anglin

re PR bootstrap/67363 (r227188 breaks build for mingw-w64)

	PR bootstrap/67363
	* configure.ac: Check if setenv and unsetenv are declared.
	* configure: Rebuild.
	* config.in: Rebuild.
	* system.h: Declare setenv and unsetenv if not declared.

From-SVN: r227666
parent 476013d6
2015-09-15 John David Anglin <danglin@gcc.gnu.org>
PR bootstrap/67363
* configure.ac: Check if setenv and unsetenv are declared.
* configure: Rebuild.
* config.in: Rebuild.
* system.h: Declare setenv and unsetenv if not declared.
2015-09-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (swap_web_entry): Update preceding
......
......@@ -934,6 +934,13 @@
#endif
/* Define to 1 if we found a declaration for 'setenv', otherwise define to 0.
*/
#ifndef USED_FOR_TARGET
#undef HAVE_DECL_SETENV
#endif
/* Define to 1 if we found a declaration for 'setrlimit', otherwise define to
0. */
#ifndef USED_FOR_TARGET
......@@ -1025,6 +1032,13 @@
#endif
/* Define to 1 if we found a declaration for 'unsetenv', otherwise define to
0. */
#ifndef USED_FOR_TARGET
#undef HAVE_DECL_UNSETENV
#endif
/* Define to 1 if we found a declaration for 'vasprintf', otherwise define to
0. */
#ifndef USED_FOR_TARGET
......
......@@ -10926,7 +10926,7 @@ _ACEOF
for ac_func in getenv atol atoll asprintf sbrk abort atof getcwd getwd \
madvise stpcpy strnlen strsignal strverscmp \
strtol strtoul strtoll strtoull \
strtol strtoul strtoll strtoull setenv unsetenv \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
free 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
......
......@@ -1247,7 +1247,7 @@ AC_CHECK_DECLS([basename(const char*), strstr(const char*,const char*)], , ,[
gcc_AC_CHECK_DECLS(getenv atol atoll asprintf sbrk abort atof getcwd getwd \
madvise stpcpy strnlen strsignal strverscmp \
strtol strtoul strtoll strtoull \
strtol strtoul strtoll strtoull setenv unsetenv \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
free getopt clock getpagesize ffs gcc_UNLOCKED_FUNCS, , ,[
#include "ansidecl.h"
......
......@@ -465,6 +465,10 @@ extern char *getwd (char *);
extern void *sbrk (int);
#endif
#if defined (HAVE_DECL_SETENV) && !HAVE_DECL_SETENV
int setenv(const char *, const char *, int);
#endif
#if defined (HAVE_DECL_STRSTR) && !HAVE_DECL_STRSTR
extern char *strstr (const char *, const char *);
#endif
......@@ -473,6 +477,10 @@ extern char *strstr (const char *, const char *);
extern char *stpcpy (char *, const char *);
#endif
#if defined (HAVE_DECL_UNSETENV) && !HAVE_DECL_UNSETENV
int unsetenv(const char *);
#endif
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment