From d7a0179cd60657079d522c17da1e5aa5cc20532d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 21 Oct 2014 12:38:46 -0200 Subject: use 'opf' (float) variants only when explicitly allowed (LUA_USE_C99) --- luaconf.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/luaconf.h b/luaconf.h index 356e8cb4..9c2e3a34 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.218 2014/10/17 16:28:21 roberto Exp roberto $ +** $Id: luaconf.h,v 1.219 2014/10/20 16:32:05 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -547,16 +547,11 @@ #endif /* } */ -#if defined(LUA_ANSI) -/* C89 does not support 'opf' variants for math functions */ +#if !defined(LUA_USE_C99) +/* 'strtof' and 'opf' variants for math functions are C99 */ #undef l_mathop -#define l_mathop(op) (lua_Number)op -#endif - - -#if defined(LUA_ANSI) || defined(_WIN32) -/* C89 and Windows do not support 'strtof'... */ #undef lua_str2number +#define l_mathop(op) (lua_Number)op #define lua_str2number(s,p) ((lua_Number)strtod((s), (p))) #endif -- cgit v1.2.3-55-g6feb