From f6854d4d0d970f5c7d0cfa8a1c4ddad528d6d704 Mon Sep 17 00:00:00 2001 From: Tim Chen Date: Sat, 5 Nov 2016 11:57:41 +0800 Subject: bugfix: fixed compilation errors from the Microsoft C compiler. Signed-off-by: Yichun Zhang (agentzh) --- lua_cjson.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua_cjson.c b/lua_cjson.c index 5f4faf2..3a77644 100644 --- a/lua_cjson.c +++ b/lua_cjson.c @@ -75,6 +75,12 @@ #define DEFAULT_DECODE_INVALID_NUMBERS 0 #endif +#ifdef _MSC_VER +/* Microsoft C compiler lacks strncasecmp and strcasecmp. */ +#define strncasecmp _strnicmp +#define strcasecmp _stricmp +#endif + static const char * const *json_empty_array; typedef enum { -- cgit v1.2.3-55-g6feb