summaryrefslogtreecommitdiff
path: root/flexint.h
diff options
context:
space:
mode:
Diffstat (limited to 'flexint.h')
-rw-r--r--flexint.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/flexint.h b/flexint.h
index be824de..4088715 100644
--- a/flexint.h
+++ b/flexint.h
@@ -6,6 +6,14 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
#if __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;