.Dt WCSTOL 3
.Os
.Sh NAME
-.Nm wcstol , wcstoul ,
-.Nm wcstoll , wcstoull ,
-.Nm wcstoimax , wcstoumax
+.Nm wcstoimax ,
+.Nm wcstol ,
+.Nm wcstoll ,
+.Nm wcstoul ,
+.Nm wcstoull ,
+.Nm wcstoumax
.Nd "convert a wide character string value to a"
+.Vt intmax_t ,
.Vt long ,
-.Vt "unsigned long" ,
.Vt "long long" ,
+.Vt "unsigned long" ,
.Vt "unsigned long long" ,
-.Vt intmax_t
or
.Vt uintmax_t
integer
.Sh SYNOPSIS
.In wchar.h
.Ft long
-.Fn wcstol "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
-.Ft "unsigned long"
-.Fn wcstoul "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
+.Fo wcstol
+.Fa "const wchar_t *restrict nptr"
+.Fa "wchar_t **restrict endptr"
+.Fa "int base"
+.Fc
.Ft "long long"
-.Fn wcstoll "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
+.Fo wcstoll
+.Fa "const wchar_t *restrict nptr"
+.Fa "wchar_t **restrict endptr"
+.Fa "int base"
+.Fc
+.Ft "unsigned long"
+.Fo wcstoul
+.Fa "const wchar_t *restrict nptr"
+.Fa "wchar_t **restrict endptr"
+.Fa "int base"
+.Fc
.Ft "unsigned long long"
-.Fn wcstoull "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
+.Fo wcstoull
+.Fa "const wchar_t *restrict nptr"
+.Fa "wchar_t **restrict endptr"
+.Fa "int base"
+.Fc
+.In stddef.h
.In inttypes.h
.Ft intmax_t
-.Fn wcstoimax "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
+.Fo wcstoimax
+.Fa "const wchar_t *restrict nptr"
+.Fa "wchar_t **restrict endptr"
+.Fa "int base"
+.Fc
.Ft uintmax_t
-.Fn wcstoumax "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
+.Fo wcstoumax
+.Fa "const wchar_t *restrict nptr"
+.Fa "wchar_t **restrict endptr"
+.Fa "int base"
+.Fc
.Sh DESCRIPTION
The
.Fn wcstol ,
.Fn wcstoul ,
.Fn wcstoll ,
.Fn wcstoull ,
-.Fn wcstoimax
+.Fn wcstoimax ,
and
.Fn wcstoumax
functions are wide-character versions of the
.Fn strtoul ,
.Fn strtoll ,
.Fn strtoull ,
-.Fn strtoimax
+.Fn strtoimax ,
and
.Fn strtoumax
functions, respectively.
Refer to their manual pages (for example
.Xr strtol 3 )
for details.
+.Pp
+Extended locale versions of these functions are documented in
+.Xr wcstol_l 3 .
+See
+.Xr xlocale 3
+for more information.
+.Sh LEGACY SYNOPSIS
+.Fd #include <stddef.h>
+.Fd #include <inttypes.h>
+.Pp
+The include file
+.In stddef.h
+is necessary for the
+.Fn wcstoimax
+and
+.Fn wcstoumax
+functions.
.Sh SEE ALSO
.Xr strtol 3 ,
-.Xr strtoul 3
+.Xr strtoul 3 ,
+.Xr wcstol_l 3 ,
+.Xr compat 5
.Sh STANDARDS
The
.Fn wcstol ,
.Fn wcstoul ,
.Fn wcstoll ,
.Fn wcstoull ,
-.Fn wcstoimax
+.Fn wcstoimax ,
and
.Fn wcstoumax
functions conform to