diff options
author | Emil Renner Berthing <esmil@mailme.dk> | 2013-12-08 14:23:01 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@mailme.dk> | 2013-12-08 15:24:07 +0100 |
commit | 0e339a54b074c7ef5f5cc461c03aac634e92b731 (patch) | |
tree | 7a6da472496b722af5a231d4cba2815056d600a4 /lua/luaconf.h.in | |
parent | c87c5a5619b1ece8ff4522dcfb688191610526f9 (diff) | |
download | lem-0e339a54b074c7ef5f5cc461c03aac634e92b731.tar.gz lem-0e339a54b074c7ef5f5cc461c03aac634e92b731.tar.xz lem-0e339a54b074c7ef5f5cc461c03aac634e92b731.zip |
Lua 5.2.3
Diffstat (limited to 'lua/luaconf.h.in')
-rw-r--r-- | lua/luaconf.h.in | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lua/luaconf.h.in b/lua/luaconf.h.in index 6f4be5b..1a9a19b 100644 --- a/lua/luaconf.h.in +++ b/lua/luaconf.h.in @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.172 2012/05/11 14:14:42 roberto Exp $ +** $Id: luaconf.h,v 1.176.1.1 2013/04/12 18:48:47 roberto Exp $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -45,7 +45,7 @@ #define LUA_USE_POSIX #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ #define LUA_USE_READLINE /* needs some extra libraries */ -#define LUA_USE_STRTODHEX /* assume 'strtod' handles hexa formats */ +#define LUA_USE_STRTODHEX /* assume 'strtod' handles hex formats */ #define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ #define LUA_USE_LONGLONG /* assume support for long long */ #endif @@ -54,7 +54,7 @@ #define LUA_USE_POSIX #define LUA_USE_DLOPEN /* does not need -ldl */ #define LUA_USE_READLINE /* needs an extra library: -lreadline */ -#define LUA_USE_STRTODHEX /* assume 'strtod' handles hexa formats */ +#define LUA_USE_STRTODHEX /* assume 'strtod' handles hex formats */ #define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ #define LUA_USE_LONGLONG /* assume support for long long */ #endif @@ -405,9 +405,15 @@ /* +@@ l_mathop allows the addition of an 'l' or 'f' to all math operations +*/ +#define l_mathop(x) (x) + + +/* @@ lua_str2number converts a decimal numeric string to a number. @@ lua_strx2number converts an hexadecimal numeric string to a number. -** In C99, 'strtod' do both conversions. C89, however, has no function +** In C99, 'strtod' does both conversions. C89, however, has no function ** to convert floating hexadecimal strings to numbers. For these ** systems, you can leave 'lua_strx2number' undefined and Lua will ** provide its own implementation. @@ -426,8 +432,8 @@ /* the following operations need the math library */ #if defined(lobject_c) || defined(lvm_c) #include <math.h> -#define luai_nummod(L,a,b) ((a) - floor((a)/(b))*(b)) -#define luai_numpow(L,a,b) (pow(a,b)) +#define luai_nummod(L,a,b) ((a) - l_mathop(floor)((a)/(b))*(b)) +#define luai_numpow(L,a,b) (l_mathop(pow)(a,b)) #endif /* these are quite standard operations */ @@ -464,13 +470,12 @@ ** Some tricks with doubles */ -#if defined(LUA_CORE) && \ - defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) /* { */ +#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) /* { */ /* ** The next definitions activate some tricks to speed up the ** conversion from doubles to integer types, mainly to LUA_UNSIGNED. ** -@@ MS_ASMTRICK uses Microsoft assembler to avoid clashes with a +@@ LUA_MSASMTRICK uses Microsoft assembler to avoid clashes with a ** DirectX idiosyncrasy. ** @@ LUA_IEEE754TRICK uses a trick that should work on any machine @@ -494,7 +499,7 @@ /* Microsoft compiler on a Pentium (32 bit) ? */ #if defined(LUA_WIN) && defined(_MSC_VER) && defined(_M_IX86) /* { */ -#define MS_ASMTRICK +#define LUA_MSASMTRICK #define LUA_IEEEENDIAN 0 #define LUA_NANTRICK |