Hi, buildfarm member "pika" fails the NaN test. Does FreeBSD/MIPS really return true for isinf(NaN)? Anyway, the attached patch tries to fix the test case by testing isnan() first and doesn't check isinf() if isnan() returned true.
Best regards, Zoltán Böszörményi -- Bible has answers for everything. Proof: "But let your communication be, Yea, yea; Nay, nay: for whatsoever is more than these cometh of evil." (Matthew 5:37) - basics of digital technology. "May your kingdom come" - superficial description of plate tectonics ---------------------------------- Zoltán Böszörményi Cybertec Schönig & Schönig GmbH http://www.postgresql.at/
diff -durpN pgsql.orig/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c pgsql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c --- pgsql.orig/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c 2010-02-09 11:43:57.000000000 +0100 +++ pgsql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c 2010-02-16 12:10:55.000000000 +0100 @@ -104,10 +104,10 @@ if (sqlca.sqlcode < 0) sqlprint ( );} if (sqlca.sqlcode) break; - if (isinf(d)) - printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val); if (isnan(d)) printf("%d NaN '%s'\n", id, val); + else if (isinf(d)) + printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest1 ( id , d ) values ( $1 + 3 , $2 )", ECPGt_int,&(id),(long)1,(long)1,sizeof(int), diff -durpN pgsql.orig/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc pgsql/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc --- pgsql.orig/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc 2010-02-09 11:43:57.000000000 +0100 +++ pgsql/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc 2010-02-16 12:04:59.000000000 +0100 @@ -37,10 +37,10 @@ main(void) exec sql fetch from cur into :id, :d, :val; if (sqlca.sqlcode) break; - if (isinf(d)) - printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val); if (isnan(d)) printf("%d NaN '%s'\n", id, val); + else if (isinf(d)) + printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val); exec sql insert into nantest1 (id, d) values (:id + 3, :d); exec sql insert into nantest1 (id, d) values (:id + 6, :val);
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers