fix fd leak in patch; remove unneeded patch;

verify package builds correctly
This commit is contained in:
marc 1998-07-25 21:55:41 +00:00
parent 8dc52a6797
commit 04ef6b8b7a
3 changed files with 12 additions and 15 deletions

View File

@ -1,11 +1,17 @@
--- src/builtin.c.orig Mon Dec 29 14:04:03 1997
+++ src/builtin.c Mon Dec 29 14:04:14 1997
@@ -1078,7 +1078,7 @@
--- 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)
{
+ int fd;
if (bad_argc (argv[0], argc, 2, 2))
return;
- mktemp (ARG (1));
+ mkstemp (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)));
}

View File

@ -1,11 +0,0 @@
--- src/output.c.orig Mon Dec 29 14:03:14 1997
+++ src/output.c Mon Dec 29 14:03:29 1997
@@ -112,7 +112,7 @@
static int
mkstemp (const char *tmpl)
{
- mktemp (tmpl);
+ mkstemp (tmpl);
return open (tmpl, O_RDWR | O_TRUNC | O_CREAT, 0600);
}

View File

@ -1,3 +1,5 @@
@cwd /usr/local
@name m4-1.4
bin/gm4
@unexec install-info --delete %D/info/m4.info %D/info/dir
info/m4.info