summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2014-03-05 12:17:25 -0500
committerWill Estes <westes575@gmail.com>2014-03-05 12:17:25 -0500
commit14a1724dde50a5d635832ebdcc2546312f1cb7c2 (patch)
tree365dc71dbc46423a9f75cd2b0a3073714e51cf34 /src
parent5dbce367dca7bfd96ef347286cecb34cb71bf7d5 (diff)
Adjust buffer sizes on ia64.
From the debian change entry: > 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. In general, this sort of architecture specific fix is not the path we want to take, but the cleanup should be done in a more organized way in the future and getting it working would be preferrable now.
Diffstat (limited to 'src')
-rw-r--r--src/flex.skl13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/flex.skl b/src/flex.skl
index f878ff0..85eea18 100644
--- a/src/flex.skl
+++ b/src/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]],
@@ -1096,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]],