diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-06-13 18:20:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-06-13 18:20:28 -0300 |
commit | 999d55d887079af989d07d747b3b354f0055fb5c (patch) | |
tree | da63175766c612a18bdd8f965d36f892db6e9845 /luaconf.h | |
parent | 1f9f97e3cfcb80bdf06ec5fc051fa6ccf98db45b (diff) | |
download | lua-999d55d887079af989d07d747b3b354f0055fb5c.tar.gz lua-999d55d887079af989d07d747b3b354f0055fb5c.tar.bz2 lua-999d55d887079af989d07d747b3b354f0055fb5c.zip |
several updates
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 51 |
1 files changed, 45 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.51 2005/05/20 19:09:05 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.52 2005/06/01 17:07:45 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 | */ |
@@ -128,19 +128,26 @@ | |||
128 | /* | 128 | /* |
129 | @@ LUAI_FUNC is a mark for all extern functions that are not to be | 129 | @@ LUAI_FUNC is a mark for all extern functions that are not to be |
130 | @* exported to outside modules. | 130 | @* exported to outside modules. |
131 | ** CHANGE it if you need to mark them in some special way. Gcc (versions | 131 | @@ LUAI_DATA is a mark for all extern (const) variables that are not to |
132 | ** 3.2 and later) mark them as "hidden" to optimize their call when Lua | 132 | @* be exported to outside modules. |
133 | ** is compiled as a shared library. | 133 | ** CHANGE them if you need to mark them in some special way. Elf/gcc |
134 | ** (versions 3.2 and later) mark them as "hidden" to optimize access | ||
135 | ** when Lua is compiled as a shared library. | ||
134 | */ | 136 | */ |
135 | #if defined(luaall_c) | 137 | #if defined(luaall_c) |
136 | #define LUAI_FUNC static | 138 | #define LUAI_FUNC static |
137 | #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) | 139 | #define LUAI_DATA /* empty */ |
138 | #define LUAI_FUNC __attribute__((visibility("hidden"))) | 140 | #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ |
141 | defined(__ELF__) | ||
142 | #define LUAI_FUNC __attribute__((visibility("hidden"))) extern | ||
143 | #define LUAI_DATA LUAI_FUNC | ||
139 | #else | 144 | #else |
140 | #define LUAI_FUNC extern | 145 | #define LUAI_FUNC extern |
146 | #define LUAI_DATA extern | ||
141 | #endif | 147 | #endif |
142 | 148 | ||
143 | 149 | ||
150 | |||
144 | /* | 151 | /* |
145 | @@ lua_assert describes the internal assertions in Lua. | 152 | @@ lua_assert describes the internal assertions in Lua. |
146 | ** CHANGE that only if you need to debug Lua. | 153 | ** CHANGE that only if you need to debug Lua. |
@@ -294,6 +301,13 @@ | |||
294 | #define LUA_COMPAT_VARARG | 301 | #define LUA_COMPAT_VARARG |
295 | 302 | ||
296 | /* | 303 | /* |
304 | @@ LUA_COMPAT_MOD controls compatibility with old math.mod function. | ||
305 | ** CHANGE it to undefined as soon as your programs change its uses | ||
306 | ** of math.mod to math.fmod or to the new '%' operator. | ||
307 | */ | ||
308 | #define LUA_COMPAT_MOD | ||
309 | |||
310 | /* | ||
297 | @@ LUA_COMPAT_LSTR controls compatibility with old long string nesting | 311 | @@ LUA_COMPAT_LSTR controls compatibility with old long string nesting |
298 | @* facility. | 312 | @* facility. |
299 | ** CHANGE it to 2 if you want the old behaviour, or undefine it to turn | 313 | ** CHANGE it to 2 if you want the old behaviour, or undefine it to turn |
@@ -601,6 +615,30 @@ | |||
601 | 615 | ||
602 | #endif | 616 | #endif |
603 | 617 | ||
618 | |||
619 | /* | ||
620 | @@ lua_popen spawns a new process connected to the current one through | ||
621 | @* the file streams. | ||
622 | ** CHANGE it if you have a way to implement it in your system. | ||
623 | */ | ||
624 | #if !defined(LUA_ANSI) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 2 | ||
625 | |||
626 | #define lua_popen(L,c,m) popen(c,m) | ||
627 | #define lua_pclose(L,file) (pclose(file) != -1) | ||
628 | |||
629 | #elif !defined(LUA_ANSI) && defined(_WIN32) | ||
630 | |||
631 | #define lua_popen(L,c,m) _popen(c,m) | ||
632 | #define lua_pclose(L,file) (_pclose(file) != -1) | ||
633 | |||
634 | #else | ||
635 | |||
636 | #define lua_popen(L,c,m) \ | ||
637 | ((void)c, (void)m, luaL_error(L, LUA_QL("popen") "not supported"), NULL) | ||
638 | #define lua_pclose(L,file) ((void)file, 0) | ||
639 | |||
640 | #endif | ||
641 | |||
604 | /* | 642 | /* |
605 | @@ LUA_DL_* define which dynamic-library system Lua should use. | 643 | @@ LUA_DL_* define which dynamic-library system Lua should use. |
606 | ** CHANGE here if Lua has problems choosing the appropriate | 644 | ** CHANGE here if Lua has problems choosing the appropriate |
@@ -676,3 +714,4 @@ | |||
676 | 714 | ||
677 | 715 | ||
678 | #endif | 716 | #endif |
717 | |||