+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
#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
#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
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
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"
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
extern char *stpcpy (char *, const char *);
#endif
+#if defined (HAVE_DECL_UNSETENV) && !HAVE_DECL_UNSETENV
+int unsetenv(const char *);
+#endif
+
#ifdef __cplusplus
}
#endif