summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2008-08-16 12:19:49 +0000
committerespie <espie@openbsd.org>2008-08-16 12:19:49 +0000
commitbd3d270542b88bf317b6d1201645d38c8cd4727c (patch)
treefa0db689decbf18bb685b4ece813ee8f20358f92
parentanother issue for which I have a patch. (diff)
downloadwireguard-openbsd-bd3d270542b88bf317b6d1201645d38c8cd4727c.tar.xz
wireguard-openbsd-bd3d270542b88bf317b6d1201645d38c8cd4727c.zip
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@
-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);