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

Skip to content

Commit abb379e

Browse files
committed
Revised version of Jason Tishler's patch to make this compile on Cygwin,
which does not define all the constants. This closes SF tracker patch #404924.
1 parent 5c01534 commit abb379e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Modules/termios.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,9 @@ static struct constant {
317317
{"B38400", B38400},
318318
{"B57600", B57600},
319319
{"B115200", B115200},
320+
#ifdef B230400
320321
{"B230400", B230400},
322+
#endif
321323
{"CBAUDEX", CBAUDEX},
322324

323325
/* tcsetattr() constants */
@@ -395,7 +397,9 @@ static struct constant {
395397
{"PARODD", PARODD},
396398
{"HUPCL", HUPCL},
397399
{"CLOCAL", CLOCAL},
400+
#ifdef CIBAUD
398401
{"CIBAUD", CIBAUD},
402+
#endif
399403
{"CRTSCTS", CRTSCTS},
400404

401405
/* struct termios.c_cflag-related values (character size) */
@@ -407,18 +411,24 @@ static struct constant {
407411
/* struct termios.c_lflag constants */
408412
{"ISIG", ISIG},
409413
{"ICANON", ICANON},
414+
#ifdef XCASE
410415
{"XCASE", XCASE},
416+
#endif
411417
{"ECHO", ECHO},
412418
{"ECHOE", ECHOE},
413419
{"ECHOK", ECHOK},
414420
{"ECHONL", ECHONL},
415421
{"ECHOCTL", ECHOCTL},
422+
#ifdef ECHOPRT
416423
{"ECHOPRT", ECHOPRT},
424+
#endif
417425
{"ECHOKE", ECHOKE},
418426
{"FLUSHO", FLUSHO},
419427
{"NOFLSH", NOFLSH},
420428
{"TOSTOP", TOSTOP},
429+
#ifdef PENDIN
421430
{"PENDIN", PENDIN},
431+
#endif
422432
{"IEXTEN", IEXTEN},
423433

424434
/* indexes into the control chars array returned by tcgetattr() */

0 commit comments

Comments
 (0)