From ac1bccf636517190eaf1cc13a79548688a38c6ea Mon Sep 17 00:00:00 2001 From: millert <> Date: Fri, 29 Jun 2007 18:54:37 +0000 Subject: Document behavior when no conversion could be performed. Adapted from FreeBSD. With help from jmc@. --- src/lib/libc/stdlib/strtoul.3 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib/libc/stdlib/strtoul.3') diff --git a/src/lib/libc/stdlib/strtoul.3 b/src/lib/libc/stdlib/strtoul.3 index 4e7fb641bc..30a09aa289 100644 --- a/src/lib/libc/stdlib/strtoul.3 +++ b/src/lib/libc/stdlib/strtoul.3 @@ -29,9 +29,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strtoul.3,v 1.17 2007/05/31 19:19:32 jmc Exp $ +.\" $OpenBSD: strtoul.3,v 1.18 2007/06/29 18:54:37 millert Exp $ .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: June 29 2007 $ .Dt STRTOUL 3 .Os .Sh NAME @@ -175,6 +175,12 @@ and the global variable .Va errno is set to .Er ERANGE . +If no conversion could be performed, 0 is returned; +the global variable +.Va errno +is also set to +.Er EINVAL, +though this is not portable across all platforms. .Pp There is no way to determine if .Fn strtoul -- cgit v1.2.3-55-g6feb