git: 7b5a98c20223 - main - libc: Refer to xlocale(3) in strto*/wcsto* manpages
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 11 Nov 2026 14:42:19 UTC
The branch main has been updated by obiwac:
URL: https://cgit.FreeBSD.org/src/commit/?id=7b5a98c202238b7c2dcbc720d064e28d13702527
commit 7b5a98c202238b7c2dcbc720d064e28d13702527
Author: Aymeric Wibo <obiwac@FreeBSD.org>
AuthorDate: 2026-11-11 14:35:56 +0000
Commit: Aymeric Wibo <obiwac@FreeBSD.org>
CommitDate: 2026-11-11 14:42:12 +0000
libc: Refer to xlocale(3) in strto*/wcsto* manpages
Mention the extended locale (_l) versions of strtol(3), strtoul(3),
strtod(3), wcstol(3), and wcstod(3) and point to xlocale(3).
While here, add missing serial commas in function lists and widen the
strtol(3) RETURN VALUES table columns to fit INTMAX_MIN/INTMAX_MAX.
Obtained from: https://github.com/apple-oss-distributions/libc (partially)
Sponsored by: Klara, Inc.
---
lib/libc/locale/wcstod.3 | 9 ++++++---
lib/libc/locale/wcstol.3 | 11 +++++++----
lib/libc/stdlib/strtod.3 | 9 +++++----
lib/libc/stdlib/strtol.3 | 14 +++++++++++---
lib/libc/stdlib/strtoul.3 | 12 ++++++++++--
5 files changed, 39 insertions(+), 16 deletions(-)
diff --git a/lib/libc/locale/wcstod.3 b/lib/libc/locale/wcstod.3
index 15af283fdd06..c480047dd984 100644
--- a/lib/libc/locale/wcstod.3
+++ b/lib/libc/locale/wcstod.3
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 22, 2003
+.Dd November 11, 2026
.Dt WCSTOD 3
.Os
.Sh NAME
@@ -46,18 +46,21 @@ or
.Sh DESCRIPTION
The
.Fn wcstof ,
-.Fn wcstod
+.Fn wcstod ,
and
.Fn wcstold
functions are the wide-character versions of the
.Fn strtof ,
-.Fn strtod
+.Fn strtod ,
and
.Fn strtold
functions.
Refer to
.Xr strtod 3
for details.
+.Pp
+Extended locale versions of these functions are documented in
+.Xr xlocale 3 .
.Sh SEE ALSO
.Xr strtod 3 ,
.Xr wcstol 3
diff --git a/lib/libc/locale/wcstol.3 b/lib/libc/locale/wcstol.3
index 725473cebb66..adee7d452b1b 100644
--- a/lib/libc/locale/wcstol.3
+++ b/lib/libc/locale/wcstol.3
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 7, 2002
+.Dd November 11, 2026
.Dt WCSTOL 3
.Os
.Sh NAME
@@ -61,7 +61,7 @@ The
.Fn wcstoul ,
.Fn wcstoll ,
.Fn wcstoull ,
-.Fn wcstoimax
+.Fn wcstoimax ,
and
.Fn wcstoumax
functions are wide-character versions of the
@@ -69,13 +69,16 @@ 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 xlocale 3 .
.Sh SEE ALSO
.Xr strtol 3 ,
.Xr strtoul 3
@@ -85,7 +88,7 @@ The
.Fn wcstoul ,
.Fn wcstoll ,
.Fn wcstoull ,
-.Fn wcstoimax
+.Fn wcstoimax ,
and
.Fn wcstoumax
functions conform to
diff --git a/lib/libc/stdlib/strtod.3 b/lib/libc/stdlib/strtod.3
index 018e1e8c3c38..74e2a8bbba0b 100644
--- a/lib/libc/stdlib/strtod.3
+++ b/lib/libc/stdlib/strtod.3
@@ -29,14 +29,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 11, 2010
+.Dd November 11, 2026
.Dt STRTOD 3
.Os
.Sh NAME
.Nm strtod , strtof , strtold
-.Nd convert
-.Tn ASCII
-string to floating point
+.Nd convert ASCII string to floating point
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
@@ -113,6 +111,9 @@ function) are skipped.
The decimal point
character is defined in the program's locale (category
.Dv LC_NUMERIC ) .
+.Pp
+Extended locale versions of these functions are documented in
+.Xr xlocale 3 .
.Sh RETURN VALUES
The
.Fn strtod ,
diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3
index af8bec579dbf..4a148ad63a51 100644
--- a/lib/libc/stdlib/strtol.3
+++ b/lib/libc/stdlib/strtol.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd August 21, 2023
+.Dd November 11, 2026
.Dt STRTOL 3
.Os
.Sh NAME
@@ -154,11 +154,19 @@ but
is
.Ql \e0
on return, the entire string was valid.)
+.Pp
+Extended locale versions of the
+.Fn strtol ,
+.Fn strtoll ,
+and
+.Fn strtoimax
+functions are documented in
+.Xr xlocale 3 .
.Sh RETURN VALUES
The
.Fn strtol ,
.Fn strtoll ,
-.Fn strtoimax
+.Fn strtoimax ,
and
.Fn strtoq
functions
@@ -176,7 +184,7 @@ is set to
.Er ERANGE
and the function return value is clamped according
to the following table.
-.Bl -column -offset indent ".Fn strtoimax" ".Sy underflow" ".Sy overflow"
+.Bl -column -offset indent ".Fn strtoimax" ".Dv INTMAX_MIN" ".Dv INTMAX_MAX"
.It Sy Function Ta Sy underflow Ta Sy overflow
.It Fn strtol Ta Dv LONG_MIN Ta Dv LONG_MAX
.It Fn strtoll Ta Dv LLONG_MIN Ta Dv LLONG_MAX
diff --git a/lib/libc/stdlib/strtoul.3 b/lib/libc/stdlib/strtoul.3
index 3e4b6bdc20fb..b418f29ea0e0 100644
--- a/lib/libc/stdlib/strtoul.3
+++ b/lib/libc/stdlib/strtoul.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd August 21, 2023
+.Dd November 11, 2026
.Dt STRTOUL 3
.Os
.Sh NAME
@@ -153,11 +153,19 @@ but
is
.Ql \e0
on return, the entire string was valid.)
+.Pp
+Extended locale versions of the
+.Fn strtoul ,
+.Fn strtoull ,
+and
+.Fn strtoumax
+functions are documented in
+.Xr xlocale 3 .
.Sh RETURN VALUES
The
.Fn strtoul ,
.Fn strtoull ,
-.Fn strtoumax
+.Fn strtoumax ,
and
.Fn strtouq
functions