浏览代码

lua: compilation fixes for non-quite-POSIX platforms.

legacy
Sam Hocevar sam 11 年前
父节点
当前提交
62870d0894
共有 35 个文件被更改,包括 118 次插入1 次删除
  1. +1
    -1
      configure.ac
  2. +3
    -0
      src/lua/lapi.c
  3. +3
    -0
      src/lua/lauxlib.c
  4. +3
    -0
      src/lua/lbaselib.c
  5. +4
    -0
      src/lua/lbitlib.c
  6. +3
    -0
      src/lua/lcode.c
  7. +3
    -0
      src/lua/lcorolib.c
  8. +4
    -0
      src/lua/lctype.c
  9. +3
    -0
      src/lua/ldblib.c
  10. +3
    -0
      src/lua/ldebug.c
  11. +3
    -0
      src/lua/ldo.c
  12. +4
    -0
      src/lua/ldump.c
  13. +3
    -0
      src/lua/lfunc.c
  14. +4
    -0
      src/lua/lgc.c
  15. +3
    -0
      src/lua/linit.c
  16. +3
    -0
      src/lua/liolib.c
  17. +3
    -0
      src/lua/llex.c
  18. +3
    -0
      src/lua/lmathlib.c
  19. +3
    -0
      src/lua/lmem.c
  20. +7
    -0
      src/lua/loadlib.c
  21. +4
    -0
      src/lua/lobject.c
  22. +3
    -0
      src/lua/lopcodes.c
  23. +7
    -0
      src/lua/loslib.c
  24. +3
    -0
      src/lua/lparser.c
  25. +3
    -0
      src/lua/lstate.c
  26. +3
    -0
      src/lua/lstring.c
  27. +3
    -0
      src/lua/lstrlib.c
  28. +3
    -0
      src/lua/ltable.c
  29. +3
    -0
      src/lua/ltablib.c
  30. +3
    -0
      src/lua/ltm.c
  31. +3
    -0
      src/lua/lua.c
  32. +4
    -0
      src/lua/luac.c
  33. +4
    -0
      src/lua/lundump.c
  34. +3
    -0
      src/lua/lvm.c
  35. +3
    -0
      src/lua/lzio.c

+ 1
- 1
configure.ac 查看文件

@@ -88,7 +88,7 @@ AC_CHECK_HEADERS(cxxabi.h)
AC_LANG_POP(C++)

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


+ 3
- 0
src/lua/lapi.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stdarg.h>
#include <string.h>


+ 3
- 0
src/lua/lauxlib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <errno.h>
#include <stdarg.h>


+ 3
- 0
src/lua/lbaselib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END


#include <ctype.h>


+ 4
- 0
src/lua/lbitlib.c 查看文件

@@ -4,6 +4,10 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#define lbitlib_c
#define LUA_LIB



+ 3
- 0
src/lua/lcode.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stdlib.h>



+ 3
- 0
src/lua/lcorolib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stdlib.h>



+ 4
- 0
src/lua/lctype.c 查看文件

@@ -4,6 +4,10 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#define lctype_c
#define LUA_CORE



+ 3
- 0
src/lua/ldblib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stdio.h>
#include <stdlib.h>


+ 3
- 0
src/lua/ldebug.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stdarg.h>
#include <stddef.h>


+ 3
- 0
src/lua/ldo.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <setjmp.h>
#include <stdlib.h>


+ 4
- 0
src/lua/ldump.c 查看文件

@@ -4,6 +4,10 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stddef.h>

#define ldump_c


+ 3
- 0
src/lua/lfunc.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stddef.h>



+ 4
- 0
src/lua/lgc.c 查看文件

@@ -4,6 +4,10 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <string.h>

#define lgc_c


+ 3
- 0
src/lua/linit.c 查看文件

@@ -4,6 +4,9 @@
** 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


+ 3
- 0
src/lua/liolib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

/*
** POSIX idiosyncrasy!


+ 3
- 0
src/lua/llex.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <locale.h>
#include <string.h>


+ 3
- 0
src/lua/lmathlib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stdlib.h>
#include <math.h>


+ 3
- 0
src/lua/lmem.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stddef.h>



+ 7
- 0
src/lua/loadlib.c 查看文件

@@ -8,6 +8,9 @@
** systems.
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

/*
** 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,
const char *envname2, const char *def) {
#if HAVE_GETENV // LOL BEGIN
const char *path = getenv(envname1);
if (path == NULL) /* no environment variable? */
path = getenv(envname2); /* try alternative name */
#else
const char *path = NULL;
#endif // LOL END
if (path == NULL || noenv(L)) /* no environment variable? */
lua_pushstring(L, def); /* use default */
else {


+ 4
- 0
src/lua/lobject.c 查看文件

@@ -4,6 +4,10 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>


+ 3
- 0
src/lua/lopcodes.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#define lopcodes_c
#define LUA_CORE


+ 7
- 0
src/lua/loslib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <errno.h>
#include <locale.h>
@@ -114,7 +117,11 @@ static int os_tmpname (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 */
#else
lua_pushstring(L, NULL);
#endif // LOL END
return 1;
}



+ 3
- 0
src/lua/lparser.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <string.h>



+ 3
- 0
src/lua/lstate.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stddef.h>
#include <string.h>


+ 3
- 0
src/lua/lstring.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <string.h>



+ 3
- 0
src/lua/lstrlib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <ctype.h>
#include <stddef.h>


+ 3
- 0
src/lua/ltable.c 查看文件

@@ -4,6 +4,9 @@
** 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).


+ 3
- 0
src/lua/ltablib.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stddef.h>



+ 3
- 0
src/lua/ltm.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <string.h>



+ 3
- 0
src/lua/lua.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#if 0 // LOL BEGIN
#include <signal.h>


+ 4
- 0
src/lua/luac.c 查看文件

@@ -4,6 +4,10 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>


+ 4
- 0
src/lua/lundump.c 查看文件

@@ -4,6 +4,10 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <string.h>

#define lundump_c


+ 3
- 0
src/lua/lvm.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <stdio.h>
#include <stdlib.h>


+ 3
- 0
src/lua/lzio.c 查看文件

@@ -4,6 +4,9 @@
** See Copyright Notice in lua.h
*/

#if defined HAVE_CONFIG_H // LOL BEGIN
# include "config.h"
#endif // LOL END

#include <string.h>



正在加载...
取消
保存