summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz PluciƄski <mplucinski@mplucinski.com>2014-07-25 16:07:06 +0200
committerWill Estes <westes575@gmail.com>2014-11-23 19:53:41 -0500
commitc0303615a661ee0fcb399b888efb2a653e6b66ed (patch)
tree53a13d831a170b94f9d90da00160515dd81de349
parent6920252234d36afb155c772e8bc30cef557bcac6 (diff)
Fix warning about redefined macro when multiple scanners are used.
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 8a70b8d..8710702 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1686,6 +1686,10 @@ void readin ()
}
else {
outn ("extern char *yytext;");
+
+ outn("#ifdef yytext_ptr");
+ outn("#undef yytext_ptr");
+ outn("#endif");
outn ("#define yytext_ptr yytext");
}
}