openbsd-ports/devel/m4/patches/patch-src_builtin_c
2001-07-10 23:55:16 +00:00

19 lines
556 B
Plaintext

$OpenBSD: patch-src_builtin_c,v 1.1 2001/07/10 23:55:17 brad Exp $
--- src/builtin.c.orig Wed Aug 31 12:45:12 1994
+++ src/builtin.c Tue Jul 10 19:50:52 2001
@@ -1076,9 +1076,13 @@ m4_sinclude (struct obstack *obs, int ar
static void
m4_maketemp (struct obstack *obs, int argc, token_data **argv)
{
+ int fd;
if (bad_argc (argv[0], argc, 2, 2))
return;
- mktemp (ARG (1));
+ fd = mkstemp (ARG (1));
+ if ( fd == -1 )
+ err( 1, "can't create temp file %s", ARG (1) );
+ close( fd );
obstack_grow (obs, ARG (1), strlen (ARG (1)));
}