Explorar el Código

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

legacy
Sam Hocevar sam hace 11 años
padre
commit
62870d0894
Se han modificado 35 ficheros con 118 adiciones y 1 borrados
  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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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>



Cargando…
Cancelar
Guardar