* 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:
@@ -317,9 +317,6 @@ struct termios
|
||||
|
||||
#define termio termios
|
||||
|
||||
#define cfgetospeed(tp) ((tp)->c_ospeed)
|
||||
#define cfgetispeed(tp) ((tp)->c_ispeed)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -331,6 +328,8 @@ int tcdrain (int);
|
||||
int tcflush (int, int);
|
||||
int tcflow (int, int);
|
||||
void cfmakeraw (struct termios *);
|
||||
speed_t cfgetispeed(const struct termios *);
|
||||
speed_t cfgetospeed(const struct termios *);
|
||||
int cfsetispeed (struct termios *, speed_t);
|
||||
int cfsetospeed (struct termios *, speed_t);
|
||||
|
||||
@@ -338,6 +337,11 @@ int cfsetospeed (struct termios *, speed_t);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define cfgetispeed(tp) ((tp)->c_ispeed)
|
||||
#define cfgetospeed(tp) ((tp)->c_ospeed)
|
||||
#endif
|
||||
|
||||
/* Extra stuff to make porting stuff easier. */
|
||||
struct winsize
|
||||
{
|
||||
|
Reference in New Issue
Block a user