[PATCH v2 5/5] termios: manual: document the _SPEED_MAX and _BAUD_MAX constants
H. Peter Anvin
hpa@zytor.com
Sun Jun 29 16:16:32 GMT 2025
Add the _SPEED_MAX and _BAUD_MAX constants to the manual.
Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com>
---
manual/terminal.texi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/manual/terminal.texi b/manual/terminal.texi
index b43231b8bf2a..b716117233bb 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.50.0
More information about the Libc-alpha
mailing list