File tree 2 files changed +15
-8
lines changed
2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ extern "C" {
13
13
#include "pycore_atomic.h" // _Py_atomic_address
14
14
15
15
#ifdef MS_WINDOWS
16
- # ifndef SOCKET
17
- # ifdef PYCORE_SIGNAL_REQUIRES_WINSOCK
16
+ # ifdef PYCORE_SIGNAL_WITH_PRE_INCLUDES
17
+ # ifndef SOCKET
18
18
# error "<winsock2.h> must be included before this header"
19
19
# endif
20
- # endif
21
- # ifndef HANDLE
22
- # error "<windows.h> must be included before this header"
20
+ # ifndef HANDLE
21
+ # error "<windows.h> must be included before this header"
22
+ # endif
23
23
# endif
24
24
#endif
25
25
#include <signal.h> // NSIG
@@ -62,7 +62,8 @@ struct _signals_runtime_state {
62
62
# ifdef SOCKET
63
63
SOCKET fd ;
64
64
# else
65
- // <winsock2.h> wasn't included already, so we fake it.
65
+ // <winsock2.h> wasn't included already,
66
+ // we use something compatible with SOCKET.
66
67
int fd ;
67
68
# endif
68
69
#elif defined(__VXWORKS__ )
@@ -84,7 +85,13 @@ struct _signals_runtime_state {
84
85
PyObject * default_handler ;
85
86
PyObject * ignore_handler ;
86
87
#ifdef MS_WINDOWS
88
+ # ifdef HANDLE
87
89
HANDLE sigint_event ;
90
+ # else
91
+ // <windows.h> wasn't included already,
92
+ // we use something compatible with HANDLE.
93
+ void * sigint_event ;
94
+ # endif
88
95
#endif
89
96
90
97
/* True if the main interpreter thread exited due to an unhandled
Original file line number Diff line number Diff line change 5
5
6
6
#ifdef MS_WINDOWS
7
7
# if !defined(SOCKET ) && defined(Py_INTERNAL_SIGNAL_H )
8
- # error "pycore_signal.h included without PYCORE_SIGNAL_REQUIRES_WINSOCK "
8
+ # error "pycore_signal.h included without PYCORE_SIGNAL_WITH_PRE_INCLUDES "
9
9
# endif
10
- # define _PYCORE_SIGNAL_REQUIRES_WINSOCK
10
+ # define PYCORE_SIGNAL_WITH_PRE_INCLUDES
11
11
#endif
12
12
13
13
#include "Python.h"
You can’t perform that action at this time.
0 commit comments