summaryrefslogtreecommitdiff
path: root/Modules/termios.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-03-02 06:50:58 +0000
committerFred Drake <fdrake@acm.org>2001-03-02 06:50:58 +0000
commitdedbebf9f8e19a94804d0d508df463b74a333d71 (patch)
tree90df8ab727976124f6e6d381a11b665107e2c73f /Modules/termios.c
parent9089b2769ecf9b6825f204001d410830883f8e19 (diff)
downloadcpython-git-dedbebf9f8e19a94804d0d508df463b74a333d71.tar.gz
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
these can be missing on some (all?) Irix and Tru64 versions. Protect the CRTSCTS value with a cast; this can be a larger value on Solaris/SPARC. This should fix SF tracker items #405092, #405350, and #405355.
Diffstat (limited to 'Modules/termios.c')
-rw-r--r--Modules/termios.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/termios.c b/Modules/termios.c
index 16a6d38596..9ed19213dc 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -391,7 +391,9 @@ static struct constant {
{"TAB1", TAB1},
{"TAB2", TAB2},
{"TAB3", TAB3},
+#ifdef XTABS
{"XTABS", XTABS},
+#endif
{"BS0", BS0},
{"BS1", BS1},
{"VT0", VT0},
@@ -410,7 +412,9 @@ static struct constant {
#ifdef CIBAUD
{"CIBAUD", CIBAUD},
#endif
- {"CRTSCTS", CRTSCTS},
+#ifdef CRTSCTS
+ {"CRTSCTS", (long)CRTSCTS},
+#endif
/* struct termios.c_cflag-related values (character size) */
{"CS5", CS5},
@@ -449,8 +453,12 @@ static struct constant {
{"VEOF", VEOF},
{"VTIME", VTIME},
{"VMIN", VMIN},
+#ifdef VSWTC
+ /* The #defines above ensure that if either is defined, both are,
+ * but both may be omitted by the system headers. ;-( */
{"VSWTC", VSWTC},
{"VSWTCH", VSWTCH},
+#endif
{"VSTART", VSTART},
{"VSTOP", VSTOP},
{"VSUSP", VSUSP},