svn commit: r188305 - head/lib/libc/stdlib

Giorgos Keramidas keramida at FreeBSD.org
Sun Feb 8 00:26:59 PST 2009


Author: keramida (doc committer)
Date: Sun Feb  8 08:26:58 2009
New Revision: 188305
URL: http://svn.freebsd.org/changeset/base/188305

Log:
  Fix language on atol(3) manpage.  Add a COMPATIBILITY section
  stating that in FreeBSD the atol() and atoll() functions affect
  errno in the same way as strtol() and stroll().
  
  PR:		docs/126487
  Submitted by:	edwin
  Reviewed by:	trhodes, gabor
  MFC after:	1 week

Modified:
  head/lib/libc/stdlib/atol.3

Modified: head/lib/libc/stdlib/atol.3
==============================================================================
--- head/lib/libc/stdlib/atol.3	Sun Feb  8 08:13:36 2009	(r188304)
+++ head/lib/libc/stdlib/atol.3	Sun Feb  8 08:26:58 2009	(r188305)
@@ -32,7 +32,7 @@
 .\"     @(#)atol.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd November 28, 2001
+.Dd February 1, 2009
 .Dt ATOL 3
 .Os
 .Sh NAME
@@ -78,13 +78,42 @@ representation.
 It is equivalent to:
 .Pp
 .Dl "strtoll(nptr, (char **)NULL, 10);"
+.Sh COMPATIBILITY
+The
+.Fx
+implementations of the
+.Fn atol
+and
+.Fn atoll
+functions are thin wrappers around
+.Fn strtol
+and
+.Fn stroll
+respectively, so these functions will affect the value of
+.Va errno
+in the same way that the
+.Fn strtol
+and
+.Fn stroll
+functions are able to.
+This behavior of
+.Fn atol
+and
+.Fn atoll
+is not required by
+.St -isoC
+or
+.St -isoC-c99 ,
+but it is allowed by all of
+.St -isoC , St -isoC-99
+and
+.St -p1003.1-2001 .
 .Sh ERRORS
 The functions
 .Fn atol
 and
 .Fn atoll
-need not
-affect the value of
+may affect the value of
 .Va errno
 on an error.
 .Sh SEE ALSO


More information about the svn-src-all mailing list