From nobody Sat Jan 18 20:20:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yb7J716ylz5kq4Y; Sat, 18 Jan 2025 20:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yb7J66Q1rz3Cqb; Sat, 18 Jan 2025 20:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737231606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFHCX4OOwpXahFive61W9Mq6gsvD/08YVOgGYE3WV4w=; b=csMzIvmnG81y7QdeUMWaUChcnd0nB1sCJh8Y9wHUPTyG+/6kRXIQVJBxOd43T170sWXM2I TnAPxzyBKwYQ4nmBFB2OeOk++1+OrxoUXb3DQeppNfvqSk9rNEH8YrMnaDdhw8x22bnM02 xVFGkYD9u+L3I68QIoJaQaHwTpNUi6HHnEbPHTAx295O7TALEeNwpOjNc8ge7x0pg8Atyo V5Jr3Lw0SPxBPODVTYcCIyfk4P47PhyD2jti3twn2lWOdoZ1DT0dLJzD4O9EsMAfW2q9Vl O+XBCdlczgqADSUJqIOqdzFSCbBt0vFY6haBQPnGtCkDnp5XPg9Zd408v0yXvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737231606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFHCX4OOwpXahFive61W9Mq6gsvD/08YVOgGYE3WV4w=; b=FWNE1GTW8ZBZ7cmOfiVCjk0Cg0PYopAO9uFnbhJxBPkL2a3EYPtiumngIjsY0HI/0Uxl9C bhVLqIRL4rhGJLaiK6jcjZkzaieUt8clJD1TGxvVfGusGRCEd2T/gqt1UlrQ2OZMeoZgkK vtY6IQRIxb2Ayz5gvpjsnlY0OlsWcWgizqKE711RduSZIhovd+87ZPK5iY6W5vFuaekHxG 6+huQ7eaxc2aSilTF8iNASs7SeUYx4K8Yg6uMtOvvg9EC24NOMLWPPUi9+Hx7qAwSfhLJC LKQMRbKqrGGG8i0E+AW3Q85XH5fBnxqCi51uiSRmQ9fYq1iggvXNV4H9rQW7yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737231606; a=rsa-sha256; cv=none; b=id7zb1A9vkFpD2KWtK3l2QsztUCiFKoeHScRGWx7KWK++PB3GtLfJicsxVKWQs0TQOvhxt VTnpzd2r4DEehGxoKPNLLZuKOpA5jQlF5VYaf5FuxvdgVv5B0teBV/qEvaJyW4dkcESzku r4AklHuZo6Qc48dgYHdC4FR/ek6lm23MLAu0z/avU+x8+n/wB4i8Y1mOnqH9qSXqH7961c TneeBD1gGgNQ4nWcfFvVFL47ArJnAM72NGvG1HyrblSoVT0LQ42da+3Ds33C2un0+eVAik MsEUulfx9LD/Nd2RBF6pwYLdp7yXPu77DpZ1fERK2hEbN8+Gr7L4sk+2/74wIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yb7J65mBHz3bG; Sat, 18 Jan 2025 20:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50IKK6Bx067159; Sat, 18 Jan 2025 20:20:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50IKK6er067156; Sat, 18 Jan 2025 20:20:06 GMT (envelope-from git) Date: Sat, 18 Jan 2025 20:20:06 GMT Message-Id: <202501182020.50IKK6er067156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stephen Hurd Subject: git: 9e659ecfb231 - stable/13 - Expose POSIX functions incorporated into C23 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: shurd X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9e659ecfb231819c5426c992885367032a8c4e94 Auto-Submitted: auto-generated The branch stable/13 has been updated by shurd: URL: https://cgit.FreeBSD.org/src/commit/?id=9e659ecfb231819c5426c992885367032a8c4e94 commit 9e659ecfb231819c5426c992885367032a8c4e94 Author: Stephen Hurd AuthorDate: 2024-12-01 17:34:40 +0000 Commit: Stephen Hurd CommitDate: 2025-01-18 20:19:16 +0000 Expose POSIX functions incorporated into C23 C23 has incoporated a small number of POSIX functions, so these should be exposed for C23, regardless of POSIX. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D47856 (cherry picked from commit 59677aecb67bbedcfa2ee5d7d2b189193cdc4af7) --- include/string.h | 8 +++++--- include/time.h | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/string.h b/include/string.h index ccc820d8b4b6..1d42b54e43ec 100644 --- a/include/string.h +++ b/include/string.h @@ -52,7 +52,7 @@ typedef __size_t size_t; #endif __BEGIN_DECLS -#if __XSI_VISIBLE >= 600 +#if __XSI_VISIBLE >= 600 || __ISO_C_VISIBLE >= 2023 void *memccpy(void * __restrict, const void * __restrict, int, size_t); #endif void *memchr(const void *, int, size_t) __pure; @@ -86,7 +86,7 @@ int strcmp(const char *, const char *) __pure; int strcoll(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); size_t strcspn(const char *, const char *) __pure; -#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE || __ISO_C_VISIBLE >= 2023 char *strdup(const char *) __malloc_like; #endif char *strerror(int); @@ -104,8 +104,10 @@ void strmode(int, char *); char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); -#if __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 || __ISO_C_VISIBLE >= 2023 char *strndup(const char *, size_t) __malloc_like; +#endif +#if __POSIX_VISIBLE >= 200809 size_t strnlen(const char *, size_t) __pure; #endif #if __BSD_VISIBLE diff --git a/include/time.h b/include/time.h index 45d3a253ed61..e99872ef6a3d 100644 --- a/include/time.h +++ b/include/time.h @@ -157,6 +157,8 @@ int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *); #if __POSIX_VISIBLE >= 199506 char *asctime_r(const struct tm *, char *); char *ctime_r(const time_t *, char *); +#endif +#if __POSIX_VISIBLE >= 199506 || __ISO_C_VISIBLE >= 2023 struct tm *gmtime_r(const time_t *, struct tm *); struct tm *localtime_r(const time_t *, struct tm *); #endif