This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
static and dllexport don't belong together on cygwin
authorTony Cook <tony@develop-help.com>
Thu, 1 Dec 2011 08:00:53 +0000 (19:00 +1100)
committerTony Cook <tony@develop-help.com>
Thu, 1 Dec 2011 08:18:22 +0000 (19:18 +1100)
This was causing build errors like:

Cwd.c:553:1: error: external linkage required for symbol ‘XS_Cwd_getcwd’ because of ‘dllexport’ attribute

XSUB.h

diff --git a/XSUB.h b/XSUB.h
index 61d0ef2..4e439f1 100644 (file)
--- a/XSUB.h
+++ b/XSUB.h
@@ -130,7 +130,7 @@ is a lexical $_ in scope.
 #undef XS_INTERNAL
 #if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
 #  define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
-#  define XS_INTERNAL(name) __declspec(dllexport) STATIC XSPROTO(name)
+#  define XS_INTERNAL(name) STATIC XSPROTO(name)
 #endif
 #if defined(__SYMBIAN32__)
 #  define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)