Mikael >The more patch is just a "quickhack" which
Mikael>replaces termio->termios, TCGETA->TCGETS,TCSETA->TCSETS...
Mikael> Howdy! As I promised one week ago, I should clean up my
Mikael> patches and make 'em availble.. Ofcourse, maybe the best
Mikael> solution still is a kernel solution...
>>>>> On the same day, David Mosberger-Tang <davidm@AZStarNet.com> replies:
David> No, since there is nothing wrong with the kernel, I don't think it
David> will change w.r.t. termio handling. Best thing to do is probably to
David> use termios and termios only. (See my earlier mail and Dave Miller's
David> follow up as to why the kernel isn't broken.)
Sorry to insist David, there is probably no need for kernel changes, but
perhaps some in system header files: if the modern (e.g. RedHat) Linux/Alpha
<sys/ioctl.h> still includes <termios.h>, it does not fit with a source which
includes both <sys/ioctl.h> and <termio.h> ... since with Linux/Alpha the uses of
<termio.h> and of <termios.h> are incompatible [cf. the `_IS_TERMIO' setting in
<termio.h> and its testing in <termios.h>]. So, for example, one could change
<sys/ioctl.h> as follow:
+ #ifdef __alpha__
+ #ifdef _IS_TERMIO
#include <termios.h>
+ #endif /* _IS_TERMIO */
+ #else /* ! __alpha__ */
#include <termios.h>
+ #endif /* __alpha__ */
But this does not solve anything unless <termio.h> is included *before*
<sys/ioctl.h>; so I suggest a harder fix in <sys/ioctl.h>:
+ #ifndef __alpha__
#include <termios.h>
+ #endif /* !__alpha__ */
(Anyway I agree with Mikael & David to forget as much as possible <termio.h>
and rewrite things using <termios.h> instead.)
fred