Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 36476:c073dffbe70e legacy-trunk
Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.
Proposed by Tim Peters.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sat, 11 Feb 2006 09:27:05 +0000 |
| parents | 7789cc557e1e |
| children | 0671f3c462d5 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Fri Feb 10 22:51:45 2006 +0000 +++ b/Modules/socketmodule.c Sat Feb 11 09:27:05 2006 +0000 @@ -396,7 +396,14 @@ 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)
