From nobody Thu Mar 20 09:55:56 2025 X-Original-To: dev-commits-src-main@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 4ZJLZ06cV2z5rbKL for ; Thu, 20 Mar 2025 09:56:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZJLZ04Vxzz3PKD for ; Thu, 20 Mar 2025 09:56:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2ff6e91cff5so879254a91.2 for ; Thu, 20 Mar 2025 02:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1742464567; x=1743069367; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BMP1EK4BkXr+Bk5fYSxK3nZfYMy8o7sC8sFutHAVDQo=; b=g19/RC5zgz305DUtpQRiDrNf1NN48rc1LBWaUZ+TD7e9h7FfHMzM8f2ekO87MGGt6m PTvxhOKeirND7TQ9IpAHgZeAwl4FIso2t+sgOiuiaUX+qDE4ryOQRgyBL9EF9DnOXi02 qmwySSLBz297jtMSq2UtbbdVFXeUxdp/lizUdrIJhq511NwcebhfgaegO4zEZca5rjnh F7SBTDnhrFUn19qbKcUCOW4B3GQI76mgPsjmF02hJukR+HbBCFIp1jWeTn77v3LsmnLJ Gh7Ooq+yq1XaulXToANTbzq403ythSykP0uPTjFBg2nwFh9DTH4nu9FnLv2VbSfpsbrQ vcQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742464567; x=1743069367; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BMP1EK4BkXr+Bk5fYSxK3nZfYMy8o7sC8sFutHAVDQo=; b=it8wRzNX+Xzr2ePXQprIIwu7WWVkRHj5kp0Cq/3UHmiXYb67PDSVt5iKMVsFSMFZuL ReZUcU3PF8d/1+QCqnepBetQ/ijBN3bRESPVoPPI4SaboNLBc36euRXb9niSkIDfQ4/D 4xLU/PFuBimbNoxUhDTuIkpEE/KkCFdu4BoPpPIHY8hAr0+dPBg7NR5A4o8RRIfNicKZ 6BaFXstcn0xZQ3QYtjW8bfR2BvNL9NAiKOHusts7sJ/wheCl0RU4GFleV2G6MTX34ZOO +ZvWhA0Icjzcri2vAmu/M60XngNtl5yg0LOe7pO1Bvebd/dyDVg0uTSwwCTRF2HdTCiE sR+Q== X-Forwarded-Encrypted: i=1; AJvYcCUhqGXCzsVXsg40i5rrdvpCnmgtogAalXROg0e6rLQD96fdL4Na1Og1zjTdWckYBEQOsUuYXfYB3sLNIc23EmtAIuH4gg==@freebsd.org X-Gm-Message-State: AOJu0YyBFDwpAhXnVv40YdoeQ8i+MxMGl/jt1aUJMzTqgVuRqxFGJb4R W0ywnovq9vpZELhYSpVmxyL15IF1TsZRuhh4p/mlsXFCJbO5qI8untgcHVF6uiAYZULOBm3kmzv oxvSigbeHhc+lI4qAmKgWWMbtope752G7sV7QeQ== X-Gm-Gg: ASbGncuA7Ta3Hfw2XnOubzHlxeeMeMkvILtDOiAOEtqDvoRyn6fHsC2IAsk7ruqdCra ByMohVcCl2Dvm45ZzWDm1ruhIM+kv/KfELMIHQNSafS2UXURFSLxNKD1sFEKP5xxgUv/ZBLgicv xU1msvPyphrQ1IRb9fhm6Ro9yoPC8576I/0zS6SoNQE06Gzkpl4cI2HZpq X-Google-Smtp-Source: AGHT+IF59zSGhTurwvrr5+ibsjM6wPDwQRI5qvP46inzmwsit30mWVZFY043+Ydf17f64PxoNysFFxri2f76v81ahkU= X-Received: by 2002:a17:90b:28cd:b0:2ee:e317:69ab with SMTP id 98e67ed59e1d1-301d4e83d83mr5327965a91.0.1742464567137; Thu, 20 Mar 2025 02:56:07 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202503200741.52K7frms088363@gitrepo.freebsd.org> In-Reply-To: <202503200741.52K7frms088363@gitrepo.freebsd.org> From: Warner Losh Date: Thu, 20 Mar 2025 03:55:56 -0600 X-Gm-Features: AQ5f1JpJ8mxfhXtXrlOeAO69-tl7wyGPN5BaPEP-v1cbywJ-jtDJYTUHFboigqM Message-ID: Subject: Re: git: 415a0ce02c9e - main - Revert Make newly POSIX functions visible To: Stephen Hurd Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000008eff690630c32596" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4ZJLZ04Vxzz3PKD X-Spamd-Bar: ---- --0000000000008eff690630c32596 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 20, 2025, 1:42=E2=80=AFAM Stephen Hurd wrot= e: > The branch main has been updated by shurd: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D415a0ce02c9ee2c15c7973b2dfbddda= 71f6344a2 > > commit 415a0ce02c9ee2c15c7973b2dfbddda71f6344a2 > Author: Stephen Hurd > AuthorDate: 2025-03-20 07:15:15 +0000 > Commit: Stephen Hurd > CommitDate: 2025-03-20 07:41:27 +0000 > > Revert Make newly POSIX functions visible > > Summary: > This reverts commit d7efac1be1441c122f7fb9de51a409172f21326c. > This reverts commit 9d0eea9422d075c8a6924b33161d2d5abfb4072a. > > Some ports (specifically Python) define __BSD_VISIBLE themselves, so > the change from __BSD_VISIBLE to __POSIX_VISIBLE >=3D 202405 makes th= em > fail. > That's not legal. Defining __BSD_VISIBLE directly is illegal and won't work right. Can't work right and should likely be a compile time error. With am exp run to fix. Warner > Reported by: jrtc27, cperciva > --- > include/dlfcn.h | 8 +------- > include/stdlib.h | 13 +++++-------- > include/string.h | 6 +++--- > include/time.h | 8 +++----- > include/unistd.h | 16 ++++++---------- > include/wchar.h | 7 ++----- > 6 files changed, 20 insertions(+), 38 deletions(-) > > diff --git a/include/dlfcn.h b/include/dlfcn.h > index ec4ad14b5091..89ec43b332e9 100644 > --- a/include/dlfcn.h > +++ b/include/dlfcn.h > @@ -80,9 +80,6 @@ typedef struct dl_info { > const char *dli_sname; /* Name of nearest symbol. */ > void *dli_saddr; /* Address of nearest symbol. */ > } Dl_info; > -#if __POSIX_VISIBLE >=3D 202405 > -typedef struct dl_info Dl_info_t; > -#endif > > /*- > * The actual type declared by this typedef is immaterial, provided that > @@ -122,12 +119,9 @@ char *dlerror(void); > void *dlopen(const char *, int); > void *dlsym(void * __restrict, const char * __restrict); > > -#if __POSIX_VISIBLE >=3D 202405 > -int dladdr(const void * __restrict, Dl_info * __restrict); > -#endif > - > #if __BSD_VISIBLE > void *fdlopen(int, int); > +int dladdr(const void * __restrict, Dl_info * __restrict); > dlfunc_t dlfunc(void * __restrict, const char * __restrict); > int dlinfo(void * __restrict, int, void * __restrict); > void dllockinit(void *_context, > diff --git a/include/stdlib.h b/include/stdlib.h > index 449b17fefff5..162031ab393d 100644 > --- a/include/stdlib.h > +++ b/include/stdlib.h > @@ -157,7 +157,7 @@ _Noreturn void _Exit(int) __noexcept; > /* > * If we're in a mode greater than C99, expose C11 functions. > */ > -#if __ISO_C_VISIBLE >=3D 2011 || __cplusplus >=3D 201103L || __POSIX_VIS= IBLE > >=3D 202405 > +#if __ISO_C_VISIBLE >=3D 2011 || __cplusplus >=3D 201103L > void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) > __alloc_size(2); > int at_quick_exit(void (*)(void)) __noexcept; > @@ -236,13 +236,6 @@ int unlockpt(int); > int ptsname_r(int, char *, size_t); > #endif > > -#if __POSIX_VISIBLE >=3D 202405 > -void qsort_r(void *, size_t, size_t, > - int (*)(const void *, const void *, void *), void *); > -void *reallocarray(void *, size_t, size_t) __result_use_check > - __alloc_size2(2, 3); > -#endif > - > #if __BSD_VISIBLE > extern const char *malloc_conf; > extern void (*malloc_message)(void *, const char *); > @@ -312,8 +305,12 @@ int mergesort_b(void *, size_t, size_t, int > (^)(const void *, const void *)); > int mkostemp(char *, int); > int mkostemps(char *, int, int); > int mkostempsat(int, char *, int, int); > +void qsort_r(void *, size_t, size_t, > + int (*)(const void *, const void *, void *), void *); > int radixsort(const unsigned char **, int, const unsigned char *, > unsigned); > +void *reallocarray(void *, size_t, size_t) __result_use_check > + __alloc_size2(2, 3); > void *reallocf(void *, size_t) __result_use_check __alloc_size(2); > int rpmatch(const char *); > char *secure_getenv(const char *); > diff --git a/include/string.h b/include/string.h > index 3deca63bd71a..a3fa96ebb449 100644 > --- a/include/string.h > +++ b/include/string.h > @@ -63,8 +63,8 @@ void *memrchr(const void *, int, size_t) __pure; > #endif > int memcmp(const void *, const void *, size_t) __pure; > void *(memcpy)(void * __restrict, const void * __restrict, size_t); > -#if __POSIX_VISIBLE >=3D 202405 > -void *(memmem)(const void *, size_t, const void *, size_t) __pure; > +#if __BSD_VISIBLE > +void *memmem(const void *, size_t, const void *, size_t) __pure; > #endif > void *(memmove)(void *, const void *, size_t); > #if __BSD_VISIBLE > @@ -98,7 +98,7 @@ char *strerror(int); > #if __POSIX_VISIBLE >=3D 200112 > int strerror_r(int, char *, size_t); > #endif > -#if __POSIX_VISIBLE >=3D 202405 > +#if __BSD_VISIBLE > size_t (strlcat)(char * __restrict, const char * __restrict, size_t); > size_t (strlcpy)(char * __restrict, const char * __restrict, size_t); > #endif > diff --git a/include/time.h b/include/time.h > index e011792aaaeb..89a76ca5fd93 100644 > --- a/include/time.h > +++ b/include/time.h > @@ -180,17 +180,15 @@ time_t posix2time(time_t t); > #include > #endif > > -#if __ISO_C_VISIBLE >=3D 2011 || __POSIX_VISIBLE >=3D 202405 || \ > +#if __BSD_VISIBLE || __ISO_C_VISIBLE >=3D 2011 || \ > (defined(__cplusplus) && __cplusplus >=3D 201703) > #include > /* ISO/IEC 9899:2011 7.27.2.5 The timespec_get function */ > #define TIME_UTC 1 /* time elapsed since epoch */ > -#if __ISO_C_VISIBLE >=3D 2023 || __POSIX_VISIBLE >=3D 202405 > -/* ISO/IEC 9899:2024 7.29.1 Components of time */ > -#define TIME_MONOTONIC 2 /* monotonic time */ > -#endif > int timespec_get(struct timespec *ts, int base); > #if __BSD_VISIBLE || __ISO_C_VISIBLE >=3D 2023 > +/* ISO/IEC 9899:2024 7.29.1 Components of time */ > +#define TIME_MONOTONIC 2 /* monotonic time */ > /* ISO/IEC 9899:2024 7.29.2.7 The timespec_getres function */ > int timespec_getres(struct timespec *, int); > #endif > diff --git a/include/unistd.h b/include/unistd.h > index 3a4e1be192d9..8574b2ba9915 100644 > --- a/include/unistd.h > +++ b/include/unistd.h > @@ -483,16 +483,6 @@ int usleep(useconds_t); > pid_t vfork(void) __returns_twice; > #endif > > -/* 1003.1-2024 */ > -#if __POSIX_VISIBLE >=3D 202405 > -pid_t _Fork(void); > -int getentropy(void *, size_t); > -int getresgid(gid_t *, gid_t *, gid_t *); > -int getresuid(uid_t *, uid_t *, uid_t *); > -int setresgid(gid_t, gid_t, gid_t); > -int setresuid(uid_t, uid_t, uid_t); > -#endif > - > #if __BSD_VISIBLE > struct timeval; /* select(2) */ > > @@ -520,11 +510,14 @@ int feature_present(const char *); > int fchroot(int); > char *fflagstostr(u_long); > int getdomainname(char *, int); > +int getentropy(void *, size_t); > int getgrouplist(const char *, gid_t, gid_t *, int *); > int getloginclass(char *, size_t); > mode_t getmode(const void *, mode_t); > int getosreldate(void); > int getpeereid(int, uid_t *, gid_t *); > +int getresgid(gid_t *, gid_t *, gid_t *); > +int getresuid(uid_t *, uid_t *, uid_t *); > char *getusershell(void); > int initgroups(const char *, gid_t); > int iruserok(unsigned long, int, const char *, const char *); > @@ -582,6 +575,8 @@ void *setmode(const char *); > int setpgrp(pid_t, pid_t); /* obsoleted by setpgid() > */ > void setproctitle(const char *_fmt, ...) __printf0like(1, 2); > void setproctitle_fast(const char *_fmt, ...) __printf0like(1, 2); > +int setresgid(gid_t, gid_t, gid_t); > +int setresuid(uid_t, uid_t, uid_t); > int setrgid(gid_t); > int setruid(uid_t); > void setusershell(void); > @@ -594,6 +589,7 @@ int undelete(const char *); > int unwhiteout(const char *); > void *valloc(size_t); /* obsoleted by malloc() = */ > int funlinkat(int, const char *, int, int); > +pid_t _Fork(void); > > #ifndef _OPTRESET_DECLARED > #define _OPTRESET_DECLARED > diff --git a/include/wchar.h b/include/wchar.h > index a8c016c42faf..e4b037c9b16f 100644 > --- a/include/wchar.h > +++ b/include/wchar.h > @@ -235,13 +235,10 @@ size_t wcsnrtombs(char * __restrict, const > wchar_t ** __restrict, size_t, > size_t, mbstate_t * __restrict); > #endif > > -#if __POSIX_VISIBLE >=3D 202405 > -size_t wcslcat(wchar_t *, const wchar_t *, size_t); > -size_t wcslcpy(wchar_t *, const wchar_t *, size_t); > -#endif > - > #if __BSD_VISIBLE > wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); > +size_t wcslcat(wchar_t *, const wchar_t *, size_t); > +size_t wcslcpy(wchar_t *, const wchar_t *, size_t); > #endif > > #if __POSIX_VISIBLE >=3D 200809 || defined(_XLOCALE_H_) > --0000000000008eff690630c32596 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Mar 20, 2025, 1:42=E2=80= =AFAM Stephen Hurd <shurd@freebsd.o= rg> wrote:
The branch main h= as been updated by shurd:

URL: ht= tps://cgit.FreeBSD.org/src/commit/?id=3D415a0ce02c9ee2c15c7973b2dfbddda71f6= 344a2

commit 415a0ce02c9ee2c15c7973b2dfbddda71f6344a2
Author:=C2=A0 =C2=A0 =C2=A0Stephen Hurd <shurd@FreeBSD.org>
AuthorDate: 2025-03-20 07:15:15 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Stephen Hurd <shurd@FreeBSD.org>
CommitDate: 2025-03-20 07:41:27 +0000

=C2=A0 =C2=A0 Revert Make newly POSIX functions visible

=C2=A0 =C2=A0 Summary:
=C2=A0 =C2=A0 This reverts commit d7efac1be1441c122f7fb9de51a409172f21326c.=
=C2=A0 =C2=A0 This reverts commit 9d0eea9422d075c8a6924b33161d2d5abfb4072a.=

=C2=A0 =C2=A0 Some ports (specifically Python) define __BSD_VISIBLE themsel= ves, so
=C2=A0 =C2=A0 the change from __BSD_VISIBLE to __POSIX_VISIBLE >=3D 2024= 05 makes them
=C2=A0 =C2=A0 fail.

That's not legal. Defining __BSD_VISIBLE directly is= illegal and won't work right. Can't work right and should likely b= e a compile time error. With am exp run to fix.

=
Warner


=C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 jrtc27, cperciva
---
=C2=A0include/dlfcn.h=C2=A0 |=C2=A0 8 +-------
=C2=A0include/stdlib.h | 13 +++++--------
=C2=A0include/string.h |=C2=A0 6 +++---
=C2=A0include/time.h=C2=A0 =C2=A0|=C2=A0 8 +++-----
=C2=A0include/unistd.h | 16 ++++++----------
=C2=A0include/wchar.h=C2=A0 |=C2=A0 7 ++-----
=C2=A06 files changed, 20 insertions(+), 38 deletions(-)

diff --git a/include/dlfcn.h b/include/dlfcn.h
index ec4ad14b5091..89ec43b332e9 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -80,9 +80,6 @@ typedef=C2=A0 =C2=A0 =C2=A0 =C2=A0struct dl_info {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 const char=C2=A0 =C2=A0 =C2=A0 *dli_sname;=C2= =A0 =C2=A0 =C2=A0/* Name of nearest symbol. */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 void=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *= dli_saddr;=C2=A0 =C2=A0 =C2=A0/* Address of nearest symbol. */
=C2=A0} Dl_info;
-#if __POSIX_VISIBLE >=3D 202405
-typedef struct dl_info Dl_info_t;
-#endif

=C2=A0/*-
=C2=A0 * The actual type declared by this typedef is immaterial, provided t= hat
@@ -122,12 +119,9 @@ char=C2=A0 =C2=A0 =C2=A0 =C2=A0*dlerror(void);
=C2=A0void=C2=A0 =C2=A0*dlopen(const char *, int);
=C2=A0void=C2=A0 =C2=A0*dlsym(void * __restrict, const char * __restrict);<= br>
-#if __POSIX_VISIBLE >=3D 202405
-int=C2=A0 =C2=A0 =C2=A0dladdr(const void * __restrict, Dl_info * __restric= t);
-#endif
-
=C2=A0#if __BSD_VISIBLE
=C2=A0void=C2=A0 =C2=A0*fdlopen(int, int);
+int=C2=A0 =C2=A0 =C2=A0dladdr(const void * __restrict, Dl_info * __restric= t);
=C2=A0dlfunc_t dlfunc(void * __restrict, const char * __restrict);
=C2=A0int=C2=A0 =C2=A0 =C2=A0dlinfo(void * __restrict, int, void * __restri= ct);
=C2=A0void=C2=A0 =C2=A0 dllockinit(void *_context,
diff --git a/include/stdlib.h b/include/stdlib.h
index 449b17fefff5..162031ab393d 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -157,7 +157,7 @@ _Noreturn void=C2=A0 =C2=A0 =C2=A0 =C2=A0_Exit(int) __n= oexcept;
=C2=A0/*
=C2=A0 * If we're in a mode greater than C99, expose C11 functions.
=C2=A0 */
-#if __ISO_C_VISIBLE >=3D 2011 || __cplusplus >=3D 201103L || __POSIX= _VISIBLE >=3D 202405
+#if __ISO_C_VISIBLE >=3D 2011 || __cplusplus >=3D 201103L
=C2=A0void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __alloc_size(2);
=C2=A0int=C2=A0 =C2=A0 at_quick_exit(void (*)(void)) __noexcept;
@@ -236,13 +236,6 @@ int=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0unlockpt(int); =C2=A0int=C2=A0 =C2=A0 =C2=A0ptsname_r(int, char *, size_t);
=C2=A0#endif

-#if __POSIX_VISIBLE >=3D 202405
-void=C2=A0 =C2=A0 qsort_r(void *, size_t, size_t,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0int (*)(const void *, const void = *, void *), void *);
-void=C2=A0 =C2=A0*reallocarray(void *, size_t, size_t) __result_use_check<= br> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0__alloc_size2(2, 3);
-#endif
-
=C2=A0#if __BSD_VISIBLE
=C2=A0extern const char *malloc_conf;
=C2=A0extern void (*malloc_message)(void *, const char *);
@@ -312,8 +305,12 @@ int=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mergesort_b(void = *, size_t, size_t, int (^)(const void *, const void *));
=C2=A0int=C2=A0 =C2=A0 =C2=A0mkostemp(char *, int);
=C2=A0int=C2=A0 =C2=A0 =C2=A0mkostemps(char *, int, int);
=C2=A0int=C2=A0 =C2=A0 =C2=A0mkostempsat(int, char *, int, int);
+void=C2=A0 =C2=A0 qsort_r(void *, size_t, size_t,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0int (*)(const void *, const void = *, void *), void *);
=C2=A0int=C2=A0 =C2=A0 =C2=A0radixsort(const unsigned char **, int, const u= nsigned char *,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unsigned);
+void=C2=A0 =C2=A0*reallocarray(void *, size_t, size_t) __result_use_check<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0__alloc_size2(2, 3);
=C2=A0void=C2=A0 =C2=A0*reallocf(void *, size_t) __result_use_check __alloc= _size(2);
=C2=A0int=C2=A0 =C2=A0 =C2=A0rpmatch(const char *);
=C2=A0char=C2=A0 =C2=A0*secure_getenv(const char *);
diff --git a/include/string.h b/include/string.h
index 3deca63bd71a..a3fa96ebb449 100644
--- a/include/string.h
+++ b/include/string.h
@@ -63,8 +63,8 @@ void=C2=A0 *memrchr(const void *, int, size_t) __pure; =C2=A0#endif
=C2=A0int=C2=A0 =C2=A0 =C2=A0memcmp(const void *, const void *, size_t) __p= ure;
=C2=A0void=C2=A0 =C2=A0*(memcpy)(void * __restrict, const void * __restrict= , size_t);
-#if __POSIX_VISIBLE >=3D 202405
-void=C2=A0 =C2=A0*(memmem)(const void *, size_t, const void *, size_t) __p= ure;
+#if __BSD_VISIBLE
+void=C2=A0 =C2=A0*memmem(const void *, size_t, const void *, size_t) __pur= e;
=C2=A0#endif
=C2=A0void=C2=A0 =C2=A0*(memmove)(void *, const void *, size_t);
=C2=A0#if __BSD_VISIBLE
@@ -98,7 +98,7 @@ char=C2=A0 *strerror(int);
=C2=A0#if __POSIX_VISIBLE >=3D 200112
=C2=A0int=C2=A0 =C2=A0 =C2=A0strerror_r(int, char *, size_t);
=C2=A0#endif
-#if __POSIX_VISIBLE >=3D 202405
+#if __BSD_VISIBLE
=C2=A0size_t=C2=A0 (strlcat)(char * __restrict, const char * __restrict, si= ze_t);
=C2=A0size_t=C2=A0 (strlcpy)(char * __restrict, const char * __restrict, si= ze_t);
=C2=A0#endif
diff --git a/include/time.h b/include/time.h
index e011792aaaeb..89a76ca5fd93 100644
--- a/include/time.h
+++ b/include/time.h
@@ -180,17 +180,15 @@ time_t posix2time(time_t t);
=C2=A0#include <xlocale/_time.h>
=C2=A0#endif

-#if __ISO_C_VISIBLE >=3D 2011 || __POSIX_VISIBLE >=3D 202405 || \ +#if __BSD_VISIBLE || __ISO_C_VISIBLE >=3D 2011 || \
=C2=A0 =C2=A0 =C2=A0(defined(__cplusplus) && __cplusplus >=3D 20= 1703)
=C2=A0#include <sys/_timespec.h>
=C2=A0/* ISO/IEC 9899:2011 7.27.2.5 The timespec_get function */
=C2=A0#define TIME_UTC=C2=A0 =C2=A0 =C2=A0 =C2=A01=C2=A0 =C2=A0 =C2=A0 =C2= =A0/* time elapsed since epoch */
-#if __ISO_C_VISIBLE >=3D 2023 || __POSIX_VISIBLE >=3D 202405
-/* ISO/IEC 9899:2024 7.29.1 Components of time */
-#define TIME_MONOTONIC 2=C2=A0 =C2=A0 =C2=A0 =C2=A0/* monotonic time */ -#endif
=C2=A0int timespec_get(struct timespec *ts, int base);
=C2=A0#if __BSD_VISIBLE || __ISO_C_VISIBLE >=3D 2023
+/* ISO/IEC 9899:2024 7.29.1 Components of time */
+#define TIME_MONOTONIC 2=C2=A0 =C2=A0 =C2=A0 =C2=A0/* monotonic time */ =C2=A0/* ISO/IEC 9899:2024 7.29.2.7 The timespec_getres function */
=C2=A0int timespec_getres(struct timespec *, int);
=C2=A0#endif
diff --git a/include/unistd.h b/include/unistd.h
index 3a4e1be192d9..8574b2ba9915 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -483,16 +483,6 @@ int=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0usleep(useconds_t= );
=C2=A0pid_t=C2=A0 =C2=A0vfork(void) __returns_twice;
=C2=A0#endif

-/* 1003.1-2024 */
-#if __POSIX_VISIBLE >=3D 202405
-pid_t=C2=A0 =C2=A0_Fork(void);
-int=C2=A0 =C2=A0 =C2=A0getentropy(void *, size_t);
-int=C2=A0 =C2=A0 =C2=A0getresgid(gid_t *, gid_t *, gid_t *);
-int=C2=A0 =C2=A0 =C2=A0getresuid(uid_t *, uid_t *, uid_t *);
-int=C2=A0 =C2=A0 =C2=A0setresgid(gid_t, gid_t, gid_t);
-int=C2=A0 =C2=A0 =C2=A0setresuid(uid_t, uid_t, uid_t);
-#endif
-
=C2=A0#if __BSD_VISIBLE
=C2=A0struct timeval;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* select(2) */=

@@ -520,11 +510,14 @@ int=C2=A0 =C2=A0 =C2=A0 =C2=A0 feature_present(const = char *);
=C2=A0int=C2=A0 =C2=A0 =C2=A0fchroot(int);
=C2=A0char=C2=A0 =C2=A0*fflagstostr(u_long);
=C2=A0int=C2=A0 =C2=A0 =C2=A0getdomainname(char *, int);
+int=C2=A0 =C2=A0 =C2=A0getentropy(void *, size_t);
=C2=A0int=C2=A0 =C2=A0 =C2=A0getgrouplist(const char *, gid_t, gid_t *, int= *);
=C2=A0int=C2=A0 =C2=A0 =C2=A0getloginclass(char *, size_t);
=C2=A0mode_t=C2=A0 getmode(const void *, mode_t);
=C2=A0int=C2=A0 =C2=A0 =C2=A0getosreldate(void);
=C2=A0int=C2=A0 =C2=A0 =C2=A0getpeereid(int, uid_t *, gid_t *);
+int=C2=A0 =C2=A0 =C2=A0getresgid(gid_t *, gid_t *, gid_t *);
+int=C2=A0 =C2=A0 =C2=A0getresuid(uid_t *, uid_t *, uid_t *);
=C2=A0char=C2=A0 =C2=A0*getusershell(void);
=C2=A0int=C2=A0 =C2=A0 =C2=A0initgroups(const char *, gid_t);
=C2=A0int=C2=A0 =C2=A0 =C2=A0iruserok(unsigned long, int, const char *, con= st char *);
@@ -582,6 +575,8 @@ void=C2=A0 =C2=A0 =C2=A0 =C2=A0 *setmode(const char *);=
=C2=A0int=C2=A0 =C2=A0 =C2=A0setpgrp(pid_t, pid_t);=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* obsoleted by setpgid() */
=C2=A0void=C2=A0 =C2=A0 setproctitle(const char *_fmt, ...) __printf0like(1= , 2);
=C2=A0void=C2=A0 =C2=A0 setproctitle_fast(const char *_fmt, ...) __printf0l= ike(1, 2);
+int=C2=A0 =C2=A0 =C2=A0setresgid(gid_t, gid_t, gid_t);
+int=C2=A0 =C2=A0 =C2=A0setresuid(uid_t, uid_t, uid_t);
=C2=A0int=C2=A0 =C2=A0 =C2=A0setrgid(gid_t);
=C2=A0int=C2=A0 =C2=A0 =C2=A0setruid(uid_t);
=C2=A0void=C2=A0 =C2=A0 setusershell(void);
@@ -594,6 +589,7 @@ int=C2=A0 undelete(const char *);
=C2=A0int=C2=A0 =C2=A0 =C2=A0unwhiteout(const char *);
=C2=A0void=C2=A0 =C2=A0*valloc(size_t);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* obsoleted by malloc() *= /
=C2=A0int=C2=A0 =C2=A0 =C2=A0funlinkat(int, const char *, int, int);
+pid_t=C2=A0 =C2=A0_Fork(void);

=C2=A0#ifndef _OPTRESET_DECLARED
=C2=A0#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 _OPTRESET_DECLARED
diff --git a/include/wchar.h b/include/wchar.h
index a8c016c42faf..e4b037c9b16f 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -235,13 +235,10 @@ size_t=C2=A0 =C2=A0 wcsnrtombs(char * __restrict, con= st wchar_t ** __restrict, size_t,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 size_t, mbstate_t * __restrict);<= br> =C2=A0#endif

-#if __POSIX_VISIBLE >=3D 202405
-size_t wcslcat(wchar_t *, const wchar_t *, size_t);
-size_t wcslcpy(wchar_t *, const wchar_t *, size_t);
-#endif
-
=C2=A0#if __BSD_VISIBLE
=C2=A0wchar_t=C2=A0 =C2=A0 =C2=A0 =C2=A0 *fgetwln(FILE * __restrict, size_t= * __restrict);
+size_t wcslcat(wchar_t *, const wchar_t *, size_t);
+size_t wcslcpy(wchar_t *, const wchar_t *, size_t);
=C2=A0#endif

=C2=A0#if __POSIX_VISIBLE >=3D 200809 || defined(_XLOCALE_H_)
--0000000000008eff690630c32596--