]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) ...
authorErik Janssens <erik.janssens@conceptive.be>
Wed, 22 May 2019 11:04:06 +0000 (13:04 +0200)
committerVictor Stinner <vstinner@redhat.com>
Wed, 22 May 2019 11:04:06 +0000 (13:04 +0200)
Include windows.h rather than crtdbg.h to get STATUS_CONTROL_C_EXIT constant.
Moreover, include windows.h on Windows, not only when MSC is used.

(cherry picked from commit 925af1d99b69bf3e229411022ad840c5a0cfdcf8)

Misc/NEWS.d/next/Windows/2019-05-20-20-26-36.bpo-36965.KsfI-N.rst [new file with mode: 0644]
Modules/main.c

diff --git a/Misc/NEWS.d/next/Windows/2019-05-20-20-26-36.bpo-36965.KsfI-N.rst b/Misc/NEWS.d/next/Windows/2019-05-20-20-26-36.bpo-36965.KsfI-N.rst
new file mode 100644 (file)
index 0000000..2a531d2
--- /dev/null
@@ -0,0 +1 @@
+include of STATUS_CONTROL_C_EXIT without depending on MSC compiler
index e3683b9417545bd2cc4fbdf7d8fe06e7bc5740d0..acc59c6c40a9975ae8041695369486e9d5a748e0 100644 (file)
@@ -18,8 +18,8 @@
 #  endif
 #endif
 
-#ifdef _MSC_VER
-#  include <crtdbg.h>
+#ifdef MS_WINDOWS
+#  include <windows.h>  /* STATUS_CONTROL_C_EXIT */
 #endif
 
 #ifdef __FreeBSD__