summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2011-07-27 22:57:51 +0200
committerSteffen Mueller <smueller@cpan.org>2011-07-27 22:57:51 +0200
commit772f5a1a1edb352c066c952044fe021a848ae23d (patch)
tree49e647b70d81dfd45e810d2f8242ffeae437a27f /dist
parentb21842bdb5588bb8eb651224624910f5b57d694a (diff)
downloadperl-772f5a1a1edb352c066c952044fe021a848ae23d.tar.gz
Fix ExtUtils::ParseXS to work on pre 5.8.9 perls
The tests were failing due to missing PERL_UNUSED_ARG. This is an update to 3.00_05 from CPAN.
Diffstat (limited to 'dist')
-rw-r--r--dist/ExtUtils-ParseXS/Changes5
-rw-r--r--dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm2
-rw-r--r--dist/ExtUtils-ParseXS/t/XSMore.xs16
-rw-r--r--dist/ExtUtils-ParseXS/t/XSUsage.xs14
4 files changed, 36 insertions, 1 deletions
diff --git a/dist/ExtUtils-ParseXS/Changes b/dist/ExtUtils-ParseXS/Changes
index ccb33e6514..e667a2aaf8 100644
--- a/dist/ExtUtils-ParseXS/Changes
+++ b/dist/ExtUtils-ParseXS/Changes
@@ -1,5 +1,10 @@
Revision history for Perl extension ExtUtils::ParseXS.
+3.00_05 - Wed Jul 27 22:54:00 CET 2011
+
+ - Define PERL_UNUSED_ARG for pre-3.8.9 perls.
+ This should fix the tests on those perls.
+
3.00_04 - Wed Jul 27 22:22:00 CET 2011
- Require perl 5.8.1.
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
index 8f5fe4ae9b..8a2658ff23 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
@@ -35,7 +35,7 @@ our @EXPORT_OK = qw(
process_file
report_error_count
);
-our $VERSION = '3.00_04';
+our $VERSION = '3.00_05';
$VERSION = eval $VERSION if $VERSION =~ /_/;
# The scalars in the line below remain as 'our' variables because pulling
diff --git a/dist/ExtUtils-ParseXS/t/XSMore.xs b/dist/ExtUtils-ParseXS/t/XSMore.xs
index d0a1f3cabe..df40186538 100644
--- a/dist/ExtUtils-ParseXS/t/XSMore.xs
+++ b/dist/ExtUtils-ParseXS/t/XSMore.xs
@@ -14,6 +14,22 @@ This parts are ignored.
=cut
+/* Old perls (pre 5.8.9 or so) did not have PERL_UNUSED_ARG in XSUB.h.
+ * This is normally covered by ppport.h. */
+#ifndef PERL_UNUSED_ARG
+# if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
+# include <note.h>
+# define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
+# else
+# define PERL_UNUSED_ARG(x) ((void)x)
+# endif
+#endif
+#ifndef PERL_UNUSED_VAR
+# define PERL_UNUSED_VAR(x) ((void)x)
+#endif
+
+
+
STATIC void
outlist(int* a, int* b){
*a = 'a';
diff --git a/dist/ExtUtils-ParseXS/t/XSUsage.xs b/dist/ExtUtils-ParseXS/t/XSUsage.xs
index 1e59635ee0..9a8d93d42a 100644
--- a/dist/ExtUtils-ParseXS/t/XSUsage.xs
+++ b/dist/ExtUtils-ParseXS/t/XSUsage.xs
@@ -2,6 +2,20 @@
#include "perl.h"
#include "XSUB.h"
+/* Old perls (pre 5.8.9 or so) did not have PERL_UNUSED_ARG in XSUB.h.
+ * This is normally covered by ppport.h. */
+#ifndef PERL_UNUSED_ARG
+# if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
+# include <note.h>
+# define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
+# else
+# define PERL_UNUSED_ARG(x) ((void)x)
+# endif
+#endif
+#ifndef PERL_UNUSED_VAR
+# define PERL_UNUSED_VAR(x) ((void)x)
+#endif
+
int xsusage_one() { return 1; }
int xsusage_two() { return 2; }
int xsusage_three() { return 3; }