diff options
author | Fred Drake <fdrake@acm.org> | 2001-03-01 21:54:49 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-03-01 21:54:49 (GMT) |
commit | 9ef7fa875a381e7ea8b6253d221d5f15052c8e06 (patch) | |
tree | dcaf42e0234bbccc9e316f7f9a9b8e69593a7a3c /Modules/termios.c | |
parent | bb66a200becd14918dbece406c2b0fd63c15f28a (diff) | |
download | cpython-9ef7fa875a381e7ea8b6253d221d5f15052c8e06.zip cpython-9ef7fa875a381e7ea8b6253d221d5f15052c8e06.tar.gz cpython-9ef7fa875a381e7ea8b6253d221d5f15052c8e06.tar.bz2 |
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
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.
Diffstat (limited to 'Modules/termios.c')
-rw-r--r-- | Modules/termios.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/termios.c b/Modules/termios.c index 4ec0a36..16a6d38 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -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}, |