1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-10 05:03:06 +03:00

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) <hpa@zytor.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
This commit is contained in:
H. Peter Anvin
2025-07-12 22:19:44 -07:00
committed by Andreas K. Hüttel
parent 12126f86f2
commit c744519bad

View 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}. alias for @code{B19200} and @code{EXTB} is an alias for @code{B38400}.
These aliases are obsolete. 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}) @deftypefun speed_t cfgetospeed (const struct termios *@var{termios-p})
@standards{POSIX.1, termios.h} @standards{POSIX.1, termios.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @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. is specifically not guaranteed to be an integer type.
@end deftp @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}) @deftypefun baud_t cfgetobaud (const struct termios *@var{termios-p})
@standards{GNU, termios.h} @standards{GNU, termios.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}