diff options
| author | Lua Team <team@lua.org> | 2006-06-01 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 2006-06-01 12:00:00 +0000 |
| commit | 60e37e0252c2758c935c8f382ace44b5100f6f21 (patch) | |
| tree | 4bd1cadadec00aedd818350c0f5c57b968125a85 /src/luaconf.h | |
| parent | f6f9af6cbce3516054b6fd2a8e9d3a1b168ce4be (diff) | |
| download | lua-github-60e37e0252c2758c935c8f382ace44b5100f6f21.tar.gz | |
Lua 5.1.1-rc15.1.1-rc1
Diffstat (limited to 'src/luaconf.h')
| -rw-r--r-- | src/luaconf.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/luaconf.h b/src/luaconf.h index 97a3e30c..f32f1f76 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.81 2006/02/10 17:44:06 roberto Exp $ +** $Id: luaconf.h,v 1.82 2006/04/10 18:27:23 roberto Exp $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -60,6 +60,18 @@ /* +@@ LUA_PATH and LUA_CPATH are the names of the environment variables that +@* Lua check to set its paths. +@@ LUA_INIT is the name of the environment variable that Lua +@* checks for initialization code. +** CHANGE them if you want different names. +*/ +#define LUA_PATH "LUA_PATH" +#define LUA_CPATH "LUA_CPATH" +#define LUA_INIT "LUA_INIT" + + +/* @@ LUA_PATH_DEFAULT is the default path that Lua uses to look for @* Lua libraries. @@ LUA_CPATH_DEFAULT is the default path that Lua uses to look for @@ -543,11 +555,25 @@ /* On a Pentium, resort to a trick */ #if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__) && \ (defined(__i386) || defined (_M_IX86) || defined(__i386__)) + +/* On a Microsoft compiler, use assembler */ +#if defined(_MSC_VER) + +#define lua_number2int(i,d) __asm fld d __asm fistp i +#define lua_number2integer(i,n) lua_number2int(i, n) + +/* the next trick should work on any Pentium, but sometimes clashes + with a DirectX idiosyncrasy */ +#else + union luai_Cast { double l_d; long l_l; }; #define lua_number2int(i,d) \ { volatile union luai_Cast u; u.l_d = (d) + 6755399441055744.0; (i) = u.l_l; } #define lua_number2integer(i,n) lua_number2int(i, n) +#endif + + /* this option always works, but may be slow */ #else #define lua_number2int(i,d) ((i)=(int)(d)) |
