Skip to content

Commit 925af1d

Browse files
erikjanssvstinner
authored andcommitted
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.
1 parent e7cb23b commit 925af1d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include of STATUS_CONTROL_C_EXIT without depending on MSC compiler

Modules/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#if defined(HAVE_GETPID) && defined(HAVE_UNISTD_H)
1919
# include <unistd.h> /* getpid() */
2020
#endif
21-
#ifdef _MSC_VER
22-
# include <crtdbg.h> /* STATUS_CONTROL_C_EXIT */
21+
#ifdef MS_WINDOWS
22+
# include <windows.h> /* STATUS_CONTROL_C_EXIT */
2323
#endif
2424
/* End of includes for exit_sigint() */
2525

0 commit comments

Comments
 (0)