This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: c_ispeed fix for tcgetattr/tcsetattr
On Wed, Sep 10, 2003 at 11:29:02AM -0700, Roland McGrath wrote:
> > New problem in the CVS sources - tcgetattr/tcsetattr check c_ispeed and
> > c_ospeed unconditionally, but at least MIPS doesn't provide them.
>
> sysdeps/unix/sysv/linux/mips/kernel_termios.h doesn't define _HAVE_C_ISPEED
> and _HAVE_C_OSPEED. How does it have a problem?
It didn't used to.
Take a look at the code in tcgetattr:
#ifdef _HAVE_C_ISPEED
termios_p->c_ispeed = k_termios.c_ispeed;
#else
termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
#endif
i.e. sets c_ispeed in both branches.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer