diff options
Diffstat (limited to 'debian/patches/0002-Finish-fixing-the-ia64-buffer-issue.patch')
-rw-r--r-- | debian/patches/0002-Finish-fixing-the-ia64-buffer-issue.patch | 81 |
1 files changed, 81 insertions, 0 deletions
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..28f9405 --- /dev/null +++ b/debian/patches/0002-Finish-fixing-the-ia64-buffer-issue.patch @@ -0,0 +1,81 @@ +From d4ba98f3f5ba3173e6f77faab6c85e5ee3d72bdc 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/4] 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]],", +-- +1.9.1 + |