8000 Fail instead of falling back to includes. · python/cpython@0f4a50b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f4a50b

Browse files
Fail instead of falling back to includes.
1 parent e3c4b93 commit 0f4a50b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Include/internal/pycore_signal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ extern "C" {
1414

1515
#ifdef MS_WINDOWS
1616
# ifndef SOCKET
17-
# include <winsock2.h> // SOCKET
17+
# error "<winsock2.h> must be included before this header"
1818
# endif
1919
# ifndef HANDLE
20-
# include <windows.h> // HANDLE
20+
# error "<windows.h> must be included before this header"
2121
# endif
2222
#endif
2323
#include <signal.h> // NSIG

Modules/signalmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "pycore_moduleobject.h" // _PyModule_GetState()
1414
#include "pycore_pyerrors.h" // _PyErr_SetString()
1515
#include "pycore_pystate.h" // _PyThreadState_GET()
16-
#include "pycore_signal.h" // Py_NSIG
1716

1817
#ifndef MS_WINDOWS
1918
# include "posixmodule.h"
@@ -29,6 +28,8 @@
2928
# endif
3029
#endif
3130

31+
#include "pycore_signal.h" // Py_NSIG
32+
3233
#ifdef HAVE_SIGNAL_H
3334
# include <signal.h>
3435
#endif

0 commit comments

Comments
 (0)
0