Skip to content

Commit

Permalink
Luac rc file renamed and fixed define warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
drahosp committed Mar 15, 2011
1 parent a5a4aab commit eb69716
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand Down
8 changes: 5 additions & 3 deletions src/loadlib_rel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
File renamed without changes.

0 comments on commit eb69716

Please sign in to comment.