1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

termios: merge the termios baud definitions

Now all platforms unconditionally use the "sane" definitions of the
termios baud constants. Unify them into a common file.

Note: I have made them explicitly unsigned to avoid problems with
compiler warnings for comparisons of unequal signedness or
similar. These constants were historically octal on most platforms,
and so unsigned by default.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
H. Peter Anvin (Intel)
2025-06-11 18:35:40 -07:00
committed by Adhemerval Zanella
parent bbbaf50b2a
commit ad37ecd579
5 changed files with 48 additions and 77 deletions

View File

@@ -35,6 +35,7 @@ typedef unsigned int tcflag_t;
/* c_cflag bit meaning */
#include <bits/termios-c_cflag.h>
#ifdef __USE_MISC
#define __B0 0000000 /* hang up */
#define __B50 0000001
#define __B75 0000002
@@ -53,9 +54,8 @@ typedef unsigned int tcflag_t;
#define __B38400 0000017
#include <bits/termios-cbaud.h>
#ifdef __USE_MISC
# define EXTA __B19200
# define EXTB __B38400
# define __EXTA __B19200
# define __EXTB __B38400
# define BOTHER __BOTHER
#endif