summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2004-10-18 19:07:55 +0000
committerWayne Davison <wayned@users.sourceforge.net>2004-10-18 19:07:55 +0000
commit8901caa58f133b40f92f819861fbaf4c797a518f (patch)
treea63a6f2d4f6a1202d5ed892ef92dab453fde700a
parent9a4cf8cf7240a4d029acd23420ffd877de16d1f1 (diff)
downloadzsh-8901caa58f133b40f92f819861fbaf4c797a518f.tar.gz
zsh-8901caa58f133b40f92f819861fbaf4c797a518f.zip
Call gettempname() with its new args.
-rw-r--r--Src/Modules/zftp.c2
-rw-r--r--Src/exec.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index a36b6bf3e..621e0cf0d 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -1971,7 +1971,7 @@ zftp_open(char *name, char **args, int flags)
* However, it is closed whenever there are no connections open.
*/
if (zfstatfd == -1) {
- fname = gettempname();
+ fname = gettempname(NULL, 1);
zfstatfd = open(fname, O_RDWR|O_CREAT|O_EXCL, 0600);
DPUTS(zfstatfd == -1, "zfstatfd not created");
#if defined(F_SETFD) && defined(FD_CLOEXEC)
diff --git a/Src/exec.c b/Src/exec.c
index 437233bad..ba4e3d28e 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2801,7 +2801,7 @@ getherestr(struct redir *fn)
untokenize(t);
unmetafy(t, &len);
t[len++] = '\n';
- s = gettempname();
+ s = gettempname(NULL, 1);
if (!s || (fd = open(s, O_CREAT|O_WRONLY|O_EXCL|O_NOCTTY, 0600)) == -1)
return -1;
write(fd, t, len);
@@ -2975,7 +2975,7 @@ getoutputfile(char *cmd)
return NULL;
if (!(prog = parsecmd(cmd)))
return NULL;
- if (!(nam = gettempname()))
+ if (!(nam = gettempname(NULL, 1)))
return NULL;
nam = ztrdup(nam);
@@ -3022,7 +3022,7 @@ getoutputfile(char *cmd)
static char *
namedpipe(void)
{
- char *tnam = gettempname();
+ char *tnam = gettempname(NULL, 1);
# ifdef HAVE_MKFIFO
if (mkfifo(tnam, 0600) < 0)