From: Merijn Broeren Date: Wed, 15 Feb 2006 13:51:49 +0000 (+0100) Subject: Problem compiling swigged c++ code with 5.8.8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=34659ad42c4b407f5dceb74f4005f299acd3ba46;p=p5sagit%2Fp5-mst-13.2.git Problem compiling swigged c++ code with 5.8.8 Message-ID: <20060215125148.GA12535@brugman.iloquent.nl> p4raw-id: //depot/perl@27203 --- diff --git a/XSUB.h b/XSUB.h index b7df5e2..9d4aae6 100644 --- a/XSUB.h +++ b/XSUB.h @@ -104,7 +104,7 @@ is a lexical $_ in scope. # define XS(name) EXPORT_C void name(pTHX_ CV* cv) #endif #ifndef XS -# ifdef HASATTRIBUTE_UNUSED +# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) # define XS(name) void name(pTHX_ CV* cv __attribute__unused__) # else # define XS(name) void name(pTHX_ CV* cv) diff --git a/perl.h b/perl.h index dccbf01..6f9f966 100644 --- a/perl.h +++ b/perl.h @@ -211,7 +211,7 @@ #endif #ifndef PERL_UNUSED_DECL -# ifdef HASATTRIBUTE_UNUSED +# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) # define PERL_UNUSED_DECL __attribute__unused__ # else # define PERL_UNUSED_DECL