summaryrefslogtreecommitdiff
path: root/usr.bin/m4/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/m4/eval.c')
-rw-r--r--usr.bin/m4/eval.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c
index 4bcfbf28589..c76801adec0 100644
--- a/usr.bin/m4/eval.c
+++ b/usr.bin/m4/eval.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eval.c,v 1.69 2011/03/24 11:23:08 espie Exp $ */
+/* $OpenBSD: eval.c,v 1.70 2012/04/12 17:00:11 espie Exp $ */
/* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */
/*
@@ -264,8 +264,13 @@ expand_builtin(const char *argv[], int argc, int td)
case INCLTYPE:
if (argc > 2)
if (!doincl(argv[2]))
- err(1, "%s at line %lu: include(%s)",
- CURRENT_NAME, CURRENT_LINE, argv[2]);
+ if (mimic_gnu) {
+ warn("%s at line %lu: include(%s)",
+ CURRENT_NAME, CURRENT_LINE, argv[2]);
+ exit_code = 1;
+ } else
+ err(1, "%s at line %lu: include(%s)",
+ CURRENT_NAME, CURRENT_LINE, argv[2]);
break;
case SINCTYPE: