From dfc5f6fe81c60539c978ef3d86b354da9e384dc9 Mon Sep 17 00:00:00 2001 From: guenther Date: Sat, 3 Aug 2024 20:09:24 +0000 Subject: [PATCH] mkostemp(3) and reallocarray(3) are in POSIX-2024: adjust #include visibility and update the reallocarray(3) manpage ok millert@ --- include/stdlib.h | 8 ++++---- lib/libc/stdlib/malloc.3 | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index d1292e6d437..2416bb395bf 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdlib.h,v 1.77 2024/03/01 21:30:40 millert Exp $ */ +/* $OpenBSD: stdlib.h,v 1.78 2024/08/03 20:09:24 guenther Exp $ */ /* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */ /*- @@ -116,7 +116,6 @@ void freezero(void *, size_t) __attribute__ ((__bounded__(__buffer__,1,2))); void *calloc_conceal(size_t, size_t); void *malloc_conceal(size_t); -void *reallocarray(void *, size_t, size_t); void *recallocarray(void *, size_t, size_t, size_t); #endif /* __BSD_VISIBLE */ void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); @@ -257,10 +256,11 @@ int getsubopt(char **, char * const *, char **); #endif /* - * The Open Group Base Specifications, post-Issue 7 + * The Open Group Base Specifications, Issue 8 */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE int mkostemp(char *, int); +void *reallocarray(void *, size_t, size_t); #endif #if __BSD_VISIBLE diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index e5d9b562668..bea5575bf80 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -30,9 +30,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: malloc.3,v 1.141 2023/12/04 22:52:41 tb Exp $ +.\" $OpenBSD: malloc.3,v 1.142 2024/08/03 20:09:24 guenther Exp $ .\" -.Dd $Mdocdate: December 4 2023 $ +.Dd $Mdocdate: August 3 2024 $ .Dt MALLOC 3 .Os .Sh NAME @@ -722,6 +722,10 @@ The .Fn aligned_alloc function conforms to .St -isoC-2011 . +The +.Fn reallocarray +function conforms to +.St -p1003.1-2024 . .Pp If .Fa nmemb -- 2.20.1