From 049691cb11115fbdb750021556cad3507fad4e69 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Fri, 7 Oct 2011 23:55:49 +1030 Subject: Add USE_POSIX_SETLOCALE option Add USE_POSIX_SETLOCALE option for platforms missing uselocale(). Document locale options in README, Makefile & rockspec. Also: - Rename USE_POSIX_LOCALE define to USE_POSIX_USELOCALE. - Use uselocale() by default through Makefile (Linux, OSX). - Use setlocale() by default through rockspec (other platforms). --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5857aee..082c720 100644 --- a/Makefile +++ b/Makefile @@ -23,8 +23,12 @@ override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\" # Handle Solaris platforms that are missing 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 +# platforms (optional, but recommended). +# USE_POSIX_USELOCALE: Linux, OSX. Thread safe. Recommended option. +# USE_POSIX_SETLOCALE: Works on all ANSI C platforms. May be used when +# thread-safety isn't required. +override CFLAGS += -DUSE_POSIX_USELOCALE +#override CFLAGS += -DUSE_POSIX_SETLOCALE INSTALL ?= install -- cgit v1.2.3-55-g6feb