Initial VMS patches
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Manifest.pm
index 0959a2f..5557089 100644 (file)
@@ -87,10 +87,16 @@ sub _manicheck {
     my $read = maniread();
     my $found = manifind();
     my $file;
+    my $dosnames=(defined(&Dos::UseLFN) && Dos::UseLFN()==0);
     my(@missfile,@missentry);
     if ($arg & 1){
        foreach $file (sort keys %$read){
            warn "Debug: manicheck checking from $MANIFEST $file\n" if $Debug;
+            if ($dosnames){
+                $file = lc $file;
+                $file =~ s=(\.(\w|-)+)=substr ($1,0,4)=ge;
+                $file =~ s=((\w|-)+)=substr ($1,0,8)=ge;
+            }
            unless ( exists $found->{$file} ) {
                warn "No such file: $file\n" unless $Quiet;
                push @missfile, $file;
@@ -236,7 +242,11 @@ sub ln {
     link($srcFile, $dstFile);
     local($_) = $dstFile; # chmod a+r,go-w+X (except "X" only applies to u=x)
     my $mode= 0444 | (stat)[2] & 0700;
-    chmod(  $mode | ( $mode & 0100 ? 0111 : 0 ),  $_  );
+    if (! chmod(  $mode | ( $mode & 0100 ? 0111 : 0 ),  $_  )) {
+       unlink $dstFile;
+       return;
+    }
+    1;
 }
 
 sub best {