From: Erik Janssens Date: Tue, 21 May 2019 10:11:11 +0000 (+0200) Subject: bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) X-Git-Tag: v3.8.0b1~276 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=925af1d99b69bf3e229411022ad840c5a0cfdcf8;p=thirdparty%2FPython%2Fcpython.git bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) 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. --- 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 6d4b351e5e17..08fb0e0417d0 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -18,8 +18,8 @@ #if defined(HAVE_GETPID) && defined(HAVE_UNISTD_H) # include /* getpid() */ #endif -#ifdef _MSC_VER -# include /* STATUS_CONTROL_C_EXIT */ +#ifdef MS_WINDOWS +# include /* STATUS_CONTROL_C_EXIT */ #endif /* End of includes for exit_sigint() */