diff options
author | Peter Drahoš <drahosp@gmail.com> | 2013-12-09 01:43:11 +0100 |
---|---|---|
committer | Peter Drahoš <drahosp@gmail.com> | 2013-12-09 01:43:11 +0100 |
commit | d2e7e7d4d43ff9068b279a617c5b2ca2c2771676 (patch) | |
tree | 915823d98b2443ecf5d2f7d0e4af904247808c02 | |
parent | a77a47e2f059c0285bbc339fa080ee1c1b144710 (diff) | |
download | lua-5.1.tar.gz |
-rw-r--r-- | src/loadlib_rel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/loadlib_rel.c b/src/loadlib_rel.c index 0556ba9..700f690 100644 --- a/src/loadlib_rel.c +++ b/src/loadlib_rel.c @@ -50,13 +50,17 @@ static void setprogdir (lua_State *L); ** Modified by the LuaDist project for UNIX platforms ** ========================================================================== */ -#if defined(_WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) #include <windows.h> #define _PATH_MAX MAX_PATH #else #define _PATH_MAX PATH_MAX #endif +#if defined(__CYGWIN__) + #include <sys/cygwin.h> +#endif + #if defined(__linux__) || defined(__sun) #include <unistd.h> /* readlink */ #endif @@ -79,7 +83,7 @@ static void setprogdir(lua_State *L) { #if defined(__CYGWIN__) char win_buff[_PATH_MAX + 1]; GetModuleFileNameA(NULL, win_buff, nsize); - cygwin_conv_to_posix_path(win_buff, progdir); + cygwin_conv_path (CCP_WIN_A_TO_POSIX, win_buff, progdir, nsize); n = strlen(progdir); #elif defined(_WIN32) n = GetModuleFileNameA(NULL, progdir, nsize); |