summaryrefslogtreecommitdiffstats
path: root/SystemTools.cxx
diff options
context:
space:
mode:
authorKWSys Robot <kwrobot@kitware.com>2014-05-19 14:53:51 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-19 14:58:10 (GMT)
commited52685dd7ea5c54e7a5e6caa789293d76f10b15 (patch)
treebb0690652624838d38adba9543853382ca0580d2 /SystemTools.cxx
parent7762c57405d3b0daefc484a5e07bc24e04701615 (diff)
downloadCMake-ed52685dd7ea5c54e7a5e6caa789293d76f10b15.zip
CMake-ed52685dd7ea5c54e7a5e6caa789293d76f10b15.tar.gz
CMake-ed52685dd7ea5c54e7a5e6caa789293d76f10b15.tar.bz2
KWSys 2014-05-19 (c282e64f)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ c282e64f | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 6074f33f..c282e64f Brad King (2): 2e00d252 SystemTools: Port cygwin path conversion to modern API c282e64f Process: Workaround child kill trouble on Cygwin Change-Id: I39a3ca47fbb4065eff922d94e6d7019c417ed75c
Diffstat (limited to 'SystemTools.cxx')
-rw-r--r--SystemTools.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/SystemTools.cxx b/SystemTools.cxx
index a2681c1..704cbbc 100644
--- a/SystemTools.cxx
+++ b/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
@@ -1113,7 +1113,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);
}