From: Nicholas Clark Date: Fri, 20 May 2005 21:46:26 +0000 (+0000) Subject: Need to make PERL_UNUSED_DECL conditional as xlc on AIX doesn't like X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=62093c1c517a0f69ccb4c04109c4e03e3036523d;p=p5sagit%2Fp5-mst-13.2.git Need to make PERL_UNUSED_DECL conditional as xlc on AIX doesn't like it being redefined. p4raw-id: //depot/perl@24519 --- diff --git a/ext/Devel/PPPort/PPPort.pm b/ext/Devel/PPPort/PPPort.pm index da91556..8aebac5 100644 --- a/ext/Devel/PPPort/PPPort.pm +++ b/ext/Devel/PPPort/PPPort.pm @@ -3951,14 +3951,16 @@ __DATA__ /* Replace: 0 */ #endif -#ifdef HASATTRIBUTE -# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) -# define PERL_UNUSED_DECL +#ifndef PERL_UNUSED_DECL +# ifdef HASATTRIBUTE +# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) +# define PERL_UNUSED_DECL +# else +# define PERL_UNUSED_DECL __attribute__((unused)) +# endif # else -# define PERL_UNUSED_DECL __attribute__((unused)) +# define PERL_UNUSED_DECL # endif -#else -# define PERL_UNUSED_DECL #endif #ifndef NOOP # define NOOP (void)0 diff --git a/ext/Devel/PPPort/parts/inc/misc b/ext/Devel/PPPort/parts/inc/misc index 0df0528..84c0511 100644 --- a/ext/Devel/PPPort/parts/inc/misc +++ b/ext/Devel/PPPort/parts/inc/misc @@ -73,14 +73,16 @@ STMT_END /* Replace: 0 */ #endif -#ifdef HASATTRIBUTE -# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) -# define PERL_UNUSED_DECL +#ifndef PERL_UNUSED_DECL +# ifdef HASATTRIBUTE +# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) +# define PERL_UNUSED_DECL +# else +# define PERL_UNUSED_DECL __attribute__((unused)) +# endif # else -# define PERL_UNUSED_DECL __attribute__((unused)) +# define PERL_UNUSED_DECL # endif -#else -# define PERL_UNUSED_DECL #endif __UNDEFINED__ NOOP (void)0