File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,20 @@ extern "C" {
10
10
# error "this header requires Py_BUILD_CORE define"
11
11
#endif
12
12
13
- #include <signal.h> // NSIG
14
13
#include "pycore_atomic.h" // _Py_atomic_address
15
14
15
+ #ifdef MS_WINDOWS
16
+ # include "socketmodule.h" // SOCKET_T
17
+ #endif
18
+
19
+ #ifdef MS_WINDOWS
20
+ # include <windows.h> // HANDLE
21
+ #endif
22
+ #ifdef HAVE_SIGNAL_H
23
+ # include <signal.h> // NSIG
24
+ #endif
25
+
26
+
16
27
#ifdef _SIG_MAXSIG
17
28
// gh-91145: On FreeBSD, <signal.h> defines NSIG as 32: it doesn't include
18
29
// realtime signals: [SIGRTMIN,SIGRTMAX]. Use _SIG_MAXSIG instead. For
@@ -21,19 +32,19 @@ extern "C" {
21
32
#elif defined(NSIG )
22
33
# define Py_NSIG NSIG
23
34
#elif defined(_NSIG )
24
- # define Py_NSIG _NSIG // BSD/SysV
35
+ # define Py_NSIG _NSIG // BSD/SysV
25
36
#elif defined(_SIGMAX )
26
- # define Py_NSIG (_SIGMAX + 1) // QNX
37
+ # define Py_NSIG (_SIGMAX + 1) // QNX
27
38
#elif defined(SIGMAX )
28
- # define Py_NSIG (SIGMAX + 1) // djgpp
39
+ # define Py_NSIG (SIGMAX + 1) // djgpp
29
40
#else
30
- # define Py_NSIG 64 // Use a reasonable default value
41
+ # define Py_NSIG 64 // Use a reasonable default value
31
42
#endif
32
43
33
44
#ifdef MS_WINDOWS
34
- # define INVALID_FD ((SOCKET_T)-1)
45
+ # define INVALID_FD ((SOCKET_T)-1)
35
46
#else
36
- # define INVALID_FD (-1)
47
+ # define INVALID_FD (-1)
37
48
#endif
38
49
39
50
struct _signals_runtime_state {
You can’t perform that action at this time.
0 commit comments