From: Erik Janssens Date: Wed, 22 May 2019 11:04:06 +0000 (+0200) Subject: bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) ... X-Git-Tag: v3.7.4rc1~118 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=791e5fcbab9e444b62d13d08707cbbbeb9406297;p=thirdparty%2FPython%2Fcpython.git 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) --- 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__