1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +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:
H. Peter Anvin (Intel)
2025-06-11 18:35:43 -07:00
committed by Adhemerval Zanella
parent 5f138519eb
commit be413adedf
3 changed files with 28 additions and 5 deletions

View File

@@ -286,7 +286,16 @@ struct termios
cc_t c_cc[NCCS];
/* 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. */ \