From 2d25a5953671bb40ca9f2cbf1b4418bea947cb3c Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 22 Jun 2007 11:18:29 +0000 Subject: [PATCH] - Don't emit yy-prefixed variables in C++ mode. Thanks Srinivas Aji. - Related: #242742 - Related: #244259 --- flex-2.5.33-yy.patch | 8 ++++++-- flex.spec | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/flex-2.5.33-yy.patch b/flex-2.5.33-yy.patch index e229c0e..c6bc5fe 100644 --- a/flex-2.5.33-yy.patch +++ b/flex-2.5.33-yy.patch @@ -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", diff --git a/flex.spec b/flex.spec index 3d4e932..7e7344f 100644 --- a/flex.spec +++ b/flex.spec @@ -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 - 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 - 2.5.33-7 - Allow joining short options into one commandline argument. - Resolves: #239695