Re: ECPG/OpenBSD buildfarm failures, take I

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Michael Meskes <meskes(at)postgresql(dot)org>, PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ECPG/OpenBSD buildfarm failures, take I
Date: 2006-09-06 22:22:15
Message-ID: 20060906222215.GA29028@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 06, 2006 at 11:20:12PM +0200, Martijn van Oosterhout wrote:
> Odd, according to these references:
>
> http://www.csse.uwa.edu.au/programming/ansic-library.html#stdlib
> http://cplus.kompf.de/cliblist.html
> http://docs.hp.com/en/B9106-90010/strtod.3C.html
>
> returning ERANGE on underflow was in the ANSI C standard.
>
> Can't find the text itself though,

In Plauger's _The Standard C Library_ (1992) on p 335 is an excerpt
from the standard (I think). At the end of a section entitled
"7.10.1.4 The strtod function" is the following: "If the correct
value would cause underflow, zero is returned and the value of the
macro ERANGE is stored in errno." I don't know how much weight a
reference that old still has, but it does show that ERANGE on
underflow has been defined for a long time.

The Open Group Base Specifications Issue 6 (2004) also documents
ERANGE on underflow: "If the correct value would cause an underflow,
a value whose magnitude is no greater than the smallest normalized
positive number in the return type shall be returned and errno set
to [ERANGE]." I'd post the link but they want people to register
to read the specification; you can get there from here:

http://www.opengroup.org/online-pubs-short?DOC=9699959299&FORM=HTML

--
Michael Fuhr

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2006-09-06 22:22:45 Re: Problems with extended-Query logging code
Previous Message Tom Lane 2006-09-06 22:17:45 Re: Problems with extended-Query logging code