This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A termios path


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   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]