summaryrefslogtreecommitdiffstats
path: root/Modules/termios.c
diff options
context:
space:
mode:
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,