From: Cyril Brulebois Date: Wed, 5 Mar 2014 17:17:25 +0000 (-0500) Subject: Adjust buffer sizes on ia64. X-Git-Tag: v2.6.0~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14a1724dde50a5d635832ebdcc2546312f1cb7c2;p=flex 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. --- 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]],