summaryrefslogtreecommitdiffstats
path: root/Modules/termios.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-11 16:14:17 (GMT)
committerFred Drake <fdrake@acm.org>2001-05-11 16:14:17 (GMT)
commit87068f1eaa01e1e15d6d34a6ac7dc51f99425890 (patch)
tree49b7643cc3b45879a5da4682b1c8e466d563cb49 /Modules/termios.c
parentbbc3c5aacf49c3be19ca9a85283f1259a303e4de (diff)
downloadcpython-87068f1eaa01e1e15d6d34a6ac7dc51f99425890.zip
cpython-87068f1eaa01e1e15d6d34a6ac7dc51f99425890.tar.gz
cpython-87068f1eaa01e1e15d6d34a6ac7dc51f99425890.tar.bz2
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.
Diffstat (limited to 'Modules/termios.c')
-rw-r--r--Modules/termios.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/termios.c b/Modules/termios.c
index f586bb1..109faf3 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -16,6 +16,14 @@
#include <unistd.h>
#endif
+/* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
+ * MDTR, MRI, and MRTS (appearantly used internally by some things
+ * defined as macros; these are not used here directly).
+ */
+#ifdef HAVE_SYS_MODEM_H
+#include <sys/modem.h>
+#endif
+
static char termios__doc__[] = "\
This module provides an interface to the Posix calls for tty I/O control.\n\
For a complete description of these calls, see the Posix or Unix manual\n\
@@ -528,8 +536,12 @@ static struct constant {
{"VSTOP", VSTOP},
{"VSUSP", VSUSP},
{"VEOL", VEOL},
+#ifndef VREPRINT
{"VREPRINT", VREPRINT},
+#endif
+#ifndef VDISCARD
{"VDISCARD", VDISCARD},
+#endif
{"VWERASE", VWERASE},
{"VLNEXT", VLNEXT},
{"VEOL2", VEOL2},