- Make yy-prefixed variables available to scanner even with -P.
This commit is contained in:
parent
21ab9e6789
commit
86ea3606d6
72
flex-2.5.33-yy.patch
Normal file
72
flex-2.5.33-yy.patch
Normal file
@ -0,0 +1,72 @@
|
||||
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([[, ]])
|
||||
%# the generated scanner as a C-style comment. This is to aid those who
|
||||
%# edit the skeleton.
|
||||
%#
|
||||
+
|
||||
+%not-for-header
|
||||
+%if-not-reentrant
|
||||
+m4_ifelse(M4_YY_PREFIX,yy,,
|
||||
+#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]
|
||||
+#define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]
|
||||
+#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
|
||||
+#define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]
|
||||
+#define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]
|
||||
+#define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]
|
||||
+#define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]
|
||||
+#define yyin M4_YY_PREFIX[[in]]
|
||||
+#define yyleng M4_YY_PREFIX[[leng]]
|
||||
+#define yylex M4_YY_PREFIX[[lex]]
|
||||
+#define yylineno M4_YY_PREFIX[[lineno]]
|
||||
+#define yyout M4_YY_PREFIX[[out]]
|
||||
+#define yyrestart M4_YY_PREFIX[[restart]]
|
||||
+#define yytext M4_YY_PREFIX[[text]]
|
||||
+#define yywrap M4_YY_PREFIX[[wrap]]
|
||||
+#define yyalloc M4_YY_PREFIX[[alloc]]
|
||||
+#define yyrealloc M4_YY_PREFIX[[realloc]]
|
||||
+#define yyfree M4_YY_PREFIX[[free]]
|
||||
+)
|
||||
+%endif
|
||||
+%ok-for-header
|
||||
+
|
||||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION FLEX_MAJOR_VERSION
|
||||
#define YY_FLEX_MINOR_VERSION FLEX_MINOR_VERSION
|
||||
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[] = {
|
||||
"%# the generated scanner as a C-style comment. This is to aid those who",
|
||||
"%# edit the skeleton.",
|
||||
"%#",
|
||||
+ "",
|
||||
+ "%not-for-header",
|
||||
+ "%if-not-reentrant",
|
||||
+ "m4_ifelse(M4_YY_PREFIX,yy,,",
|
||||
+ "#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]",
|
||||
+ "#define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]",
|
||||
+ "#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]",
|
||||
+ "#define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]",
|
||||
+ "#define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]",
|
||||
+ "#define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]",
|
||||
+ "#define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]",
|
||||
+ "#define yyin M4_YY_PREFIX[[in]]",
|
||||
+ "#define yyleng M4_YY_PREFIX[[leng]]",
|
||||
+ "#define yylex M4_YY_PREFIX[[lex]]",
|
||||
+ "#define yylineno M4_YY_PREFIX[[lineno]]",
|
||||
+ "#define yyout M4_YY_PREFIX[[out]]",
|
||||
+ "#define yyrestart M4_YY_PREFIX[[restart]]",
|
||||
+ "#define yytext M4_YY_PREFIX[[text]]",
|
||||
+ "#define yywrap M4_YY_PREFIX[[wrap]]",
|
||||
+ "#define yyalloc M4_YY_PREFIX[[alloc]]",
|
||||
+ "#define yyrealloc M4_YY_PREFIX[[realloc]]",
|
||||
+ "#define yyfree M4_YY_PREFIX[[free]]",
|
||||
+ ")",
|
||||
+ "%endif",
|
||||
+ "%ok-for-header",
|
||||
+ "",
|
||||
"#define FLEX_SCANNER",
|
||||
"#define YY_FLEX_MAJOR_VERSION 2",
|
||||
"#define YY_FLEX_MINOR_VERSION 5",
|
11
flex.spec
11
flex.spec
@ -1,12 +1,13 @@
|
||||
Summary: A tool for creating scanners (text pattern recognizers)
|
||||
Name: flex
|
||||
Version: 2.5.33
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: BSD
|
||||
Group: Development/Tools
|
||||
URL: http://flex.sourceforge.net/
|
||||
Source: http://puzzle.dl.sourceforge.net/sourceforge/flex/flex-%{version}.tar.bz2
|
||||
Source: flex-%{version}.tar.bz2
|
||||
Patch0: flex-2.5.33-pic.patch
|
||||
Patch1: flex-2.5.33-yy.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: m4
|
||||
BuildRequires: gettext info bison m4
|
||||
@ -30,6 +31,7 @@ application development.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-dependency-tracking
|
||||
@ -60,7 +62,7 @@ fi
|
||||
|
||||
%check
|
||||
echo ============TESTING===============
|
||||
#make check
|
||||
make check
|
||||
echo ============END TESTING===========
|
||||
|
||||
%clean
|
||||
@ -76,6 +78,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_infodir}/flex.info*
|
||||
|
||||
%changelog
|
||||
* Fri Mar 30 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-5
|
||||
- Make yy-prefixed variables available to scanner even with -P.
|
||||
|
||||
* Fri Feb 2 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-4
|
||||
- Use %%find_lang to package locale files.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user