openbsd-ports/devel/m4/patches/patch-ac

18 lines
448 B
Plaintext
Raw Normal View History

--- src/builtin.c.orig Wed Aug 31 09:45:12 1994
+++ src/builtin.c Sat Jul 25 14:30:35 1998
@@ -1076,9 +1076,13 @@
static void
m4_maketemp (struct obstack *obs, int argc, token_data **argv)
1997-12-29 18:35:42 -05:00
{
+ int fd;
1997-12-29 18:35:42 -05:00
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 );
1997-12-29 18:35:42 -05:00
obstack_grow (obs, ARG (1), strlen (ARG (1)));
}