diff options
| -rw-r--r-- | luaconf.h | 39 |
1 files changed, 28 insertions, 11 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.214 2014/10/01 11:54:56 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.216 2014/10/08 20:24:43 roberto Exp $ |
| 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 | */ |
| @@ -20,23 +20,34 @@ | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | /* | 22 | /* |
| 23 | ** =================================================================== | 23 | ** {================================================================== |
| 24 | @@ LUA_INT_INT / LUA_INT_LONG / LUA_INT_LONGLONG defines type for | 24 | @@ LUA_INT_INT / LUA_INT_LONG / LUA_INT_LONGLONG defines type for |
| 25 | @@ Lua integers; | 25 | @@ Lua integers; you must define one of them. |
| 26 | @@ LUA_REAL_FLOAT / LUA_REAL_DOUBLE / LUA_REAL_LONGDOUBLE defines | 26 | @@ LUA_REAL_FLOAT / LUA_REAL_DOUBLE / LUA_REAL_LONGDOUBLE defines |
| 27 | @@ type for Lua floats. | 27 | @@ type for Lua floats. You must define one of them. |
| 28 | ** | ||
| 29 | ** These definitions set the numeric types for Lua. Lua should work fine | ||
| 30 | ** with any mix of these previous options. The usual configurations | ||
| 31 | ** are 64-bit integers and floats (the default) and 32-bit integers and | ||
| 32 | ** floats (Small Lua, for restricted platforms). | ||
| 28 | ** | 33 | ** |
| 29 | ** These definitions set the numeric types for Lua. Lua should work | 34 | ** Note that C compilers not compliant with C99 may not have |
| 30 | ** fine with any mix of these previous options. | 35 | ** support for 'long long'. In that case, you should not use option |
| 31 | ** The usual configurations are 64-bit integers and floats (the default) | 36 | ** 'LUA_INT_LONGLONG'; use instead option 'LUA_32BITS' for Small Lua |
| 32 | ** and 32-bit integers and floats (Lua 32, for restricted hardware). | 37 | ** (see below), or LUA_INT_LONG plus LUA_REAL_DOUBLE for an interpreter |
| 38 | ** with 32-bit integers and double floating-point numbers. | ||
| 33 | ** ===================================================================== | 39 | ** ===================================================================== |
| 34 | */ | 40 | */ |
| 35 | 41 | ||
| 36 | /* just uncomment the next line for Lua 32 */ | 42 | /* |
| 37 | /* #define LUA_32 */ | 43 | ** Just uncomment the next line for Small Lua; you can also define |
| 44 | ** LUA_32BITS in the make file, but changing here you ensure that | ||
| 45 | ** all software connected to Lua will be compiled with the same | ||
| 46 | ** configuration. | ||
| 47 | */ | ||
| 48 | /* #define LUA_32BITS */ | ||
| 38 | 49 | ||
| 39 | #if !defined(LUA_32) | 50 | #if !defined(LUA_32BITS) |
| 40 | #define LUA_INT_LONGLONG | 51 | #define LUA_INT_LONGLONG |
| 41 | #define LUA_REAL_DOUBLE | 52 | #define LUA_REAL_DOUBLE |
| 42 | #else /* Lua 32 bits */ | 53 | #else /* Lua 32 bits */ |
| @@ -44,6 +55,8 @@ | |||
| 44 | #define LUA_REAL_FLOAT | 55 | #define LUA_REAL_FLOAT |
| 45 | #endif | 56 | #endif |
| 46 | 57 | ||
| 58 | /* }================================================================== */ | ||
| 59 | |||
| 47 | 60 | ||
| 48 | /* | 61 | /* |
| 49 | @@ LUA_ANSI controls the use of non-ansi features. | 62 | @@ LUA_ANSI controls the use of non-ansi features. |
| @@ -663,6 +676,10 @@ | |||
| 663 | 676 | ||
| 664 | #else | 677 | #else |
| 665 | 678 | ||
| 679 | #if !defined(LLONG_MAX) | ||
| 680 | #error "Compiler does not support 'long long'. See file 'luaconf.h' line 24" | ||
| 681 | #endif | ||
| 682 | |||
| 666 | #define LUA_INTEGER long long | 683 | #define LUA_INTEGER long long |
| 667 | #define LUA_INTEGER_FRMLEN "ll" | 684 | #define LUA_INTEGER_FRMLEN "ll" |
| 668 | 685 | ||
