summaryrefslogtreecommitdiff
path: root/ext/Storable
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-20 22:30:16 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-20 22:30:16 +0000
commitaec614a53fcaa2a63038ec4dcf0fcd1cda92fd31 (patch)
tree9a4a347ff6f70319c70dd2a7404fc56bde9a759a /ext/Storable
parentab9184c907a73e26d04db8741a60e1abb3ead566 (diff)
downloadperl-aec614a53fcaa2a63038ec4dcf0fcd1cda92fd31.tar.gz
Update XS code to declare PERL_UNUSED_DECL conditionally
p4raw-id: //depot/perl@24521
Diffstat (limited to 'ext/Storable')
-rw-r--r--ext/Storable/Storable.xs15
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index 628dd0a106..87f94e1aaa 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -86,14 +86,17 @@ typedef double NV; /* Older perls lack the NV type */
#endif
#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