1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Insert a hack into get_float8_nan (both core and ecpg copies) to deal with

the fact that NetBSD/mips is currently broken, as per buildfarm member pika.

Also add regression tests to ensure that get_float8_nan and get_float4_nan
are exercised even on platforms where they are not needed by
float8in/float4in.

Zoltán Böszörményi and Tom Lane
This commit is contained in:
Tom Lane
2010-02-27 21:53:21 +00:00
parent bf379837dc
commit 4d17a2146c
10 changed files with 45 additions and 5 deletions

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.165 2010/02/08 20:39:51 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.166 2010/02/27 21:53:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -130,7 +130,8 @@ get_float4_infinity(void)
double
get_float8_nan(void)
{
#ifdef NAN
/* (double) NAN doesn't work on some NetBSD/MIPS releases */
#if defined(NAN) && !(defined(__NetBSD__) && defined(__mips__))
/* C99 standard way */
return (double) NAN;
#else