diff options
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/loadlib_rel.c | 8 | ||||
-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 |