diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-01-20 18:30:16 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-01-21 11:45:34 -0800 |
commit | 8358090292e21c61a583da542bad9099ad65f355 (patch) | |
tree | 53953078483eeaa9932966ae6c05066cceb24381 | |
parent | 0364dbacbf7b2e7e4c6655f706395a2eadd5f54e (diff) | |
download | bison-8358090292e21c61a583da542bad9099ad65f355.tar.gz |
c: port to HP-UX 11.23
Problem reported by Albert Chin in:
https://lists.gnu.org/r/bug-bison/2021-01/msg00029.html
* data/skeletons/c.m4 (b4_c99_int_type_define):
Work around HP-UX bug.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | data/skeletons/c.m4 | 12 |
2 files changed, 15 insertions, 0 deletions
@@ -2,6 +2,9 @@ GNU Bison NEWS * Noteworthy changes in release ?.? (????-??-??) [?] +** Bug fixes + +*** C-language parsers now work around quirks of HP-UX 11.23 (2003). * Noteworthy changes in release 3.7.4 (2020-11-14) [stable] diff --git a/data/skeletons/c.m4 b/data/skeletons/c.m4 index 07148ef8..14a16a9d 100644 --- a/data/skeletons/c.m4 +++ b/data/skeletons/c.m4 @@ -242,6 +242,18 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ |