This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: A termios path
- To: hjl@lucon.org (H.J. Lu)
- Subject: Re: A termios path
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 07 Dec 1998 16:13:02 -0800
- Cc: libc-hacker@cygnus.com
- References: <m0zn9Fk-0000UXC@sea.lucon.org>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
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 `------------------------