https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108300

--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Yong <[email protected]>:

https://gcc.gnu.org/g:49f3e5d51a00ac8e5057eca51606742bdcf2a966

commit r17-5485-g49f3e5d51a00ac8e5057eca51606742bdcf2a966
Author: LIU Hao <[email protected]>
Date:   Fri Jan 6 23:18:15 2023 +0800

    Always define `WIN32_LEAN_AND_MEAN` before <windows.h>

    This is the leftover part in r13-5055-g902c755930326c.

    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

    ChangeLog:

            PR middle-end/108300
            * libgo/misc/cgo/test/callback_c.c: Define `WIN32_LEAN_AND_MEAN`
            before <windows.h>.

    Co-authored-by: Zhongteng Gui <[email protected]>
    Signed-off-by: Zhongteng Gui <[email protected]>
    Signed-off-by: Jonathan Yong <[email protected]>

Reply via email to