]> granicus.if.org Git - python/commitdiff
Patch #787189: Explicitly define CTRL on SGI.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 31 Oct 2003 13:01:24 +0000 (13:01 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 31 Oct 2003 13:01:24 +0000 (13:01 +0000)
Modules/termios.c

index 7e4eb7ba8d0dc810753b01d6c40e3fdd5a40de9a..a1d14a18b845b0ef8be655c6675e5472cc867413 100644 (file)
@@ -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,