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.
This commit is contained in:
parent
d6ffe2d512
commit
f10929ae7c
@ -64,9 +64,12 @@
|
|||||||
#include <signal.h> /* sigprocmask */
|
#include <signal.h> /* sigprocmask */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Windows API. Some parts used even on cygwin.
|
// Windows API.
|
||||||
#if defined(_WIN32) || defined (__CYGWIN__)
|
#if defined(_WIN32)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
#elif defined (__CYGWIN__)
|
||||||
|
# include <windows.h>
|
||||||
|
# undef _WIN32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user