Message ID | 34bff4f7-c91b-1bdc-f530-85e5d645a090@bell.net |
---|---|
State | New |
Headers | show |
Series | [committed] Add include hack to fix missing SCNuMAX defines in inttypes.h on hpux11.[01]* | expand |
On 1/25/20 9:34 AM, John David Anglin wrote: > +/* > + * Fix missing SCNuMAX defines in inttypes.h > + */ > +fix = { > + hackname = hpux_c99_inttypes4; > + mach = "hppa*-hp-hpux11.[01]*"; > + files = inttypes.h; > + sed = "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx64/a\\\n" > + "#define SCNuMAX \t SCNu64\n"; > + sed = "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx32/a\\\n" > + "#define SCNuMAX \t SCNu32\n"; > + test_text = "#define SCNxMAX SCNx64\n" > + "#define SCNxMAX SCNx32\n"; > +}; > + "<space><tab><space>" in the inserted text? OK. It works...
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index bf136fdaa20..f58e7771e1c 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -2613,6 +2613,21 @@ fix = { "#define UINTPTR_MAX\n"; }; +/* + * Fix missing SCNuMAX defines in inttypes.h + */ +fix = { + hackname = hpux_c99_inttypes4; + mach = "hppa*-hp-hpux11.[01]*"; + files = inttypes.h; + sed = "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx64/a\\\n" + "#define SCNuMAX \t SCNu64\n"; + sed = "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx32/a\\\n" + "#define SCNuMAX \t SCNu32\n"; + test_text = "#define SCNxMAX SCNx64\n" + "#define SCNxMAX SCNx32\n"; +}; + /* * Fix hpux broken ctype macros */ diff --git a/fixincludes/tests/base/inttypes.h b/fixincludes/tests/base/inttypes.h index e2216832666..144ea6596e8 100644 --- a/fixincludes/tests/base/inttypes.h +++ b/fixincludes/tests/base/inttypes.h @@ -33,3 +33,12 @@ #endif #endif /* HPUX_C99_INTTYPES3_CHECK */ + + +#if defined( HPUX_C99_INTTYPES4_CHECK ) +#define SCNxMAX SCNx64 +#define SCNuMAX SCNu64 +#define SCNxMAX SCNx32 +#define SCNuMAX SCNu32 + +#endif /* HPUX_C99_INTTYPES4_CHECK */