-/* $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 $ */
/*-
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))
-.\" $OpenBSD: wcslcpy.3,v 1.7 2019/01/25 00:19:25 millert Exp $
+.\" $OpenBSD: wcslcpy.3,v 1.8 2024/08/07 04:59:45 guenther Exp $
.\"
.\" Copyright (c) 1998, 2000 Todd C. Miller <millert@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: January 25 2019 $
+.Dd $Mdocdate: August 7 2024 $
.Dt WCSLCPY 3
.Os
.Sh NAME
.Sh SYNOPSIS
.In wchar.h
.Ft size_t
-.Fn wcslcpy "wchar_t *dst" "const wchar_t *src" "size_t size"
+.Fn wcslcpy "wchar_t * restrict dst" "const wchar_t * restrict src" "size_t size"
.Ft size_t
-.Fn wcslcat "wchar_t *dst" "const wchar_t *src" "size_t size"
+.Fn wcslcat "wchar_t * restrict dst" "const wchar_t * restrict src" "size_t size"
.Sh DESCRIPTION
The
.Fn wcslcpy
.Xr swprintf 3 ,
.Xr wcsncat 3 ,
.Xr wcsncpy 3
+.Sh STANDARDS
+The
+.Fn wcslcpy
+and
+.Fn wcslcat
+functions conform to
+.St -p1003.1-2024 .
.Sh HISTORY
The
.Fn wcslcpy