mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.
Proposed by Tim Peters.
This commit is contained in:
parent
03ca23d892
commit
f84d1b9375
3 changed files with 14 additions and 0 deletions
|
@ -396,7 +396,14 @@ static int taskwindow;
|
|||
static PyTypeObject sock_type;
|
||||
|
||||
/* Can we call select() with this socket without a buffer overrun? */
|
||||
#ifdef Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE
|
||||
/* Platform can select file descriptors beyond FD_SETSIZE */
|
||||
#define IS_SELECTABLE(s) 1
|
||||
#else
|
||||
/* POSIX says selecting file descriptors beyond FD_SETSIZE
|
||||
has undefined behaviour. */
|
||||
#define IS_SELECTABLE(s) ((s)->sock_fd < FD_SETSIZE)
|
||||
#endif
|
||||
|
||||
static PyObject*
|
||||
select_error(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue