From 791e5fcbab9e444b62d13d08707cbbbeb9406297 Mon Sep 17 00:00:00 2001 From: Erik Janssens Date: Wed, 22 May 2019 13:04:06 +0200 Subject: [PATCH] bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) (GH-13471) 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) --- .../next/Windows/2019-05-20-20-26-36.bpo-36965.KsfI-N.rst | 1 + Modules/main.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Windows/2019-05-20-20-26-36.bpo-36965.KsfI-N.rst 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 index 000000000000..2a531d2c14d9 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2019-05-20-20-26-36.bpo-36965.KsfI-N.rst @@ -0,0 +1 @@ +include of STATUS_CONTROL_C_EXIT without depending on MSC compiler diff --git a/Modules/main.c b/Modules/main.c index e3683b941754..acc59c6c40a9 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -18,8 +18,8 @@ # endif #endif -#ifdef _MSC_VER -# include +#ifdef MS_WINDOWS +# include /* STATUS_CONTROL_C_EXIT */ #endif #ifdef __FreeBSD__ -- 2.47.3