Fixes for longdouble perl builds
Mostly test fixes, but the Pg 'timestamp' type did have a small conversion bug.
This commit is contained in:
parent
8dca0a22a9
commit
de36b90cde
4 changed files with 8 additions and 5 deletions
|
|
@ -55,7 +55,7 @@ typedef struct {
|
|||
if (SvIOK(val)) iv = SvIV(val); \
|
||||
else if (SvNOK(val)) { \
|
||||
NV nv = SvNV(val); \
|
||||
if (nv < IV_MIN || nv > IV_MAX || fabs(nv - floor(nv)) > 0.0000000001) SERR("expected integer");\
|
||||
if (nv < IV_MIN || nv > IV_MAX || fabs((double)(nv - floor(nv))) > 0.0000000001) SERR("expected integer");\
|
||||
iv = SvIV(val); \
|
||||
} else if (SvPOK(val)) {\
|
||||
STRLEN sl; \
|
||||
|
|
@ -503,7 +503,7 @@ SENDFN(uuid) {
|
|||
RECVFN(timestamp) {
|
||||
RLEN(8);
|
||||
IV ts = fu_frombeI(64, buf);
|
||||
return newSVnv(((double)ts / 1000000) + UNIX_PG_EPOCH);
|
||||
return newSVnv(((NV)ts / 1000000) + UNIX_PG_EPOCH);
|
||||
}
|
||||
|
||||
SENDFN(timestamp) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue