Skip to content

Commit

Permalink
pythongh-85984: Add _POSIX_VDISABLE from unistd.h to termios module. (p…
Browse files Browse the repository at this point in the history
…ython#114985)

Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
  • Loading branch information
2 people authored and fsc-eriker committed Feb 14, 2024
1 parent a88c67d commit 9d6c9d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added ``_POSIX_VDISABLE`` from C's ``<unistd.h>`` to :mod:`termios`.
7 changes: 4 additions & 3 deletions Modules/termios.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1315,6 +1313,9 @@ static struct constant {
#ifdef TIOCTTYGSTRUCT
{"TIOCTTYGSTRUCT", TIOCTTYGSTRUCT},
#endif
#ifdef _POSIX_VDISABLE
{"_POSIX_VDISABLE", _POSIX_VDISABLE},
#endif

/* sentinel */
{NULL, 0}
Expand Down

0 comments on commit 9d6c9d8

Please sign in to comment.