From owner-freebsd-bugs Wed Nov 7 5: 0:45 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 0CC8037B41C for ; Wed, 7 Nov 2001 05:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fA7D01Q66457; Wed, 7 Nov 2001 05:00:01 -0800 (PST) (envelope-from gnats) Received: from visp.engelschall.com (en4.engelschall.com [62.208.181.48]) by hub.freebsd.org (Postfix) with ESMTP id 512FC37B418 for ; Wed, 7 Nov 2001 04:51:37 -0800 (PST) Received: by visp.engelschall.com (Postfix, from userid 1005) id 8E3584CE80D; Wed, 7 Nov 2001 13:51:35 +0100 (CET) Received: by en1.engelschall.com (Sendmail 8.11.0+) id fA7Cp6839790; Wed, 7 Nov 2001 13:51:06 +0100 (CET) Message-Id: <200111071251.fA7Cp6839790@en1.engelschall.com> Date: Wed, 7 Nov 2001 13:51:06 +0100 (CET) From: "Ralf S. Engelschall" Reply-To: "Ralf S. Engelschall" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: misc/31820: strdod(3): HUGE_VAL expected in , but is in 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 >Number: 31820 >Category: misc >Synopsis: strdod(3): HUGE_VAL expected in , but is in >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Nov 07 05:00:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Ralf S. Engelschall >Release: FreeBSD 4.4-STABLE i386 >Organization: Engelschall, Germany. >Environment: System: FreeBSD en1.engelschall.com 4.4-STABLE FreeBSD 4.4-STABLE #0: Sun Oct 28 17:45:23 CET 2001 root@en1.engelschall.com:/v/dsk/0/g/src/sys/compile/EN1 i386 >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 [...] Unfortunately just including is not sufficient to get the definition of HUGE_VAL, because it is defined in our . We follow closely SUSv2 here, so saying that the user should also include is more than what the standard dictates. OTOH always including from is also not reasonable, of course. >How-To-Repeat: #include #ifndef HUGE_VAL #error "strtod(3) says it should be defined now" #endif >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. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message