| @@ -88,7 +88,7 @@ AC_CHECK_HEADERS(cxxabi.h) | |||||
| AC_LANG_POP(C++) | AC_LANG_POP(C++) | ||||
| dnl Common C functions | dnl Common C functions | ||||
| AC_CHECK_FUNCS(getcwd _getcwd backtrace_symbols) | |||||
| AC_CHECK_FUNCS(getenv getcwd _getcwd backtrace_symbols) | |||||
| if test "${enable_debug}" = "yes"; then | if test "${enable_debug}" = "yes"; then | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stdarg.h> | #include <stdarg.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <errno.h> | #include <errno.h> | ||||
| #include <stdarg.h> | #include <stdarg.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <ctype.h> | #include <ctype.h> | ||||
| @@ -4,6 +4,10 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #define lbitlib_c | #define lbitlib_c | ||||
| #define LUA_LIB | #define LUA_LIB | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| @@ -4,6 +4,10 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #define lctype_c | #define lctype_c | ||||
| #define LUA_CORE | #define LUA_CORE | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stdarg.h> | #include <stdarg.h> | ||||
| #include <stddef.h> | #include <stddef.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <setjmp.h> | #include <setjmp.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| @@ -4,6 +4,10 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stddef.h> | #include <stddef.h> | ||||
| #define ldump_c | #define ldump_c | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stddef.h> | #include <stddef.h> | ||||
| @@ -4,6 +4,10 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <string.h> | #include <string.h> | ||||
| #define lgc_c | #define lgc_c | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| /* | /* | ||||
| ** If you embed Lua in your program and need to open the standard | ** If you embed Lua in your program and need to open the standard | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| /* | /* | ||||
| ** POSIX idiosyncrasy! | ** POSIX idiosyncrasy! | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <locale.h> | #include <locale.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stddef.h> | #include <stddef.h> | ||||
| @@ -8,6 +8,9 @@ | |||||
| ** systems. | ** systems. | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| /* | /* | ||||
| ** if needed, includes windows header before everything else | ** if needed, includes windows header before everything else | ||||
| @@ -636,9 +639,13 @@ static int noenv (lua_State *L) { | |||||
| static void setpath (lua_State *L, const char *fieldname, const char *envname1, | static void setpath (lua_State *L, const char *fieldname, const char *envname1, | ||||
| const char *envname2, const char *def) { | const char *envname2, const char *def) { | ||||
| #if HAVE_GETENV // LOL BEGIN | |||||
| const char *path = getenv(envname1); | const char *path = getenv(envname1); | ||||
| if (path == NULL) /* no environment variable? */ | if (path == NULL) /* no environment variable? */ | ||||
| path = getenv(envname2); /* try alternative name */ | path = getenv(envname2); /* try alternative name */ | ||||
| #else | |||||
| const char *path = NULL; | |||||
| #endif // LOL END | |||||
| if (path == NULL || noenv(L)) /* no environment variable? */ | if (path == NULL || noenv(L)) /* no environment variable? */ | ||||
| lua_pushstring(L, def); /* use default */ | lua_pushstring(L, def); /* use default */ | ||||
| else { | else { | ||||
| @@ -4,6 +4,10 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stdarg.h> | #include <stdarg.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #define lopcodes_c | #define lopcodes_c | ||||
| #define LUA_CORE | #define LUA_CORE | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <errno.h> | #include <errno.h> | ||||
| #include <locale.h> | #include <locale.h> | ||||
| @@ -114,7 +117,11 @@ static int os_tmpname (lua_State *L) { | |||||
| static int os_getenv (lua_State *L) { | static int os_getenv (lua_State *L) { | ||||
| #if HAVE_GETENV // LOL BEGIN | |||||
| lua_pushstring(L, getenv(luaL_checkstring(L, 1))); /* if NULL push nil */ | lua_pushstring(L, getenv(luaL_checkstring(L, 1))); /* if NULL push nil */ | ||||
| #else | |||||
| lua_pushstring(L, NULL); | |||||
| #endif // LOL END | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <string.h> | #include <string.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stddef.h> | #include <stddef.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <string.h> | #include <string.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #include <stddef.h> | #include <stddef.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| /* | /* | ||||
| ** Implementation of tables (aka arrays, objects, or hash tables). | ** Implementation of tables (aka arrays, objects, or hash tables). | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stddef.h> | #include <stddef.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <string.h> | #include <string.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #if 0 // LOL BEGIN | #if 0 // LOL BEGIN | ||||
| #include <signal.h> | #include <signal.h> | ||||
| @@ -4,6 +4,10 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <errno.h> | #include <errno.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| @@ -4,6 +4,10 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <string.h> | #include <string.h> | ||||
| #define lundump_c | #define lundump_c | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| @@ -4,6 +4,9 @@ | |||||
| ** See Copyright Notice in lua.h | ** See Copyright Notice in lua.h | ||||
| */ | */ | ||||
| #if defined HAVE_CONFIG_H // LOL BEGIN | |||||
| # include "config.h" | |||||
| #endif // LOL END | |||||
| #include <string.h> | #include <string.h> | ||||