Skip to content

Commit 791e5fc

Browse files
erikjanssvstinner
authored andcommitted
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 925af1d)
1 parent aea49b1 commit 791e5fc

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
# endif
1919
#endif
2020

21-
#ifdef _MSC_VER
22-
# include <crtdbg.h>
21+
#ifdef MS_WINDOWS
22+
# include <windows.h> /* STATUS_CONTROL_C_EXIT */
2323
#endif
2424

2525
#ifdef __FreeBSD__

0 commit comments

Comments
 (0)