mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
parent
9089b2769e
commit
dedbebf9f8
1 changed files with 9 additions and 1 deletions
|
@ -391,7 +391,9 @@ static struct constant {
|
||||||
{"TAB1", TAB1},
|
{"TAB1", TAB1},
|
||||||
{"TAB2", TAB2},
|
{"TAB2", TAB2},
|
||||||
{"TAB3", TAB3},
|
{"TAB3", TAB3},
|
||||||
|
#ifdef XTABS
|
||||||
{"XTABS", XTABS},
|
{"XTABS", XTABS},
|
||||||
|
#endif
|
||||||
{"BS0", BS0},
|
{"BS0", BS0},
|
||||||
{"BS1", BS1},
|
{"BS1", BS1},
|
||||||
{"VT0", VT0},
|
{"VT0", VT0},
|
||||||
|
@ -410,7 +412,9 @@ static struct constant {
|
||||||
#ifdef CIBAUD
|
#ifdef CIBAUD
|
||||||
{"CIBAUD", CIBAUD},
|
{"CIBAUD", CIBAUD},
|
||||||
#endif
|
#endif
|
||||||
{"CRTSCTS", CRTSCTS},
|
#ifdef CRTSCTS
|
||||||
|
{"CRTSCTS", (long)CRTSCTS},
|
||||||
|
#endif
|
||||||
|
|
||||||
/* struct termios.c_cflag-related values (character size) */
|
/* struct termios.c_cflag-related values (character size) */
|
||||||
{"CS5", CS5},
|
{"CS5", CS5},
|
||||||
|
@ -449,8 +453,12 @@ static struct constant {
|
||||||
{"VEOF", VEOF},
|
{"VEOF", VEOF},
|
||||||
{"VTIME", VTIME},
|
{"VTIME", VTIME},
|
||||||
{"VMIN", VMIN},
|
{"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},
|
{"VSWTC", VSWTC},
|
||||||
{"VSWTCH", VSWTCH},
|
{"VSWTCH", VSWTCH},
|
||||||
|
#endif
|
||||||
{"VSTART", VSTART},
|
{"VSTART", VSTART},
|
||||||
{"VSTOP", VSTOP},
|
{"VSTOP", VSTOP},
|
||||||
{"VSUSP", VSUSP},
|
{"VSUSP", VSUSP},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue