[ 
https://issues.apache.org/jira/browse/XALANC-661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12533075
 ] 

Bernd Ernesti commented on XALANC-661:
--------------------------------------

I found the following url: 
http://www-1.ibm.com/support/docview.wss?uid=swg1IY70427
So this kind of change was introduced with a patch for xlC 7.0 or within xlC 
8.0.

There are two ways to solve this issue, both needs a change in 
src/xalanc/PlatformSupport/DoubleSupport.hpp

1. Add '#include <cstdlib>' before '#include <cmath>'
2. Or move the '#include <cmath>' after '#include 
<xalanc/XalanDOM/XalanDOMString.hpp>'

This needs to be tested on other OS and compilers. Maybe solution 1 looks 
better.
There maybe another way to fix it, by defining __ABS_LONG__ but I haven't done 
any tests here.


> PlatformSupport/DoubleSupport.cpp compile error on AIX 5.3
> ----------------------------------------------------------
>
>                 Key: XALANC-661
>                 URL: https://issues.apache.org/jira/browse/XALANC-661
>             Project: XalanC
>          Issue Type: Bug
>          Components: XalanC
>    Affects Versions: 1.10
>         Environment: AIX 5.3
> xlC (Compiler) 9.0
> xerces 2.7.0
>            Reporter: Bernd Ernesti
>            Priority: Blocker
>
> xlC_r -I/tmp/xerces/include -O -DNDEBUG -qthreaded -DAIX -D_THREAD_SAFE 
> -DXALAN_INMEM_MSG_LOADER -c -I/xml-xalan/c/src -I/xml-xalan/c/include 
> -I../../nls/include -I/tmp/xerces/include/xercesc -I/tmp/xerces/include/  -o 
> ../../obj/DoubleSupport.o 
> /xml-xalan/c/src/xalanc/PlatformSupport/DoubleSupport.cpp
> "/usr/vacpp/include/cstdlib", line 72.15: 1540-0403 (S) "abs(long)" is 
> already defined.
> "/usr/vacpp/include/stdlib.h", line 146.32: 1540-0425 (I) "abs" is defined on 
> line 146 of "/usr/vacpp/include/stdlib.h".
> "/usr/vacpp/include/stdlib.h", line 38.32: 1540-0424 (I) "abs" is declared on 
> line 38 of "/usr/vacpp/include/stdlib.h".
> gmake[1]: *** [../../obj/DoubleSupport.o] Error 1
> gmake[1]: Leaving directory `/xml-xalan/c/src/xalanc'
> gmake: *** [all] Error 2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to