summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-10-23 10:16:21 +0000
committertjr <tjr@FreeBSD.org>2002-10-23 10:16:21 +0000
commit77d4d24de82f01ae296c40de72da7f7481a85574 (patch)
tree11c4d5b8eb0ed4eaf0cef00c44831cf4449907f2 /lib/libc
parenteda1974761b960cf014c2177bbbfb77df3bfd1c0 (diff)
downloadFreeBSD-src-77d4d24de82f01ae296c40de72da7f7481a85574.zip
FreeBSD-src-77d4d24de82f01ae296c40de72da7f7481a85574.tar.gz
Add a Standards section, claiming conformance to IEEE Std. 1003.1-2001.
Also add a note to the Bugs section pointing out that strerror() and perror() share the same static buffer.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/strerror.318
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3
index 3e75cb1..eeb9f1e 100644
--- a/lib/libc/string/strerror.3
+++ b/lib/libc/string/strerror.3
@@ -36,7 +36,7 @@
.\" @(#)strerror.3 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
-.Dd November 26, 2001
+.Dd October 22, 2002
.Dt STRERROR 3
.Os
.Sh NAME
@@ -150,6 +150,14 @@ should be used instead.
.Sh SEE ALSO
.Xr intro 2 ,
.Xr psignal 3
+.Sh STANDARDS
+The
+.Fn perror ,
+.Fn strerror
+and
+.Fn strerror_r
+functions conform to
+.St -p1003.1-2001 .
.Sh HISTORY
The
.Fn strerror
@@ -169,6 +177,14 @@ For unknown error numbers, the
function will return its result in a static buffer which
may be overwritten by subsequent calls.
.Pp
+The
+.Fn perror
+function is implemented in terms of
+.Fn strerror ,
+hence it uses the same static buffer.
+This behaviour is forbidden by
+.St -isoC-99 .
+.Pp
Programs that use the deprecated
.Va sys_errlist
variable often fail to compile because they declare it
OpenPOWER on IntegriCloud