summaryrefslogtreecommitdiffstats
path: root/contrib/flex
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-05-21 19:22:42 +0000
committerjkim <jkim@FreeBSD.org>2013-05-21 19:22:42 +0000
commit5af6d6ab75db4b1a0c4f3733b65b5804643cf0bf (patch)
tree2fc4ce9c459ce829ff6951e227219ac44f1f7991 /contrib/flex
parent042b47f82d2c3e0d33b15d14c1a7092608f4dec6 (diff)
downloadFreeBSD-src-5af6d6ab75db4b1a0c4f3733b65b5804643cf0bf.zip
FreeBSD-src-5af6d6ab75db4b1a0c4f3733b65b5804643cf0bf.tar.gz
Allow YY_NO_UNPUT to disable unput() for backward compatibility.
Diffstat (limited to 'contrib/flex')
-rw-r--r--contrib/flex/flex.skl5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/flex/flex.skl b/contrib/flex/flex.skl
index b693ba9..d06471f 100644
--- a/contrib/flex/flex.skl
+++ b/contrib/flex/flex.skl
@@ -1032,7 +1032,9 @@ extern int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
%not-for-header
m4_ifdef( [[M4_YY_NO_UNPUT]],,
[[
+#ifndef YY_NO_UNPUT
static void yyunput M4_YY_PARAMS( int c, char *buf_ptr M4_YY_PROTO_LAST_ARG);
+#endif
]])
%ok-for-header
%endif
@@ -1808,9 +1810,11 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
%if-c-only
m4_ifdef( [[M4_YY_NO_UNPUT]],,
[[
+#ifndef YY_NO_UNPUT
static void yyunput YYFARGS2( int,c, char *,yy_bp)
%endif
%if-c++-only
+#ifndef YY_NO_UNPUT
void yyFlexLexer::yyunput( int c, char* yy_bp)
%endif
{
@@ -1857,6 +1861,7 @@ m4_ifdef( [[M4_YY_USE_LINENO]],
YY_G(yy_hold_char) = *yy_cp;
YY_G(yy_c_buf_p) = yy_cp;
}
+#endif /* ifndef YY_NO_UNPUT */
%if-c-only
]])
%endif
OpenPOWER on IntegriCloud