- Don't emit yy-prefixed variables in C++ mode. Thanks Srinivas Aji.

- Related: #242742
- Related: #244259
This commit is contained in:
Petr Machata 2007-06-22 11:18:29 +00:00
parent 9c030ea142
commit 2d25a59536
2 changed files with 12 additions and 3 deletions

View File

@ -1,12 +1,13 @@
diff -urp flex-2.5.33/flex.skl flex-2.5.33-pm/flex.skl
--- flex-2.5.33/flex.skl 2006-02-16 23:20:43.000000000 +0100
+++ flex-2.5.33-pm/flex.skl 2007-03-30 14:04:42.000000000 +0200
@@ -54,6 +54,32 @@ m4_changequote([[, ]])
@@ -54,6 +54,34 @@ m4_changequote([[, ]])
%# the generated scanner as a C-style comment. This is to aid those who
%# edit the skeleton.
%#
+
+%not-for-header
+%if-c-only
+%if-not-reentrant
+m4_ifelse(M4_YY_PREFIX,yy,,
+#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]
@ -29,6 +30,7 @@ diff -urp flex-2.5.33/flex.skl flex-2.5.33-pm/flex.skl
+#define yyfree M4_YY_PREFIX[[free]]
+)
+%endif
+%endif
+%ok-for-header
+
#define FLEX_SCANNER
@ -37,12 +39,13 @@ diff -urp flex-2.5.33/flex.skl flex-2.5.33-pm/flex.skl
diff -urp flex-2.5.33/skel.c flex-2.5.33-pm/skel.c
--- flex-2.5.33/skel.c 2006-02-21 03:45:41.000000000 +0100
+++ flex-2.5.33-pm/skel.c 2007-03-30 14:04:43.000000000 +0200
@@ -59,6 +59,32 @@ const char *skel[] = {
@@ -59,6 +59,34 @@ const char *skel[] = {
"%# the generated scanner as a C-style comment. This is to aid those who",
"%# edit the skeleton.",
"%#",
+ "",
+ "%not-for-header",
+ "%if-c-only",
+ "%if-not-reentrant",
+ "m4_ifelse(M4_YY_PREFIX,yy,,",
+ "#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]",
@ -65,6 +68,7 @@ diff -urp flex-2.5.33/skel.c flex-2.5.33-pm/skel.c
+ "#define yyfree M4_YY_PREFIX[[free]]",
+ ")",
+ "%endif",
+ "%endif",
+ "%ok-for-header",
+ "",
"#define FLEX_SCANNER",

View File

@ -1,7 +1,7 @@
Summary: A tool for creating scanners (text pattern recognizers)
Name: flex
Version: 2.5.33
Release: 7%{?dist}
Release: 8%{?dist}
License: BSD
Group: Development/Tools
URL: http://flex.sourceforge.net/
@ -80,6 +80,11 @@ rm -rf ${RPM_BUILD_ROOT}
%{_infodir}/flex.info*
%changelog
* Fri Jun 22 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-8
- Don't emit yy-prefixed variables in C++ mode. Thanks Srinivas Aji.
- Related: #242742
- Related: #244259
* Fri May 11 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-7
- Allow joining short options into one commandline argument.
- Resolves: #239695