+-------------------+------------------------------------------+
| :const:`POLLHUP` | Hung up |
+-------------------+------------------------------------------+
+ | :const:`POLLRDHUP`| Stream socket peer closed connection, or |
+ | | shut down writing half of connection |
+ +-------------------+------------------------------------------+
| :const:`POLLNVAL` | Invalid request: descriptor not open |
+-------------------+------------------------------------------+
- Expose the EPOLLEXCLUSIVE constant (when it is defined) in the select module.
-- Issue #27567: Expose the EPOLLRDHUP constant in the select module.
+- Issue #27567: Expose the EPOLLRDHUP and POLLRDHUP constants in the select
+ module.
- Issue #1621: Avoid signed int negation overflow in the "audioop" module.
have any value except INVALID_SOCKET.
*/
+#if defined(HAVE_POLL_H) && !defined(_GNU_SOURCE)
+#define _GNU_SOURCE
+#endif
+
#include "Python.h"
#include <structmember.h>
#endif
#ifdef POLLMSG
PyModule_AddIntMacro(m, POLLMSG);
+#endif
+#ifdef POLLRDHUP
+ /* Kernel 2.6.17+ */
+ PyModule_AddIntMacro(m, POLLRDHUP);
#endif
}
#endif /* HAVE_POLL */