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.
This commit is contained in:
Erik Janssens 2019-05-21 12:11:11 +02:00 committed by Victor Stinner
parent e7cb23bf20
commit 925af1d99b
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
include of STATUS_CONTROL_C_EXIT without depending on MSC compiler

View File

@ -18,8 +18,8 @@
#if defined(HAVE_GETPID) && defined(HAVE_UNISTD_H) #if defined(HAVE_GETPID) && defined(HAVE_UNISTD_H)
# include <unistd.h> /* getpid() */ # include <unistd.h> /* getpid() */
#endif #endif
#ifdef _MSC_VER #ifdef MS_WINDOWS
# include <crtdbg.h> /* STATUS_CONTROL_C_EXIT */ # include <windows.h> /* STATUS_CONTROL_C_EXIT */
#endif #endif
/* End of includes for exit_sigint() */ /* End of includes for exit_sigint() */