From eb697165069fed8f6623b9bc9048d310f6cc68e0 Mon Sep 17 00:00:00 2001 From: Peter Drahos Date: Tue, 15 Mar 2011 23:30:01 +0100 Subject: Luac rc file renamed and fixed define warning. --- CMakeLists.txt | 3 +-- src/loadlib_rel.c | 8 +++++--- src/lua_simple.rc | 1 - src/luac.rc | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 src/lua_simple.rc create mode 100644 src/luac.rc 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 - #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/lua_simple.rc deleted file mode 100644 index 7caa98c..0000000 --- a/src/lua_simple.rc +++ /dev/null @@ -1 +0,0 @@ -0 ICON "..\\etc\\lua.ico" diff --git a/src/luac.rc b/src/luac.rc new file mode 100644 index 0000000..7caa98c --- /dev/null +++ b/src/luac.rc @@ -0,0 +1 @@ +0 ICON "..\\etc\\lua.ico" -- cgit v1.2.1