mirror of
https://github.com/python/cpython.git
synced 2025-10-06 07:02:33 +00:00
FreeBSD is the only platforms with unsigned FD_SETSIZE.
(cherry picked from commit 783d0c1a1c
)
This commit is contained in:
parent
8e572491b5
commit
cb7fdf69ec
2 changed files with 5 additions and 5 deletions
|
@ -39,7 +39,7 @@ PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
|
|||
|
||||
/* A routine to check if a file descriptor can be select()-ed. */
|
||||
#ifdef HAVE_SELECT
|
||||
#define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE))
|
||||
#define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
|
||||
#else
|
||||
#define _PyIsSelectable_fd(FD) (1)
|
||||
#endif /* HAVE_SELECT */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue