Hopefully mkstemp is available on all systems we want to support these
days.
As mentioned in #703.
getopt_long
getpwuid
gettimeofday
- mkstemp
posix_fallocate
realpath
setenv
// Define if the system has the type "long long".
#cmakedefine HAVE_LONG_LONG
-// Define if you have the "mkstemp" function.
-#cmakedefine HAVE_MKSTEMP
-
// Define if you have the "posix_fallocate.
#cmakedefine HAVE_POSIX_FALLOCATE
}
#endif
-#ifndef HAVE_MKSTEMP
-// Cheap and nasty mkstemp replacement.
-int
-mkstemp(char* name_template)
-{
-# ifdef __GNUC__
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-# endif
- mktemp(name_template);
-# ifdef __GNUC__
-# pragma GCC diagnostic pop
-# endif
- return open(name_template, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600);
-}
-#endif
-
} // namespace
TemporaryFile::TemporaryFile(string_view path_prefix)