summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-16 12:39:46 -0400
committerBrad King <brad.king@kitware.com>2014-05-20 09:48:26 -0400
commite604209cb930c5bc7e53f58625407b82e6899d0f (patch)
tree3d1167bc34868ee1593114b5216836d75ca914b2
parent5527cfa002f50a644bf6bbb6a1a7af534870df35 (diff)
downloadcmake-e604209cb930c5bc7e53f58625407b82e6899d0f.tar.gz
KWSys SystemTools: Port cygwin path conversion to modern API
The cygwin_conv_to_win32_path function is deprecated in favor of cygwin_conv_path. Use the latter.
-rw-r--r--Source/kwsys/SystemTools.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index f4a443f98c..e5d8bded9e 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -92,7 +92,7 @@ extern char **environ;
#endif
#ifdef __CYGWIN__
-extern "C" void cygwin_conv_to_win32_path(const char *path, char *win32_path);
+# include <sys/cygwin.h>
#endif
// getpwnam doesn't exist on Windows and Cray Xt3/Catamount
@@ -1110,7 +1110,10 @@ bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
}
else
{
- cygwin_conv_to_win32_path(path, win32_path);
+ if(cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, win32_path, MAX_PATH) != 0)
+ {
+ win32_path[0] = 0;
+ }
SystemToolsTranslationMap::value_type entry(path, win32_path);
SystemTools::Cyg2Win32Map->insert(entry);
}