From a05c5153ad6b4082de209ed1154034ccd3b68326 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Sat, 21 Jan 2012 12:53:08 +1030 Subject: Rename USE_INTERNAL_DTOA to USE_INTERNAL_FPCONV --- CMakeLists.txt | 6 +++--- Makefile | 4 ++-- fpconv.h | 2 +- manual.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c18381f..5de35db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(lua-cjson C) cmake_minimum_required(VERSION 2.6) option(ENABLE_CJSON_GLOBAL "Register cjson module table as a global variable - not recommended") -option(USE_INTERNAL_DTOA "Use internal strtod() / dtoa code for performance") +option(USE_INTERNAL_FPCONV "Use internal strtod() / g_fmt() code for performance") option(MULTIPLE_THREADS "Build internal dtoa with support for multi-threaded applications - recommended" ON) @@ -24,12 +24,12 @@ if(ENABLE_CJSON_GLOBAL) add_definitions(-DENABLE_CJSON_GLOBAL) endif() -if(NOT USE_INTERNAL_DTOA) +if(NOT USE_INTERNAL_FPCONV) # Use libc number conversion routines (strtod(), sprintf()) set(FPCONV_SOURCES fpconv.c) else() # Use internal number conversion routines - add_definitions(-DUSE_INTERNAL_DTOA) + add_definitions(-DUSE_INTERNAL_FPCONV) set(FPCONV_SOURCES g_fmt.c dtoa.c) include(TestBigEndian) diff --git a/Makefile b/Makefile index de1c144..bf06d73 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ ## NaN, Infinity, hex. ## ## Optional built-in number conversion uses the following defines: -## USE_INTERNAL_DTOA: Use builtin strtod/dtoa for numeric conversions. +## USE_INTERNAL_FPCONV: Use builtin strtod/dtoa for numeric conversions. ## IEEE_BIG_ENDIAN: Required on big endian architectures. ## MULTIPLE_THREADS: Must be set when Lua CJSON may be used in a ## multi-threaded application. Requries _pthreads_. @@ -54,7 +54,7 @@ LUA_BIN_DIR = $(PREFIX)/bin ## Enable built in number conversion #FPCONV_OBJS = g_fmt.o dtoa.o -#CJSON_CFLAGS += -DUSE_INTERNAL_DTOA +#CJSON_CFLAGS += -DUSE_INTERNAL_FPCONV ## Compile built in number conversion for big endian architectures #CJSON_CFLAGS += -DIEEE_BIG_ENDIAN diff --git a/fpconv.h b/fpconv.h index ac2f2c4..0124908 100644 --- a/fpconv.h +++ b/fpconv.h @@ -6,7 +6,7 @@ * -1.7976931348623e+308 */ # define FPCONV_G_FMT_BUFSIZE 32 -#ifdef USE_INTERNAL_DTOA +#ifdef USE_INTERNAL_FPCONV static inline void fpconv_init() { /* Do nothing - not required */ diff --git a/manual.txt b/manual.txt index 8ca4778..eacd2c7 100644 --- a/manual.txt +++ b/manual.txt @@ -133,7 +133,7 @@ converting data number heavy data. However, this option reduces portability and is disabled by default. [horizontal] -USE_INTERNAL_DTOA:: Enable internal number conversion routines. +USE_INTERNAL_FPCONV:: Enable internal number conversion routines. IEEE_BIG_ENDIAN:: Must be set on big endian architectures. MULTIPLE_THREADS:: Must be set when Lua CJSON may be used in a multi-threaded application. Requries _pthreads_. -- cgit v1.2.3-55-g6feb