Skip to content

Commit 1367e8e

Browse files
lhmousenashif
authored andcommitted
Always define WIN32_LEAN_AND_MEAN before <windows.h>
Recently, mingw-w64 has got updated <msxml.h> from Wine which is included indirectly by <windows.h> if `WIN32_LEAN_AND_MEAN` is not defined. The `IXMLDOMDocument` class has a member function named `abort()`, which gets affected by our `abort()` macro in "system.h". `WIN32_LEAN_AND_MEAN` should, nevertheless, always be defined. This can exclude 'APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets' [1], and speed up compilation of these files a bit. [1] https://learn.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers (cherry picked from commit 902c755) Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 7e5b7b7 commit 1367e8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libgo/misc/cgo/test/callback_c.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ IntoC(void)
3232
}
3333

3434
#ifdef WIN32
35+
#define WIN32_LEAN_AND_MEAN
3536
#include <windows.h>
3637
long long
3738
mysleep(int seconds) {

0 commit comments

Comments
 (0)