]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
termios: manual: document the SPEED_MAX and BAUD_MAX constants
authorH. Peter Anvin <hpa@zytor.com>
Sun, 13 Jul 2025 05:19:44 +0000 (22:19 -0700)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Sun, 20 Jul 2025 15:17:44 +0000 (17:17 +0200)
Add the SPEED_MAX and BAUD_MAX constants to the manual.

[ v3: drop leading underscores ]

Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
manual/terminal.texi

index b43231b8bf2a7821b1786a987800f0449f59eee1..805b408fb2cbfc5e4fd31fd7c905fa61bde907e8 100644 (file)
@@ -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{}}