mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
2003-09-08 Roland McGrath <roland@frob.com>
* sysdeps/unix/sysv/linux/speed.c (cfsetospeed): Only set c_ospeed under [_HAVE_STRUCT_TERMIOS_C_OSPEED]. (cfsetispeed): Only set c_ispeed under [_HAVE_STRUCT_TERMIOS_C_ISPEED]. * sysdeps/unix/sysv/linux/bits/termios.h (_HAVE_STRUCT_TERMIOS_C_ISPEED, _HAVE_STRUCT_TERMIOS_C_OSPEED): Define. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
This commit is contained in:
@ -67,7 +67,9 @@ cfsetospeed (termios_p, speed)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
|
||||
termios_p->c_ospeed = speed;
|
||||
#endif
|
||||
termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
|
||||
termios_p->c_cflag |= speed;
|
||||
|
||||
@ -92,7 +94,9 @@ cfsetispeed (termios_p, speed)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
|
||||
termios_p->c_ispeed = speed;
|
||||
#endif
|
||||
if (speed == 0)
|
||||
termios_p->c_iflag |= IBAUD0;
|
||||
else
|
||||
|
Reference in New Issue
Block a user