This is a discussion on Re: ECPG/OpenBSD buildfarm failures, take I within the pgsql Hackers forums, part of the PostgreSQL category; --> Michael Meskes wrote: > It seems ECPG regression tests trigger a bug in OpenBSD libc. Please try > the ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Michael Meskes wrote: > It seems ECPG regression tests trigger a bug in OpenBSD libc. Please try > the attached test case. I should give ERANGE as error, but on OpenBSD > errno is set to 0. > > I tried this test case on Linux, where it works, and OpenBSD 3.8 and 4.0 > (that is HEAD). On both these systems it doesn't. Now the question is > what do we do? a bit of testing shows that at least FreeBSD 4.10 behaves similiar to OpenBSD/i386 and I found the following discussion too: http://docs.freebsd.org/cgi/getmsg.c...ebsd-standards that hints that setting ERANGE on an underflow (vs an overflow) is implementation specific though I ws unable to verify that this is indeed the case ... Stefan ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| ||||
| Michael Fuhr <mike@fuhr.org> writes: > 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." The Single Unix Spec also makes it clear that ERANGE on underflow is not optional: http://www.opengroup.org/onlinepubs/...sh/strtod.html I think there is no question that OpenBSD is broken. The question for us is whether we should expend effort to work around that. We already have a "small-is-zero" workaround comparison file in the main regression tests, so my thought is that ecpg should probably do likewise ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |