aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/common.h b/common.h
index d8a9622..a9386be 100644
--- a/common.h
+++ b/common.h
@@ -10,6 +10,18 @@
#define BITMASK(n) (UINTMAX_MAX >> (sizeof (uintmax_t) * CHAR_BIT - n))
+#ifndef PRIuSIZE
+ #ifdef _WIN32
+ #ifdef _WIN64
+ #define PRIuSIZE PRIu64
+ #else
+ #define PRIuSIZE PRIu32
+ #endif
+ #else
+ #define PRIuSIZE "zu"
+ #endif
+#endif
+
enum endian { BIG, LITTLE };
size_t getsize(char c);