From owner-freebsd-bugs Thu Nov 8 9:30: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AA25637B425 for ; Thu, 8 Nov 2001 09:30:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fA8HU2433530; Thu, 8 Nov 2001 09:30:02 -0800 (PST) (envelope-from gnats) Date: Thu, 8 Nov 2001 09:30:02 -0800 (PST) Message-Id: <200111081730.fA8HU2433530@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: misc/31820: strdod(3): HUGE_VAL expected in , but is in Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/31820; it has been noted by GNATS. From: Bruce Evans To: "Ralf S. Engelschall" Cc: Subject: Re: misc/31820: strdod(3): HUGE_VAL expected in , but is in Date: Fri, 9 Nov 2001 04:18:53 +1100 (EST) On Wed, 7 Nov 2001, Ralf S. Engelschall wrote: > >Description: > > The manpage of strtod(3) correctly (according to SUSv2) says: > > [...] > SYNOPSIS > #include > double strtod(const char *nptr, char **endptr); > [...] > RETURN VALUES > [...] > If the correct value would cause overflow, plus or minus HUGE_VAL is > returned [...] This seems to be just a bug in SUSv2. The FreeBSD man page just doesn't mention _all_ the headers that may be needed for _all_ uses of the function. Doing so is very unusual for section [2-3] man pages, since few or none of the synopses mention but most of the functions can set errno. > >Fix: > > I don't know what the best fix for this is. Fact is that SUSv2 says > is enough. I don't know whether we nevertheless say "include > also " in our FreeBSD version of strtod(3) or whether we hack > our includes so math.h's HUGE_VAL is available through stdlib.h, too. > Someone else has to decide on a correct solution. It certainly is not > a major problem, but a little bit nasty because at least our strtod(3) > does not reflect the FreeBSD reality. The C standard doesn't cross-reference either or in its specification of strtod(). IMO, man pages need such cross-references considerably less than paper standards, since they can be grepped. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message