From patchwork Sun Jul 13 05:19:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Peter Anvin" X-Patchwork-Id: 116200 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8DED73858433 for ; Sun, 13 Jul 2025 05:22:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DED73858433 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=zytor.com header.i=@zytor.com header.a=rsa-sha256 header.s=2025062101 header.b=B5tWvZiw X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail.zytor.com (terminus.zytor.com [IPv6:2607:7c80:54:3::136]) by sourceware.org (Postfix) with ESMTPS id 914FA3858C66 for ; Sun, 13 Jul 2025 05:19:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 914FA3858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zytor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 914FA3858C66 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:7c80:54:3::136 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752383995; cv=none; b=XiCLXDOzl1LGZ546EjpYGHs+Jy12NL2hB/MBfl4EizkCkFnfR8t9sXb5H3pRB6UsU2F8eGpEPI300nL9eZyLDBMzoj4QFMBsfH5jGBz5jE9oRXLZM+GaysGdWD3xpBow4Jxz4UtCnkb1ZNVBWm88aCL0cyM383NHyKXyF3cWVJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752383995; c=relaxed/simple; bh=8js91IgVYsC8Fy0R0aj0rczYZJdglhoK86obU86UhJQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BbfcuhqJSBV2JArOJ3jOV4nrUMeIXL0IWB7+bkxK0wimJ5Bj8w/De9dt4SIgbLfurRUTP/90mXtYzUJyfZUu8MRQiv4G70sB7N0RModckPyQ2ZR/EadWigE+Y/m4YwsZZXHZ7qx9xVjiIUW32E4JRUnn0HZGs0iOc80QZn+gsu4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 914FA3858C66 Received: from mail.zytor.com ([IPv6:2601:646:8081:9482:5253:b53:6783:9834]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 56D5Jokp2268726 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 12 Jul 2025 22:19:53 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 56D5Jokp2268726 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1752383993; bh=S4jcNrUjIuS6Va+A+eNS+JzqwNoXkQJ15DHe9ksHJvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B5tWvZiwOJHr2ZSxekrExZMqwbRitmaqteaXxGg+PPZJ/KzAfkxxNL2Ow18nmoG4e q9eEegZTW6m5hwJo4CYfBp5NY1Yjeuci2fxFOauASWcScDjhDqurVKteckC05G5F3y wTDYZiDhrbNtG7SUzVUFtqufrezjzrwNVCmLBa/TDsrqVJMYO501yzhDAtsk3bFrDf ewgL/WIT4PD0FkXuYwGei51k2/H10jOrF76Hm2FM7JUKxkt6NUA+U57pp0RAOPAvLH jXrNl0qjjLOlsj+ppt4Yuo2Q2j0ROyowiNfurZOQZ+Ltlrlbqsvc3oxwzN4BC0Ayez SZFORC85f+z9Q== From: "H. Peter Anvin" To: GNU C Library Cc: Adhemerval Zanella Netto , Collin Funk , "H. Peter Anvin" Subject: [PATCH v4 3/3] termios: manual: document the SPEED_MAX and BAUD_MAX constants Date: Sat, 12 Jul 2025 22:19:44 -0700 Message-ID: <20250713051944.782970-4-hpa@zytor.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250713051944.782970-1-hpa@zytor.com> References: <20250713051944.782970-1-hpa@zytor.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Add the SPEED_MAX and BAUD_MAX constants to the manual. [ v3: drop leading underscores ] Signed-off-by: "H. Peter Anvin" (Intel) --- manual/terminal.texi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/manual/terminal.texi b/manual/terminal.texi index b43231b8bf2a..805b408fb2cb 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{}}