Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ef7fa8

Browse files
committed
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.
1 parent bb66a20 commit 9ef7fa8

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Modules/termios.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ static PyMethodDef termios_methods[] =
294294
};
295295

296296

297+
#if defined(VSWTCH) && !defined(VSWTC)
298+
#define VSWTC VSWTCH
299+
#endif
300+
301+
#if defined(VSWTC) && !defined(VSWTCH)
302+
#define VSWTCH VSWTC
303+
#endif
304+
297305
static struct constant {
298306
char *name;
299307
long value;
@@ -320,7 +328,9 @@ static struct constant {
320328
#ifdef B230400
321329
{"B230400", B230400},
322330
#endif
331+
#ifdef CBAUDEX
323332
{"CBAUDEX", CBAUDEX},
333+
#endif
324334

325335
/* tcsetattr() constants */
326336
{"TCSANOW", TCSANOW},
@@ -440,6 +450,7 @@ static struct constant {
440450
{"VTIME", VTIME},
441451
{"VMIN", VMIN},
442452
{"VSWTC", VSWTC},
453+
{"VSWTCH", VSWTCH},
443454
{"VSTART", VSTART},
444455
{"VSTOP", VSTOP},
445456
{"VSUSP", VSUSP},

0 commit comments

Comments
 (0)