summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Drahos <drahosp@gmail.com>2011-03-15 23:30:01 +0100
committerPeter Drahos <drahosp@gmail.com>2011-03-15 23:30:01 +0100
commiteb697165069fed8f6623b9bc9048d310f6cc68e0 (patch)
treeba5c5c33d162e12e3a6d49be461d41102cadba01
parenta5a4aabe53db90c8f1b9cc7c19b82295fbec1fe7 (diff)
downloadlua-eb697165069fed8f6623b9bc9048d310f6cc68e0.tar.gz
Luac rc file renamed and fixed define warning.
-rw-r--r--CMakeLists.txt3
-rw-r--r--src/loadlib_rel.c8
-rw-r--r--src/luac.rc (renamed from src/lua_simple.rc)0
3 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32d49ec..0d9ba3d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,13 +73,12 @@ if ( LUA_USE_DLOPEN )
endif ()
if ( LUA_WIN )
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE )
# Add extra rc files to the windows build
if ( MSVC OR MINGW )
set ( LUA_DEF src/lua.def )
set ( LUA_DLL_RC src/lua_dll.rc )
set ( LUA_RC src/lua.rc )
- set ( LUAC_RC src/lua_simple.rc )
+ set ( LUAC_RC src/luac.rc )
endif ()
endif ()
diff --git a/src/loadlib_rel.c b/src/loadlib_rel.c
index 97f63be..5d266f2 100644
--- a/src/loadlib_rel.c
+++ b/src/loadlib_rel.c
@@ -51,16 +51,18 @@ static void setprogdir (lua_State *L);
*/
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
- #define PATH_MAX MAX_PATH
+ #define _PATH_MAX MAX_PATH
+#else
+ #define _PATH_MAX PATH_MAX
#endif
static void setprogdir (lua_State *L) {
- char progdir[PATH_MAX + 1];
+ char progdir[_PATH_MAX + 1];
char *lb;
int nsize = sizeof(progdir)/sizeof(char);
int n;
#if defined(__CYGWIN__)
- char win_buff[PATH_MAX + 1];
+ char win_buff[_PATH_MAX + 1];
GetModuleFileNameA(NULL, win_buff, nsize);
cygwin_conv_to_posix_path(win_buff, progdir);
n = strlen(progdir);
diff --git a/src/lua_simple.rc b/src/luac.rc
index 7caa98c..7caa98c 100644
--- a/src/lua_simple.rc
+++ b/src/luac.rc