summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.c b/main.c
index 493c636..fef16f4 100644
--- a/main.c
+++ b/main.c
@@ -1578,9 +1578,11 @@ void readin ()
}
if (!do_yywrap) {
- if (!C_plus_plus) {
- outn ("\n#define yywrap() 1");
- }
+ if (!C_plus_plus)
+ if (reentrant)
+ outn ("\n#define yywrap(yyscanner) 1");
+ else
+ outn ("\n#define yywrap() 1");
outn ("#define YY_SKIP_YYWRAP");
}