]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Only import termio.h on OSF, and add a comment about why it is needed there.
authorFred Drake <fdrake@acm.org>
Wed, 9 May 2001 17:53:06 +0000 (17:53 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 9 May 2001 17:53:06 +0000 (17:53 +0000)
This header does not exist on all Unix flavors; FreeBSD in particular does
not include it.

This closes SF bug #422320.

Modules/termios.c

index d192bfc99133951cad3770c0f6b766f97971c919..cedcb0ff35636438d8a417c12dd16423c81e0b4e 100644 (file)
@@ -5,7 +5,11 @@
 #define PyInit_termios inittermios
 
 #include <termios.h>
+#ifdef __osf__
+/* On OSF, sys/ioctl.h requires that struct termio already be defined,
+ * so this needs to be included first on that platform. */
 #include <termio.h>
+#endif
 #include <sys/ioctl.h>
 
 #ifdef __BEOS__