This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Fixes for cfget[io]speed
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 11 Jan 2011 11:10:01 +0100
- Subject: Re: Fixes for cfget[io]speed
- References: <1294738575.5256.6.camel@YAAKOV04>
- Reply-to: cygwin-patches at cygwin dot com
On Jan 11 03:36, Yaakov (Cygwin/X) wrote:
> I discovered some compliance issues with cfget[io]speed:
>
> * POSIX requires these to be declared (at least) as functions[1];
> * POSIX requires their argument to be const[1];
> * the macros are not safe for C++ code.
>
> The following patch fixes these issues, providing that constifying the
> arguments doesn't change the ABI.
>
>
> Yaakov
>
> [1]
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html
> 2011-01-11 Yaakov Selkowitz
>
> * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
> * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
> Move macros after declarations and make conditional on !__cplusplus.
Thanks, applied.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat