]> granicus.if.org Git - flex/commitdiff
scanner: Add a fallback INT_MAX definition.
authorExplorer09 <explorer09@gmail.com>
Thu, 8 Mar 2018 01:54:41 +0000 (09:54 +0800)
committerWill Estes <westes575@gmail.com>
Thu, 8 Mar 2018 21:00:24 +0000 (16:00 -0500)
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
src/flexint.h

index 13f880926adb10d7438237c53cfdc7eff9189401..4b9e691fffcd4e3eb48aee6c0fd4fad3c2d64f95 100644 (file)
@@ -58,6 +58,9 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#ifndef INT_MAX
+#define INT_MAX                ((int)(~0U)>>1)
+#endif
 #ifndef SIZE_MAX
 #define SIZE_MAX               (~(size_t)0)
 #endif