[Python-checkins] bpo-32660: Solaris should support constants like termios' FIONREAD (#5328)

jcea webhook-mailer at python.org
Sun Jan 28 08:00:51 EST 2018


https://github.com/python/cpython/commit/f0a95f27c043e847a23940534fdfc53e1b3e31a1
commit: f0a95f27c043e847a23940534fdfc53e1b3e31a1
branch: master
author: jcea <jcea at jcea.es>
committer: GitHub <noreply at github.com>
date: 2018-01-28T14:00:48+01:00
summary:

bpo-32660: Solaris should support constants like termios' FIONREAD (#5328)

files:
A Misc/NEWS.d/next/Library/2018-01-26-01-26-00.bpo-32660.tVJIWV.rst
M Modules/termios.c

diff --git a/Misc/NEWS.d/next/Library/2018-01-26-01-26-00.bpo-32660.tVJIWV.rst b/Misc/NEWS.d/next/Library/2018-01-26-01-26-00.bpo-32660.tVJIWV.rst
new file mode 100644
index 000000000000..5b33e1a19f96
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-01-26-01-26-00.bpo-32660.tVJIWV.rst
@@ -0,0 +1,2 @@
+:mod:`termios` makes available ``FIONREAD``, ``FIONCLEX``, ``FIOCLEX``,
+``FIOASYNC`` and ``FIONBIO`` also under Solaris/derivatives.
diff --git a/Modules/termios.c b/Modules/termios.c
index 6ed4395ae4dd..b4aa77f89764 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -8,6 +8,12 @@
 #define CTRL(c) ((c)&037)
 #endif
 
+#if defined(__sun)
+/* We could do better. Check issue-32660 */
+#include <sys/filio.h>
+#include <sys/sockio.h>
+#endif
+
 #include <termios.h>
 #include <sys/ioctl.h>
 



More information about the Python-checkins mailing list