mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-25 12:42:04 +03:00
termios: unify the naming of the termios speed fields
The generic code has __ispeed and __ospeed; Linux has c_ispeed and c_ospeed. Use an anonymous union member to allow both set of names on all platforms. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
committed by
Adhemerval Zanella
parent
5f138519eb
commit
be413adedf
@ -286,7 +286,16 @@ struct termios
|
|||||||
cc_t c_cc[NCCS];
|
cc_t c_cc[NCCS];
|
||||||
|
|
||||||
/* Input and output baud rates. */
|
/* Input and output baud rates. */
|
||||||
speed_t __ispeed, __ospeed;
|
__extension__ union {
|
||||||
|
speed_t __ispeed;
|
||||||
|
speed_t c_ispeed;
|
||||||
|
};
|
||||||
|
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
|
||||||
|
__extension__ union {
|
||||||
|
speed_t __ospeed;
|
||||||
|
speed_t c_ospeed;
|
||||||
|
};
|
||||||
|
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
|
||||||
};
|
};
|
||||||
|
|
||||||
#define _IOT_termios /* Hurd ioctl type field. */ \
|
#define _IOT_termios /* Hurd ioctl type field. */ \
|
||||||
|
@ -30,8 +30,15 @@ struct termios
|
|||||||
tcflag_t c_lflag; /* local mode flags */
|
tcflag_t c_lflag; /* local mode flags */
|
||||||
cc_t c_cc[NCCS]; /* control characters */
|
cc_t c_cc[NCCS]; /* control characters */
|
||||||
cc_t c_line; /* line discipline (== c_cc[33]) */
|
cc_t c_line; /* line discipline (== c_cc[33]) */
|
||||||
speed_t c_ispeed; /* input speed */
|
/* Input and output baud rates. */
|
||||||
speed_t c_ospeed; /* output speed */
|
__extension__ union {
|
||||||
|
speed_t __ispeed;
|
||||||
|
speed_t c_ispeed;
|
||||||
|
};
|
||||||
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
|
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
|
||||||
|
__extension__ union {
|
||||||
|
speed_t __ospeed;
|
||||||
|
speed_t c_ospeed;
|
||||||
|
};
|
||||||
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
|
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
|
||||||
};
|
};
|
||||||
|
@ -29,8 +29,15 @@ struct termios
|
|||||||
tcflag_t c_lflag; /* local mode flags */
|
tcflag_t c_lflag; /* local mode flags */
|
||||||
cc_t c_line; /* line discipline */
|
cc_t c_line; /* line discipline */
|
||||||
cc_t c_cc[NCCS]; /* control characters */
|
cc_t c_cc[NCCS]; /* control characters */
|
||||||
speed_t c_ispeed; /* input speed */
|
/* Input and output baud rates. */
|
||||||
speed_t c_ospeed; /* output speed */
|
__extension__ union {
|
||||||
|
speed_t __ispeed;
|
||||||
|
speed_t c_ispeed;
|
||||||
|
};
|
||||||
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
|
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
|
||||||
|
__extension__ union {
|
||||||
|
speed_t __ospeed;
|
||||||
|
speed_t c_ospeed;
|
||||||
|
};
|
||||||
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
|
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user