Comment #9 on issue 75 by
rockdrea...@gmail.com: Has anyone ever tried to
Ok, I managed to compile cleanly using xlC 12.1 on aix 5.3
It's necessary to provide the following argument in the configure directive
in order to compile cleanly
./configure CXXFLAGS=-D__IBMCPP_TR1__
I am also submitting a series of patches based on ctemplate 2.2 that
allowed me to compile cleanly.
* alignment-on-xlc uses the enhanced gcc compatibility in xlC 12.1 to
compile. It won't work with older versions of the compiler. I tried to
compile with xlC 11.1 using the IBM-specific __align and __alignof__
variants but the compiler barfed badly, so I'm keeping it valid on xlC
>=12.1
* bswap32 must leak outside the header it's defined in, I've kept this
behaviour xlc-specific
* operator new in xlC requires a non-const size_t parameter, this is
specific to arena*
* htmlparser statemachine.h uses C++-isms but it must be C-compatible. I've
made the static inline functions in statemachine.h dependend on
__cplusplus. One function that is necessary has been turned into a normal
function. Not sure if this has a serious impact on performance...
* the rest is small stuff: removing C++ // style comments from C sources,
providing return values even in places where it's not necessary etc
Please apply these patches :)
BTW: I'm having a hard time testing because of the aix 5.3 toolchain's
limitations.
Let me know if you have questions, comments, flames etc.
Attachments:
alignment-on-xlc.diff 618 bytes
htmlparser_cpp_test_warnings-on-xlc.diff 656 bytes
leak-bswap32-on-xlc.diff 530 bytes
operator-new-size-argument-on-xlc.diff 2.5 KB
statemachine_test-c-compatibility-on-xlc.diff 464 bytes
statemachine-c-compatibility-on-xlc.diff 1.6 KB