@@ -2668,6 +2668,34 @@ fix = {
"#define SCNxMAX SCNx32\n";
};
+/*
+ * Fix missing PRIdPTR defines in inttypes.h
+ */
+fix = {
+ hackname = hpux_c99_inttypes5;
+ mach = "hppa*-hp-hpux11.[01]*";
+ files = inttypes.h;
+ select = "#ifndef[ \t]_KERNEL[ \t]*\n";
+ c_fix = format;
+ c_fix_arg = "#ifndef __LP64__\n"
+ "#define PRIdPTR\t\tPRId32\n"
+ "#define PRIiPTR\t\tPRIi32\n"
+ "#define PRIoPTR\t\tPRIo32\n"
+ "#define PRIuPTR\t\tPRIu32\n"
+ "#define PRIxPTR\t\tPRIx32\n"
+ "#define PRIXPTR\t\tPRIX32\n"
+ "#else\n"
+ "#define PRIdPTR\t\tPRId64\n"
+ "#define PRIiPTR\t\tPRIi64\n"
+ "#define PRIoPTR\t\tPRIo64\n"
+ "#define PRIuPTR\t\tPRIu64\n"
+ "#define PRIxPTR\t\tPRIx64\n"
+ "#define PRIXPTR\t\tPRIX64\n"
+ "#endif\n\n"
+ "#ifndef _KERNEL\n";
+ test_text = "#ifndef _KERNEL\n";
+};
+
/*
* Fix hpux broken ctype macros
*/
@@ -42,3 +42,25 @@
#define SCNuMAX SCNu32
#endif /* HPUX_C99_INTTYPES4_CHECK */
+
+
+#if defined( HPUX_C99_INTTYPES5_CHECK )
+#ifndef __LP64__
+#define PRIdPTR PRId32
+#define PRIiPTR PRIi32
+#define PRIoPTR PRIo32
+#define PRIuPTR PRIu32
+#define PRIxPTR PRIx32
+#define PRIXPTR PRIX32
+#else
+#define PRIdPTR PRId64
+#define PRIiPTR PRIi64
+#define PRIoPTR PRIo64
+#define PRIuPTR PRIu64
+#define PRIxPTR PRIx64
+#define PRIXPTR PRIX64
+#endif
+
+#ifndef _KERNEL
+
+#endif /* HPUX_C99_INTTYPES5_CHECK */