diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-04 08:05:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-04 08:05:29 +0000 |
commit | acfa95f85c020c40612e80f323d9c17431f222f1 (patch) | |
tree | c1d9948f37a3e0e49102c3aceefb1f62c8965a1d /gnu/usr.bin/gcc/f | |
parent | 267f93bc4676f6e2941729bef725b2515c84a111 (diff) |
use mkstemp() correctly, i think
Diffstat (limited to 'gnu/usr.bin/gcc/f')
-rw-r--r-- | gnu/usr.bin/gcc/f/runtime/libI77/open.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/open.c b/gnu/usr.bin/gcc/f/runtime/libI77/open.c index 14f1c7815a7..9fa49275916 100644 --- a/gnu/usr.bin/gcc/f/runtime/libI77/open.c +++ b/gnu/usr.bin/gcc/f/runtime/libI77/open.c @@ -78,7 +78,7 @@ integer f_open(olist *a) #ifdef NON_UNIX_STDIO FILE *tf; #else - int n; + int n, fd; struct stat stb; #endif if(a->ounit>=MXUNIT || a->ounit<0) @@ -148,7 +148,10 @@ integer f_open(olist *a) tmpnam(buf); #else (void) strcpy(buf,"tmp.FXXXXXX"); - (void) mktemp(buf); + fd = mkstemp(buf); + if (fd != -1) + close(fd); + break; #endif goto replace; case 'n': |