summaryrefslogtreecommitdiff
path: root/usr.bin/m4/main.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2008-08-16 12:19:50 +0000
committerMarc Espie <espie@cvs.openbsd.org>2008-08-16 12:19:50 +0000
commit411f1cecb74fed58f93a6a2fa3d2f4d72864bb4c (patch)
tree192e51e609d46a97e4e75adc498f40186738dd72 /usr.bin/m4/main.c
parent9a5ba52ee51a7afba45581b5b2bf2f2c50e03b4f (diff)
be more liberal in include handling, namely we only error out if it's
the end of the last included file AND we still have a macro to expand. autoconf uses this in wine, and it turns out other m4 also do things that way (not only gnu m4). okay fries@, millert@
Diffstat (limited to 'usr.bin/m4/main.c')
-rw-r--r--usr.bin/m4/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c
index 064db65dc2d..b85ac986cee 100644
--- a/usr.bin/m4/main.c
+++ b/usr.bin/m4/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.74 2006/03/24 08:03:44 espie Exp $ */
+/* $OpenBSD: main.c,v 1.75 2008/08/16 12:19:49 espie Exp $ */
/* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */
/*-
@@ -408,7 +408,7 @@ macro(void)
}
}
} else if (t == EOF) {
- if (sp > -1) {
+ if (sp > -1 && ilevel <= 0) {
warnx( "unexpected end of input, unclosed parenthesis:");
dump_stack(paren, PARLEV);
exit(1);