Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87068f1

Browse files
committed
Include sys/modem.h if we have it; this is needed on HP-UX to provide
constants used by other macros from the headers. Conditionalize VREPRINT and VDISCARD; these are not available on HP-UX. This closes bug #417418.
1 parent bbc3c5a commit 87068f1

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Modules/termios.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
#include <unistd.h>
1717
#endif
1818

19+
/* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
20+
* MDTR, MRI, and MRTS (appearantly used internally by some things
21+
* defined as macros; these are not used here directly).
22+
*/
23+
#ifdef HAVE_SYS_MODEM_H
24+
#include <sys/modem.h>
25+
#endif
26+
1927
static char termios__doc__[] = "\
2028
This module provides an interface to the Posix calls for tty I/O control.\n\
2129
For a complete description of these calls, see the Posix or Unix manual\n\
@@ -528,8 +536,12 @@ static struct constant {
528536
{"VSTOP", VSTOP},
529537
{"VSUSP", VSUSP},
530538
{"VEOL", VEOL},
539+
#ifndef VREPRINT
531540
{"VREPRINT", VREPRINT},
541+
#endif
542+
#ifndef VDISCARD
532543
{"VDISCARD", VDISCARD},
544+
#endif
533545
{"VWERASE", VWERASE},
534546
{"VLNEXT", VLNEXT},
535547
{"VEOL2", VEOL2},

0 commit comments

Comments
 (0)