Clarify that strerror() doesn't return EINVAL but stores in errno;

prompted by Thomas Klausner.
This commit is contained in:
kleink 2006-05-22 21:40:33 +00:00
parent 497c1ccc27
commit bf44a81954
1 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: strerror.3,v 1.12 2005/07/29 13:14:49 wiz Exp $
.\" $NetBSD: strerror.3,v 1.13 2006/05/22 21:40:33 kleink Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -32,7 +32,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)strerror.3 8.1 (Berkeley) 6/9/93
.Dd July 28, 2005
.Dd May 22, 2006
.Dt STRERROR 3
.Os
.Sh NAME
@ -99,17 +99,20 @@ a colon and space
.Pq Dq Li ":\ " ;
otherwise, only the error message string is printed.
.Pp
If the error number is not recognized, these functions return an error message
If the error number is not recognized, these functions pass an error message
string containing
.Dq Li "Unknown error:\ "
followed by the error number in decimal.
The
To warn about this,
.Fn strerror
sets
.Dv errno
to
.Er EINVAL,
and
.Fn strerror_r
functions return
.Er EINVAL
as a warning.
returns
.Er EINVAL .
Error numbers recognized by this implementation fall in
the range 0 \*[Lt]
.Fa errnum