glibc/sysdeps
H. Peter Anvin (Intel) 5f138519eb termios: add new baud_t interface, defined to be explicitly numeric
Add an explicitly numeric interface for baudrate setting. For glibc,
this only announces what is a fair accompli, but this is a plausible
way forward for standardization, and may be possible to infill on
non-compliant systems. The POSIX committee has stated:

[https://www.austingroupbugs.net/view.php?id=1916#c7135]

	A future version of this standard is expected to add at least
	the following symbolic constants for use as values of objects
	of type speed_t: B57600, B115200, B230400, B460800, and
	B921600.

	Implementations are encouraged to propose additional
	interfaces which will make it possible to set and query a
	wider range of speeds than just those enumerated by the
	constants beginning with B. If a set of common interfaces
	emerges between several implementations, a future version of
	this standard will likely add those interfaces.

This is exactly that interface.

The use of the term "baud" is due to the need to have a term
contrasting "speed", and it is already well established as a legacy
term -- including in the names of the legacy Bxxx
constants. Futhermore, it *is* valid from the point of view that the
termios interface fundamentally emulates an RS-232 serial port as far
as the application software is concerned.

The documentation states that for the current version of glibc,
speed_t == baud_t, but explicitly declares that this may not be the
case in the future.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-06-17 09:11:38 -03:00
..
aarch64 aarch64: fix typo in sysdeps/aarch64/Makefile 2025-06-10 10:48:07 +01:00
alpha math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
arc math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
arm math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
csky math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
generic generic: Add missing parameter name to __getrandom_early_init 2025-05-28 10:00:41 +02:00
gnu Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
hppa math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
htl htl: move pthread_key_*, pthread_get/setspecific 2025-06-15 21:21:12 +02:00
hurd hurd: Consolidate signal mask change 2025-03-06 02:28:35 +01:00
i386 math: Remove i386 ilogb/ilogbf/llogb/llogbf 2025-06-02 13:32:19 -03:00
ieee754 math: Optimize float ilogb/llogb 2025-06-02 13:32:19 -03:00
loongarch math: Optimize float ilogb/llogb 2025-06-02 13:32:19 -03:00
m68k math: Optimize float ilogb/llogb 2025-06-02 13:32:19 -03:00
mach termios: add new baud_t interface, defined to be explicitly numeric 2025-06-17 09:11:38 -03:00
microblaze math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
mips math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
nptl stdlib: Fix qsort memory leak if callback throws (BZ 32058) 2025-04-02 18:01:55 +00:00
or1k math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
posix Fix underallocation of abort_msg_s struct (CVE-2025-0395) 2025-01-22 08:17:17 -05:00
powerpc ppc64le: Revert "powerpc: Optimized strcmp for power10" (CVE-2025-5702) 2025-06-16 18:02:58 -04:00
pthread hurd: Fix tst-stack2 test build on Hurd 2025-05-09 10:19:37 -03:00
riscv RISC-V: Use builtin for ffs and ffsll while supported extension available 2025-04-28 09:51:59 -03:00
s390 S390: Use cfi_val_offset instead of cfi_escape. 31bit part 2025-05-23 15:05:56 +02:00
sh math: Refactor how to use libm-test-ulps 2025-03-12 13:40:07 -03:00
sparc sparc: Fix argument passing to __libc_start_main (BZ 32981) 2025-06-03 09:11:46 -03:00
unix termios: add new baud_t interface, defined to be explicitly numeric 2025-06-17 09:11:38 -03:00
wordsize-32 stdio-common: Reject integer prefixes in scanf [BZ #12701] 2025-03-28 12:35:53 +00:00
wordsize-64 stdio-common: Reject integer prefixes in scanf [BZ #12701] 2025-03-28 12:35:53 +00:00
x86 x86: Avoid GLRO(dl_x86_cpu_features) 2025-06-09 13:03:13 +08:00
x86_64 elf: Add optimization barrier for __ehdr_start and _end 2025-06-16 08:43:40 +08:00