Subject: | Does not build with perl5.8.9RC1 (problem with XS macro?) |
XML-Xerces does not build anymore with recent perls, e.g. perl 5.8.9.
The error output when doing make looks like this:
cc -c -I. -IHandler -I/usr/local/include -D_REENTRANT -O
-DVERSION=\"2.7.0-0\" -DXS_VERSION=\"2.7.0-0\" -DPIC -fPIC
"-I/usr/perl5.8.9@RC1/lib/5.8.9/i386-freebsd/CORE" Xerces.cpp
Xerces.cpp:1219: error: expected unqualified-id before string constant
Xerces.cpp:1219: error: expected `,' or `;' before string constant
Xerces.cpp:1220: error: expected init-declarator before '*' token
Xerces.cpp:1220: error: expected `,' or `;' before '*' token
Xerces.cpp:1225: error: `SwigPerlWrapperPtr' does not name a type
It is very probable that the following change in Perl is causing this
failure, and it is also proposing a solution:
[ 31697]
SWIG uses XS() like this (in the perlrun.swg template):
typedef XS(SwigPerlWrapper);
typedef SwigPerlWrapper *SwigPerlWrapperPtr;
This breaks if XS() includes the 'extern "C"' decoration under C++.
The appended patch provides an XSPROTO() macro that could be used
by SWIG instead.
(Patch from Jan Dubois to fix breakage caused by #28734.)
Regards,
Slaven