diff options
author | Tony Cook <tony@develop-help.com> | 2016-08-04 14:30:13 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2017-09-11 10:59:42 +1000 |
commit | e48855bdd2fc57fc51156f5e4b8dee6b544456c8 (patch) | |
tree | 79e0c472f0a2485d7ee7638c30fb5946ce8fae46 /util.h | |
parent | f26b33bdaa1e41fbaf65c649a3208f081fa7571b (diff) | |
download | perl-e48855bdd2fc57fc51156f5e4b8dee6b544456c8.tar.gz |
(perl #127663) add our own mkstemp() implementation
Needed to generate temp files for safer in-place editing.
Not based on any particular implementation, the BSD implementations
tend to be wrappers around a megafunction that also does a few variations
of mkstemp() and mkdtemp(), which we don't need (yet.)
This might also be useful as a replacement for broken mkstemp()
implementations that use a mode of 0666 when creating the file, though
we'd need to add Configure probing for that.
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -246,6 +246,10 @@ means arg not present, 1 is empty string/null byte */ ((char *) memmem(big, bigend - big, little, lend - little)) #endif +#if defined(HAS_MKSTEMP) && defined(PERL_CORE) +# define Perl_my_mkstemp(templte) mkstemp(templte) +#endif + #endif /* PERL_UTIL_H_ */ /* |