From nobody Sat Jan 18 20:18:13 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 4Yb7Fx612dz5kppK; Sat, 18 Jan 2025 20:18:13 +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 4Yb7Fx5DZXz4B6L; Sat, 18 Jan 2025 20:18:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737231493; 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=P2APUkkR5mKdOnGuXv6hD2EclcEZUQD29aUnpkDh8+0=; b=uN+vxeC0cIntR1CSB/Sf45HP+8ldo8QbKov1jUmnFh4jAZO+ssl+oFQObM+uMZMW/BjrF7 VtiRh0s2nFXycWzccvGAI80uMxUyXe1MS8WhLfFlNYEcdCge8spdVNszuXRHMmlpuS8cdR EjeCmgCZIKmXivpabF1VL+e5DtKz+/JsiWMDdYNYwu6HConz+V/GQZJ7gvtLp/bQnfmF6N NKKa5KvNdFqSwm9pcemLHuQhC/OGZkpX0V4T//fXaQ/5ERpeG3r6G0cDw/Q4pUTCwH/oxk BMhsh79SbOJGFV5XCSL8q+Rd0lxpgu3/2cZ70aX7OHLqY1VpdPgYSpGrLogF9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737231493; 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=P2APUkkR5mKdOnGuXv6hD2EclcEZUQD29aUnpkDh8+0=; b=RCfEztLHlkayTfX8Tsp3v127Aalp4sYrEELQUPVS+h+avLMZuVddopWCOmYSIbWNreuDl6 Q2mGYL3WHWGyUsvWtCJ25kap2jFp0VzuGNHPja5KCRROPUKLo8bOjuQ2d7h/2Csh9pvLjJ t3frI77L8iShfsR2ot1mtyVcXzOh5NiupJvpe5NMUl5zPMh9SVHf9OjYIcl1gSOrEm5wGl 5+wtYi6kHf+tnE1PSKdmD7q6+w8gFDw6brzBRLw9kjWtVpv3rxBefTGdOLsBS++5Ipy/WX a/8bhP09SSCXUfsY4T6vJetEsvN4SWGOLskAiQAWYIfKJpbVbitfMsGOt7W34A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737231493; a=rsa-sha256; cv=none; b=VSpy3IBdRhL8PIpmOeYM9NLOZPdU3MPm4R1JCH5zW98ZdEE6SyDiis5EaEXVRb+fBURf6e g6eH9kLPmEFzOkRtsHXTKtKy3NDHirRe+xTbv5KjwdkO2Rza8UkzGSss0owWUIsbJBeYOZ Z5A6VcFpYWkJMyVDmWHYJV8JcB7PmNg++IHXsYi1mo+qWmGGKmmmtntSeu4H3bPgdIisWN n17a9kOo85rr4vVaPz3FHS5K2Om1IR46hVbyaBWHCSeG9eALQxjMfSc/lUVnU2mpdCiP0r FnWFeSVVA3AFx02osb4i3pg13goeUhjsp72SGQyhQJGSBkzS0ZXi/FRbvQCwOg== 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 4Yb7Fx4q3cz3st; Sat, 18 Jan 2025 20:18:13 +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 50IKIDFU063463; Sat, 18 Jan 2025 20:18:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50IKIDxt063460; Sat, 18 Jan 2025 20:18:13 GMT (envelope-from git) Date: Sat, 18 Jan 2025 20:18:13 GMT Message-Id: <202501182018.50IKIDxt063460@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: bc14b1ebce0e - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: bc14b1ebce0eac01d70d126eae48ae50c1b6112d Auto-Submitted: auto-generated The branch stable/14 has been updated by shurd: URL: https://cgit.FreeBSD.org/src/commit/?id=bc14b1ebce0eac01d70d126eae48ae50c1b6112d commit bc14b1ebce0eac01d70d126eae48ae50c1b6112d Author: Stephen Hurd AuthorDate: 2025-01-18 20:17:48 +0000 Commit: Stephen Hurd CommitDate: 2025-01-18 20:17:48 +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 7b0cb9f56524..a362dc9e0f3f 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); @@ -110,8 +110,10 @@ void strmode(mode_t, 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 ff858cc1f420..cac9c76e3f79 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