[Cmake-commits] [cmake-commits] king committed SystemTools.cxx 1.251 1.252

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Sep 24 08:10:51 EDT 2009


Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv21523/Source/kwsys

Modified Files:
	SystemTools.cxx 
Log Message:
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 <windows.h>
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 <windows.h> if it was not defined beforehand.


Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.251
retrieving revision 1.252
diff -C 2 -d -r1.251 -r1.252
*** SystemTools.cxx	23 Sep 2009 14:45:00 -0000	1.251
--- SystemTools.cxx	24 Sep 2009 12:10:46 -0000	1.252
***************
*** 65,71 ****
  #endif
  
! // Windows API.  Some parts used even on cygwin.
! #if defined(_WIN32) || defined (__CYGWIN__)
  # include <windows.h>
  #endif
  
--- 65,74 ----
  #endif
  
! // Windows API.
! #if defined(_WIN32)
  # include <windows.h>
+ #elif defined (__CYGWIN__)
+ # include <windows.h>
+ # undef _WIN32
  #endif
  



More information about the Cmake-commits mailing list