aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2024-12-29 14:38:09 -0500
committerJohn David Anglin <danglin@gcc.gnu.org>2024-12-29 14:38:09 -0500
commit9fbf4a6adf6212cfe762c5ade87e6e5066b5b05b (patch)
tree25985f2c05db0c9068a50f26816d975abdecebe6
parent0b06abe027a78681d29a5e91daa74bf8dba39826 (diff)
downloadgcc-9fbf4a6adf6212cfe762c5ade87e6e5066b5b05b.zip
gcc-9fbf4a6adf6212cfe762c5ade87e6e5066b5b05b.tar.gz
gcc-9fbf4a6adf6212cfe762c5ade87e6e5066b5b05b.tar.bz2
Add support to provide libiberty mkstemps in gcc
2024-12-28 John David Anglin <danglin@gcc.gnu.org> gcc/ChangeLog: PR target/118121 * configure.ac: Check for mkstemps declaration. * configure: Regenerate. * config.in: Regenerate. include/ChangeLog: * libiberty.h (mkstemps): Declare
-rw-r--r--gcc/config.in7
-rwxr-xr-xgcc/configure2
-rw-r--r--gcc/configure.ac2
-rw-r--r--include/libiberty.h4
4 files changed, 13 insertions, 2 deletions
diff --git a/gcc/config.in b/gcc/config.in
index d8145a1..44de5a5 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1164,6 +1164,13 @@
#endif
+/* Define to 1 if we found a declaration for 'mkstemps', otherwise define to
+ 0. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_DECL_MKSTEMPS
+#endif
+
+
/* Define to 1 if we found a declaration for 'putchar_unlocked', otherwise
define to 0. */
#ifndef USED_FOR_TARGET
diff --git a/gcc/configure b/gcc/configure
index a8b531d..a495762 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -12153,7 +12153,7 @@ _ACEOF
for ac_func in getenv atol atoll asprintf sbrk abort atof getcwd getwd \
- madvise stpcpy strnlen strsignal strverscmp \
+ madvise mkstemps stpcpy strnlen strsignal strverscmp \
strtol strtoul strtoll strtoull setenv unsetenv \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
free getopt clock getpagesize ffs fmemopen 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
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 77fab88..5a178e0 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1652,7 +1652,7 @@ AC_CHECK_DECLS([basename(const char*), strstr(const char*,const char*)], , ,[
#include "system.h"])
gcc_AC_CHECK_DECLS(getenv atol atoll asprintf sbrk abort atof getcwd getwd \
- madvise stpcpy strnlen strsignal strverscmp \
+ madvise mkstemps stpcpy strnlen strsignal strverscmp \
strtol strtoul strtoll strtoull setenv unsetenv \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
free getopt clock getpagesize ffs fmemopen gcc_UNLOCKED_FUNCS, , ,[
diff --git a/include/libiberty.h b/include/libiberty.h
index 6259d7d..174fefb 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -199,6 +199,10 @@ extern int fdmatch (int fd1, int fd2);
extern int ffs(int);
#endif
+#if defined (HAVE_DECL_MKSTEMPS) && !HAVE_DECL_MKSTEMPS
+extern int mkstemps(char *, int);
+#endif
+
/* Get the working directory. The result is cached, so don't call
chdir() between calls to getpwd(). */