summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-03-03 18:08:52 (GMT)
committerFred Drake <fdrake@acm.org>2001-03-03 18:08:52 (GMT)
commitd85556c6634cb7587f76ed4ef3455becb75cd6c5 (patch)
tree542a6f523aa2a48059959aa82d28c31e7dc992f5
parent4211925453161712cf7c725ee4286dff81ddf518 (diff)
downloadcpython-d85556c6634cb7587f76ed4ef3455becb75cd6c5.zip
cpython-d85556c6634cb7587f76ed4ef3455becb75cd6c5.tar.gz
cpython-d85556c6634cb7587f76ed4ef3455becb75cd6c5.tar.bz2
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
some fairly recent versions have an anaemic selection of terminal-control symbols. This closes SF bug #405567.
-rw-r--r--Modules/termios.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/Modules/termios.c b/Modules/termios.c
index 9ed1921..05e3400 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -358,7 +358,9 @@ static struct constant {
{"INLCR", INLCR},
{"IGNCR", IGNCR},
{"ICRNL", ICRNL},
+#ifdef IUCLC
{"IUCLC", IUCLC},
+#endif
{"IXON", IXON},
{"IXANY", IXANY},
{"IXOFF", IXOFF},
@@ -366,40 +368,96 @@ static struct constant {
/* struct termios.c_oflag constants */
{"OPOST", OPOST},
+#ifdef OLCUC
{"OLCUC", OLCUC},
+#endif
{"ONLCR", ONLCR},
+#ifdef OCRNL
{"OCRNL", OCRNL},
+#endif
+#ifdef ONOCR
{"ONOCR", ONOCR},
+#endif
+#ifdef ONLRET
{"ONLRET", ONLRET},
+#endif
+#ifdef OFILL
{"OFILL", OFILL},
+#endif
+#ifdef OFDEL
{"OFDEL", OFDEL},
+#endif
+#ifdef NLDLY
{"NLDLY", NLDLY},
+#endif
+#ifdef CRDLY
{"CRDLY", CRDLY},
+#endif
+#ifdef TABDLY
{"TABDLY", TABDLY},
+#endif
+#ifdef BSDLY
{"BSDLY", BSDLY},
+#endif
+#ifdef VTDLY
{"VTDLY", VTDLY},
+#endif
+#ifdef FFDLY
{"FFDLY", FFDLY},
+#endif
/* struct termios.c_oflag-related values (delay mask) */
+#ifdef NL0
{"NL0", NL0},
+#endif
+#ifdef NL1
{"NL1", NL1},
+#endif
+#ifdef CR0
{"CR0", CR0},
+#endif
+#ifdef CR1
{"CR1", CR1},
+#endif
+#ifdef CR2
{"CR2", CR2},
+#endif
+#ifdef CR3
{"CR3", CR3},
+#endif
+#ifdef TAB0
{"TAB0", TAB0},
+#endif
+#ifdef TAB1
{"TAB1", TAB1},
+#endif
+#ifdef TAB2
{"TAB2", TAB2},
+#endif
+#ifdef TAB3
{"TAB3", TAB3},
+#endif
#ifdef XTABS
{"XTABS", XTABS},
#endif
+#ifdef BS0
{"BS0", BS0},
+#endif
+#ifdef BS1
{"BS1", BS1},
+#endif
+#ifdef VT0
{"VT0", VT0},
+#endif
+#ifdef VT1
{"VT1", VT1},
+#endif
+#ifdef FF0
{"FF0", FF0},
+#endif
+#ifdef FF1
{"FF1", FF1},
+#endif
/* struct termios.c_cflag constants */
{"CSIZE", CSIZE},