summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-19 18:32:05 +0000
committerZefram <zefram@fysh.org>2017-12-22 16:22:52 +0000
commit2517ba9951b6aed3ab780dc0247c90deff825b4e (patch)
tree0b6053a93c0cf53654d6546046df1d57ffddaa63 /util.h
parent226394c3368f2e223fb9d10e2b5408a6bf8608f5 (diff)
downloadperl-2517ba9951b6aed3ab780dc0247c90deff825b4e.tar.gz
portable Perl_my_mkostemp()
Akin to the existing Perl_my_mkstemp(), Perl_my_mkostemp() is defined as a macro for mkostemp() where available, and otherwise as our own implementation of it. The guts of our own implementations of the two functions are shared. Perl_my_mkostemp() is not guaranteed to handle O_CLOEXEC: that depends on open() handling it.
Diffstat (limited to 'util.h')
-rw-r--r--util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.h b/util.h
index 62cb05bf0b..7bec0fcde3 100644
--- a/util.h
+++ b/util.h
@@ -241,6 +241,9 @@ means arg not present, 1 is empty string/null byte */
(little), (lend) - (little)))
#endif
+#if defined(HAS_MKOSTEMP) && defined(PERL_CORE)
+# define Perl_my_mkostemp(templte, flags) mkostemp(templte, flags)
+#endif
#if defined(HAS_MKSTEMP) && defined(PERL_CORE)
# define Perl_my_mkstemp(templte) mkstemp(templte)
#endif