summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-23 14:45:00 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-23 14:45:00 (GMT)
commit4e121af95eebcff0e203ce19994c0f20f02688c6 (patch)
tree6effe8640f9d25126a667d89ace1775b79dd5340
parent6f45c1d88c973478060c5bf944d092160afd2727 (diff)
downloadCMake-4e121af95eebcff0e203ce19994c0f20f02688c6.zip
CMake-4e121af95eebcff0e203ce19994c0f20f02688c6.tar.gz
CMake-4e121af95eebcff0e203ce19994c0f20f02688c6.tar.bz2
Fix KWSys SystemTools build on cygwin with -mwin32
Commit "Optimize KWSys SystemTools::FileExists on Windows" accidentally added "#undef _WIN32" when including <windows.h> on cygwin, which breaks builds using the -mwin32 flag. This commit removes that line and fixes the real error it was intended to avoid.
-rw-r--r--Source/kwsys/SystemTools.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 2ea54b0..c0ec2e4 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -70,7 +70,6 @@
#endif
#ifdef __CYGWIN__
-# undef _WIN32
extern "C" void cygwin_conv_to_win32_path(const char *path, char *win32_path);
#endif
@@ -2614,7 +2613,7 @@ bool SystemTools::FileIsDirectory(const char* name)
struct stat fs;
if(stat(name, &fs) == 0)
{
-#if defined( _WIN32 )
+#if defined( _WIN32 ) && !defined(__CYGWIN__)
return ((fs.st_mode & _S_IFDIR) != 0);
#else
return S_ISDIR(fs.st_mode);