diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2025-06-11 18:35:43 -0700 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-06-17 09:11:38 -0300 |
commit | be413adedfca146a6fb8cabe3df1244a70f106f3 (patch) | |
tree | eca1173decaf5568f26efe305cbcd4127dfa66b3 /sysdeps/unix/sysv/linux/bits | |
parent | 5f138519ebdf88e1fc5395d65df0b780dd07829a (diff) | |
download | glibc-be413adedfca146a6fb8cabe3df1244a70f106f3.zip glibc-be413adedfca146a6fb8cabe3df1244a70f106f3.tar.gz glibc-be413adedfca146a6fb8cabe3df1244a70f106f3.tar.bz2 |
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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/termios-struct.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/termios-struct.h b/sysdeps/unix/sysv/linux/bits/termios-struct.h index 4c501a5..0aba1a4 100644 --- a/sysdeps/unix/sysv/linux/bits/termios-struct.h +++ b/sysdeps/unix/sysv/linux/bits/termios-struct.h @@ -29,8 +29,15 @@ struct termios tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ + /* Input and output baud rates. */ + __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 }; |