diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-20 22:30:16 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-20 22:30:16 +0000 |
commit | aec614a53fcaa2a63038ec4dcf0fcd1cda92fd31 (patch) | |
tree | 9a4a347ff6f70319c70dd2a7404fc56bde9a759a /ext/List/Util | |
parent | ab9184c907a73e26d04db8741a60e1abb3ead566 (diff) | |
download | perl-aec614a53fcaa2a63038ec4dcf0fcd1cda92fd31.tar.gz |
Update XS code to declare PERL_UNUSED_DECL conditionally
p4raw-id: //depot/perl@24521
Diffstat (limited to 'ext/List/Util')
-rw-r--r-- | ext/List/Util/Util.xs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs index 45aa92d62e..0c6a14dd8e 100644 --- a/ext/List/Util/Util.xs +++ b/ext/List/Util/Util.xs @@ -107,14 +107,16 @@ sv_tainted(SV *sv) # define SvUV_set(sv, val) (((XPVUV*)SvANY(sv))->xuv_uv = (val)) #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 dNOOP |