Skip to content

Commit c457df0

Browse files
committed
Remove MacOS classic support from DynaLoader.
ExtUtils::MakeMaker removed MacOS support in 6.25, merged to blead in December 2004, so this code is vestigial, and a small maintenance penalty.
1 parent 862f843 commit c457df0

File tree

3 files changed

+3
-211
lines changed

3 files changed

+3
-211
lines changed

MANIFEST

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2980,7 +2980,6 @@ ext/DynaLoader/dl_dllload.xs S/390 dllload() style implementation
29802980
ext/DynaLoader/dl_dlopen.xs BSD/SunOS4&5 dlopen() style implementation
29812981
ext/DynaLoader/dl_dyld.xs NeXT/Apple dyld implementation
29822982
ext/DynaLoader/dl_hpux.xs HP-UX implementation
2983-
ext/DynaLoader/dl_mac.xs MacOS implementation
29842983
ext/DynaLoader/dl_mpeix.xs MPE/iX implementation
29852984
ext/DynaLoader/dl_next.xs NeXT implementation
29862985
ext/DynaLoader/dl_none.xs Stub implementation

ext/DynaLoader/DynaLoader_pm.PL

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ $Is_VMS = $^O eq 'VMS';
134134
<</$^O-eq-VMS>>
135135
$do_expand = <<$^O-eq-VMS>>1<<|$^O-eq-VMS>>0<</$^O-eq-VMS>>;
136136

137-
<<$^O-eq-MacOS>>
138-
my $Mac_FS;
139-
$Mac_FS = eval { require Mac::FileSpec::Unixish };
140-
<</$^O-eq-MacOS>>
141-
142137
@dl_require_symbols = (); # names of symbols we need
143138
@dl_resolve_using = (); # names of files to link with
144139
@dl_library_path = (); # path to look for files
@@ -312,30 +307,20 @@ sub bootstrap {
312307
}
313308
<</$^O-eq-NetWare>>
314309

315-
my $modpname = join(<<$^O-eq-MacOS>>':'<<|$^O-eq-MacOS>>'/'<</$^O-eq-MacOS>>,@modparts);
310+
my $modpname = join('/',@modparts);
316311

317312
print STDERR "DynaLoader::bootstrap for $module ",
318-
<<$^O-eq-MacOS>> "(:auto:$modpname:$modfname.$dl_dlext)\n"
319-
<<|$^O-eq-MacOS>>"(auto/$modpname/$modfname.$dl_dlext)\n"<</$^O-eq-MacOS>>
313+
"(auto/$modpname/$modfname.$dl_dlext)\n"
320314
if $dl_debug;
321315

322316
foreach (@INC) {
323317
<<$^O-eq-VMS>>chop($_ = VMS::Filespec::unixpath($_));<</$^O-eq-VMS>>
324-
<<$^O-eq-MacOS>>
325-
my $path = $_;
326-
if ($Mac_FS && ! -d $path) {
327-
$path = Mac::FileSpec::Unixish::nativize($path);
328-
}
329-
$path .= ":" unless /:$/;
330-
my $dir = "${path}auto:$modpname";
331-
<<|$^O-eq-MacOS>>
332318
my $dir = "$_/auto/$modpname";
333-
<</$^O-eq-MacOS>>
334319

335320
next unless -d $dir; # skip over uninteresting directories
336321

337322
# check for common cases to avoid autoload of dl_findfile
338-
my $try = <<$^O-eq-MacOS>> "$dir:$modfname.$dl_dlext" <<|$^O-eq-MacOS>> "$dir/$modfname.$dl_dlext"<</$^O-eq-MacOS>>;
323+
my $try = "$dir/$modfname.$dl_dlext";
339324
last if $file = ($do_expand) ? dl_expandspec($try) : ((-f $try) && $try);
340325

341326
# no luck here, save dir for possible later dl_findfile search
@@ -439,12 +424,6 @@ sub dl_findfile {
439424
next;
440425
}
441426
<</$^O-eq-VMS>>
442-
<<$^O-eq-MacOS>>
443-
if (m/:/ && -f $_) {
444-
push(@found,$_);
445-
last arg unless wantarray;
446-
}
447-
<</$^O-eq-MacOS>>
448427
<<$^O-ne-VMS>>
449428
if (m:/: && -f $_) {
450429
push(@found,$_);
@@ -457,30 +436,6 @@ sub dl_findfile {
457436
# Using a -L prefix is the preferred option (faster and more robust)
458437
if (m:^-L:) { s/^-L//; push(@dirs, $_); next; }
459438

460-
<<$^O-eq-MacOS>>
461-
# Otherwise we try to try to spot directories by a heuristic
462-
# (this is a more complicated issue than it first appears)
463-
if (m/:/ && -d $_) { push(@dirs, $_); next; }
464-
# Only files should get this far...
465-
my(@names, $name); # what filenames to look for
466-
s/^-l//;
467-
push(@names, $_);
468-
foreach $dir (@dirs, @dl_library_path) {
469-
next unless -d $dir;
470-
$dir =~ s/^([^:]+)$/:$1/;
471-
$dir =~ s/:$//;
472-
foreach $name (@names) {
473-
my($file) = "$dir:$name";
474-
print STDERR " checking in $dir for $name\n" if $dl_debug;
475-
if (-f $file) {
476-
push(@found, $file);
477-
next arg; # no need to look any further
478-
}
479-
}
480-
}
481-
next;
482-
<</$^O-eq-MacOS>>
483-
484439
# Otherwise we try to try to spot directories by a heuristic
485440
# (this is a more complicated issue than it first appears)
486441
if (m:/: && -d $_) { push(@dirs, $_); next; }

ext/DynaLoader/dl_mac.xs

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)