]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Include sys/modem.h if we have it; this is needed on HP-UX to provide
authorFred Drake <fdrake@acm.org>
Fri, 11 May 2001 16:14:17 +0000 (16:14 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 11 May 2001 16:14:17 +0000 (16:14 +0000)
constants used by other macros from the headers.

Conditionalize VREPRINT and VDISCARD; these are not available on HP-UX.

This closes bug #417418.

Modules/termios.c

index f586bb16222f84da0925324cc35c6d0202e0d355..109faf38aa879a317b2b476a2a02838237f2d9ae 100644 (file)
 #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},