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-10-07 16:21:31 +0400
committerMark Pulford <mark@kyne.com.au>2011-10-07 16:21:31 +0400
commit48c5cf183fa7cab608168fdec2406a1ca3cb2c11 (patch)
tree76b385d490badeb00cf6ced3b59843ef94f20c34
parent0f3ab84a261292d16f684551e67f2f007199936a (diff)
Rename MISSING_ISINF to USE_INTERNAL_ISINF
-rw-r--r--Makefile4
-rw-r--r--README2
-rw-r--r--lua-cjson-1.0.3-1.rockspec3
-rw-r--r--lua_cjson.c4
4 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 5731440..5857aee 100644
--- a/Makefile
+++ b/Makefile
@@ -19,9 +19,9 @@ LUA_LIB_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
CFLAGS ?= -g -O3 -Wall -pedantic
override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\"
-## Conditional work arounds
+## Optional work arounds
# Handle Solaris platforms that are missing isinf().
-#override CFLAGS += -DMISSING_ISINF
+#override CFLAGS += -DUSE_INTERNAL_ISINF
# Handle locales that use comma as a decimal separator on locale aware
# platforms. Requires POSIX-1.2008 support.
override CFLAGS += -DUSE_POSIX_LOCALE
diff --git a/README b/README
index 473bf83..e8c3abe 100644
--- a/README
+++ b/README
@@ -55,7 +55,7 @@ build and install the module:
# cp cjson.so [your_module_directory]
Note: Some Solaris platforms are missing isinf(). You can work around
- this bug by adding -DMISSING_ISINF to CFLAGS in the Makefile.
+ this bug by adding -DUSE_INTERNAL_ISINF to CFLAGS in the Makefile.
RPM
diff --git a/lua-cjson-1.0.3-1.rockspec b/lua-cjson-1.0.3-1.rockspec
index 1550ae9..3f8e981 100644
--- a/lua-cjson-1.0.3-1.rockspec
+++ b/lua-cjson-1.0.3-1.rockspec
@@ -24,6 +24,9 @@ build = {
modules = {
cjson = {
sources = { "lua_cjson.c", "strbuf.c" },
+-- Optional workarounds:
+-- USE_INTERNAL_ISINF: Provide internal isinf() implementation. Required
+-- on some Solaris platforms.
defines = { "VERSION=\"1.0.3\"" }
}
},
diff --git a/lua_cjson.c b/lua_cjson.c
index 151fa39..ad3818d 100644
--- a/lua_cjson.c
+++ b/lua_cjson.c
@@ -66,8 +66,8 @@
#define LOCALE_RESTORE(x) do { } while(0)
#endif
-#ifdef MISSING_ISINF
-/* Some Solaris platforms are missing isinf(). Define here. */
+/* Some Solaris platforms are missing isinf(). */
+#if defined(USE_INTERNAL_ISINF) || defined(MISSING_ISINF)
#define isinf(x) (!isnan(x) && isnan((x) - (x)))
#endif