A termios path

Ulrich Drepper drepper@cygnus.com
Mon Dec 7 16:13:00 GMT 1998


hjl@lucon.org (H.J. Lu) writes:

> That was my first approach. It doesn't work with
> 
> 	cfsetispeed (termios_p, (speed_t) 0);
> 	if ((speed_t) 0 == cfgetispeed (termios_p))
> 	 ...

This is a very special case but I've nevertheless worked around this
now.  The current sources include something very similar to your
patch.  The only differences are:

- the IBAUD0 macro is not in a user-level header.  I've instead redefined
  it in both files.  Your patch would probably have broken compilation
  on systems which have c_ispeed etc.  Not publishing this hack should
  be done in any case.

- if cfsetospeed I clear the bit.  Otherwise the behaviour is inconsistent.
  If I set ispeed and then ospeed on a system where only one speed is
  available the later overwrites the former.  The special have zero
  shouldn't be an exception.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------



More information about the Libc-hacker mailing list