summaryrefslogtreecommitdiff
path: root/flexint.h
diff options
context:
space:
mode:
Diffstat (limited to 'flexint.h')
-rw-r--r--flexint.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/flexint.h b/flexint.h
index fd649c4..4088715 100644
--- a/flexint.h
+++ b/flexint.h
@@ -5,7 +5,15 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#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;