diff options
author | Soumendra Ganguly <67527439+8vasu@users.noreply.github.com> | 2024-02-11 10:29:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-11 10:29:44 (GMT) |
commit | bf75f1b147b8cc4c5506df7c4bb30b9950ceda1a (patch) | |
tree | c3f605a2c9ab7501c74c7cd837ec8e183a85cdc5 | |
parent | aeffc7f8951e04258f0fd8cadfa6cd8b704730f6 (diff) | |
download | cpython-bf75f1b147b8cc4c5506df7c4bb30b9950ceda1a.zip cpython-bf75f1b147b8cc4c5506df7c4bb30b9950ceda1a.tar.gz cpython-bf75f1b147b8cc4c5506df7c4bb30b9950ceda1a.tar.bz2 |
gh-85984: Add _POSIX_VDISABLE from unistd.h to termios module. (#114985)
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-02-04-02-28-37.gh-issue-85984.NHZVTQ.rst | 1 | ||||
-rw-r--r-- | Modules/termios.c | 7 |
2 files changed, 5 insertions, 3 deletions
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 index 0000000..bfa7e67 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-02-04-02-28-37.gh-issue-85984.NHZVTQ.rst @@ -0,0 +1 @@ +Added ``_POSIX_VDISABLE`` from C's ``<unistd.h>`` to :mod:`termios`. diff --git a/Modules/termios.c b/Modules/termios.c index 69dbd88..4635fef 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -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} |