From ec4f23d5d25dd33de99301956d2219b32860570e Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Thu, 8 Mar 2018 09:54:41 +0800 Subject: [PATCH] scanner: Add a fallback INT_MAX definition. Signed-off-by: Kang-Che Sung --- src/flexint.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/flexint.h b/src/flexint.h index 13f880926..4b9e691ff 100644 --- a/src/flexint.h +++ b/src/flexint.h @@ -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