From fd70a1b5a6c92981259437d5e65501df5e679f2a Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Wed, 7 Aug 2024 04:59:46 +0000 Subject: wcslcpy() and wcslcat() are in POSIX-2024. Update #include visibility and manpages and add restrict qualifiers. ok millert@ --- include/wchar.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/wchar.h b/include/wchar.h index 462ed5e4bbf..96e86a15515 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wchar.h,v 1.32 2024/07/14 10:04:17 jca Exp $ */ +/* $OpenBSD: wchar.h,v 1.33 2024/08/07 04:59:45 guenther Exp $ */ /* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ /*- @@ -223,14 +223,17 @@ int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, __va_list); int vwscanf(const wchar_t * __restrict, __va_list); int wscanf(const wchar_t * __restrict, ...); -#if __BSD_VISIBLE -wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); -size_t wcslcat(wchar_t *, const wchar_t *, size_t) +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE +size_t wcslcat(wchar_t * __restrict, const wchar_t * __restrict, size_t) __attribute__ ((__bounded__(__wcstring__,1,3))); -size_t wcslcpy(wchar_t *, const wchar_t *, size_t) +size_t wcslcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t) __attribute__ ((__bounded__(__wcstring__,1,3))); #endif +#if __BSD_VISIBLE +wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); +#endif + #define getwc(f) fgetwc(f) #define getwchar() getwc(stdin) #define putwc(wc, f) fputwc((wc), (f)) -- cgit v1.2.3