summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/lowparse.c4
-rw-r--r--usr.bin/make/main.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/make/lowparse.c b/usr.bin/make/lowparse.c
index 7e74ce66b48..19f527cc656 100644
--- a/usr.bin/make/lowparse.c
+++ b/usr.bin/make/lowparse.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lowparse.c,v 1.6 2001/05/03 13:41:07 espie Exp $ */
+/* $OpenBSD: lowparse.c,v 1.7 2001/05/07 22:57:19 espie Exp $ */
/* low-level parsing functions. */
@@ -147,7 +147,7 @@ static void
free_ifile(ifile)
IFile *ifile;
{
- if (ifile->F)
+ if (ifile->F && fileno(ifile->F) != STDIN_FILENO)
(void)fclose(ifile->F);
else
free(ifile->str);
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index b97e15e0476..757cfbc4932 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: main.c,v 1.46 2001/05/03 13:41:07 espie Exp $ */
+/* $OpenBSD: main.c,v 1.47 2001/05/07 22:57:19 espie Exp $ */
/* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */
/*
@@ -107,7 +107,7 @@ static char copyright[] =
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
UNUSED
-static char rcsid[] = "$OpenBSD: main.c,v 1.46 2001/05/03 13:41:07 espie Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.47 2001/05/07 22:57:19 espie Exp $";
#endif
#endif /* not lint */
@@ -914,7 +914,6 @@ ReadMakefile(p, q)
*/
found: Var_Set("MAKEFILE", fname, VAR_GLOBAL);
Parse_File(fname, stream);
- (void)fclose(stream);
}
return TRUE;
}