Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
authorFred Drake <fdrake@acm.org>
Thu, 1 Mar 2001 21:54:49 +0000 (21:54 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 1 Mar 2001 21:54:49 +0000 (21:54 +0000)
defined and export both names.

Solaris also does not define CBAUDEX; it is not clear that CBAUDEXT
(which is defined there) is the same thing, so we only protect against
the lack of CBAUDEX.

Reported by Greg V. Wilson.

Modules/termios.c

index 4ec0a36c95b6ea9e4fa4b51a66b5739607a2d454..16a6d38596f378301dfa56d7aeb3738690b7a194 100644 (file)
@@ -294,6 +294,14 @@ static PyMethodDef termios_methods[] =
 };
 
 
+#if defined(VSWTCH) && !defined(VSWTC)
+#define VSWTC VSWTCH
+#endif
+
+#if defined(VSWTC) && !defined(VSWTCH)
+#define VSWTCH VSWTC
+#endif
+
 static struct constant {
        char *name;
        long value;
@@ -320,7 +328,9 @@ static struct constant {
 #ifdef B230400
        {"B230400", B230400},
 #endif
+#ifdef CBAUDEX
        {"CBAUDEX", CBAUDEX},
+#endif
 
        /* tcsetattr() constants */
        {"TCSANOW", TCSANOW},
@@ -440,6 +450,7 @@ static struct constant {
        {"VTIME", VTIME},
        {"VMIN", VMIN},
        {"VSWTC", VSWTC},
+       {"VSWTCH", VSWTCH},
        {"VSTART", VSTART},
        {"VSTOP", VSTOP},
        {"VSUSP", VSUSP},