diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-07-18 15:05:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 15:05:03 (GMT) |
commit | f474c5a3f3c1fbc0383800b88e8518d43a52d1d1 (patch) | |
tree | 9c29ab7759d4e8b23dcf2ba3f0ff84bf94e9e299 /Include/fileobject.h | |
parent | efa26bcd5085279fc4e9ae96d052272a5214c2bd (diff) | |
download | cpython-f474c5a3f3c1fbc0383800b88e8518d43a52d1d1.zip cpython-f474c5a3f3c1fbc0383800b88e8518d43a52d1d1.tar.gz cpython-f474c5a3f3c1fbc0383800b88e8518d43a52d1d1.tar.bz2 |
bpo-30946: Remove obsolete fallback code in readline module (#2738)
* Remove obsolete fallback code in readline module
* Add NEWS
* Remove obsolete include
* Fix macro on Windows
Diffstat (limited to 'Include/fileobject.h')
-rw-r--r-- | Include/fileobject.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h index 1dde17e..0b1678e 100644 --- a/Include/fileobject.h +++ b/Include/fileobject.h @@ -38,11 +38,12 @@ PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; #endif /* Py_LIMITED_API */ /* A routine to check if a file descriptor can be select()-ed. */ -#ifdef HAVE_SELECT - #define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE) +#ifdef _MSC_VER + /* On Windows, any socket fd can be select()-ed, no matter how high */ + #define _PyIsSelectable_fd(FD) (1) #else - #define _PyIsSelectable_fd(FD) (1) -#endif /* HAVE_SELECT */ + #define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE) +#endif #ifdef __cplusplus } |