* 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.
This commit is contained in:
@@ -232,14 +232,14 @@ tcsetpgrp (int fd, pid_t pgid)
|
||||
|
||||
/* cfgetospeed: POSIX96 7.1.3.1 */
|
||||
extern "C" speed_t
|
||||
cfgetospeed (struct termios *tp)
|
||||
cfgetospeed (const struct termios *tp)
|
||||
{
|
||||
return __tonew_termios (tp)->c_ospeed;
|
||||
}
|
||||
|
||||
/* cfgetispeed: POSIX96 7.1.3.1 */
|
||||
extern "C" speed_t
|
||||
cfgetispeed (struct termios *tp)
|
||||
cfgetispeed (const struct termios *tp)
|
||||
{
|
||||
return __tonew_termios (tp)->c_ispeed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user