Revert "Googletest export"

This reverts commit a9f6c1ed14.

That commit cannot fix the issue it sets out to fix.

The original issue, #2822, was that building with a toolset
targeting XP compatibility is missing the debugapi.h header -
as debugapi.h didn't exist in older Windows SDKs.

Commit a9f6c1ed14 misinterpreted
the Microsoft documentation about IsDebuggerPresent. The information
about which header to use, "debugapi.h (include Windows.h)" means
that the function declaration currently lives in debugapi.h, but
for compatibility, just include the Windows.h umbrella header.
In older Windows SDKs (e.g. the v6.0a SDK), IsDebuggerPresent
is declared in winbase.h, and debugapi.h doesn't exist at all in those
versions.

Including Windows.h with a different capitalization than the existing
include won't help finding headers that don't exist.

Including Windows.h with a capital W breaks cross compilation with mingw
toolchains, where the header always has been spelled with a lower case
W. When building on native windows, the file system is case insensitive
and the capitalization doesn't matter.

This fixes issue #2840.
This commit is contained in:
Martin Storsjö 2020-05-08 10:13:33 +03:00
parent a09ea700d3
commit 09f587512a

View File

@ -81,7 +81,6 @@
#elif GTEST_OS_WINDOWS // We are on Windows proper.
# include <Windows.h> // NOLINT
# include <windows.h> // NOLINT
# undef min