diff options
Diffstat (limited to 'debian/patches')
6 files changed, 367 insertions, 0 deletions
diff --git a/debian/patches/0001-debcherry-fixup-patch.patch b/debian/patches/0001-debcherry-fixup-patch.patch new file mode 100644 index 0000000..f7c0c6a --- /dev/null +++ b/debian/patches/0001-debcherry-fixup-patch.patch @@ -0,0 +1,75 @@ +From 5976487aeeaf3321d938ed450d8767f434f6b1e9 Mon Sep 17 00:00:00 2001 +From: Manoj Srivastava <srivasta@golden-gryphon.com> +Date: Tue, 6 May 2014 23:53:47 -0700 +Subject: [PATCH 1/5] debcherry fixup patch + +61112fc [topic--autoconf0files] Delete files create by autoconf + - extra changes or conflicts +91d57d4 Correct a few dependencies in Makefiles + - extra changes or conflicts +--- + tests/test-bison-nr/Makefile.am | 4 ++-- + tests/test-bison-yylloc/Makefile.am | 4 ++-- + tests/test-bison-yylval/Makefile.am | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test-bison-nr/Makefile.am b/tests/test-bison-nr/Makefile.am +index 9bc8af3..f6e6de9 100644 +--- a/tests/test-bison-nr/Makefile.am ++++ b/tests/test-bison-nr/Makefile.am +@@ -29,12 +29,12 @@ CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) + OBJS = scanner.o parser.o main.o + + AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) +-#LDFLAGS = $(top_srcdir)/libfl.a ++#LDFLAGS = $(top_srcdir)/libfl.a + YFLAGS = --defines --output=parser.c --name-prefix="test" + + testname = test-bison-nr + +-scanner.c: $(srcdir)/scanner.l ++scanner.c scanner.h: $(srcdir)/scanner.l + $(FLEX) $< + scanner.h: scanner.c + scanner.o: parser.h +diff --git a/tests/test-bison-yylloc/Makefile.am b/tests/test-bison-yylloc/Makefile.am +index dc41b0f..0070991 100644 +--- a/tests/test-bison-yylloc/Makefile.am ++++ b/tests/test-bison-yylloc/Makefile.am +@@ -29,12 +29,12 @@ CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) + OBJS = scanner.o parser.o main.o + + AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) +-#LDFLAGS = $(top_srcdir)/libfl.a ++#LDFLAGS = $(top_srcdir)/libfl.a + YFLAGS = --defines --output=parser.c --name-prefix="test" + + testname = test-bison-yylloc + +-scanner.c: $(srcdir)/scanner.l ++scanner.c scanner.h: $(srcdir)/scanner.l + $(FLEX) $< + scanner.h: scanner.c + scanner.o: parser.h +diff --git a/tests/test-bison-yylval/Makefile.am b/tests/test-bison-yylval/Makefile.am +index d8e27f7..1937b34 100644 +--- a/tests/test-bison-yylval/Makefile.am ++++ b/tests/test-bison-yylval/Makefile.am +@@ -29,12 +29,12 @@ CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) + OBJS = parser.o scanner.o main.o + + AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) +-#LDFLAGS = $(top_srcdir)/libfl.a ++#LDFLAGS = $(top_srcdir)/libfl.a + YFLAGS = --defines --output=parser.c --name-prefix="test" + + testname = test-bison-yylval + +-scanner.c: $(srcdir)/scanner.l ++scanner.c scanner.h: $(srcdir)/scanner.l + $(FLEX) $< + scanner.h: scanner.c + scanner.o: parser.h +-- +2.0.0.rc0 + diff --git a/debian/patches/0002-Finish-fixing-the-ia64-buffer-issue.patch b/debian/patches/0002-Finish-fixing-the-ia64-buffer-issue.patch new file mode 100644 index 0000000..472a158 --- /dev/null +++ b/debian/patches/0002-Finish-fixing-the-ia64-buffer-issue.patch @@ -0,0 +1,81 @@ +From 028b2841cadc8abddfa1a8907b5b7b3ed31dbd0c Mon Sep 17 00:00:00 2001 +From: Cyril Brulebois <kibi@debian.org> +Date: Fri, 2 Jan 2009 06:53:39 +0100 +Subject: [PATCH 2/5] Finish fixing the ia64 buffer issue. + +Previous commits increased YY_READ_BUF_SIZE (where __ia64__ is defined) but +left YY_BUF_SIZE unchanged, so that didn't fix the problem in the end. In the +general case, the latter is twice the former. Therefore set it to the same +ratio in the ia64 case. + +Signed-off-by: Cyril Brulebois <kibi@debian.org> +Signed-off-by: Manoj Srivastava <srivasta@debian.org> +--- + flex.skl | 8 ++++++++ + scan.c | 8 ++++++++ + skel.c | 8 ++++++++ + 3 files changed, 24 insertions(+) + +diff --git a/flex.skl b/flex.skl +index f878ff0..460cbf4 100644 +--- a/flex.skl ++++ b/flex.skl +@@ -447,7 +447,15 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]], + + /* Size of default input buffer. */ + #ifndef YY_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k. ++ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. ++ * Ditto for the __ia64__ case accordingly. ++ */ ++#define YY_BUF_SIZE 32768 ++#else + #define YY_BUF_SIZE 16384 ++#endif /* __ia64__ */ + #endif + + m4_ifdef( [[M4_YY_NOT_IN_HEADER]], +diff --git a/scan.c b/scan.c +index 4bbbdcc..83bb6aa 100644 +--- a/scan.c ++++ b/scan.c +@@ -141,7 +141,15 @@ typedef unsigned int flex_uint32_t; + + /* Size of default input buffer. */ + #ifndef YY_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k. ++ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. ++ * Ditto for the __ia64__ case accordingly. ++ */ ++#define YY_BUF_SIZE 32768 ++#else + #define YY_BUF_SIZE 16384 ++#endif /* __ia64__ */ + #endif + + /* The state buf must be large enough to hold one state per character in the main buffer. +diff --git a/skel.c b/skel.c +index 6dc7644..128cdb3 100644 +--- a/skel.c ++++ b/skel.c +@@ -514,7 +514,15 @@ const char *skel[] = { + "", + "/* Size of default input buffer. */", + "#ifndef YY_BUF_SIZE", ++ "#ifdef __ia64__", ++ "/* On IA-64, the buffer size is 16k, not 8k.", ++ " * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.", ++ " * Ditto for the __ia64__ case accordingly.", ++ " */", ++ "#define YY_BUF_SIZE 32768", ++ "#else", + "#define YY_BUF_SIZE 16384", ++ "#endif /* __ia64__ */", + "#endif", + "", + "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", +-- +2.0.0.rc0 + diff --git a/debian/patches/0003-ia64-buffer-fix-Some-more-fixes-for-the-ia64-buffer-.patch b/debian/patches/0003-ia64-buffer-fix-Some-more-fixes-for-the-ia64-buffer-.patch new file mode 100644 index 0000000..754b69d --- /dev/null +++ b/debian/patches/0003-ia64-buffer-fix-Some-more-fixes-for-the-ia64-buffer-.patch @@ -0,0 +1,75 @@ +From 2cd06e17a6500865438007bd7983c9823269cb99 Mon Sep 17 00:00:00 2001 +From: Manoj Srivastava <srivasta@golden-gryphon.com> +Date: Fri, 2 Jan 2009 07:23:39 +0100 +Subject: [PATCH 3/5] [ia64-buffer-fix]]: Some more fixes for the ia64 buffer + issue. + +Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com> +--- + flex.skl | 5 +++++ + scan.c | 8 +++++++- + skel.c | 5 +++++ + 3 files changed, 17 insertions(+), 1 deletion(-) + +diff --git a/flex.skl b/flex.skl +index 460cbf4..85eea18 100644 +--- a/flex.skl ++++ b/flex.skl +@@ -1104,7 +1104,12 @@ m4_define( [[M4_YY_NO_TOP_STATE]]) + + /* Amount of stuff to slurp up with each read. */ + #ifndef YY_READ_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k */ ++#define YY_READ_BUF_SIZE 16384 ++#else + #define YY_READ_BUF_SIZE 8192 ++#endif /* __ia64__ */ + #endif + + m4_ifdef( [[M4_YY_NOT_IN_HEADER]], +diff --git a/scan.c b/scan.c +index 83bb6aa..30b4bf2 100644 +--- a/scan.c ++++ b/scan.c +@@ -1,5 +1,6 @@ ++#line 2 "scan.c" + +-#line 3 "scan.c" ++#line 4 "scan.c" + + #define YY_INT_ALIGNED short int + +@@ -2095,7 +2096,12 @@ static int input (void ); + + /* Amount of stuff to slurp up with each read. */ + #ifndef YY_READ_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k */ ++#define YY_READ_BUF_SIZE 16384 ++#else + #define YY_READ_BUF_SIZE 8192 ++#endif /* __ia64__ */ + #endif + + /* Copy whatever the last rule matched to the standard output. */ +diff --git a/skel.c b/skel.c +index 128cdb3..4ef6e3a 100644 +--- a/skel.c ++++ b/skel.c +@@ -1171,7 +1171,12 @@ const char *skel[] = { + "", + "/* Amount of stuff to slurp up with each read. */", + "#ifndef YY_READ_BUF_SIZE", ++ "#ifdef __ia64__", ++ "/* On IA-64, the buffer size is 16k, not 8k */", ++ "#define YY_READ_BUF_SIZE 16384", ++ "#else", + "#define YY_READ_BUF_SIZE 8192", ++ "#endif /* __ia64__ */", + "#endif", + "", + "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", +-- +2.0.0.rc0 + diff --git a/debian/patches/0004-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch b/debian/patches/0004-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch new file mode 100644 index 0000000..729571f --- /dev/null +++ b/debian/patches/0004-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch @@ -0,0 +1,77 @@ +From d3d8bc98898f2b917062d8ef935de9bb0a50b540 Mon Sep 17 00:00:00 2001 +From: Manoj Srivastava <srivasta@golden-gryphon.com> +Date: Wed, 9 Apr 2014 00:23:07 -0700 +Subject: [PATCH 4/5] [bison-test-fixes] Do not use obsolete bison constructs + in tests. + +In Bison 3.0, support for YYLEX_PARAM and YYPARSE_PARAM has been +removed (deprecated in Bison 1.875): use %lex-param, %parse-param, or +%param. This commit fixes the tests so they still work. + +Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com> +--- + tests/test-bison-yylloc/parser.y | 4 ++-- + tests/test-bison-yylval/parser.y | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y +index e8f4e56..224d252 100644 +--- a/tests/test-bison-yylloc/parser.y ++++ b/tests/test-bison-yylloc/parser.y +@@ -22,6 +22,7 @@ + */ + + %parse-param { void* scanner } ++%lex-param { void* scanner } + + /* + How to compile: +@@ -34,7 +35,6 @@ + #include "config.h" + + #define YYERROR_VERBOSE 1 +-#define YYLEX_PARAM scanner + + extern int testget_lineno(void*); + +@@ -52,7 +52,7 @@ int process_text(char* s) { + + %} + +-%pure_parser ++%pure-parser + + %union { + int lineno; +diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y +index 0ffdb89..626c5e7 100644 +--- a/tests/test-bison-yylval/parser.y ++++ b/tests/test-bison-yylval/parser.y +@@ -26,6 +26,7 @@ + bison --defines --output-file="parser.c" --name-prefix="test" parser.y + */ + %parse-param { void* scanner } ++%lex-param { void* scanner } + %{ + #include <stdio.h> + #include <stdlib.h> +@@ -33,7 +34,6 @@ + #include "config.h" + + #define YYERROR_VERBOSE 1 +-#define YYLEX_PARAM scanner + + + /* A dummy function. A check against seg-faults in yylval->str. */ +@@ -49,7 +49,7 @@ int process_text(char* s) { + + %} + +-%pure_parser ++%pure-parser + + %union { + long unused; +-- +2.0.0.rc0 + diff --git a/debian/patches/0005-fix-off-by-one-error-generatred-line-numbers-are-off.patch b/debian/patches/0005-fix-off-by-one-error-generatred-line-numbers-are-off.patch new file mode 100644 index 0000000..280d392 --- /dev/null +++ b/debian/patches/0005-fix-off-by-one-error-generatred-line-numbers-are-off.patch @@ -0,0 +1,53 @@ +From 0784556690a1f33ea44a03d20312ef439ae5cc32 Mon Sep 17 00:00:00 2001 +From: Manoj Srivastava <srivasta@golden-gryphon.com> +Date: Tue, 6 May 2014 23:50:05 -0700 +Subject: [PATCH 5/5] [fix-off-by-one-error]: generatred line numbers are off + by one + +The code that is generated by flex has an off-by-one error in the +generated #line pragmas that occur after the second %% line in the +source file (that is, the one that is used after the token patterns). As +a result, gdb will think we're, e.g., on line 46 when in reality we're +on line 45. + +Marcus Rausch supplied the patch in this commit + +Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com> +--- + gen.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gen.c b/gen.c +index 8261951..1594dcf 100644 +--- a/gen.c ++++ b/gen.c +@@ -1084,7 +1084,7 @@ void gentabs () + out_str_dec (long_align ? get_int32_decl () : + get_int16_decl (), "yy_acclist", MAX (numas, + 1) + 1); +- ++ + buf_prints (&yydmap_buf, + "\t{YYTD_ID_ACCLIST, (void**)&yy_acclist, sizeof(%s)},\n", + long_align ? "flex_int32_t" : "flex_int16_t"); +@@ -1092,7 +1092,7 @@ void gentabs () + yyacclist_tbl = (struct yytbl_data*)calloc(1,sizeof(struct yytbl_data)); + yytbl_data_init (yyacclist_tbl, YYTD_ID_ACCLIST); + yyacclist_tbl->td_lolen = MAX(numas,1) + 1; +- yyacclist_tbl->td_data = yyacclist_data = ++ yyacclist_tbl->td_data = yyacclist_data = + (flex_int32_t *) calloc (yyacclist_tbl->td_lolen, sizeof (flex_int32_t)); + yyacclist_curr = 1; + +@@ -2158,7 +2158,7 @@ void make_tables () + skelout (); + + /* Copy remainder of input to output. */ +- ++ linenum--; + line_directive_out (stdout, 1); + + if (sectnum == 3) { +-- +2.0.0.rc0 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..ddba361 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,6 @@ +# exported from git by git-debcherry +0001-debcherry-fixup-patch.patch +0002-Finish-fixing-the-ia64-buffer-issue.patch +0003-ia64-buffer-fix-Some-more-fixes-for-the-ia64-buffer-.patch +0004-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch +0005-fix-off-by-one-error-generatred-line-numbers-are-off.patch |