From bf75f1b147b8cc4c5506df7c4bb30b9950ceda1a Mon Sep 17 00:00:00 2001 From: Soumendra Ganguly <67527439+8vasu@users.noreply.github.com> Date: Sun, 11 Feb 2024 11:29:44 +0100 Subject: [PATCH] gh-85984: Add _POSIX_VDISABLE from unistd.h to termios module. (#114985) Signed-off-by: Soumendra Ganguly Co-authored-by: Gregory P. Smith --- .../Library/2024-02-04-02-28-37.gh-issue-85984.NHZVTQ.rst | 1 + Modules/termios.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2024-02-04-02-28-37.gh-issue-85984.NHZVTQ.rst 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 00000000000..bfa7e676f92 --- /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 ```` to :mod:`termios`. diff --git a/Modules/termios.c b/Modules/termios.c index 69dbd88be5f..4635fefb8f3 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -27,9 +27,7 @@ #include #include -#if defined(__sun) && defined(__SVR4) -# include // ioctl() -#endif +#include // _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}