Find more conflicts by lowercasing.
Jarkko Hietaniemi [Sat, 22 Sep 2001 13:38:49 +0000 (13:38 +0000)]
p4raw-id: //depot/perl@12131

MANIFEST
Porting/check83.pl [moved from check83.pl with 74% similarity]

index cdd65fa..3b8fecc 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -15,7 +15,6 @@ Changes5.003          Differences between 5.002 and 5.003
 Changes5.004           Differences between 5.003 and 5.004
 Changes5.005           Differences between 5.004 and 5.005
 Changes5.6             Differences between 5.005 and 5.6
-check83.pl             Check whether we are 8.3-friendly
 configpm               Produces lib/Config.pm
 Configure              Portability tool
 configure.com          Configure-equivalent for VMS
@@ -572,10 +571,10 @@ ext/Thread/unsync4.tx             Test thread implicit synchronisation
 ext/threads/Changes            ithreads
 ext/threads/Makefile.PL                ithreads
 ext/threads/README             ithreads
+ext/threads/t/basic.t          ithreads
 ext/threads/threads.h          ithreads
 ext/threads/threads.pm          ithreads
 ext/threads/threads.xs         ithreads
-ext/threads/t/basic.t          ithreads
 ext/Time/HiRes/Changes         Time::HiRes extension
 ext/Time/HiRes/hints/dynixptx.pl       Hint for Time::HiRes for named architecture
 ext/Time/HiRes/hints/sco.pl    Hints for Time::HiRes for named architecture
@@ -1843,6 +1842,7 @@ pod/splitman                      Splits perlfunc into multiple man pages
 pod/splitpod                   Splits perlfunc into multiple pod pages
 Policy_sh.SH           Hold site-wide preferences between Configure runs.
 Porting/apply          Apply patches sent by mail
+Porting/check83.pl     Check whether we are 8.3-friendly
 Porting/config.sh      Sample config.sh
 Porting/config_H       Sample config.h
 Porting/Contract       Social contract for contributed modules in Perl core
similarity index 74%
rename from check83.pl
rename to Porting/check83.pl
index 69e00c6..51b2b11 100644 (file)
@@ -1,3 +1,8 @@
+#!/usr/local/bin/perl
+
+# Check whether there are naming conflicts when names are truncated
+# to the DOSish case-ignoring 8.3 format
+
 sub eight_dot_three {
     my ($dir, $base, $ext) = ($_[0] =~ m!^(?:(.+)/)?([^/.]+)(?:\.([^/.]+))?$!);
     $base = substr($base, 0, 8);
@@ -20,11 +25,11 @@ if (open(MANIFEST, "MANIFEST")) {
            next;
        }
        if (tr/././ > 1) {
-           warn "$_: more than one dot\n";
+           print "$_: more than one dot\n";
            next;
        }
        my ($dir, $edt) = eight_dot_three($_);
-       next if $edt eq $_;
+       ($dir, $edt) = map { lc } ($dir, $edt);
        push @{$dir{$dir}->{$edt}}, $_;
     }
 } else {
@@ -35,7 +40,7 @@ for my $dir (sort keys %dir) {
     for my $edt (keys %{$dir{$dir}}) {
        my @files = @{$dir{$dir}->{$edt}};
        if (@files > 1) {
-           print "$dir $edt @files\n";
+           print "@files: directory $dir conflict $edt\n";
        }
     }
 }