summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/err.316
-rw-r--r--lib/libc/gen/glob.313
-rw-r--r--lib/libc/gen/psignal.314
-rw-r--r--lib/libc/stdio/perror.316
-rw-r--r--lib/libc/string/strerror.322
-rw-r--r--lib/libc/string/strsignal.318
-rw-r--r--lib/libc/time/strftime.319
-rw-r--r--lib/libc/time/strptime.322
8 files changed, 103 insertions, 37 deletions
diff --git a/lib/libc/gen/err.3 b/lib/libc/gen/err.3
index a9635b0c257..1add656944c 100644
--- a/lib/libc/gen/err.3
+++ b/lib/libc/gen/err.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: err.3,v 1.20 2014/04/23 16:26:33 jmc Exp $
+.\" $OpenBSD: err.3,v 1.21 2019/05/16 13:35:16 schwarze Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: April 23 2014 $
+.Dd $Mdocdate: May 16 2019 $
.Dt ERR 3
.Os
.Sh NAME
@@ -233,3 +233,15 @@ Always be sure to use the proper secure idiom:
.Bd -literal -offset indent
err(1, "%s", string);
.Ed
+.Pp
+On systems other than
+.Ox ,
+the
+.Dv LC_MESSAGES
+.Xr locale 1
+category can cause different strings to be printed instead of the
+normal
+.Xr errno 2
+messages; see CAVEATS in
+.Xr setlocale 3
+for details.
diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3
index 0d3aaed8835..69166a831bc 100644
--- a/lib/libc/gen/glob.3
+++ b/lib/libc/gen/glob.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: glob.3,v 1.36 2019/02/04 16:45:40 millert Exp $
+.\" $OpenBSD: glob.3,v 1.37 2019/05/16 13:35:16 schwarze Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: February 4 2019 $
+.Dd $Mdocdate: May 16 2019 $
.Dt GLOB 3
.Os
.Sh NAME
@@ -478,6 +478,15 @@ and
.Fn globfree
functions first appeared in
.Bx 4.4 .
+.Sh CAVEATS
+On systems other than
+.Ox ,
+the
+.Dv LC_COLLATE
+.Xr locale 1
+category can affect the sort order; see CAVEATS in
+.Xr setlocale 3
+for details.
.Sh BUGS
Patterns longer than
.Dv PATH_MAX
diff --git a/lib/libc/gen/psignal.3 b/lib/libc/gen/psignal.3
index 24972b156cd..3fd2ebbf7bf 100644
--- a/lib/libc/gen/psignal.3
+++ b/lib/libc/gen/psignal.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: psignal.3,v 1.13 2013/06/05 03:39:22 tedu Exp $
+.\" $OpenBSD: psignal.3,v 1.14 2019/05/16 13:35:16 schwarze Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: May 16 2019 $
.Dt PSIGNAL 3
.Os
.Sh NAME
@@ -87,3 +87,13 @@ The
.Fn psignal
function appeared in
.Bx 4.2 .
+.Sh CAVEATS
+On systems other than
+.Ox ,
+the
+.Dv LC_MESSAGES
+.Xr locale 1
+category can cause different strings to be printed instead of the
+normal signal descriptions; see CAVEATS in
+.Xr setlocale 3
+for details.
diff --git a/lib/libc/stdio/perror.3 b/lib/libc/stdio/perror.3
index c5c0d9f76a8..bed232d2177 100644
--- a/lib/libc/stdio/perror.3
+++ b/lib/libc/stdio/perror.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: perror.3,v 1.10 2013/07/17 05:42:11 schwarze Exp $
+.\" $OpenBSD: perror.3,v 1.11 2019/05/16 13:35:16 schwarze Exp $
.\"
.\" Copyright (c) 1980, 1991 Regents of the University of California.
.\" All rights reserved.
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 17 2013 $
+.Dd $Mdocdate: May 16 2019 $
.Dt PERROR 3
.Os
.Sh NAME
@@ -44,7 +44,7 @@
.Sh DESCRIPTION
The
.Fn perror
-function looks up the language-dependent error message string affiliated
+function looks up the error message string affiliated
with an error number and writes it, followed by a new-line, to the
standard error stream.
.Pp
@@ -76,3 +76,13 @@ The
.Fn perror
function first appeared in
.At v4 .
+.Sh CAVEATS
+On systems other than
+.Ox ,
+the
+.Dv LC_MESSAGES
+.Xr locale 1
+category can cause different strings to be printed instead of the
+normal error messages; see CAVEATS in
+.Xr setlocale 3
+for details.
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3
index 0d4f084e5e0..6c5b890fa4c 100644
--- a/lib/libc/string/strerror.3
+++ b/lib/libc/string/strerror.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strerror.3,v 1.15 2017/09/05 03:16:13 schwarze Exp $
+.\" $OpenBSD: strerror.3,v 1.16 2019/05/16 13:35:16 schwarze Exp $
.\"
.\" Copyright (c) 1980, 1991 Regents of the University of California.
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -32,7 +32,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 5 2017 $
+.Dd $Mdocdate: May 16 2019 $
.Dt STRERROR 3
.Os
.Sh NAME
@@ -95,14 +95,6 @@ returns zero upon successful completion.
If an error occurs, the error code is stored in
.Va errno
and the error code is returned.
-.Sh ENVIRONMENT
-On other operating systems, the behaviour of
-.Fn strerror
-and
-.Fn strerror_r
-may depend on the
-.Dv LC_MESSAGES
-.Xr locale 1 .
.Sh ERRORS
All these functions may fail if:
.Bl -tag -width Er
@@ -150,3 +142,13 @@ and
.Fn strerror_l
since
.Ox 6.2 .
+.Sh CAVEATS
+On systems other than
+.Ox ,
+the
+.Dv LC_MESSAGES
+.Xr locale 1
+category can cause different strings to be returned instead of the
+normal error messages; see CAVEATS in
+.Xr setlocale 3
+for details.
diff --git a/lib/libc/string/strsignal.3 b/lib/libc/string/strsignal.3
index 3261f699d88..b46be893b52 100644
--- a/lib/libc/string/strsignal.3
+++ b/lib/libc/string/strsignal.3
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strsignal.3,v 1.8 2013/06/05 03:39:23 tedu Exp $
+.\" $OpenBSD: strsignal.3,v 1.9 2019/05/16 13:35:16 schwarze Exp $
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: May 16 2019 $
.Dt STRSIGNAL 3
.Os
.Sh NAME
@@ -44,8 +44,8 @@
.Sh DESCRIPTION
The
.Fn strsignal
-function returns a pointer to the language-dependent string describing
-a signal.
+function returns a pointer to the string describing the signal
+.Fa sig .
.Pp
The array pointed to is not to be modified by the program, but may be
overwritten by subsequent calls to
@@ -66,3 +66,13 @@ function first appeared in
.At V.4
and was reimplemented for
.Nx 1.0 .
+.Sh CAVEATS
+On systems other than
+.Ox ,
+the
+.Dv LC_MESSAGES
+.Xr locale 1
+category can cause different strings to be returned instead of the
+normal signal descriptions; see CAVEATS in
+.Xr setlocale 3
+for details.
diff --git a/lib/libc/time/strftime.3 b/lib/libc/time/strftime.3
index a02af262b15..a2adf880bbe 100644
--- a/lib/libc/time/strftime.3
+++ b/lib/libc/time/strftime.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strftime.3,v 1.37 2017/09/05 03:16:14 schwarze Exp $
+.\" $OpenBSD: strftime.3,v 1.38 2019/05/16 13:35:17 schwarze Exp $
.\"
.\" Copyright (c) 1989, 1991 The Regents of the University of California.
.\" All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" from: @(#)strftime.3 5.12 (Berkeley) 6/29/91
.\"
-.Dd $Mdocdate: September 5 2017 $
+.Dd $Mdocdate: May 16 2019 $
.Dt STRFTIME 3
.Os
.Sh NAME
@@ -219,12 +219,6 @@ NUL character, is not more than
returns the number of characters placed in the array, not counting the
terminating NUL.
Otherwise, zero is returned.
-.Sh ENVIRONMENT
-On other operating systems, the behaviour of
-.Fn strftime
-may depend on the
-.Dv LC_TIME
-.Xr locale 1 .
.Sh SEE ALSO
.Xr date 1 ,
.Xr printf 1 ,
@@ -295,6 +289,15 @@ implemented the
version of
.Fn strftime
in 1989.
+.Sh CAVEATS
+On systems other than
+.Ox ,
+the
+.Dv LC_TIME
+.Xr locale 1
+category can cause erratic output; see CAVEATS in
+.Xr setlocale 3
+for details.
.Sh BUGS
There is no conversion specification for the phase of the moon.
.Pp
diff --git a/lib/libc/time/strptime.3 b/lib/libc/time/strptime.3
index 6f75294370a..1d670523a1d 100644
--- a/lib/libc/time/strptime.3
+++ b/lib/libc/time/strptime.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strptime.3,v 1.28 2019/05/10 12:49:16 schwarze Exp $
+.\" $OpenBSD: strptime.3,v 1.29 2019/05/16 13:35:17 schwarze Exp $
.\"
.\" Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -26,7 +26,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 10 2019 $
+.Dd $Mdocdate: May 16 2019 $
.Dt STRPTIME 3
.Os
.Sh NAME
@@ -65,10 +65,6 @@ replacement required.
There must be whitespace or other
non-alphanumeric characters between any two conversion specifications.
.Pp
-The
-.Dv LC_TIME
-category defines the locale values for the conversion
-specifications.
The following conversion specifications are supported:
.Bl -tag -width "xxxx"
.It Cm \&%a
@@ -250,6 +246,11 @@ A `%' is read.
No argument is converted.
.El
.Pp
+The
+.Ox
+implementation always uses the C locale and ignores the
+global locale and the thread-specific locale.
+.Pp
There is no way to specify whether Daylight Saving Time is in effect when
calling
.Nm .
@@ -303,6 +304,15 @@ The
and
.Ql \&%Z
conversion specifications are extensions.
+.Sh CAVEATS
+On systems other than
+.Ox ,
+the
+.Dv LC_TIME
+.Xr locale 1
+category can cause parsing failures; see CAVEATS in
+.Xr setlocale 3
+for details.
.Sh BUGS
The
.Cm \&%Z