Lua-5.1.4 source code modifications:

  1. Applied the patch-lua-5.1.4-2.diff patch

  2. Moved the following headers from src/ into include/:
     - lua.h
     - lualib.h
     - lauxlib.h
     - luaconf.h

  3. Added the include/LuaInclude.h header

  4. Made the following adjustments in luaconf.h:

     //SPRING#define LUA_NUMBER_DOUBLE
     #undef LUA_NUMBER_DOUBLE

     //SPRING#define LUA_NUMBER  double
     #define LUA_NUMBER  float                                               

     //SPRING#define LUA_NUMBER_SCAN "%lf"
     #define LUA_NUMBER_SCAN "%f"

  5. Moved the *.c files to *.cpp for C++ compilation

  6. Swapped <math.h> includes with "streflop_cond.h" includes  (for sync) 

  6. removed the following files:
     Makefile
     doc/*
     etc/*
     test/*
     src/lua.c
     src/luac.c

  7. Changed the return type of lua_toboolean from int to bool to prevent
     compiler performance warnings on Visual Studio 2005.

  8. Modified lbaselib.cpp:luaB_tostring() and lvm.cpp:luaV_tostring()
     so that the tostring() lua function would be sync safe.

  9. Undefined (in include/luaconf.h):
       LUA_COMPAT_VARARG
       LUA_COMPAT_MOD
       LUA_COMPAT_LSTR
       LUA_COMPAT_GFIND
       LUA_COMPAT_OPENLIB

  10. Added the following to lua.h  (and associated code)
        lua_set_fopen()
        lua_set_popen()
        lua_set_system()
        lua_set_remove()
        lua_set_rename()
        lua_calchash()
        lua_pushhstring()

  11.
      modify lauxlib.cpp::luaL_checknumber and LuaInclude.h::lua_tofloat to
      trigger asserts if a Lua script pushes a NaN or Inf onto the stack and
      the engine reads it (asserts are disabled for Lua-internal math calls)

