diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2001-06-15 22:19:44 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2001-06-15 22:19:44 +0000 |
commit | bd6302eae03648fe191dd08a53f05bb24647adff (patch) | |
tree | f5433c19d16c10bd47335de0c31090e56c4cda76 /Src | |
parent | 3f6a9e4522205efb2e404d81ae44ad45df44d79b (diff) | |
download | zsh-bd6302eae03648fe191dd08a53f05bb24647adff.tar.gz zsh-bd6302eae03648fe191dd08a53f05bb24647adff.tar.xz zsh-bd6302eae03648fe191dd08a53f05bb24647adff.zip |
Use mkstemp where available
Diffstat (limited to 'Src')
-rw-r--r-- | Src/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c index 6bede2e43..1bd4afeca 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1101,12 +1101,15 @@ gettempname(void) if (!(s = getsparam("TMPPREFIX"))) s = DEFAULT_TMPPREFIX; +#ifdef HAVE_MKSTEMP + ret = ((char *) mkstemp(dyncat(unmeta(s), "XXXXXX"))); #ifdef HAVE__MKTEMP /* Zsh uses mktemp() safely, so silence the warnings */ ret = ((char *) _mktemp(dyncat(unmeta(s), "XXXXXX"))); #else ret = ((char *) mktemp(dyncat(unmeta(s), "XXXXXX"))); #endif +#endif unqueue_signals(); return ret; |