diff options
author | Peter Drahoš <drahosp@gmail.com> | 2014-02-19 12:31:36 +0100 |
---|---|---|
committer | Peter Drahoš <drahosp@gmail.com> | 2014-02-19 12:31:36 +0100 |
commit | 96245accd1539c8bb0d8be310eaa9cf5fbab9fed (patch) | |
tree | efd2ffbb4fa10d60b90144bddf7d8251f69ef389 | |
parent | d416eed4dea30525e141cf893d9b1b963e73098d (diff) | |
parent | aaf39ecc16c688f6a3804477f9355651534ddec1 (diff) | |
download | lua-5.2.3.tar.gz |
Merge branch 'master' of git://github.com/LuaDist/lua5.2.3
* 'master' of git://github.com/LuaDist/lua:
Correction of path format
Loadlib fix for newer Cygwin releases
-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 b3f537b..c2e9b95 100644 --- a/src/loadlib_rel.c +++ b/src/loadlib_rel.c @@ -116,13 +116,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 @@ -145,7 +149,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); |