summaryrefslogtreecommitdiffstats
path: root/Modules/termios.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-10-31 13:01:24 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-10-31 13:01:24 (GMT)
commitbe4fea6198013c808d702210b065394d0771fd28 (patch)
tree5eb121f7afc315eea05cda0b689a2dacac0ef1b6 /Modules/termios.c
parent48440b7c2751813da110689aff07b4e7ed4ac73f (diff)
downloadcpython-be4fea6198013c808d702210b065394d0771fd28.zip
cpython-be4fea6198013c808d702210b065394d0771fd28.tar.gz
cpython-be4fea6198013c808d702210b065394d0771fd28.tar.bz2
Patch #787189: Explicitly define CTRL on SGI.
Diffstat (limited to 'Modules/termios.c')
-rw-r--r--Modules/termios.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/termios.c b/Modules/termios.c
index 7e4eb7b..a1d14a1 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -4,6 +4,12 @@
#define PyInit_termios inittermios
+/* Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE
+ is defined, so we define it here. */
+#if defined(__sgi)
+#define CTRL(c) ((c)&037)
+#endif
+
#include <termios.h>
#ifdef __osf__
/* On OSF, sys/ioctl.h requires that struct termio already be defined,