This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fixes for cfget[io]speed


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


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