Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Patsy Franklin
67d60cea42 Resolves: #1364943
- Replace C++ style comment with C style comment.
2016-12-09 11:45:54 -06:00
Patsy Franklin
2e83912955 Resolves: #1360744
Fix wrong type on num_to_read.
2016-07-27 14:21:53 -04:00
3 changed files with 66 additions and 1 deletions

View file

@ -0,0 +1,36 @@
diff -Nrup a/src/flex.skl b/src/flex.skl
--- a/src/flex.skl 2016-07-27 11:11:48.528378027 -0400
+++ b/src/flex.skl 2016-07-27 11:14:03.012351701 -0400
@@ -1718,7 +1718,7 @@ int yyFlexLexer::yy_get_next_buffer()
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
diff -Nrup a/src/scan.c b/src/scan.c
--- a/src/scan.c 2015-11-17 11:17:41.000000000 -0500
+++ b/src/scan.c 2016-07-27 11:14:18.126674417 -0400
@@ -4181,7 +4181,7 @@ static int yy_get_next_buffer (void)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
diff -Nrup a/src/skel.c b/src/skel.c
--- a/src/skel.c 2015-11-17 11:17:39.000000000 -0500
+++ b/src/skel.c 2016-07-27 11:14:36.362857240 -0400
@@ -1929,7 +1929,7 @@ const char *skel[] = {
"",
" else",
" {",
- " yy_size_t num_to_read =",
+ " int num_to_read =",
" YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;",
"",
" while ( num_to_read <= 0 )",

19
flex-bz1364943.patch Normal file
View file

@ -0,0 +1,19 @@
commit 07d89829cce4527c7614a34642d4b2c2ef5d6005
Author: Will Estes <westes575@gmail.com>
Date: Fri Dec 11 09:45:14 2015 -0500
Commented in C style in skeleton; fixed sf#195
diff --git a/src/flex.skl b/src/flex.skl
index b63c8c8..40287b6 100644
--- a/src/flex.skl
+++ b/src/flex.skl
@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
M4_YY_CALL_LAST_ARG);

View file

@ -3,7 +3,7 @@
Summary: A tool for creating scanners (text pattern recognizers)
Name: flex
Version: 2.6.0
Release: 1%{?dist}
Release: 3%{?dist}
# parse.c and parse.h are under GPLv3+ with exception which allows
# relicensing. Since flex is shipped under BDS-style license,
# let's assume that the relicensing was done.
@ -14,6 +14,8 @@ URL: http://flex.sourceforge.net/
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Patch0: flex-2.6.0-yyless.patch
Patch1: flex-2.6.0-num_to_read.patch
Patch2: flex-bz1364943.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: m4
@ -61,6 +63,8 @@ plain text and PDF formats.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure --docdir=%{_pkgdocdir} CFLAGS="-fPIC $RPM_OPT_FLAGS"
@ -133,6 +137,12 @@ rm -rf ${RPM_BUILD_ROOT}
%{_pkgdocdir}
%changelog
* Thu Oct 20 2016 Patsy Franklin <pfrankli@redhat.com> - 2.6.0-3
- Replace C++ style comment with C comment. BZ #1364943
* Wed Jul 27 2016 Patsy Franklin <pfrankli@redhat.com> - 2.6.0-2
Fix wrong type on num_to_read. BZ #1360744
* Thu Mar 10 2016 Patsy Franklin <pfrankli@redhat.com> - 2.6.0-1
- Rebase to 2.6.0
- Pick up an additional patch requested in BZ #1281976