libxml2 2.9.8 build error on AIX, HP-UX and old Visual Studio like 10.0
Fabrice Manfroi <[email protected]>
| Newsgroups | gmane.comp.gnome.lib.xml.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm trying to build the last libxml2 2.9.8 on AIX, HP-UX and Visual
Studio 10.0 ans I get the same kind of errors:
VS 2010:
..\xpath.c(506) : error C2099: initializer is not a constant
..\xpath.c(507) : error C2099: initializer is not a constant
..\xpath.c(508) : error C2099: initializer is not a constant
and the same kind of error at the same lines on AIX 7.1 with xlc and
HP-UX Itanium 11.23 (same issue for HP-UX PA-RISC 11.31 with natif cc or
gcc).
If I have a look into the math.h header on AIX, I see the following
definition for NAN:
{code}
static const unsigned int _SQNAN = 0x7fc00000;
#define NAN (*((float *)(&_SQNAN)))
{code}
Indeed, it's not a constant. The compilation error make sense...
If I replace in xpace.c "double xmlXPathNAN = NAN;" by "double
xmlXPathNAN = (float)0x7fc00000;" it works.
And it's the same kind of issue for VS 2010 and HP-UX: NAN and INFINITY
are not defined as a constant.
So, the question is, how to fix that in order to have all platforms
working? I need some advises.
Thanks in advance.
Best Regards.
--
Fabrice MANFROI
--
Four J's Development Tools (www.4js.com)
[email protected] - Tel +33 (0)3 88 18 61 20 - Fax +33 (0)3 88 18 61 21
--
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEN/8PtIXzupd0JYyj3QvSp+LucZMFAlqqiFIACgkQ3QvSp+Lu cZOfdwf+II1cuCG9Rt+jhxlEIFDzhjoBWmL/KudYI8qwUfYpreM88e2eSLcyBchI BijxVWOjDcTUE8N9gwUK+Ff/eGiWEfHbgzTopoEwpItggPauVr02lUFWpuy52ByP JdNwF4msxyLI8xi1Rh2O1sB6QsSt7JLuxO5XPI8UBNLfsbDPR00XMsQhvg7uUNtB ZXMZETrs81Q0mlzidCzQC51FenRLF0z6+jOyz4mY2JYBq3QmG5AKEXGVSK8cDV0h coXZL/d7FuuI4T736nn/2onbekwsgtpzccHbgVzsvMXD/sSw1VjUJSqFFq3mijLO 6hSTh8rgtYxLgMhh+a+irowexA3NMg== =ZsKV -----END PGP SIGNATURE-----