diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2015-10-31 06:53:54 -0400 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-11-03 08:58:18 +1100 |
commit | f24427ccd6154b1ab883b98e12381d005b311cb4 (patch) | |
tree | 6c4c7904eaa5ee32a1f172cb0c3359761a05035b /ext/DynaLoader | |
parent | 73103bd71331afc1a8e2fcbb0b7a406151e835fd (diff) | |
download | perl-f24427ccd6154b1ab883b98e12381d005b311cb4.tar.gz |
remove XSLoader and DynaLoader OS specific code on NA OSes
@dl_resolve_using is only used on dld/freemint, and HPUX shlib loader OSes.
Dont create the array and glob on OSes where @dl_resolve_using is ignored.
sub dl_undef_symbols is only implmented on dld and freemint (freemint is
dld under a different name), otherwise it always returns empty list. Dont
call the sub on OSes where we knows it's constant retval. Saves ops+compile
time for sub bootstrap.
Diffstat (limited to 'ext/DynaLoader')
-rw-r--r-- | ext/DynaLoader/DynaLoader_pm.PL | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL index 0100ae1e37..376b03c252 100644 --- a/ext/DynaLoader/DynaLoader_pm.PL +++ b/ext/DynaLoader/DynaLoader_pm.PL @@ -68,7 +68,7 @@ unlink "DynaLoader.pm" if -f "DynaLoader.pm"; open OUT, ">DynaLoader.pm" or die $!; print OUT <<'EOT'; -# Generated from DynaLoader_pm.PL +# Generated from DynaLoader_pm.PL, this file is unique for every OS package DynaLoader; @@ -85,7 +85,7 @@ package DynaLoader; # Tim.Bunce@ig.co.uk, August 1994 BEGIN { - $VERSION = '1.35'; + $VERSION = '1.36'; } EOT @@ -138,8 +138,9 @@ $Is_VMS = $^O eq 'VMS'; <</$^O-eq-VMS>> $do_expand = <<$^O-eq-VMS>>1<<|$^O-eq-VMS>>0<</$^O-eq-VMS>>; -@dl_require_symbols = (); # names of symbols we need -@dl_resolve_using = (); # names of files to link with +@dl_require_symbols = (); # names of symbols we need<<$^O-eq-freemint>> +@dl_resolve_using = (); # names of files to link with<</$^O-eq-freemint>><<$^O-eq-hpux>> +@dl_resolve_using = (); # names of files to link with<</$^O-eq-hpux>> @dl_library_path = (); # path to look for files #XSLoader.pm may have added elements before we were required @@ -396,13 +397,13 @@ sub bootstrap { croak("Can't load '$file' for module $module: ".dl_error()); push(@dl_librefs,$libref); # record loaded object - +<<$^O-eq-freemint>> my @unresolved = dl_undef_symbols(); if (@unresolved) { require Carp; Carp::carp("Undefined symbols present after loading $file: @unresolved\n"); } - +<</$^O-eq-freemint>> $boot_symbol_ref = dl_find_symbol($libref, $bootname) or croak("Can't find '$bootname' symbol in $file\n"); |