summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/texmfmp.h
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-11-06 13:40:17 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-11-06 13:40:17 +0000
commitc08eff2883a952dd0f9325c51ad7968370452b02 (patch)
tree72080b810e039359df54696191cebf66f21d677b /Build/source/texk/web2c/texmfmp.h
parente8386671e9408e3e71d63a518a5d8851689c3e7c (diff)
MinGW64 build: Fix minor glitches, avoid compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@35527 c570f23f-e606-0410-a88d-b1316a301751
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)