Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.

Proposed by Tim Peters.
This commit is contained in:
Martin v. Löwis 2006-02-11 09:27:05 +00:00
parent 03ca23d892
commit f84d1b9375
3 changed files with 14 additions and 0 deletions

View file

@ -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)