[xml] libxml2 2.9.8 build error on AIX, HP-UX and old Visual Studio like 10.0



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)
fm 4js com - Tel +33 (0)3 88 18 61 20 - Fax +33 (0)3 88 18 61 21
--

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]