parent
37c97f3c4c
commit
fe59d6ddc0
@ -1,11 +0,0 @@
|
|||||||
diff -urp flex-2.5.33/Makefile.in flex-2.5.33-pm/Makefile.in
|
|
||||||
--- flex-2.5.33/Makefile.in 2007-05-30 10:57:18.000000000 +0200
|
|
||||||
+++ flex-2.5.33-pm/Makefile.in 2007-05-30 10:57:11.000000000 +0200
|
|
||||||
@@ -291,6 +291,6 @@ SUBDIRS = \
|
|
||||||
|
|
||||||
|
|
||||||
localedir = $(datadir)/locale
|
|
||||||
-AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl
|
|
||||||
+AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl
|
|
||||||
|
|
||||||
# Run GNU indent on sources. Don't run this unless all the sources compile cleanly.
|
|
@ -1,40 +0,0 @@
|
|||||||
diff -urp flex-2.5.33/scanopt.c flex-2.5.33-pm/scanopt.c
|
|
||||||
--- flex-2.5.33/scanopt.c 2002-08-29 22:30:25.000000000 +0200
|
|
||||||
+++ flex-2.5.33-pm/scanopt.c 2007-05-11 17:48:29.000000000 +0200
|
|
||||||
@@ -789,12 +789,12 @@ int scanopt (svoid, arg, optindex)
|
|
||||||
}
|
|
||||||
|
|
||||||
optarg = pstart + 1;
|
|
||||||
- arglen = 0;
|
|
||||||
- while (optarg[arglen])
|
|
||||||
- arglen++;
|
|
||||||
-
|
|
||||||
- if (arglen == 0)
|
|
||||||
+ if (!*optarg) {
|
|
||||||
optarg = NULL;
|
|
||||||
+ arglen = 0;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ arglen = strlen (optarg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At this point, we have a long or short option matched at opt_offset into
|
|
||||||
@@ -812,13 +812,16 @@ int scanopt (svoid, arg, optindex)
|
|
||||||
|
|
||||||
/* case: no args allowed */
|
|
||||||
if (auxp->flags & ARG_NONE) {
|
|
||||||
- if (optarg) {
|
|
||||||
+ if (optarg && !is_short) {
|
|
||||||
scanopt_err (s, opt_offset, is_short, errcode =
|
|
||||||
SCANOPT_ERR_ARG_NOT_ALLOWED);
|
|
||||||
INC_INDEX (s, 1);
|
|
||||||
return errcode;
|
|
||||||
}
|
|
||||||
- INC_INDEX (s, 1);
|
|
||||||
+ else if (!optarg)
|
|
||||||
+ INC_INDEX (s, 1);
|
|
||||||
+ else
|
|
||||||
+ s->subscript++;
|
|
||||||
return optp->r_val;
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
--- flex-2.5.33/gen.c
|
|
||||||
+++ flex-2.5.33/gen.c
|
|
||||||
@@ -1897,7 +1897,7 @@ void make_tables ()
|
|
||||||
outn ("\t\t{ \\");
|
|
||||||
outn ("\t\tint c = '*'; \\");
|
|
||||||
outn ("\t\tsize_t n; \\");
|
|
||||||
- outn ("\t\tfor ( n = 0; n < max_size && \\");
|
|
||||||
+ outn ("\t\tfor ( n = 0; n < (size_t) max_size && \\");
|
|
||||||
outn ("\t\t\t (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\");
|
|
||||||
outn ("\t\t\tbuf[n] = (char) c; \\");
|
|
||||||
outn ("\t\tif ( c == '\\n' ) \\");
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
diff -rup flex-2.5.33/tests/test-linedir-r/Makefile.am flex-2.5.33-pm/tests/test-linedir-r/Makefile.am
|
|
||||||
--- flex-2.5.33/tests/test-linedir-r/Makefile.in 2003-03-26 19:29:45.000000000 +0100
|
|
||||||
+++ flex-2.5.33-pm/tests/test-linedir-r/Makefile.in 2007-08-30 12:28:09.000000000 +0200
|
|
||||||
@@ -46,8 +46,8 @@ $(testname)$(EXEEXT): $(OBJS)
|
|
||||||
|
|
||||||
test: $(testname)$(EXEEXT)
|
|
||||||
./$(testname)$(EXEEXT) < $(srcdir)/test.input
|
|
||||||
- cat -n scanner.c | grep '#line' | grep scanner.c | awk -f $(srcdir)/check-lines.awk
|
|
||||||
- cat -n scanner.h | grep '#line' | grep scanner.h | awk -f $(srcdir)/check-lines.awk
|
|
||||||
+ cat -n scanner.c | grep '#line' | grep scanner.c | $(AWK) -f $(srcdir)/check-lines.awk
|
|
||||||
+ cat -n scanner.h | grep '#line' | grep scanner.h | $(AWK) -f $(srcdir)/check-lines.awk
|
|
||||||
|
|
||||||
.c.o:
|
|
||||||
$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
|
|
@ -1,76 +0,0 @@
|
|||||||
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,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]]
|
|
||||||
+#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
|
|
||||||
+%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,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]]",
|
|
||||||
+ "#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",
|
|
||||||
+ "%endif",
|
|
||||||
+ "%ok-for-header",
|
|
||||||
+ "",
|
|
||||||
"#define FLEX_SCANNER",
|
|
||||||
"#define YY_FLEX_MAJOR_VERSION 2",
|
|
||||||
"#define YY_FLEX_MINOR_VERSION 5",
|
|
131
flex-2.5.34-testsuite.patch
Normal file
131
flex-2.5.34-testsuite.patch
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
diff -urp flex-2.5.34/tests/test-alloc-extra/scanner.l flex-2.5.34-pm/tests/test-alloc-extra/scanner.l
|
||||||
|
--- flex-2.5.34/tests/test-alloc-extra/scanner.l 2007-09-10 08:17:45.000000000 +0200
|
||||||
|
+++ flex-2.5.34-pm/tests/test-alloc-extra/scanner.l 2008-02-25 18:09:14.000000000 +0100
|
||||||
|
@@ -44,7 +44,7 @@ struct Check {
|
||||||
|
static void check_extra ( yyscan_t scanner );
|
||||||
|
|
||||||
|
/* Special yyalloc */
|
||||||
|
-void *yyalloc ( size_t size, yyscan_t scanner );
|
||||||
|
+void *yyalloc ( yy_size_t size, yyscan_t scanner );
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-void *yyalloc(size_t size, yyscan_t scanner)
|
||||||
|
+void *yyalloc(yy_size_t size, yyscan_t scanner)
|
||||||
|
{
|
||||||
|
struct Check *check;
|
||||||
|
check = testget_extra(scanner);
|
||||||
|
diff -urp flex-2.5.34/tests/test-c++-multiple-scanners/scanner-1.l flex-2.5.34-pm/tests/test-c++-multiple-scanners/scanner-1.l
|
||||||
|
--- flex-2.5.34/tests/test-c++-multiple-scanners/scanner-1.l 2002-10-01 17:10:12.000000000 +0200
|
||||||
|
+++ flex-2.5.34-pm/tests/test-c++-multiple-scanners/scanner-1.l 2008-02-25 16:54:48.000000000 +0100
|
||||||
|
@@ -1,23 +1,25 @@
|
||||||
|
- // This file is part of flex.
|
||||||
|
- //
|
||||||
|
- // Redistribution and use in source and binary forms, with or without
|
||||||
|
- // modification, are permitted provided that the following conditions
|
||||||
|
- // are met:
|
||||||
|
- //
|
||||||
|
- // 1. Redistributions of source code must retain the above copyright
|
||||||
|
- // notice, this list of conditions and the following disclaimer.
|
||||||
|
- // 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
- // notice, this list of conditions and the following disclaimer in the
|
||||||
|
- // documentation and/or other materials provided with the distribution.
|
||||||
|
- //
|
||||||
|
- // Neither the name of the University nor the names of its contributors
|
||||||
|
- // may be used to endorse or promote products derived from this software
|
||||||
|
- // without specific prior written permission.
|
||||||
|
- //
|
||||||
|
- // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||||
|
- // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||||
|
- // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
- // PURPOSE.
|
||||||
|
+/*
|
||||||
|
+ * This file is part of flex.
|
||||||
|
+ *
|
||||||
|
+ * Redistribution and use in source and binary forms, with or without
|
||||||
|
+ * modification, are permitted provided that the following conditions
|
||||||
|
+ * are met:
|
||||||
|
+ *
|
||||||
|
+ * 1. Redistributions of source code must retain the above copyright
|
||||||
|
+ * notice, this list of conditions and the following disclaimer.
|
||||||
|
+ * 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
+ * notice, this list of conditions and the following disclaimer in the
|
||||||
|
+ * documentation and/or other materials provided with the distribution.
|
||||||
|
+ *
|
||||||
|
+ * Neither the name of the University nor the names of its contributors
|
||||||
|
+ * may be used to endorse or promote products derived from this software
|
||||||
|
+ * without specific prior written permission.
|
||||||
|
+ *
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||||
|
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||||
|
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
+ * PURPOSE.
|
||||||
|
+ */
|
||||||
|
|
||||||
|
%{
|
||||||
|
#include "config.h"
|
||||||
|
diff -urp flex-2.5.34/tests/test-c++-multiple-scanners/scanner-2.l flex-2.5.34-pm/tests/test-c++-multiple-scanners/scanner-2.l
|
||||||
|
--- flex-2.5.34/tests/test-c++-multiple-scanners/scanner-2.l 2006-10-23 00:17:38.000000000 +0200
|
||||||
|
+++ flex-2.5.34-pm/tests/test-c++-multiple-scanners/scanner-2.l 2008-02-25 16:55:00.000000000 +0100
|
||||||
|
@@ -1,23 +1,25 @@
|
||||||
|
- // This file is part of flex.
|
||||||
|
- //
|
||||||
|
- // Redistribution and use in source and binary forms, with or without
|
||||||
|
- // modification, are permitted provided that the following conditions
|
||||||
|
- // are met:
|
||||||
|
- //
|
||||||
|
- // 1. Redistributions of source code must retain the above copyright
|
||||||
|
- // notice, this list of conditions and the following disclaimer.
|
||||||
|
- // 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
- // notice, this list of conditions and the following disclaimer in the
|
||||||
|
- // documentation and/or other materials provided with the distribution.
|
||||||
|
- //
|
||||||
|
- // Neither the name of the University nor the names of its contributors
|
||||||
|
- // may be used to endorse or promote products derived from this software
|
||||||
|
- // without specific prior written permission.
|
||||||
|
- //
|
||||||
|
- // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||||
|
- // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||||
|
- // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
- // PURPOSE.
|
||||||
|
+/*
|
||||||
|
+ * This file is part of flex.
|
||||||
|
+ *
|
||||||
|
+ * Redistribution and use in source and binary forms, with or without
|
||||||
|
+ * modification, are permitted provided that the following conditions
|
||||||
|
+ * are met:
|
||||||
|
+ *
|
||||||
|
+ * 1. Redistributions of source code must retain the above copyright
|
||||||
|
+ * notice, this list of conditions and the following disclaimer.
|
||||||
|
+ * 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
+ * notice, this list of conditions and the following disclaimer in the
|
||||||
|
+ * documentation and/or other materials provided with the distribution.
|
||||||
|
+ *
|
||||||
|
+ * Neither the name of the University nor the names of its contributors
|
||||||
|
+ * may be used to endorse or promote products derived from this software
|
||||||
|
+ * without specific prior written permission.
|
||||||
|
+ *
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||||
|
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||||
|
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
+ * PURPOSE.
|
||||||
|
+ */
|
||||||
|
|
||||||
|
%{
|
||||||
|
#include "config.h"
|
||||||
|
diff -urp flex-2.5.34/tests/test-pthread/scanner.l flex-2.5.34-pm/tests/test-pthread/scanner.l
|
||||||
|
--- flex-2.5.34/tests/test-pthread/scanner.l 2007-05-12 17:27:33.000000000 +0200
|
||||||
|
+++ flex-2.5.34-pm/tests/test-pthread/scanner.l 2008-02-25 17:02:03.000000000 +0100
|
||||||
|
@@ -52,7 +52,7 @@ static int process_text(char* s, yyscan_
|
||||||
|
%option reentrant
|
||||||
|
%option warn
|
||||||
|
|
||||||
|
- /* Arbitrary states.*/
|
||||||
|
+/* Arbitrary states.*/
|
||||||
|
%x STATE_1
|
||||||
|
%x STATE_2
|
||||||
|
|
22
flex.spec
22
flex.spec
@ -1,17 +1,13 @@
|
|||||||
Summary: A tool for creating scanners (text pattern recognizers)
|
Summary: A tool for creating scanners (text pattern recognizers)
|
||||||
Name: flex
|
Name: flex
|
||||||
Version: 2.5.33
|
Version: 2.5.34
|
||||||
Release: 17%{?dist}
|
Release: 1%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
URL: http://flex.sourceforge.net/
|
URL: http://flex.sourceforge.net/
|
||||||
Source: flex-%{version}.tar.bz2
|
Source: flex-%{version}.tar.bz2
|
||||||
Patch1: flex-2.5.33-yy.patch
|
Patch0: flex-2.5.33-prototypes.patch
|
||||||
Patch2: flex-2.5.33-opts.patch
|
Patch1: flex-2.5.34-testsuite.patch
|
||||||
Patch3: flex-2.5.33-includedir.patch
|
|
||||||
Patch4: flex-2.5.33-test-linedir-r.patch
|
|
||||||
Patch5: flex-2.5.33-signedwarn.patch
|
|
||||||
Patch6: flex-2.5.33-prototypes.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Requires: m4
|
Requires: m4
|
||||||
BuildRequires: gettext bison m4
|
BuildRequires: gettext bison m4
|
||||||
@ -34,12 +30,8 @@ application development.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p0
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p0
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-dependency-tracking CFLAGS="-fPIC $RPM_OPT_FLAGS"
|
%configure --disable-dependency-tracking CFLAGS="-fPIC $RPM_OPT_FLAGS"
|
||||||
@ -86,6 +78,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_infodir}/flex.info*
|
%{_infodir}/flex.info*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 25 2008 Petr Machata <pmachata@redhat.com> - 2.5.34-1
|
||||||
|
- Rebase to 2.5.34. Drop five patches.
|
||||||
|
- Resolves: #434676
|
||||||
|
|
||||||
* Mon Feb 11 2008 Petr Machata <pmachata@redhat.com> - 2.5.33-17
|
* Mon Feb 11 2008 Petr Machata <pmachata@redhat.com> - 2.5.33-17
|
||||||
- Generate prototypes for accessor functions. Upstream patch.
|
- Generate prototypes for accessor functions. Upstream patch.
|
||||||
- Related: #432203
|
- Related: #432203
|
||||||
|
Loading…
Reference in New Issue
Block a user