* 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:
Corinna Vinschen
2011-01-11 10:09:23 +00:00
parent cd441f06e2
commit b7d4651e3e
3 changed files with 15 additions and 5 deletions

View File

@@ -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;
}