]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add support to provide libiberty mkstemps in gcc
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 29 Dec 2024 19:38:09 +0000 (14:38 -0500)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 29 Dec 2024 19:38:09 +0000 (14:38 -0500)
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

gcc/config.in
gcc/configure
gcc/configure.ac
include/libiberty.h

index d8145a1453b41e1b33c59d4145d86d26b75df09e..44de5a546116063274633aaaa595d76bab492a81 100644 (file)
 #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
index a8b531d8fae06a213f8d466647d0823effdc5035..a495762724d7b45c11e0db9d4a67cc46e15d1f02 100755 (executable)
@@ -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
index 77fab885a428ef35ce18cc634a3fd14d306badb1..5a178e056efb7371b54ad85479aa572e0b1c1e01 100644 (file)
@@ -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, , ,[
index 6259d7d54ca6beaa3d6dbaed2bba24ec7a057b8a..174fefb3d75954cec1c82abcbd8ca9ef70792054 100644 (file)
@@ -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().  */