summaryrefslogtreecommitdiff
path: root/lib/ExtUtils
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-07-08 10:39:50 +0200
committerNicholas Clark <nick@ccl4.org>2013-07-09 07:54:26 +0200
commita76b6481754efe93c8fd83bfbf53f4409c2e6e8d (patch)
tree281f8d68c8db61bcf972cab598acea8ec26e035f /lib/ExtUtils
parent566e3efea3c525320e489c80ef426a6cfc5df4a1 (diff)
downloadperl-a76b6481754efe93c8fd83bfbf53f4409c2e6e8d.tar.gz
Propagate bugfixes from {mini,}perlmain.c into ExtUtils::Embed.
xs_init() must pass a static char* when creating &DynaLoader::boot_DynaLoader (commit 1b77350017006d9e) Avoid linker errors on Win32 by including perlapi.h (via XSUB.h) (commit 3ecadf9633330795) my_perl might be unused (commit 96a5add60f1f39d3)
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r--lib/ExtUtils/Embed.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm
index 758e24139c..8953ce7db3 100644
--- a/lib/ExtUtils/Embed.pm
+++ b/lib/ExtUtils/Embed.pm
@@ -85,6 +85,7 @@ sub xsi_header {
return <<EOF;
#include <EXTERN.h>
#include <perl.h>
+#include <XSUB.h>
EOF
}
@@ -109,8 +110,9 @@ sub xsi_body {
my(@exts) = @_;
my($pname,@retval,%seen);
my($dl) = canon('/','DynaLoader');
- push(@retval, "\tchar *file = __FILE__;\n");
- push(@retval, "\tdXSUB_SYS;\n") if $] > 5.002;
+ push(@retval, "\tstatic const char file[] = __FILE__;\n");
+ push(@retval, "\tdXSUB_SYS;\n");
+ push(@retval, "\tPERL_UNUSED_CONTEXT;\n");
push(@retval, "\n");
foreach $_ (@exts){