summaryrefslogtreecommitdiff
path: root/dist/XSLoader
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2014-10-30 14:34:39 +0100
committerBrian Fraser <fraserbn@gmail.com>2014-10-31 13:40:23 +0100
commit4821216b2814930e7d3a44653772d5e68220b3cc (patch)
treec4e0711b0ec848f41732d8323c68c240e0a5fd92 /dist/XSLoader
parenta7ea4c68ecf61b7634f2df7a4fcaf47e291b0465 (diff)
downloadperl-4821216b2814930e7d3a44653772d5e68220b3cc.tar.gz
XSLoader: Amend the mod2fname generation to detect more cases
Diffstat (limited to 'dist/XSLoader')
-rw-r--r--dist/XSLoader/XSLoader_pm.PL7
1 files changed, 5 insertions, 2 deletions
diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL
index 893846acc2..7a8a6381e9 100644
--- a/dist/XSLoader/XSLoader_pm.PL
+++ b/dist/XSLoader/XSLoader_pm.PL
@@ -68,11 +68,14 @@ sub load {
EOT
-print OUT <<'EOT' if defined &DynaLoader::mod2fname;
+# defined &DynaLoader::mod2fname catches most cases, except when
+# cross-compiling to a system that defines mod2fname. Using
+# $Config{d_libname_unique} is a best attempt at catching those cases.
+print OUT <<'EOT' if defined &DynaLoader::mod2fname || $Config{d_libname_unique};
# Some systems have restrictions on files names for DLL's etc.
# mod2fname returns appropriate file base name (typically truncated)
# It may also edit @modparts if required.
- $modfname = &mod2fname(\@modparts) if defined &mod2fname;
+ $modfname = &DynaLoader::mod2fname(\@modparts) if defined &DynaLoader::mod2fname;
EOT