summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/texmfmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/texmfmp.h')
-rw-r--r--Build/source/texk/web2c/texmfmp.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/texmfmp.h b/Build/source/texk/web2c/texmfmp.h
index f0a244549f0..a4cd5f28cc8 100644
--- a/Build/source/texk/web2c/texmfmp.h
+++ b/Build/source/texk/web2c/texmfmp.h
@@ -290,6 +290,13 @@ extern void paintrow (/*screenrow, pixelcolor, transspec, screencol*/);
#define undumpthings(base, len) \
do_undump ((char *) &(base), sizeof (base), (int) (len), DUMP_FILE)
+#ifndef PRIdPTR
+#define PRIdPTR "ld"
+#endif
+#ifndef PRIxPTR
+#define PRIxPTR "lx"
+#endif
+
/* Like do_undump, but check each value against LOW and HIGH. The
slowdown isn't significant, and this improves the chances of
detecting incompatible format files. In fact, Knuth himself noted
@@ -301,9 +308,10 @@ extern void paintrow (/*screenrow, pixelcolor, transspec, screencol*/);
undumpthings (base, len); \
for (i = 0; i < (len); i++) { \
if ((&(base))[i] < (low) || (&(base))[i] > (high)) { \
- FATAL5 ("Item %u (=%ld) of .fmt array at %lx <%ld or >%ld", \
- i, (unsigned long) (&(base))[i], (unsigned long) &(base),\
- (unsigned long) low, (unsigned long) high); \
+ FATAL5 ("Item %u (=%" PRIdPTR ") of .fmt array at %" PRIxPTR \
+ " <%" PRIdPTR " or >%" PRIdPTR, \
+ i, (uintptr_t) (&(base))[i], (uintptr_t) &(base), \
+ (uintptr_t) low, (uintptr_t) high); \
} \
} \
} while (0)
@@ -317,9 +325,10 @@ extern void paintrow (/*screenrow, pixelcolor, transspec, screencol*/);
undumpthings (base, len); \
for (i = 0; i < (len); i++) { \
if ((&(base))[i] > (high)) { \
- FATAL4 ("Item %u (=%ld) of .fmt array at %lx >%ld", \
- i, (unsigned long) (&(base))[i], (unsigned long) &(base),\
- (unsigned long) high); \
+ FATAL4 ("Item %u (=%" PRIdPTR ") of .fmt array at %" PRIxPTR \
+ " >%" PRIdPTR, \
+ i, (uintptr_t) (&(base))[i], (uintptr_t) &(base), \
+ (uintptr_t) high); \
} \
} \
} while (0)