From 53baee1e33022fcba4d316b3952510c085173e02 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Thu, 11 Aug 2011 19:46:36 +0930 Subject: Add work around for missing isinf() on Solaris Some versions of Solaris (Eg, Solaris 11 / GCC 3.4.3) are missing isinf(). Provide a work around when MISSING_ISINF is defined. Reported by: Zhang "agentzh" Yichun --- lua_cjson.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua_cjson.c') diff --git a/lua_cjson.c b/lua_cjson.c index b46e915..076c56f 100644 --- a/lua_cjson.c +++ b/lua_cjson.c @@ -44,6 +44,10 @@ #include "strbuf.h" +#ifdef MISSING_ISINF +#define isinf(x) (!isnan(x) && isnan((x) - (x))) +#endif + #define DEFAULT_SPARSE_CONVERT 0 #define DEFAULT_SPARSE_RATIO 2 #define DEFAULT_SPARSE_SAFE 10 -- cgit v1.2.3-55-g6feb