]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-85984: Add _POSIX_VDISABLE from unistd.h to termios module. (#114985)
authorSoumendra Ganguly <67527439+8vasu@users.noreply.github.com>
Sun, 11 Feb 2024 10:29:44 +0000 (11:29 +0100)
committerGitHub <noreply@github.com>
Sun, 11 Feb 2024 10:29:44 +0000 (10:29 +0000)
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Misc/NEWS.d/next/Library/2024-02-04-02-28-37.gh-issue-85984.NHZVTQ.rst [new file with mode: 0644]
Modules/termios.c

diff --git a/Misc/NEWS.d/next/Library/2024-02-04-02-28-37.gh-issue-85984.NHZVTQ.rst b/Misc/NEWS.d/next/Library/2024-02-04-02-28-37.gh-issue-85984.NHZVTQ.rst
new file mode 100644 (file)
index 0000000..bfa7e67
--- /dev/null
@@ -0,0 +1 @@
+Added ``_POSIX_VDISABLE`` from C's ``<unistd.h>`` to :mod:`termios`.
index 69dbd88be5fcc20054a9c892623c58542d9fc744..4635fefb8f3f5aefa72aacf513c4abbf1ae9e29c 100644 (file)
@@ -27,9 +27,7 @@
 
 #include <termios.h>
 #include <sys/ioctl.h>
-#if defined(__sun) && defined(__SVR4)
-#  include <unistd.h>             // ioctl()
-#endif
+#include <unistd.h> // _POSIX_VDISABLE
 
 /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
  * MDTR, MRI, and MRTS (apparently used internally by some things
@@ -1315,6 +1313,9 @@ static struct constant {
 #ifdef TIOCTTYGSTRUCT
     {"TIOCTTYGSTRUCT", TIOCTTYGSTRUCT},
 #endif
+#ifdef _POSIX_VDISABLE
+    {"_POSIX_VDISABLE", _POSIX_VDISABLE},
+#endif
 
     /* sentinel */
     {NULL, 0}