aboutsummaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-21 12:38:46 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-21 12:38:46 -0200
commitd7a0179cd60657079d522c17da1e5aa5cc20532d (patch)
treea4fad0b6b5d8b070c5ccfcd922ce370b25c564a2 /luaconf.h
parent6d613817d4c94588260484f29e931c46bae1fc28 (diff)
downloadlua-d7a0179cd60657079d522c17da1e5aa5cc20532d.tar.gz
lua-d7a0179cd60657079d522c17da1e5aa5cc20532d.tar.bz2
lua-d7a0179cd60657079d522c17da1e5aa5cc20532d.zip
use 'opf' (float) variants only when explicitly allowed (LUA_USE_C99)
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h13
1 files 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 @@
1/* 1/*
2** $Id: luaconf.h,v 1.218 2014/10/17 16:28:21 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.219 2014/10/20 16:32:05 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -547,16 +547,11 @@
547#endif /* } */ 547#endif /* } */
548 548
549 549
550#if defined(LUA_ANSI) 550#if !defined(LUA_USE_C99)
551/* C89 does not support 'opf' variants for math functions */ 551/* 'strtof' and 'opf' variants for math functions are C99 */
552#undef l_mathop 552#undef l_mathop
553#define l_mathop(op) (lua_Number)op
554#endif
555
556
557#if defined(LUA_ANSI) || defined(_WIN32)
558/* C89 and Windows do not support 'strtof'... */
559#undef lua_str2number 553#undef lua_str2number
554#define l_mathop(op) (lua_Number)op
560#define lua_str2number(s,p) ((lua_Number)strtod((s), (p))) 555#define lua_str2number(s,p) ((lua_Number)strtod((s), (p)))
561#endif 556#endif
562 557