diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-09-14 08:23:10 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-09-14 08:23:10 +0000 |
commit | c9790893cb2ab8ba35f85b340bca03768fc88c42 (patch) | |
tree | cfc11a4bbfe24b1004b4820a5afd5dbc1caacd53 /usr.bin/m4/eval.c | |
parent | 688ca0dc80e1ccc5f1fe3104b89735d3e11312df (diff) |
mktemp -> mkstemp
Diffstat (limited to 'usr.bin/m4/eval.c')
-rw-r--r-- | usr.bin/m4/eval.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index a83666a79fc..27fb0d5235a 100644 --- a/usr.bin/m4/eval.c +++ b/usr.bin/m4/eval.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.15 1999/09/14 08:21:36 espie Exp $ */ +/* $OpenBSD: eval.c,v 1.16 1999/09/14 08:23:09 espie Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)eval.c 8.2 (Berkeley) 4/27/95"; #else -static char rcsid[] = "$OpenBSD: eval.c,v 1.15 1999/09/14 08:21:36 espie Exp $"; +static char rcsid[] = "$OpenBSD: eval.c,v 1.16 1999/09/14 08:23:09 espie Exp $"; #endif #endif /* not lint */ @@ -298,8 +298,15 @@ register int td; /* * dotemp - create a temporary file */ - if (argc > 2) - pbstr(mktemp(argv[2])); + if (argc > 2) { + int fd; + + fd = mkstemp(argv[2]); + if (fd == -1) + err(1, "couldn't make temp file %s", argv[2]); + close(fd); + pbstr(argv[2]); + } break; case TRNLTYPE: |