From f10929ae7ce3d62c7f49ffc9a98abf5d6b267b81 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Sep 2009 08:10:46 -0400 Subject: Restore KWSys SystemTools _WIN32 state on cygwin The commit "Fix KWSys SystemTools build on cygwin with -mwin32" tried to restore the state of the _WIN32 definition that was broken by the commit "Optimize KWSys SystemTools::FileExists on Windows". It did so for the case of building with -mwin32 on cygwin, but since including defines _WIN32, it failed for the case of not using -mwin32. This commit restores the state of _WIN32 in all cases by undefining it after including if it was not defined beforehand. --- Source/kwsys/SystemTools.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index c0ec2e4..30865f9 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -64,9 +64,12 @@ #include /* sigprocmask */ #endif -// Windows API. Some parts used even on cygwin. -#if defined(_WIN32) || defined (__CYGWIN__) +// Windows API. +#if defined(_WIN32) +# include +#elif defined (__CYGWIN__) # include +# undef _WIN32 #endif #ifdef __CYGWIN__ -- cgit v0.12