[PATCH v3 0/5] termios: improve manual, add SPEED|BAUD_MAX constants
H. Peter Anvin
hpa@zytor.com
Sun Jul 13 02:20:01 GMT 2025
Patches 1-3 are improvements to the termios documentation; no
functional change.
Patch 4 adds the constants SPEED_MAX and BAUD_MAX, containing the
maximum valid values for speed_t and baud_t, respectively. The need
for these constants became clear when I worked on an infill library
for the baud_t interface for non-glibc and retro-glibc platforms.
The intent is for these constants to be included in the proposal to
the POSIX committee to standardize the baud_t interface.
On *some* platforms, including glibc/Linux, the former was defined as
__MAX_BAUD, which I carried over to other platforms in my termios
enabling patches. However, it is rather confusing since it is called
"baud" while referring to speed_t.
Patch 5 documents these new constants and their semantics in the
manual. No functional change.
Git tree:
https://git.zytor.com/linux/glibc hpa/termios-manual
[ v2: remove a stray chunk in patch 3/5 left from editing ]
[ v3: dropped leading underscores, leave __MAX_BAUD outside
#ifdef __USE_MISC since it is a legacy symbol, and
namespace-protected with a double underscore.
(Collin Funk, Adhermerval Zanella Netto) ]
---
bits/termios-baud.h | 5 +-
manual/terminal.texi | 439 +++++++++++++++++++++++++++++++++++----------------
termios/termios.h | 1 +
3 files changed, 305 insertions(+), 140 deletions(-)
More information about the Libc-alpha
mailing list