diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-27 17:21:56 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-27 17:21:56 -0200 |
| commit | 4870194380c4fcf40ffa20ef06956a462b3fd10c (patch) | |
| tree | 4a7e258c09af6785e6d30e10a724e94632cf6b35 /luaconf.h | |
| parent | 41d0e661846275994262f7e94c879d02254ef0ef (diff) | |
| download | lua-4870194380c4fcf40ffa20ef06956a462b3fd10c.tar.gz lua-4870194380c4fcf40ffa20ef06956a462b3fd10c.tar.bz2 lua-4870194380c4fcf40ffa20ef06956a462b3fd10c.zip | |
small reorganization of tests around LUA_USE_C99
Diffstat (limited to 'luaconf.h')
| -rw-r--r-- | luaconf.h | 45 |
1 files changed, 24 insertions, 21 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.222 2014/10/27 16:59:31 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.223 2014/10/27 18:06:03 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 | */ |
| @@ -95,24 +95,6 @@ | |||
| 95 | #endif | 95 | #endif |
| 96 | 96 | ||
| 97 | 97 | ||
| 98 | /* | ||
| 99 | @@ LUA_USE_C99 includes all functionality that depends on C 99. | ||
| 100 | ** CHANGE it (define it) if your system is compatible. | ||
| 101 | */ | ||
| 102 | #if defined(LUA_USE_C99) | ||
| 103 | #define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ | ||
| 104 | #endif | ||
| 105 | |||
| 106 | |||
| 107 | /* | ||
| 108 | @@ LUA_USE_POSIX includes all functionality listed as X/Open System | ||
| 109 | @@ Interfaces Extension (XSI). | ||
| 110 | ** CHANGE it (define it) if your system is XSI compatible. | ||
| 111 | */ | ||
| 112 | #if defined(LUA_USE_POSIX) | ||
| 113 | #endif | ||
| 114 | |||
| 115 | |||
| 116 | 98 | ||
| 117 | #include <limits.h> | 99 | #include <limits.h> |
| 118 | #include <stddef.h> | 100 | #include <stddef.h> |
| @@ -287,8 +269,8 @@ | |||
| 287 | 269 | ||
| 288 | /* | 270 | /* |
| 289 | @@ LUA_KCONTEXT is the type of the context ('ctx') for continuation | 271 | @@ LUA_KCONTEXT is the type of the context ('ctx') for continuation |
| 290 | @@ functions. It must be a numerical type; Lua will use 'intptr_t' if | 272 | ** functions. It must be a numerical type; Lua will use 'intptr_t' if |
| 291 | @@ available. | 273 | ** available. |
| 292 | */ | 274 | */ |
| 293 | #if defined (LUA_USE_C99) | 275 | #if defined (LUA_USE_C99) |
| 294 | #include <stdint.h> | 276 | #include <stdint.h> |
| @@ -304,6 +286,27 @@ | |||
| 304 | 286 | ||
| 305 | 287 | ||
| 306 | /* | 288 | /* |
| 289 | @@ lua_strx2number converts an hexadecimal numeric string to a number. | ||
| 290 | ** In C99, 'strtod' does both conversions. Otherwise, you can | ||
| 291 | ** leave 'lua_strx2number' undefined and Lua will provide its own | ||
| 292 | ** implementation. | ||
| 293 | */ | ||
| 294 | #if defined(LUA_USE_C99) | ||
| 295 | #define lua_strx2number(s,p) lua_str2number(s,p) | ||
| 296 | #endif | ||
| 297 | |||
| 298 | |||
| 299 | /* | ||
| 300 | @@ LUA_USE_AFORMAT allows '%a'/'%A' specifiers in 'string.format' | ||
| 301 | ** Enable it if the C function 'printf' supports these specifiers. | ||
| 302 | ** (C99 demands it.) | ||
| 303 | */ | ||
| 304 | #if !defined(LUA_USE_AFORMAT) && defined(LUA_USE_C99) | ||
| 305 | #define LUA_USE_AFORMAT | ||
| 306 | #endif | ||
| 307 | |||
| 308 | |||
| 309 | /* | ||
| 307 | ** {================================================================== | 310 | ** {================================================================== |
| 308 | ** Compatibility with previous versions | 311 | ** Compatibility with previous versions |
| 309 | ** =================================================================== | 312 | ** =================================================================== |
