[Python-Dev] Recent change to termios module breaks build on FreeBSD

Michael Hudson mwh@python.net
Tue, 8 May 2001 15:41:45 +0100 (BST)


Guido van Rossum <guido@digicool.com> writes:

> > A change to termios.c in the last couple of days to #include termio.h
> > as well as termios.h breaks the build on FreeBSD, which has only
> > termios.h - needs an autoconf test? There'll probably be other similar
> > systems.
>
> Frankly, I don't see the point of including termio.h at all -- it
> seems to be a backwards compatibility file.

If you don't include termio.h the build breaks on alpha/OSF1.  This
sounds to me like OSF1's headers are broken (you can't include
sys/ioctl.h without including termio.h first, it seems, or you get
complaints about struct termio being undefined).  So I'd suggest

+#ifdef __osf__
 #include <termio.h>
+#endif

and then see if the build breaks anywhere else (I love unix).

Using the sf compile farm, I've tested this on FreeBSD, Linux/x86,
Linux/PPC, OSF1/alpha, Linux/sparc, Solaris/sparc (using gcc; cc gives
a pile of warnings from redefined macros and then dies 'cause it can't
find a valiud license file).

So we might need some more magic for solaris using cc.

Cheers,
M.

-- 
  Imagine if every Thursday your shoes exploded if you tied them
  the usual way.  This happens to us all the time with computers,
  and nobody thinks of complaining.                     -- Jeff Raskin