[postgis-devel] [postgis-tickets] r14592 - Patch from Sebastiaan Couwenberg to fix test_wkb_out_point failure on hppa & mips.
Greg Troxel
gdt at ir.bbn.com
Tue Jan 12 16:43:41 PST 2016
Regina Obe <lr at pcorp.us> writes:
> Author: robe
> Date: 2016-01-12 16:36:35 -0800 (Tue, 12 Jan 2016)
> New Revision: 14592
>
> Modified:
> branches/2.2/liblwgeom/cunit/cu_out_wkb.c
> Log:
> Patch from Sebastiaan Couwenberg to fix test_wkb_out_point failure on hppa & mips.
> references #3426
I'm a little surprised at changes going onto the release branch without
first being on trunk and having review and then getting cherrypicked
onto the release branch.
> +/* parisc and mips (at least some processors) have a different nan representation from other arches. */
> +#if !defined(__hppa__) && !defined(__mips__)
> +# define nan_val( v1, v2) v1
> +#else
> +# define nan_val( v1, v2) v2
> +#endif
This seems quite awkward. It would seem the tests should be grounded in
the standards (presumably postgis requires IEEE754 to start and doesn't
work on the vax :-). Isn't there some way to start with a nan expressed
as a double, and then to convert that to a sql representation? Or to
write an "isnan_wkb" function that takes the string/hex representation,
extracts a double, and then uses the C99-specified isnan(3) procedures.
Encoding of IEEE754 values into hex and having them in the tests seems
nonrobust, and it seems extra fragile to have switches by arch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 180 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20160112/8b59b813/attachment.sig>
More information about the postgis-devel
mailing list