From c744519bad81067697600bd01e90b90ae338bf08 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 12 Jul 2025 22:19:44 -0700 Subject: [PATCH] termios: manual: document the SPEED_MAX and BAUD_MAX constants Add the SPEED_MAX and BAUD_MAX constants to the manual. [ v3: drop leading underscores ] Signed-off-by: "H. Peter Anvin" (Intel) Reviewed-by: Collin Funk --- manual/terminal.texi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/manual/terminal.texi b/manual/terminal.texi index b43231b8bf..805b408fb2 100644 --- a/manual/terminal.texi +++ b/manual/terminal.texi @@ -1264,6 +1264,17 @@ BSD defines two additional speed symbols as aliases: @code{EXTA} is an alias for @code{B19200} and @code{EXTB} is an alias for @code{B38400}. These aliases are obsolete. +@deftypevr Macro speed_t SPEED_MAX +@standards{GNU, termios.h} + +@theglibc{} defines the constant @code{SPEED_MAX} for the largest valid +value of type @code{speed_t}. This value may be smaller than the +underlying C type can store. + +For compatiblity with some other platforms the alias @code{__MAX_BAUD} +is defined for this constant. +@end deftypevr + @deftypefun speed_t cfgetospeed (const struct termios *@var{termios-p}) @standards{POSIX.1, termios.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @@ -1347,6 +1358,13 @@ may not be the case in future versions or on other implementations; it is specifically not guaranteed to be an integer type. @end deftp +@deftypevr Macro baud_t BAUD_MAX +@standards{GNU, termios.h} +The constant @code{BAUD_MAX} is defined to the maximum valid value of +type @code{baud_t}. This value may be smaller than the underlying C +type can store. +@end deftypevr + @deftypefun baud_t cfgetobaud (const struct termios *@var{termios-p}) @standards{GNU, termios.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} -- 2.47.2