Files
MSYS2-packages/cmake/3.5.2-cygwin-paths.patch
J. Peter Mugaas a5badda0b4 cmake 3.5.2 - Update to latest version, rekey all patches
Update to latest version
Rekey all patches
Hopefully have improvements from #584.
jsoncpp is dependency
2016-05-23 04:42:32 -04:00

110 lines
3.2 KiB
Diff

diff -aur cmake-3.5.2/Source/kwsys/SystemTools.cxx.orig cmake-3.5.2/Source/kwsys/SystemTools.cxx
--- cmake-3.5.2/Source/kwsys/SystemTools.cxx.orig 2016-04-15 09:41:22.000000000 -0400
+++ cmake-3.5.2/Source/kwsys/SystemTools.cxx 2016-05-19 07:22:11.643728500 -0400
@@ -93,19 +93,12 @@
# if defined(_MSC_VER) && _MSC_VER >= 1800
# define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# endif
-#elif defined (__CYGWIN__)
-# include <windows.h>
-# undef _WIN32
#endif
#if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
extern char **environ;
#endif
-#ifdef __CYGWIN__
-# include <sys/cygwin.h>
-#endif
-
// getpwnam doesn't exist on Windows and Cray Xt3/Catamount
// same for TIOCGWINSZ
#if defined(_WIN32) || defined (__LIBCATAMOUNT__)
@@ -1214,7 +1207,7 @@
{
return false;
}
-#if defined(__CYGWIN__)
+#if 0
// Convert filename to native windows path if possible.
char winpath[MAX_PATH];
if(SystemTools::PathCygwinToWin32(filename.c_str(), winpath))
@@ -1291,7 +1284,7 @@
}
//----------------------------------------------------------------------------
-#ifdef __CYGWIN__
+#if 0
bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
{
SystemToolsTranslationMap::iterator i =
@@ -4451,7 +4444,7 @@
bool SystemTools::FileIsFullPath(const char* in_name, size_t len)
{
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
// On Windows, the name must be at least two characters long.
if(len < 2)
{
@@ -5263,9 +5256,6 @@
#ifdef _WIN32
SystemToolsPathCaseMap *SystemTools::PathCaseMap;
#endif
-#ifdef __CYGWIN__
-SystemToolsTranslationMap *SystemTools::Cyg2Win32Map;
-#endif
// SystemToolsManager manages the SystemTools singleton.
// SystemToolsManager should be included in any translation unit
@@ -5313,9 +5303,6 @@
#ifdef _WIN32
SystemTools::PathCaseMap = new SystemToolsPathCaseMap;
#endif
-#ifdef __CYGWIN__
- SystemTools::Cyg2Win32Map = new SystemToolsTranslationMap;
-#endif
// Add some special translation paths for unix. These are not added
// for windows because drive letters need to be maintained. Also,
@@ -5372,9 +5359,6 @@
#ifdef _WIN32
delete SystemTools::PathCaseMap;
#endif
-#ifdef __CYGWIN__
- delete SystemTools::Cyg2Win32Map;
-#endif
}
diff -aur cmake-3.5.2/Source/kwsys/SystemTools.hxx.in.orig cmake-3.5.2/Source/kwsys/SystemTools.hxx.in
--- cmake-3.5.2/Source/kwsys/SystemTools.hxx.in.orig 2016-04-15 09:41:22.000000000 -0400
+++ cmake-3.5.2/Source/kwsys/SystemTools.hxx.in 2016-05-19 07:36:23.880430500 -0400
@@ -333,15 +333,6 @@
TestFilePermissions permissions);
/**
- * Converts Cygwin path to Win32 path. Uses dictionary container for
- * caching and calls to cygwin_conv_to_win32_path from Cygwin dll
- * for actual translation. Returns true on success, else false.
- */
-#ifdef __CYGWIN__
- static bool PathCygwinToWin32(const char *path, char *win32_path);
-#endif
-
- /**
* Return file length
*/
static unsigned long FileLength(const std::string& filename);
@@ -990,9 +981,6 @@
#ifdef _WIN32
static SystemToolsPathCaseMap *PathCaseMap;
#endif
-#ifdef __CYGWIN__
- static SystemToolsTranslationMap *Cyg2Win32Map;
-#endif
friend class SystemToolsManager;
};