1 --- cmake-3.2.2/Source/cmFileCommand.cxx 2015-04-13 19:09:00.000000000 +0200
2 +++ cmake-3.2.2/Source/ccmFileCommand.cxx 2015-06-10 11:02:27.345598700 +0200
4 MatchProperties CollectMatchProperties(const char* file)
6 // Match rules are case-insensitive on some platforms.
7 -#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
8 +#if defined(_WIN32) || defined(__APPLE__)
9 std::string lower = cmSystemTools::LowerCase(file);
10 const char* file_to_match = lower.c_str();
12 --- cmake-3.2.2/Source/cmInstallCommand.cxx 2015-04-13 19:09:00.000000000 +0200
13 +++ cmake-3.2.2/Source/cmInstallCommand.cxx 2015-06-10 11:04:19.257935200 +0200
16 literal_args += " REGEX \"";
17 // Match rules are case-insensitive on some platforms.
18 -#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
19 +#if defined(_WIN32) || defined(__APPLE__)
20 std::string regex = cmSystemTools::LowerCase(args[i]);
22 std::string regex = args[i];
23 --- cmake-3.2.2/Source/kwsys/Glob.cxx 2015-04-13 19:09:00.000000000 +0200
24 +++ cmake-3.2.2/Source/kwsys/Glob.cxx 2015-06-10 11:05:51.602674000 +0200
27 namespace KWSYS_NAMESPACE
29 -#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
30 +#if defined(_WIN32) || defined(__APPLE__)
31 // On Windows and apple, no difference between lower and upper case
32 # define KWSYS_GLOB_CASE_INDEPENDENT
34 --- cmake-3.2.2/Source/kwsys/SystemInformation.cxx 2015-04-13 19:09:00.000000000 +0200
35 +++ cmake-3.2.2/Source/kwsys/SystemInformation.cxx 2015-06-10 11:13:00.308303500 +0200
37 // Hide implementation details in an anonymous namespace.
39 // *****************************************************************************
40 -#if defined(__linux) || defined(__APPLE__)
41 +#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__)
44 kwsys_stl::vector<kwsys_stl::string> &lines)
49 -# if defined(__linux)
50 +# if defined(__linux) || defined(__CYGWIN__)
51 // *****************************************************************************
59 +#if defined(__linux) || defined(__CYGWIN__)
60 // ****************************************************************************
62 int GetFieldsFromFile(
64 pos = buffer.find("processor\t",pos+1);
68 // Find the largest physical id.
70 kwsys_stl::string idc =
71 @@ -3165,14 +3164,6 @@
72 atoi(this->ExtractValueFromCpuInfoFile(buffer,"ncpus active").c_str());
76 - // does not have "physical id" entries, neither "cpu cores"
77 - // this has to be fixed for hyper-threading.
78 - kwsys_stl::string cpucount =
79 - this->ExtractValueFromCpuInfoFile(buffer,"cpu count");
80 - this->NumberOfPhysicalCPU=
81 - this->NumberOfLogicalCPU = atoi(cpucount.c_str());
83 // gotta have one, and if this is 0 then we get a / by 0n
84 // better to have a bad answer than a crash
85 if(this->NumberOfPhysicalCPU <= 0)
87 GlobalMemoryStatusEx(&statex);
88 return statex.ullTotalPhys/1024;
90 -#elif defined(__linux)
91 +#elif defined(__linux) || defined(__CYGWIN__)
92 SystemInformation::LongLong memTotal=0;
93 int ierr=GetFieldFromFile("/proc/meminfo","MemTotal:",memTotal);
96 GlobalMemoryStatusEx(&statex);
97 return (statex.ullTotalPhys - statex.ullAvailPhys)/1024;
99 -#elif defined(__linux)
100 +#elif defined(__linux) || defined(__CYGWIN__)
101 const char *names[3]={"MemTotal:","MemFree:",NULL};
102 SystemInformation::LongLong values[2]={SystemInformation::LongLong(0)};
103 int ierr=GetFieldsFromFile("/proc/meminfo",names,values);
104 @@ -3560,7 +3551,7 @@
107 return pmc.WorkingSetSize/1024;
108 -#elif defined(__linux)
109 +#elif defined(__linux) || defined(__CYGWIN__)
110 SystemInformation::LongLong memUsed=0;
111 int ierr=GetFieldFromFile("/proc/self/status","VmRSS:",memUsed);
113 @@ -3612,7 +3603,7 @@
116 return GetCurrentProcessId();
117 -#elif defined(__linux) || defined(__APPLE__)
118 +#elif defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__)
122 --- cmake-3.2.2/Source/kwsys/SystemTools.cxx 2015-04-13 19:09:00.000000000 +0200
123 +++ cmake-3.2.2/Source/kwsys/SystemTools.cxx 2015-06-10 11:21:58.980443200 +0200
125 # if defined(_MSC_VER) && _MSC_VER >= 1800
126 # define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
128 -#elif defined (__CYGWIN__)
129 -# include <windows.h>
133 #if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
134 extern char **environ;
138 -# include <sys/cygwin.h>
141 // getpwnam doesn't exist on Windows and Cray Xt3/Catamount
142 // same for TIOCGWINSZ
143 #if defined(_WIN32) || defined (__LIBCATAMOUNT__)
144 @@ -1148,15 +1141,7 @@
148 -#if defined(__CYGWIN__)
149 - // Convert filename to native windows path if possible.
150 - char winpath[MAX_PATH];
151 - if(SystemTools::PathCygwinToWin32(filename.c_str(), winpath))
153 - return (GetFileAttributesA(winpath) != INVALID_FILE_ATTRIBUTES);
155 - return access(filename.c_str(), R_OK) == 0;
156 -#elif defined(_WIN32)
158 return (GetFileAttributesW(
159 SystemTools::ConvertToWindowsExtendedPath(filename).c_str())
160 != INVALID_FILE_ATTRIBUTES);
161 @@ -1190,28 +1175,6 @@
164 //----------------------------------------------------------------------------
166 -bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
168 - SystemToolsTranslationMap::iterator i =
169 - SystemTools::Cyg2Win32Map->find(path);
171 - if (i != SystemTools::Cyg2Win32Map->end())
173 - strncpy(win32_path, i->second.c_str(), MAX_PATH);
177 - if(cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, win32_path, MAX_PATH) != 0)
181 - SystemToolsTranslationMap::value_type entry(path, win32_path);
182 - SystemTools::Cyg2Win32Map->insert(entry);
184 - return win32_path[0] != 0;
188 bool SystemTools::Touch(const kwsys_stl::string& filename, bool create)
190 @@ -4307,7 +4270,7 @@
192 bool SystemTools::FileIsFullPath(const char* in_name, size_t len)
194 -#if defined(_WIN32) || defined(__CYGWIN__)
196 // On Windows, the name must be at least two characters long.
199 @@ -5078,9 +5041,6 @@
200 static unsigned int SystemToolsManagerCount;
201 SystemToolsTranslationMap *SystemTools::TranslationMap;
202 SystemToolsTranslationMap *SystemTools::LongPathMap;
204 -SystemToolsTranslationMap *SystemTools::Cyg2Win32Map;
207 // SystemToolsManager manages the SystemTools singleton.
208 // SystemToolsManager should be included in any translation unit
209 @@ -5126,9 +5086,6 @@
210 // Allocate the translation map first.
211 SystemTools::TranslationMap = new SystemToolsTranslationMap;
212 SystemTools::LongPathMap = new SystemToolsTranslationMap;
214 - SystemTools::Cyg2Win32Map = new SystemToolsTranslationMap;
217 // Add some special translation paths for unix. These are not added
218 // for windows because drive letters need to be maintained. Also,
219 @@ -5183,9 +5140,6 @@
221 delete SystemTools::TranslationMap;
222 delete SystemTools::LongPathMap;
224 - delete SystemTools::Cyg2Win32Map;
229 --- cmake-3.2.2/Source/kwsys/SystemTools.hxx.in 2015-04-13 19:09:00.000000000 +0200
230 +++ cmake-3.2.2/Source/kwsys/SystemTools.hxx.in 2015-06-10 11:24:24.271286600 +0200
232 static bool FileExists(const kwsys_stl::string& filename);
235 - * Converts Cygwin path to Win32 path. Uses dictionary container for
236 - * caching and calls to cygwin_conv_to_win32_path from Cygwin dll
237 - * for actual translation. Returns true on success, else false.
240 - static bool PathCygwinToWin32(const char *path, char *win32_path);
246 static unsigned long FileLength(const kwsys_stl::string& filename);
249 static SystemToolsTranslationMap *TranslationMap;
250 static SystemToolsTranslationMap *LongPathMap;
252 - static SystemToolsTranslationMap *Cyg2Win32Map;
254 friend class SystemToolsManager;
257 --- cmake-3.2.2/Modules/FindCurses.cmake 2015-04-13 19:09:00.000000000 +0200
258 +++ cmake-3.2.2/Modules/FindCurses.cmake 2015-06-10 12:10:19.682030300 +0200
260 if(CURSES_NCURSES_LIBRARY AND ((NOT CURSES_CURSES_LIBRARY) OR CURSES_NEED_NCURSES))
261 set(CURSES_USE_NCURSES TRUE)
263 -# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html
264 -# cygwin ncurses stopped providing curses.h symlinks see above
265 -# message. Cygwin is an ncurses package, so force ncurses on
266 -# cygwin if the curses.h is missing
268 - if(NOT EXISTS /usr/include/curses.h)
269 - set(CURSES_USE_NCURSES TRUE)
274 # Not sure the logic is correct here.