Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpx/lua-cjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-08-11 14:16:36 +0400
committerMark Pulford <mark@kyne.com.au>2011-08-11 14:16:36 +0400
commit53baee1e33022fcba4d316b3952510c085173e02 (patch)
treeaed27e186b05a3bd8e5e2cec48095527fc29143c /lua_cjson.c
parent1fc923da45731b39e6aea9f50543cd7e8b0e4ad8 (diff)
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 <agentzh@gmail.com>
Diffstat (limited to 'lua_cjson.c')
-rw-r--r--lua_cjson.c4
1 files changed, 4 insertions, 0 deletions
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