From edwin@mavetju.org  Wed Aug 13 01:07:44 2008
Return-Path: <edwin@mavetju.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A3701065672
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 13 Aug 2008 01:07:44 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78])
	by mx1.freebsd.org (Postfix) with ESMTP id 228558FC2D
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 13 Aug 2008 01:07:43 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: by mail5out.barnet.com.au (Postfix, from userid 1001)
	id AD6862218A62; Wed, 13 Aug 2008 11:07:42 +1000 (EST)
Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK))
	by mail5.barnet.com.au (Postfix) with ESMTP id 4A3FE21B4B84
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 13 Aug 2008 11:07:42 +1000 (EST)
Received: from k7.mavetju (ppp121-44-60-242.lns10.syd7.internode.on.net [121.44.60.242])
	by mail5auth.barnet.com.au (Postfix) with ESMTP id 6E3082218A25
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 13 Aug 2008 11:07:41 +1000 (EST)
Received: by k7.mavetju (Postfix, from userid 1001)
	id D5860791; Wed, 13 Aug 2008 11:06:47 +1000 (EST)
Message-Id: <20080813010647.D5860791@k7.mavetju>
Date: Wed, 13 Aug 2008 11:06:47 +1000 (EST)
From: Edwin Groothuis <edwin@mavetju.org>
Reply-To: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: fix language on atol(3) manpage
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         126487
>Category:       docs
>Synopsis:       fix language on atol(3) manpage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    keramida
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 13 01:10:01 UTC 2008
>Closed-Date:    Tue Feb 15 07:05:33 UTC 2011
>Last-Modified:  Tue Feb 15 07:05:33 UTC 2011
>Originator:     Edwin Groothuis
>Release:        FreeBSD 7.0-RELEASE-p1 i386
>Organization:
>Environment:

System: FreeBSD k7.mavetju 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #2: \
Wed May 28 08:12:56 EST 2008 edwin@k7.mavetju:/usr/src/sys/i386/compile/k7 i386

>Description:

Man page now says:

  ERRORS
       The functions atol() and atoll() need not affect the value
       of errno on an error.

That line doesn't make sense, it should be replaced with:

  ERRORS
       The functions atol() and atoll() do not affect the value
       of errno on an error.

or

  ERRORS
       The functions atol() and atoll() do not affect the value
       of errno in case of an error.

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:

From: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: docs/126487: fix language on atol(3) manpage
Date: Wed, 13 Aug 2008 15:46:06 +1000

After discussions with bjk on #bsddocs:

If, for some reason, it *might* change it, then it should read:

  ERRORS
       The functions atol() and atoll() might affect the value of
       errno in case of an error.

From: newsonia <newsonia@163.com>
To: "Edwin Groothuis" <edwin@mavetju.org>
Cc: FreeBSD-gnats-submit <FreeBSD-gnats-submit@FreeBSD.org>
Subject: Re:docs/126487: fix language on atol(3) manpage
Date: Thu, 14 Aug 2008 20:36:14 +0800 (CST)

 You should change ports packet or upate your Ports

Responsible-Changed-From-To: freebsd-doc->keramida 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Tue Jan 27 00:05:37 UTC 2009 
Responsible-Changed-Why:  
I'll handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126487 

From: Giorgos Keramidas <keramida@freebsd.org>
To: Edwin Groothuis <edwin@mavetju.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/126487: fix language on atol(3) manpage
Date: Sun, 01 Feb 2009 08:21:15 +0200

 On Wed, 13 Aug 2008 11:06:47 +1000 (EST), Edwin Groothuis <edwin@mavetju.org> wrote:
 > After discussions with bjk on #bsddocs:
 >
 > If, for some reason, it *might* change it, then it should read:
 >
 >   ERRORS
 >        The functions atol() and atoll() might affect the value of
 >        errno in case of an error.
 
 Hi Edwin,
 
 AFAICT, our atol() and atoll() functions are just thin wrappers around
 strtol() and strtoll() respectively.
 
 Does the following look 'ok' as a change that clarifies what the
 standards say about atol/atoll and what our own version does?
 
 %%%
 diff -r d060dd4c20d0 lib/libc/stdlib/atol.3
 --- a/lib/libc/stdlib/atol.3	Sat Jan 31 10:27:14 2009 +0200
 +++ b/lib/libc/stdlib/atol.3	Sun Feb 01 08:20:47 2009 +0200
 @@ -78,13 +78,41 @@
  It is equivalent to:
  .Pp
  .Dl "strtoll(nptr, (char **)NULL, 10);"
 +.Sh COMPATIBILITY
 +The
 +.Fx implementation of the
 +.Fn atol
 +and
 +.Fn atoll
 +functions is a thin wrapper around
 +.Fn strtol
 +and
 +.Fn stroll
 +respectively, so these functions may affect the value of
 +.Va errno
 +in the same ways that
 +.Fn strtol
 +and
 +.Fn stroll
 +is permitted to change it.
 +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
 %%%
 
State-Changed-From-To: open->patched 
State-Changed-By: keramida 
State-Changed-When: Sun Feb 8 08:27:08 UTC 2009 
State-Changed-Why:  
Fixed by change 188305 in /head. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126487 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/126487: commit references a PR
Date: Sun,  8 Feb 2009 08:27:13 +0000 (UTC)

 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
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: keramida 
State-Changed-When: Tue Feb 15 07:05:18 UTC 2011 
State-Changed-Why:  
Fixed in stable/7 and stable/8 too now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126487 
>Unformatted:
