summaryrefslogtreecommitdiff
path: root/lang/perl5/patches/patch-aq
blob: 2a48d25c28c968c1a0df8b74666abcdbdf29a6bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-aq,v 1.2 2008/10/10 21:58:43 he Exp $

--- XSUB.h.orig	2007-12-18 11:47:07.000000000 +0100
+++ XSUB.h
@@ -93,6 +93,9 @@ is a lexical $_ in scope.
 #ifndef PERL_UNUSED_VAR
 #  define PERL_UNUSED_VAR(x) ((void)x)
 #endif
+#ifndef PERL_UNUSED_DECL
+#  define PERL_UNUSED_DECL
+#endif
 
 #define ST(off) PL_stack_base[ax + (off)]
 
@@ -116,15 +119,7 @@ is a lexical $_ in scope.
 #  define XS(name) EXPORT_C XSPROTO(name)
 #endif
 #ifndef XS
-#  if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
-#    define XS(name) void name(pTHX_ CV* cv __attribute__unused__)
-#  else
-#    ifdef __cplusplus
-#      define XS(name) extern "C" XSPROTO(name)
-#    else
-#      define XS(name) XSPROTO(name)
-#    endif
-#  endif
+#  define XS(name) void name(pTHX_ CV* cv PERL_UNUSED_DECL)
 #endif
 
 #define dAX const I32 ax = (I32)(MARK - PL_stack_base + 1)