diff options
Diffstat (limited to 'luaconf.h')
| -rw-r--r-- | luaconf.h | 15 |
1 files changed, 5 insertions, 10 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.168 2011/11/29 17:15:42 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.169 2011/11/30 12:35:05 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 | */ |
| @@ -174,13 +174,8 @@ | |||
| 174 | ** give a warning about it. To avoid these warnings, change to the | 174 | ** give a warning about it. To avoid these warnings, change to the |
| 175 | ** default definition. | 175 | ** default definition. |
| 176 | */ | 176 | */ |
| 177 | #if defined(luaall_c) /* { */ | 177 | #if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ |
| 178 | #define LUAI_FUNC static | 178 | defined(__ELF__) /* { */ |
| 179 | #define LUAI_DDEC static | ||
| 180 | #define LUAI_DDEF static | ||
| 181 | |||
| 182 | #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ | ||
| 183 | defined(__ELF__) | ||
| 184 | #define LUAI_FUNC __attribute__((visibility("hidden"))) extern | 179 | #define LUAI_FUNC __attribute__((visibility("hidden"))) extern |
| 185 | #define LUAI_DDEC LUAI_FUNC | 180 | #define LUAI_DDEC LUAI_FUNC |
| 186 | #define LUAI_DDEF /* empty */ | 181 | #define LUAI_DDEF /* empty */ |
| @@ -214,7 +209,7 @@ | |||
| 214 | ** They are only used in libraries and the stand-alone program. (The #if | 209 | ** They are only used in libraries and the stand-alone program. (The #if |
| 215 | ** avoids including 'stdio.h' everywhere.) | 210 | ** avoids including 'stdio.h' everywhere.) |
| 216 | */ | 211 | */ |
| 217 | #if defined(LUA_LIB) || defined(lua_c) || defined(luaall_c) | 212 | #if defined(LUA_LIB) || defined(lua_c) |
| 218 | #include <stdio.h> | 213 | #include <stdio.h> |
| 219 | #define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) | 214 | #define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) |
| 220 | #define luai_writeline() (luai_writestring("\n", 1), fflush(stdout)) | 215 | #define luai_writeline() (luai_writestring("\n", 1), fflush(stdout)) |
| @@ -423,7 +418,7 @@ | |||
| 423 | */ | 418 | */ |
| 424 | 419 | ||
| 425 | /* the following operations need the math library */ | 420 | /* the following operations need the math library */ |
| 426 | #if defined(lobject_c) || defined(lvm_c) || defined(luaall_c) | 421 | #if defined(lobject_c) || defined(lvm_c) |
| 427 | #include <math.h> | 422 | #include <math.h> |
| 428 | #define luai_nummod(L,a,b) ((a) - floor((a)/(b))*(b)) | 423 | #define luai_nummod(L,a,b) ((a) - floor((a)/(b))*(b)) |
| 429 | #define luai_numpow(L,a,b) (pow(a,b)) | 424 | #define luai_numpow(L,a,b) (pow(a,b)) |
