===================================================================
@@ -2588,6 +2588,32 @@
};
/*
+ * Fix broken and missing defines in inttypes.h
+ */
+fix = {
+ hackname = hpux_c99_inttypes3;
+ mach = "hppa*-hp-hpux11*";
+ files = inttypes.h;
+ select = "#define[ \t]INTPTR_MAX[ \t]*\n"
+ "#define[ \t]UINTPTR_MAX[ \t]*\n";
+ c_fix = format;
+ c_fix_arg = "#undef SIZE_MAX\n"
+ "#define SIZE_MAX __SIZE_MAX__\n"
+ "#ifdef __INTPTR_MAX__\n"
+ "# undef INTPTR_MAX\n"
+ "# define INTPTR_MAX __INTPTR_MAX__\n"
+ "# undef INTPTR_MIN\n"
+ "# define INTPTR_MIN (-INTPTR_MAX - 1)\n"
+ "#endif\n"
+ "#ifdef __UINTPTR_MAX__\n"
+ "# undef UINTPTR_MAX\n"
+ "# define UINTPTR_MAX __UINTPTR_MAX__\n"
+ "#endif\n";
+ test_text = "#define INTPTR_MAX\n"
+ "#define UINTPTR_MAX\n";
+};
+
+/*
* Fix hpux broken ctype macros
*/
fix = {
===================================================================
@@ -16,3 +16,20 @@
#define UINT32_C(__c) __CONCAT__(__c,u)
#endif /* HPUX_C99_INTTYPES_CHECK */
+
+
+#if defined( HPUX_C99_INTTYPES3_CHECK )
+#undef SIZE_MAX
+#define SIZE_MAX __SIZE_MAX__
+#ifdef __INTPTR_MAX__
+# undef INTPTR_MAX
+# define INTPTR_MAX __INTPTR_MAX__
+# undef INTPTR_MIN
+# define INTPTR_MIN (-INTPTR_MAX - 1)
+#endif
+#ifdef __UINTPTR_MAX__
+# undef UINTPTR_MAX
+# define UINTPTR_MAX __UINTPTR_MAX__
+#endif
+
+#endif /* HPUX_C99_INTTYPES3_CHECK */