Changeset 2542


Ignore:
Timestamp:
Mar 2, 2013, 6:30:07 PM (10 years ago)
Author:
sam
Message:

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

Location:
trunk
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r2540 r2542  
    8989
    9090dnl  Common C functions
    91 AC_CHECK_FUNCS(getcwd _getcwd backtrace_symbols)
     91AC_CHECK_FUNCS(getenv getcwd _getcwd backtrace_symbols)
    9292
    9393
  • trunk/src/lua/lapi.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stdarg.h>
  • trunk/src/lua/lauxlib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <errno.h>
  • trunk/src/lua/lbaselib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811
  • trunk/src/lua/lbitlib.c

    r2540 r2542  
    44** See Copyright Notice in lua.h
    55*/
     6
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    610
    711#define lbitlib_c
  • trunk/src/lua/lcode.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stdlib.h>
  • trunk/src/lua/lcorolib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stdlib.h>
  • trunk/src/lua/lctype.c

    r2540 r2542  
    44** See Copyright Notice in lua.h
    55*/
     6
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    610
    711#define lctype_c
  • trunk/src/lua/ldblib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stdio.h>
  • trunk/src/lua/ldebug.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stdarg.h>
  • trunk/src/lua/ldo.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <setjmp.h>
  • trunk/src/lua/ldump.c

    r2540 r2542  
    44** See Copyright Notice in lua.h
    55*/
     6
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    610
    711#include <stddef.h>
  • trunk/src/lua/lfunc.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stddef.h>
  • trunk/src/lua/lgc.c

    r2540 r2542  
    44** See Copyright Notice in lua.h
    55*/
     6
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    610
    711#include <string.h>
  • trunk/src/lua/linit.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811/*
  • trunk/src/lua/liolib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811/*
  • trunk/src/lua/llex.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <locale.h>
  • trunk/src/lua/lmathlib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stdlib.h>
  • trunk/src/lua/lmem.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stddef.h>
  • trunk/src/lua/loadlib.c

    r2540 r2542  
    99*/
    1010
     11#if defined HAVE_CONFIG_H // LOL BEGIN
     12#   include "config.h"
     13#endif // LOL END
    1114
    1215/*
     
    637640static void setpath (lua_State *L, const char *fieldname, const char *envname1,
    638641                                   const char *envname2, const char *def) {
     642#if HAVE_GETENV // LOL BEGIN
    639643  const char *path = getenv(envname1);
    640644  if (path == NULL)  /* no environment variable? */
    641645    path = getenv(envname2);  /* try alternative name */
     646#else
     647  const char *path = NULL;
     648#endif // LOL END
    642649  if (path == NULL || noenv(L))  /* no environment variable? */
    643650    lua_pushstring(L, def);  /* use default */
  • trunk/src/lua/lobject.c

    r2540 r2542  
    44** See Copyright Notice in lua.h
    55*/
     6
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    610
    711#include <stdarg.h>
  • trunk/src/lua/lopcodes.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#define lopcodes_c
  • trunk/src/lua/loslib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <errno.h>
     
    115118
    116119static int os_getenv (lua_State *L) {
     120#if HAVE_GETENV // LOL BEGIN
    117121  lua_pushstring(L, getenv(luaL_checkstring(L, 1)));  /* if NULL push nil */
     122#else
     123  lua_pushstring(L, NULL);
     124#endif // LOL END
    118125  return 1;
    119126}
  • trunk/src/lua/lparser.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <string.h>
  • trunk/src/lua/lstate.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stddef.h>
  • trunk/src/lua/lstring.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <string.h>
  • trunk/src/lua/lstrlib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <ctype.h>
  • trunk/src/lua/ltable.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811/*
  • trunk/src/lua/ltablib.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stddef.h>
  • trunk/src/lua/ltm.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <string.h>
  • trunk/src/lua/lua.c

    r2541 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#if 0 // LOL BEGIN
  • trunk/src/lua/luac.c

    r2540 r2542  
    44** See Copyright Notice in lua.h
    55*/
     6
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    610
    711#include <errno.h>
  • trunk/src/lua/lundump.c

    r2540 r2542  
    44** See Copyright Notice in lua.h
    55*/
     6
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    610
    711#include <string.h>
  • trunk/src/lua/lvm.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <stdio.h>
  • trunk/src/lua/lzio.c

    r2540 r2542  
    55*/
    66
     7#if defined HAVE_CONFIG_H // LOL BEGIN
     8#   include "config.h"
     9#endif // LOL END
    710
    811#include <string.h>
Note: See TracChangeset for help on using the changeset viewer.