PERFORCE change 11185 for review
[email protected] (Chris Nandor) Sat, 7 Jul 2001 17:08:07 -0400
| Newsgroups | perl.perl5.changes.mac |
|---|---|
| Message-ID | <p05100306b76d2a9ae37f@[10.0.1.177]> |
Change 11185 by pudge@pudge-mobile on 2001/07/06 23:46:57
Include changes already sent in separately as patches,
before branch was created.
Affected files ...
... //depot/maint-5.6/macperl/ext/File/Glob/bsd_glob.c#2 edit
... //depot/maint-5.6/macperl/ext/IO/lib/IO/Dir.pm#2 edit
... //depot/maint-5.6/macperl/gv.c#2 edit
... //depot/maint-5.6/macperl/lib/DirHandle.pm#2 edit
... //depot/maint-5.6/macperl/lib/File/Basename.pm#2 edit
... //depot/maint-5.6/macperl/lib/File/Copy.pm#2 edit
... //depot/maint-5.6/macperl/lib/File/Find.pm#2 edit
... //depot/maint-5.6/macperl/lib/diagnostics.pm#2 edit
... //depot/maint-5.6/macperl/perl.c#2 edit
... //depot/maint-5.6/macperl/t/base/term.t#2 edit
... //depot/maint-5.6/macperl/t/comp/cpp.t#2 edit
... //depot/maint-5.6/macperl/t/comp/multiline.t#2 edit
... //depot/maint-5.6/macperl/t/comp/script.t#2 edit
... //depot/maint-5.6/macperl/t/comp/term.t#2 edit
... //depot/maint-5.6/macperl/t/lib/anydbm.t#2 edit
... //depot/maint-5.6/macperl/t/lib/autoloader.t#2 edit
... //depot/maint-5.6/macperl/t/lib/dirhand.t#2 edit
... //depot/maint-5.6/macperl/t/lib/filefind.t#2 edit
... //depot/maint-5.6/macperl/t/lib/io_dir.t#2 edit
... //depot/maint-5.6/macperl/t/lib/selfloader.t#2 edit
... //depot/maint-5.6/macperl/t/op/anonsub.t#2 edit
... //depot/maint-5.6/macperl/t/op/closure.t#2 edit
... //depot/maint-5.6/macperl/t/op/defins.t#2 edit
... //depot/maint-5.6/macperl/t/op/die_exit.t#2 edit
... //depot/maint-5.6/macperl/t/op/exec.t#2 edit
... //depot/maint-5.6/macperl/t/op/goto.t#2 edit
... //depot/maint-5.6/macperl/t/op/misc.t#2 edit
... //depot/maint-5.6/macperl/t/op/pack.t#2 edit
... //depot/maint-5.6/macperl/t/op/regexp.t#2 edit
... //depot/maint-5.6/macperl/t/op/regexp_noamp.t#2 edit
... //depot/maint-5.6/macperl/t/op/split.t#2 edit
... //depot/maint-5.6/macperl/t/op/write.t#2 edit
... //depot/maint-5.6/macperl/t/pragma/strict.t#2 edit
Differences ...
==== //depot/maint-5.6/macperl/ext/File/Glob/bsd_glob.c#2 (text) ====
98,99c98,99
< # ifdef _SC_ARG_MAX
< # define ARG_MAX (sysconf(_SC_ARG_MAX))
---
> # ifdef MACOS_TRADITIONAL
> # define ARG_MAX 65536 /* Mac OS is actually unlimited */
101,102c101,102
< # ifdef _POSIX_ARG_MAX
< # define ARG_MAX _POSIX_ARG_MAX
---
> # ifdef _SC_ARG_MAX
> # define ARG_MAX (sysconf(_SC_ARG_MAX))
104,105c104,105
< # ifdef WIN32
< # define ARG_MAX 14500 /* from VC's limits.h */
---
> # ifdef _POSIX_ARG_MAX
> # define ARG_MAX _POSIX_ARG_MAX
107c107,111
< # define ARG_MAX 4096 /* from POSIX, be conservative */
---
> # ifdef WIN32
> # define ARG_MAX 14500 /* from VC's limits.h */
> # else
> # define ARG_MAX 4096 /* from POSIX, be conservative */
> # endif
495c499
< return(globextend(pattern, pglob));
---
> return(globextend(pattern, pglob, &limit));
==== //depot/maint-5.6/macperl/ext/IO/lib/IO/Dir.pm#2 (text) ====
9c9
< use 5.003_26;
---
> use 5.6.0;
18a19
> use File::Spec;
46a48,50
> # a dir name should always have a ":" in it; assume dirname is
> # in current directory
> $dirname = ':' . $dirname if ( ($^O eq 'MacOS') && ($dirname =~ /^[^:]+$/) );
106c110
< -e ${*$dh}{io_dir_path} . "/" . $key;
---
> -e File::Spec->catfile(${*$dh}{io_dir_path}, $key);
111c115
< &lstat(${*$dh}{io_dir_path} . "/" . $key);
---
> &lstat(File::Spec->catfile(${*$dh}{io_dir_path}, $key));
117c121
< my $file = ${*$dh}{io_dir_path} . "/" . $key;
---
> my $file = File::Spec->catfile(${*$dh}{io_dir_path}, $key);
128c132
< my $file = ${*$dh}{io_dir_path} . "/" . $key;
---
> my $file = File::Spec->catfile(${*$dh}{io_dir_path}, $key);
==== //depot/maint-5.6/macperl/gv.c#2 (text) ====
1036c1036,1041
< && (instr(file, "/lib/") || instr(file, ".pm")))
---
> #ifdef MACOS_TRADITIONAL
> && (instr(file, ":lib:")
> #else
> && (instr(file, "/lib/")
> #endif
> || instr(file, ".pm")))
==== //depot/maint-5.6/macperl/lib/DirHandle.pm#2 (text) ====
2a3,4
> our $VERSION = '1.00';
>
25a28,41
> =head1 NOTES
>
> =over 4
>
> =item *
>
> On Mac OS (Classic), the path separator is ':', not '/', and the
> current directory is denoted as ':', not '.'. You should be careful
> about specifying relative pathnames. While a full path always begins
> with a volume name, a relative pathname should always begin with a
> ':'. If specifying a volume name only, a trailing ':' is required.
>
> =back
>
==== //depot/maint-5.6/macperl/lib/File/Basename.pm#2 (text) ====
98c98
< =over
---
> =over 4
138c138,139
< use 5.005_64;
---
> use 5.6.0;
> use warnings;
143c144
< $VERSION = "2.6";
---
> $VERSION = "2.7";
184a186
> $dirpath = ':' unless $dirpath;
215,216c217,218
< wantarray ? ($basename . $taint, $dirpath . $taint, $tail)
< : $basename . $taint;
---
> wantarray ? ($basename .= $taint, $dirpath .= $taint, $tail)
> : $basename .= $taint;
==== //depot/maint-5.6/macperl/lib/File/Copy.pm#2 (text) ====
10c10
< use 5.005_64;
---
> use 5.6.0;
12a13
> use File::Spec;
24c25
< $VERSION = '2.03';
---
> $VERSION = '2.04';
33c34
< sub _catname { # Will be replaced by File::Spec when it arrives
---
> sub _catname {
39,42c40,46
< if ($^O eq 'VMS') { $to = VMS::Filespec::vmspath($to) . basename($from); }
< elsif ($^O eq 'MacOS') { $to =~ s/^([^:]+)$/:$1/; $to .= ':' . basename($from); }
< elsif ($to =~ m|\\|) { $to .= '\\' . basename($from); }
< else { $to .= '/' . basename($from); }
---
>
> if ($^O eq 'MacOS') {
> # a partial dir name that's valid only in the cwd (e.g. 'tmp')
> $to = ':' . $to if $to =~ /^[^:]+$/;
> }
>
> return File::Spec->catfile($to, basename($from));
371a376,403
> =head1 NOTES
>
> =over 4
>
> =item *
>
> On Mac OS (Classic), the path separator is ':', not '/', and the
> current directory is denoted as ':', not '.'. You should be careful
> about specifying relative pathnames. While a full path always begins
> with a volume name, a relative pathname should always begin with a
> ':'. If specifying a volume name only, a trailing ':' is required.
>
> E.g.
>
> copy("file1", "tmp"); # creates the file 'tmp' in the current directory
> copy("file1", ":tmp:"); # creates :tmp:file1
> copy("file1", ":tmp"); # same as above
> copy("file1", "tmp"); # same as above, if 'tmp' is a directory (but don't do
> # that, since it may cause confusion, see example #1)
> copy("file1", "tmp:file1"); # error, since 'tmp:' is not a volume
> copy("file1", ":tmp:file1"); # ok, partial path
> copy("file1", "DataHD:"); # creates DataHD:file1
>
> move("MacintoshHD:fileA", "DataHD:fileB"); # moves (don't copies) files from one
> # volume to another
>
> =back
>
==== //depot/maint-5.6/macperl/lib/File/Find.pm#2 (text) ====
2c2,3
< use 5.005_64;
---
> use warnings;
> use 5.6.0;
101c102
< dirctories but to proceed normally otherwise.
---
> directories but to proceed normally otherwise.
186a188,259
> =head1 NOTES
>
> =over 4
>
> =item *
>
> Mac OS (Classic) users should note a few differences:
>
> =over 4
>
> =item *
>
> The path separator is ':', not '/', and the current directory is denoted
> as ':', not '.'. You should be careful about specifying relative pathnames.
> While a full path always begins with a volume name, a relative pathname
> should always begin with a ':'. If specifying a volume name only, a
> trailing ':' is required.
>
> =item *
>
> C<$File::Find::dir> is guaranteed to end with a ':'. If C<$_>
> contains the name of a directory, that name may or may not end with a
> ':'. Likewise, C<$File::Find::name>, which contains the complete
> pathname to that directory, and C<$File::Find::fullname>, which holds
> the absolute pathname of that directory with all symbolic links resolved,
> may or may not end with a ':'.
>
> =item *
>
> The default C<untaint_pattern> (see above) on Mac OS is set to
> C<qr|^(.+)$|s>. Note that the parentheses are vital.
>
> =item *
>
> The invisible system file "Icon\015" is ignored. While this file may
> appear in every directory, there are some more invisible system files
> on every volume, which are all located at the volume root level (i.e.
> "MacintoshHD:"). These system files are B<not> excluded automatically.
> Your filter may use the following code to recognize invisible files or
> directories (requires Mac::Files):
>
> use Mac::Files;
>
> # invisible(): returns 1 if file/directory is invisible,
> # 0 if it's visible or undef if an error occured
>
> sub invisible($) {
> my $file = shift;
> my ($fileCat, $fileInfo);
> my $invisible_flag = 1 << 14;
>
> if ( $fileCat = FSpGetCatInfo($file) ) {
> if ($fileInfo = $fileCat->ioFlFndrInfo() ) {
> return (($fileInfo->fdFlags & $invisible_flag) && 1);
> }
> }
> return undef;
> }
>
> Generally, invisible files are system files, unless an odd application
> decides to use invisible files for it's own purposes. To distinguish
> such files from system files, you have to look at the B<type> and B<creator>
> file attributes. The MacPerl built-in functions C<GetFileInfo(FILE)> and
> C<SetFileInfo(CREATOR, TYPE, FILES)> offer access to these attributes
> (see MacPerl.pm for details).
>
> Files that appear on the desktop actually reside in an (hidden) directory
> named "Desktop Folder" on the particular disk volume. Note that, although
> all desktop files appear to be on the same "virtual" desktop, each disk
> volume actually maintains its own "Desktop Folder" directory.
>
> =back
187a261,262
> =back
>
195a271
> my $Is_MacOS;
197a274
> require File::Spec;
207c284
< return substr($cdir,0,rindex($cdir,'/')) if $fn eq '.';
---
> return substr($cdir,0,rindex($cdir,'/')) if $fn eq $File::Find::current_dir;
221a299,327
> # return the absolute name of a directory or file
> sub contract_name_Mac {
> my ($cdir,$fn) = @_;
> my $abs_name;
>
> if ($fn =~ /^(:+)(.*)$/) { # valid pathname starting with a ':'
>
> my $colon_count = length ($1);
> if ($colon_count == 1) {
> $abs_name = $cdir . $2;
> return $abs_name;
> }
> else {
> # need to move up the tree, but
> # only if it's not a volume name
> for (my $i=1; $i<$colon_count; $i++) {
> unless ($cdir =~ /^[^:]+:$/) { # volume name
> $cdir =~ s/[^:]+:$//;
> }
> else {
> return undef;
> }
> }
> $abs_name = $cdir . $2;
> return $abs_name;
> }
>
> }
> else {
222a329,345
> # $fn may be a valid path to a directory or file or (dangling)
> # symlink, without a leading ':'
> if ( (-e $fn) || (-l $fn) ) {
> if ($fn =~ /^[^:]+:/) { # a volume name like DataHD:*
> return $fn; # $fn is already an absolut path
> }
> else {
> $abs_name = $cdir . $fn;
> return $abs_name;
> }
> }
> else { # argh!, $fn is not a valid directory/file
> return undef;
> }
> }
> }
>
227,228c350,358
< if (substr($Name,0,1) eq '/') {
< $AbsName= $Name;
---
> if ($Is_MacOS) {
> # $Name is the resolved symlink (always a full path on MacOS),
> # i.e. there's no need to call contract_name_Mac()
> $AbsName = $Name;
>
> # (simple) check for recursion
> if ( ( $Base =~ /^$AbsName/) && (-d $AbsName) ) { # recursion
> return undef;
> }
231,232c361,366
< $AbsName= contract_name($Base,$Name);
< }
---
> if (substr($Name,0,1) eq '/') {
> $AbsName= $Name;
> }
> else {
> $AbsName= contract_name($Base,$Name);
> }
234,240c368,375
< # (simple) check for recursion
< my $newlen= length($AbsName);
< if ($newlen <= length($Base)) {
< if (($newlen == length($Base) || substr($Base,$newlen,1) eq '/')
< && $AbsName eq substr($Base,0,$newlen))
< {
< return undef;
---
> # (simple) check for recursion
> my $newlen= length($AbsName);
> if ($newlen <= length($Base)) {
> if (($newlen == length($Base) || substr($Base,$newlen,1) eq '/')
> && $AbsName eq substr($Base,0,$newlen))
> {
> return undef;
> }
278c413
< if ($follow_skip < 1) {
---
> if ( ($follow_skip < 1) || ((-d _) && ($follow_skip < 2)) ) {
326,330c461,489
< my $top_item = $TOP;
< $top_item =~ s|/\z|| unless $top_item eq '/';
< $Is_Dir= 0;
<
< ($topdev,$topino,$topmode,$topnlink) = stat $top_item;
---
> my $top_item = $TOP;
>
> if ($Is_MacOS) {
> ($topdev,$topino,$topmode,$topnlink) = stat $top_item;
> $top_item = ":$top_item"
> if ( (-d _) && ($top_item =~ /^[^:]+\z/) );
> }
> else {
> $top_item =~ s|/\z|| unless $top_item eq '/';
> ($topdev,$topino,$topmode,$topnlink) = stat $top_item;
> }
>
> $Is_Dir= 0;
>
> if ($follow) {
>
> if ($Is_MacOS) {
> $cwd = "$cwd:" unless ($cwd =~ /:$/); # for safety
>
> if ($top_item eq $File::Find::current_dir) {
> $abs_dir = $cwd;
> }
> else {
> $abs_dir = contract_name_Mac($cwd, $top_item);
> unless (defined $abs_dir) {
> warn "Can't determine absolute path for $top_item (No such file or directory)\n";
> next Proc_Top_Item;
> }
> }
332,337c491,501
< if ($follow) {
< if (substr($top_item,0,1) eq '/') {
< $abs_dir = $top_item;
< }
< elsif ($top_item eq '.') {
< $abs_dir = $cwd;
---
> }
> else {
> if (substr($top_item,0,1) eq '/') {
> $abs_dir = $top_item;
> }
> elsif ($top_item eq $File::Find::current_dir) {
> $abs_dir = $cwd;
> }
> else { # care about any ../
> $abs_dir = contract_name("$cwd/",$top_item);
> }
339,343c503,504
< else { # care about any ../
< $abs_dir = contract_name("$cwd/",$top_item);
< }
< $abs_dir= Follow_SymLink($abs_dir);
< unless (defined $abs_dir) {
---
> $abs_dir= Follow_SymLink($abs_dir);
> unless (defined $abs_dir) {
346,347c507,509
< }
< if (-d _) {
---
> }
>
> if (-d _) {
350,351c512,513
< }
< }
---
> }
> }
353,358c515,520
< $topdir = $top_item;
< unless (defined $topnlink) {
< warn "Can't stat $top_item: $!\n";
< next Proc_Top_Item;
< }
< if (-d _) {
---
> $topdir = $top_item;
> unless (defined $topnlink) {
> warn "Can't stat $top_item: $!\n";
> next Proc_Top_Item;
> }
> if (-d _) {
362c524
< }
---
> }
365,366c527,528
< }
< }
---
> }
> }
368c530
< unless ($Is_Dir) {
---
> unless ($Is_Dir) {
370c532,537
< ($dir,$_) = ('./', $top_item);
---
> if ($Is_MacOS) {
> ($dir,$_) = (':', $top_item); # $File::Find::dir, $_
> }
> else {
> ($dir,$_) = ('./', $top_item);
> }
373,374c540,541
< $abs_dir = $dir;
< if ($untaint) {
---
> $abs_dir = $dir;
> if ($untaint) {
385c552
< }
---
> }
387,390c554,557
< unless ($no_chdir or chdir $abs_dir) {
< warn "Couldn't chdir $abs_dir: $!\n";
< next Proc_Top_Item;
< }
---
> unless ($no_chdir or chdir $abs_dir) {
> warn "Couldn't chdir $abs_dir: $!\n";
> next Proc_Top_Item;
> }
392c559
< $name = $abs_dir . $_;
---
> $name = $abs_dir . $_; # $File::Find::name
394c561
< { &$wanted_callback }; # protect against wild "next"
---
> { &$wanted_callback }; # protect against wild "next"
396c563
< }
---
> }
398c565
< $no_chdir or chdir $cwd_untainted;
---
> $no_chdir or chdir $cwd_untainted;
417,418c584,594
< my $dir_pref= ( $p_dir eq '/' ? '/' : "$p_dir/" );
< my $dir_rel= '.'; # directory name relative to current directory
---
> my $dir_pref;
> my $dir_rel;
>
> if ($Is_MacOS) {
> $dir_pref= ($p_dir =~ /:$/) ? $p_dir : "$p_dir:"; # preface
> $dir_rel= ':'; # directory name relative to current directory
> }
> else {
> $dir_pref= ( $p_dir eq '/' ? '/' : "$p_dir/" );
> $dir_rel= '.'; # directory name relative to current directory
> }
421,422c597,598
<
< unless ($no_chdir or $p_dir eq '.') {
---
>
> unless ( $no_chdir || ($p_dir eq $File::Find::current_dir) ) {
440c616,617
<
---
>
> # push the starting directory
442a620,623
> if ($Is_MacOS) {
> $p_dir = $dir_pref;
> }
>
445,447c626,628
< $dir= $p_dir;
< $name= $dir_name;
< $_= ($no_chdir ? $dir_name : $dir_rel );
---
> $dir= $p_dir; # $File::Find::dir
> $name= $dir_name; # $File::Find::name
> $_= ($no_chdir ? $dir_name : $dir_rel ); # $_
449,451c630,632
< $prune= 0;
< { &$wanted_callback }; # protect against wild "next"
< next if $prune;
---
> $prune= 0;
> { &$wanted_callback }; # protect against wild "next"
> next if $prune;
453c634
<
---
>
455c636
< unless ($no_chdir or $dir_rel eq '.') {
---
> unless ($no_chdir or $dir_rel eq $File::Find::current_dir) {
461,463c642,647
< die "directory ("
< . ($p_dir ne '/' ? $p_dir : '')
< . "/) $dir_rel is still tainted";
---
> if ($Is_MacOS) {
> die "directory ($p_dir) $dir_rel is still tainted";
> }
> else {
> die "directory (" . ($p_dir ne '/' ? $p_dir : '') . "/) $dir_rel is still tainted";
> }
468,470c652,657
< warn "Can't cd to ("
< . ($p_dir ne '/' ? $p_dir : '')
< . "/) $udir : $!\n";
---
> if ($Is_MacOS) {
> warn "Can't cd to ($p_dir) $udir: $!\n";
> }
> else {
> warn "Can't cd to (" . ($p_dir ne '/' ? $p_dir : '') . "/) $udir: $!\n";
> }
476c663,667
< $dir= $dir_name;
---
> if ($Is_MacOS) {
> $dir_name = "$dir_name:" unless ($dir_name =~ /:$/);
> }
>
> $dir= $dir_name; # $File::Find::dir
479c670
< unless (opendir DIR, ($no_chdir ? $dir_name : '.')) {
---
> unless (opendir DIR, ($no_chdir ? $dir_name : $File::Find::current_dir)) {
491c682
< next if $FN =~ /^\.{1,2}\z/;
---
> next if $FN =~ $File::Find::skip_pattern;
493,494c684,685
< $name = $dir_pref . $FN;
< $_ = ($no_chdir ? $name : $FN);
---
> $name = $dir_pref . $FN; # $File::Find::name
> $_ = ($no_chdir ? $name : $FN); # $_
504c695
< next if $FN =~ /^\.{1,2}\z/;
---
> next if $FN =~ $File::Find::skip_pattern;
517,518c708,709
< $name = $dir_pref . $FN;
< $_= ($no_chdir ? $name : $FN);
---
> $name = $dir_pref . $FN; # $File::Find::name
> $_= ($no_chdir ? $name : $FN); # $_
534,536c725,733
< my $tmp = join('/',('..') x ($CdLvl-$Level));
< die "Can't cd to $dir_name" . $tmp
< unless chdir ($tmp);
---
> my $tmp;
> if ($Is_MacOS) {
> $tmp = (':' x ($CdLvl-$Level)) . ':';
> }
> else {
> $tmp = join('/',('..') x ($CdLvl-$Level));
> }
> die "Can't cd to $dir_name" . $tmp
> unless chdir ($tmp);
539,540c736,747
< $dir_name = ($p_dir eq '/' ? "/$dir_rel" : "$p_dir/$dir_rel");
< $dir_pref = "$dir_name/";
---
>
> if ($Is_MacOS) {
> # $pdir always has a trailing ':', except for the starting dir,
> # where $dir_rel == ':'
> $dir_name = "$p_dir$dir_rel";
> $dir_pref = "$dir_name:";
> }
> else {
> $dir_name = ($p_dir eq '/' ? "/$dir_rel" : "$p_dir/$dir_rel");
> $dir_pref = "$dir_name/";
> }
>
542,543c749,755
< $name = $dir = $p_dir;
< $_ = ".";
---
> $name = $dir = $p_dir; # $File::Find::name / dir
> if ($Is_MacOS) {
> $_ = ':'; # $_
> }
> else {
> $_ = '.';
> }
545,559c757,783
< } elsif ( $nlink < 0 ) { # must be finddepth, report dirname now
< $name = $dir_name;
< if ( substr($name,-2) eq '/.' ) {
< $name =~ s|/\.$||;
< }
< $dir = $p_dir;
< $_ = ($no_chdir ? $dir_name : $dir_rel );
< if ( substr($_,-2) eq '/.' ) {
< s|/\.$||;
< }
< { &$wanted_callback }; # protect against wild "next"
< } else {
< push @Stack,[$CdLvl,$p_dir,$dir_rel,-1] if $bydepth;
< last;
< }
---
> }
> elsif ( $nlink < 0 ) { # must be finddepth, report dirname now
> $name = $dir_name;
> if ($Is_MacOS) {
> if ($dir_rel eq ':') { # must be the top dir, where we started
> $name =~ s|:$||; # $File::Find::name
> $p_dir = "$p_dir:" unless ($p_dir =~ /:$/);
> }
> $dir = $p_dir; # $File::Find::dir
> $_ = ($no_chdir ? $name : $dir_rel); # $_
> }
> else {
> if ( substr($name,-2) eq '/.' ) {
> $name =~ s|/\.$||;
> }
> $dir = $p_dir;
> $_ = ($no_chdir ? $dir_name : $dir_rel );
> if ( substr($_,-2) eq '/.' ) {
> s|/\.$||;
> }
> }
> { &$wanted_callback }; # protect against wild "next"
> }
> else {
> push @Stack,[$CdLvl,$p_dir,$dir_rel,-1] if $bydepth;
> last;
> }
573c797
< my ($wanted, $dir_loc, $p_dir) = @_;
---
> my ($wanted, $dir_loc, $p_dir) = @_; # $dir_loc is absdir, without trailing ':' on Mac OS
580,583c804,817
< my $dir_pref = ( $p_dir eq '/' ? '/' : "$p_dir/" );
< my $loc_pref = ( $dir_loc eq '/' ? '/' : "$dir_loc/" );
< my $dir_rel = '.'; # directory name relative to current directory
< my $byd_flag; # flag for pending stack entry if $bydepth
---
> my $dir_pref;
> my $loc_pref;
> my $dir_rel;
> my $byd_flag; # flag for pending stack entry if $bydepth
>
> if ($Is_MacOS) {
> $dir_pref = ($p_dir =~ /:$/) ? "$p_dir" : "$p_dir:";
> $loc_pref = ($dir_loc =~ /:$/) ? "$dir_loc" : "$dir_loc:";
> $dir_rel = ':'; # directory name relative to current directory
> } else {
> $dir_pref = ( $p_dir eq '/' ? '/' : "$p_dir/" );
> $loc_pref = ( $dir_loc eq '/' ? '/' : "$dir_loc/" );
> $dir_rel = '.'; # directory name relative to current directory
> }
586,587c820,821
<
< unless ($no_chdir or $p_dir eq '.') {
---
>
> unless ($no_chdir or $p_dir eq $File::Find::current_dir) {
607a842,845
> if ($Is_MacOS) {
> $p_dir = $dir_pref;
> }
>
622,625c860,863
< $dir= $p_dir;
< $name= $dir_name;
< $_= ($no_chdir ? $dir_name : $dir_rel );
< $fullname= $dir_loc;
---
> $dir= $p_dir; # File::Find::dir
> $name= $dir_name; # File::Find::name
> $_= ($no_chdir ? $dir_name : $dir_rel ); # $_
> $fullname= $dir_loc; # File::Find::fullname
627c865
< $prune= 0;
---
> $prune= 0;
629,630c867,868
< { &$wanted_callback }; # protect against wild "next"
< next if $prune;
---
> { &$wanted_callback }; # protect against wild "next"
> next if $prune;
634c872
< unless ($no_chdir or $dir_rel eq '.') {
---
> unless ($no_chdir or $dir_rel eq $File::Find::current_dir) {
653c891,895
< $dir = $dir_name;
---
> if ($Is_MacOS) {
> $dir_name = "$dir_name:" unless ($dir_name =~ /:$/);
> }
>
> $dir = $dir_name; # $File::Find::dir
656c898
< unless (opendir DIR, ($no_chdir ? $dir_loc : '.')) {
---
> unless (opendir DIR, ($no_chdir ? $dir_loc : $File::Find::current_dir)) {
664c906
< next if $FN =~ /^\.{1,2}\z/;
---
> next if $FN =~ $File::Find::skip_pattern;
671c913
<
---
>
676,678c918,920
< $fullname = $new_loc;
< $name = $dir_pref . $FN;
< $_ = ($no_chdir ? $name : $FN);
---
> $fullname = $new_loc; # $File::Find::fullname
> $name = $dir_pref . $FN; # $File::Find::name
> $_ = ($no_chdir ? $name : $FN); # $_
687,710c929,971
< $dir_name = ($p_dir eq '/' ? "/$dir_rel" : "$p_dir/$dir_rel");
< $dir_pref = "$dir_name/";
< $loc_pref = "$dir_loc/";
< if ( $byd_flag < 0 ) { # must be finddepth, report dirname now
< unless ($no_chdir or $dir_rel eq '.') {
< my $udir = $pdir_loc;
< if ($untaint) {
< $udir = $1 if $dir_loc =~ m|$untaint_pat|;
< }
< unless (chdir $udir) {
< warn "Can't cd to $udir: $!\n";
< next;
< }
< }
< $fullname = $dir_loc;
< $name = $dir_name;
< if ( substr($name,-2) eq '/.' ) {
< $name =~ s|/\.$||;
< }
< $dir = $p_dir;
< $_ = ($no_chdir ? $dir_name : $dir_rel);
< if ( substr($_,-2) eq '/.' ) {
< s|/\.$||;
< }
---
> if ($Is_MacOS) {
> # $p_dir always has a trailing ':', except for the starting dir,
> # where $dir_rel == ':'
> $dir_name = "$p_dir$dir_rel";
> $dir_pref = "$dir_name:";
> $loc_pref = ($dir_loc =~ /:$/) ? $dir_loc : "$dir_loc:";
> }
> else {
> $dir_name = ($p_dir eq '/' ? "/$dir_rel" : "$p_dir/$dir_rel");
> $dir_pref = "$dir_name/";
> $loc_pref = "$dir_loc/";
> }
> if ( $byd_flag < 0 ) { # must be finddepth, report dirname now
> unless ($no_chdir or $dir_rel eq $File::Find::current_dir) {
> my $udir = $pdir_loc;
> if ($untaint) {
> $udir = $1 if $dir_loc =~ m|$untaint_pat|;
> }
> unless (chdir $udir) {
> warn "Can't cd to $udir: $!\n";
> next;
> }
> }
> $fullname = $dir_loc; # $File::Find::fullname
> $name = $dir_name; # $File::Find::name
> if ($Is_MacOS) {
> if ($dir_rel eq ':') { # must be the top dir, where we started
> $name =~ s|:$||; # $File::Find::name
> $p_dir = "$p_dir:" unless ($p_dir =~ /:$/);
> }
> $dir = $p_dir; # $File::Find::dir
> $_ = ($no_chdir ? $name : $dir_rel); # $_
> }
> else {
> if ( substr($name,-2) eq '/.' ) {
> $name =~ s|/\.$||;
> }
> $dir = $p_dir; # $File::Find::dir
> $_ = ($no_chdir ? $dir_name : $dir_rel); # $_
> if ( substr($_,-2) eq '/.' ) {
> s|/\.$||;
> }
> }
712,717c973,979
< lstat($_); # make sure file tests with '_' work
< { &$wanted_callback }; # protect against wild "next"
< } else {
< push @Stack,[$dir_loc, $pdir_loc, $p_dir, $dir_rel,-1] if $bydepth;
< last;
< }
---
> lstat($_); # make sure file tests with '_' work
> { &$wanted_callback }; # protect against wild "next"
> }
> else {
> push @Stack,[$dir_loc, $pdir_loc, $p_dir, $dir_rel,-1] if $bydepth;
> last;
> }
730c992
< $wanted->{untaint_pattern} = qr|^([-+@\w./]+)$|
---
> $wanted->{untaint_pattern} = $File::Find::untaint_pattern
742a1005
> %SLnkSeen= (); # clear hash first
748a1012
> %SLnkSeen= (); # clear hash first
753a1018,1021
> # default
> $File::Find::skip_pattern = qr/^\.{1,2}\z/;
> $File::Find::untaint_pattern = qr|^([-+@\w./]+)$|;
>
757c1025,1031
< $File::Find::dont_use_nlink = 1;
---
> $File::Find::dont_use_nlink = 1;
> }
> elsif ($^O eq 'MacOS') {
> $Is_MacOS = 1;
> $File::Find::dont_use_nlink = 1;
> $File::Find::skip_pattern = qr/^Icon\015\z/;
> $File::Find::untaint_pattern = qr|^(.+)$|;
759a1034,1037
> # this _should_ work properly on all platforms
> # where File::Find can be expected to work
> $File::Find::current_dir = File::Spec->curdir || '.';
>
==== //depot/maint-5.6/macperl/lib/diagnostics.pm#2 (xtext) ====
171c171
< use 5.005_64;
---
> use 5.6.0;
174c174
< our $VERSION = v1.0;
---
> our $VERSION = 1.0;
197a198,202
> if ($^O eq 'MacOS') {
> # just updir one from each lib dir, we'll find it ...
> ($PODFILE) = grep { -e } map { "$_:pod:perldiag.pod" } @INC;
> }
>
==== //depot/maint-5.6/macperl/perl.c#2 (text) ====
3089a3090,3092
> #ifdef MACOS_TRADITIONAL
> break;
> #endif
==== //depot/maint-5.6/macperl/t/base/term.t#2 (xtext) ====
7d6
< @INC = '../lib';
10,11d8
< use Config;
<
17,19c14,17
< # 10 is ASCII/Iso Latin, 21 is EBCDIC.
< if ($x eq chr(10) ||
< ($Config{ebcdic} eq 'define' && $x eq chr(21))) {print "ok 1\n";}
---
> # 10 is ASCII/Iso Latin, 13 in Mac OS, 21 is EBCDIC.
> if ($x eq chr(10)) { print "ok 1\n";}
> elsif ($x eq chr(13)) { print "ok 1 # Mac OS\n"; }
> elsif ($x eq chr(21)) { print "ok 1 # EBCDIC\n"; }
45c43
< open(try, "/dev/null") || open(try,"nla0:") || (die "Can't open /dev/null.");
---
> open(try, "/dev/null") || open(try,"Dev:Null") || open(try,"nla0:") || (die "Can't open /dev/null.");
==== //depot/maint-5.6/macperl/t/comp/cpp.t#2 (xtext) ====
11c11
< if ( $^O eq 'MSWin32' or
---
> if ( $^O eq 'MSWin32' or $^O eq 'MacOS' or
==== //depot/maint-5.6/macperl/t/comp/multiline.t#2 (xtext) ====
39c39,41
< $_ = ($^O eq 'MSWin32') ? `type Comp.try` : `cat Comp.try`;
---
> $_ = ($^O eq 'MSWin32') ? `type Comp.try`
> : ($^O eq 'MacOS') ? `catenate Comp.try`
> : `cat Comp.try`;
==== //depot/maint-5.6/macperl/t/comp/script.t#2 (xtext) ====
7c7,8
< $PERL = ($^O eq 'MSWin32') ? '.\perl' : './perl';
---
> $PERL = ($^O eq 'MSWin32') ? '.\perl'
> : ($^O eq 'MacOS') ? $^X : './perl';
==== //depot/maint-5.6/macperl/t/comp/term.t#2 (xtext) ====
==== //depot/maint-5.6/macperl/t/lib/anydbm.t#2 (xtext) ====
32c32
< if ($Is_Dosish) {
---
> if ($Is_Dosish || $^O eq 'MacOS') {
==== //depot/maint-5.6/macperl/t/lib/autoloader.t#2 (xtext) ====
5c5,11
< $dir = "auto-$$";
---
> if ($^O eq 'MacOS') {
> $dir = ":auto-$$";
> $sep = ":";
> } else {
> $dir = "auto-$$";
> $sep = "/";
> }
14,15c20,21
< mkdir "$dir/auto", 0755 or die "Can't mkdir: $!";
< mkdir "$dir/auto/Foo", 0755 or die "Can't mkdir: $!";
---
> mkdir "$dir${sep}auto", 0755 or die "Can't mkdir: $!";
> mkdir "$dir${sep}auto${sep}Foo", 0755 or die "Can't mkdir: $!";
17c23
< open(FOO, ">$dir/auto/Foo/foo.al") or die;
---
> open(FOO, ">$dir${sep}auto${sep}Foo${sep}foo.al") or die;
25c31
< open(BAR, ">$dir/auto/Foo/bar.al") or die;
---
> open(BAR, ">$dir${sep}auto${sep}Foo${sep}bar.al") or die;
33c39
< open(BAZ, ">$dir/auto/Foo/bazmarkhian.al") or die;
---
> open(BAZ, ">$dir${sep}auto${sep}Foo${sep}bazmarkhian.al") or die;
93c99
< open(F, ">$dir/auto/Foo/a.al") or die;
---
> open(F, ">$dir${sep}auto${sep}Foo${sep}a.al") or die;
102c108
< open(F, ">$dir/auto/Foo/b.al") or die;
---
> open(F, ">$dir${sep}auto${sep}Foo${sep}b.al") or die;
114,120c120,126
< unlink "$dir/auto/Foo/foo.al";
< unlink "$dir/auto/Foo/bar.al";
< unlink "$dir/auto/Foo/bazmarkhian.al";
< unlink "$dir/auto/Foo/a.al";
< unlink "$dir/auto/Foo/b.al";
< rmdir "$dir/auto/Foo";
< rmdir "$dir/auto";
---
> unlink "$dir${sep}auto${sep}Foo${sep}foo.al";
> unlink "$dir${sep}auto${sep}Foo${sep}bar.al";
> unlink "$dir${sep}auto${sep}Foo${sep}bazmarkhian.al";
> unlink "$dir${sep}auto${sep}Foo${sep}a.al";
> unlink "$dir${sep}auto${sep}Foo${sep}b.al";
> rmdir "$dir${sep}auto${sep}Foo";
> rmdir "$dir${sep}auto";
==== //depot/maint-5.6/macperl/t/lib/dirhand.t#2 (xtext) ====
17c17,18
< $dot = new DirHandle ".";
---
> $dot = new DirHandle ($^O eq 'MacOS' ? ':' : '.');
>
==== //depot/maint-5.6/macperl/t/lib/filefind.t#2 (xtext) ====
5a6
> my $warn_msg;
9a11,12
>
> $SIG{'__WARN__'} = sub { $warn_msg = $_[0]; warn "# $_[0]"; }
12c15
< if ( $symlink_exists ) { print "1..117\n"; }
---
> if ( $symlink_exists ) { print "1..167\n"; }
17,19c20,26
< find(sub { print "ok 1\n" if $_ eq 'filefind.t'; }, ".");
< finddepth(sub { print "ok 2\n" if $_ eq 'filefind.t'; }, ".");
<
---
> if ($^O eq 'MacOS') {
> find(sub { print "ok 1\n" if $_ eq 'filefind.t'; }, ':');
> finddepth(sub { print "ok 2\n" if $_ eq 'filefind.t'; }, ':');
> } else {
> find(sub { print "ok 1\n" if $_ eq 'filefind.t'; }, '.');
> finddepth(sub { print "ok 2\n" if $_ eq 'filefind.t'; }, '.');
> }
25,34c32,55
< unlink 'fa/fa_ord','fa/fsl','fa/faa/faa_ord',
< 'fa/fab/fab_ord','fa/fab/faba/faba_ord','fb/fb_ord','fb/fba/fba_ord';
< rmdir 'fa/faa';
< rmdir 'fa/fab/faba';
< rmdir 'fa/fab';
< rmdir 'fa';
< rmdir 'fb/fba';
< rmdir 'fb';
< chdir '..';
< rmdir 'for_find';
---
> if ($^O eq 'MacOS') {
> unlink ':fa:fa_ord',':fa:fsl',':fa:faa:faa_ord',
> ':fa:fab:fab_ord',':fa:fab:faba:faba_ord',':fb:fb_ord',':fb:fba:fba_ord';
> rmdir ':fa:faa';
> rmdir ':fa:fab:faba';
> rmdir ':fa:fab';
> rmdir ':fa';
> rmdir ':fb:fba';
> rmdir ':fb';
> chdir '::';
> rmdir ':for_find';
>
> } else {
> unlink 'fa/fa_ord','fa/fsl','fa/faa/faa_ord',
> 'fa/fab/fab_ord','fa/fab/faba/faba_ord','fb/fb_ord','fb/fba/fba_ord';
> rmdir 'fa/faa';
> rmdir 'fa/fab/faba';
> rmdir 'fa/fab';
> rmdir 'fa';
> rmdir 'fb/fba';
> rmdir 'fb';
> chdir '..';
> rmdir 'for_find';
> }
69c90
<
---
>
78,79c99,102
< if ( $OK ) {
< $OK= exists($Expect{substr($n,0,$i)}) if $i >= 0;
---
> unless ($^O eq 'MacOS') {
> if ( $OK ) {
> $OK= exists($Expect{substr($n,0,$i)}) if $i >= 0;
> }
90,91c113,116
< if ( $OK ) {
< $OK= exists($Expect{substr($_,0,$i)}) if $i >= 0;
---
> unless ($^O eq 'MacOS') {
> if ( $OK ) {
> $OK= exists($Expect{substr($_,0,$i)}) if $i >= 0;
> }
97,105c122,341
< MkDir( 'for_find',0770 );
< CheckDie(chdir(for_find));
< MkDir( 'fa',0770 );
< MkDir( 'fb',0770 );
< touch('fb/fb_ord');
< MkDir( 'fb/fba',0770 );
< touch('fb/fba/fba_ord');
< CheckDie( symlink('../fb','fa/fsl') ) if $symlink_exists;
< touch('fa/fa_ord');
---
> sub simple_wanted {
> print "# \$File::Find::dir => '$File::Find::dir'\n";
> print "# \$_ => '$_'\n";
> }
>
>
> if ($^O eq 'MacOS') {
>
> MkDir( 'for_find',0770 );
> CheckDie(chdir(for_find));
> MkDir( 'fa',0770 );
> MkDir( 'fb',0770 );
> touch(':fb:fb_ord');
> MkDir( ':fb:fba',0770 );
> touch(':fb:fba:fba_ord');
> CheckDie( symlink(':fb',':fa:fsl') ) if $symlink_exists;
> touch(':fa:fa_ord');
>
> MkDir( ':fa:faa',0770 );
> touch(':fa:faa:faa_ord');
> MkDir( ':fa:fab',0770 );
> touch(':fa:fab:fab_ord');
> MkDir( ':fa:fab:faba',0770 );
> touch(':fa:fab:faba:faba_ord');
>
> %Expect = (':' => 1, 'fsl' => 1, 'fa_ord' => 1, 'fab' => 1, 'fab_ord' => 1,
> 'faba' => 1, 'faa' => 1, 'faa_ord' => 1);
> delete $Expect{'fsl'} unless $symlink_exists;
> %Expect_Dir = (':' => 1, 'fa' => 1, 'faa' => 1, 'fab' => 1, 'faba' => 1,
> 'fb' => 1, 'fba' => 1);
> delete @Expect_Dir{'fb','fba'} unless $symlink_exists;
> File::Find::find( {wanted => \&wanted, },':fa' );
> Check( scalar(keys %Expect) == 0 );
>
> %Expect=(':fa' => 1, ':fa:fsl' => 1, ':fa:fa_ord' => 1, ':fa:fab' => 1,
> ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1,
> ':fa:fab:faba:faba_ord' => 1, ':fa:faa' => 1, ':fa:faa:faa_ord' => 1);
> delete $Expect{':fa:fsl'} unless $symlink_exists;
> %Expect_Dir = (':fa' => 1, ':fa:faa' => 1, ':fa:fab' => 1, ':fa:fab:faba' => 1,
> ':fb' => 1, ':fb:fba' => 1);
> delete @Expect_Dir{':fb',':fb:fba'} unless $symlink_exists;
> File::Find::find( {wanted => \&wanted, no_chdir => 1},':fa' );
> Check( scalar(keys %Expect) == 0 );
>
> %Expect=(':' => 1, ':fa' => 1, ':fa:fsl' => 1, ':fa:fa_ord' => 1, ':fa:fab' => 1,
> ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1,
> ':fa:fab:faba:faba_ord' => 1, ':fa:faa' => 1, ':fa:faa:faa_ord' => 1,
> ':fb' => 1, ':fb:fba' => 1, ':fb:fba:fba_ord' => 1, ':fb:fb_ord' => 1);
> delete $Expect{':fa:fsl'} unless $symlink_exists;
> %Expect_Dir = (':' => 1, ':fa' => 1, ':fa:faa' => 1, ':fa:fab' => 1, ':fa:fab:faba' => 1,
> ':fb' => 1, ':fb:fba' => 1);
> delete @Expect_Dir{':fb',':fb:fba'} unless $symlink_exists;
> File::Find::finddepth( {wanted => \&dn_wanted },':' );
> Check( scalar(keys %Expect) == 0 );
>
> %Expect=(':' => 1, ':fa' => 1, ':fa:fsl' => 1, ':fa:fa_ord' => 1, ':fa:fab' => 1,
> ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1,
> ':fa:fab:faba:faba_ord' => 1, ':fa:faa' => 1, ':fa:faa:faa_ord' => 1,
> ':fb' => 1, ':fb:fba' => 1, ':fb:fba:fba_ord' => 1, ':fb:fb_ord' => 1);
> delete $Expect{':fa:fsl'} unless $symlink_exists;
> %Expect_Dir = (':' => 1, ':fa' => 1, ':fa:faa' => 1, ':fa:fab' => 1, ':fa:fab:faba' => 1,
> ':fb' => 1, ':fb:fba' => 1);
> delete @Expect_Dir{':fb',':fb:fba'} unless $symlink_exists;
> File::Find::finddepth( {wanted => \&d_wanted, no_chdir => 1 },':' );
> Check( scalar(keys %Expect) == 0 );
>
> if ( $symlink_exists ) {
> $FastFileTests_OK= 1;
> %Expect=(':' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
> 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faa' => 1,
> 'faa_ord' => 1);
> %Expect_Dir = (':' => 1, 'fa' => 1, 'faa' => 1, 'fab' => 1, 'faba' => 1,
> 'fb' => 1, 'fba' => 1);
> File::Find::find( {wanted => \&wanted, follow_fast => 1},':fa' );
> Check( scalar(keys %Expect) == 0 );
>
> %Expect=(':fa' => 1, ':fa:fa_ord' => 1, ':fa:fsl' => 1, ':fa:fsl:fb_ord' => 1,
> ':fa:fsl:fba' => 1, ':fa:fsl:fba:fba_ord' => 1, ':fa:fab' => 1,
> ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1, ':fa:fab:faba:faba_ord' => 1,
> ':fa:faa' => 1, ':fa:faa:faa_ord' => 1);
> %Expect_Dir = (':fa' => 1, ':fa:faa' => 1, ':fa:fab' => 1, ':fa:fab:faba' => 1,
> ':fb' => 1, ':fb:fba' => 1);
> File::Find::find( {wanted => \&wanted, follow_fast => 1, no_chdir => 1},':fa' );
> Check( scalar(keys %Expect) == 0 );
>
> %Expect=(':fa' => 1, ':fa:fa_ord' => 1, ':fa:fsl' => 1, ':fa:fsl:fb_ord' => 1,
> ':fa:fsl:fba' => 1, ':fa:fsl:fba:fba_ord' => 1, ':fa:fab' => 1,
> ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1, ':fa:fab:faba:faba_ord' => 1,
> ':fa:faa' => 1, ':fa:faa:faa_ord' => 1);
> %Expect_Dir = (':fa' => 1, ':fa:faa' => 1, ':fa:fab' => 1, ':fa:fab:faba' => 1,
> ':fb' => 1, ':fb:fba' => 1);
> File::Find::finddepth( {wanted => \&dn_wanted, follow_fast => 1},':fa' );
> Check( scalar(keys %Expect) == 0 );
>
> %Expect=(':fa' => 1, ':fa:fa_ord' => 1, ':fa:fsl' => 1, ':fa:fsl:fb_ord' => 1,
> ':fa:fsl:fba' => 1, ':fa:fsl:fba:fba_ord' => 1, ':fa:fab' => 1,
> ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1, ':fa:fab:faba:faba_ord' => 1,
> ':fa:faa' => 1, ':fa:faa:faa_ord' => 1);
> %Expect_Dir = (':fa' => 1, ':fa:faa' => 1, ':fa:fab' => 1, ':fa:fab:faba' => 1,
> ':fb' => 1, ':fb:fba' => 1);
> File::Find::finddepth( {wanted => \&d_wanted, follow_fast => 1, no_chdir => 1},':fa' );
> Check( scalar(keys %Expect) == 0 );
>
> # tests below added by Thomas Wegner, 25-04-2001
>
> print "# check dangling symbolic links\n";
> MkDir( 'dangling_dir',0770 );
> CheckDie( symlink('dangling_dir','dangling_dir_sl') );
> rmdir 'dangling_dir';
> touch('dangling_file');
> CheckDie( symlink('dangling_file',':fa:dangling_file_sl') );
> unlink 'dangling_file';
>
> %Expect=(':' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
> 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faba_ord' => 1,
> 'faa' => 1, 'faa_ord' => 1);
> %Expect_Dir = (':' => 1, 'fa' => 1, 'faa' => 1, 'fab' => 1, 'faba' => 1,
> 'fb' => 1, 'fba' => 1);
> File::Find::find( {wanted => \&d_wanted, follow => 1}, 'dangling_dir_sl', ':fa' );
> Check( $warn_msg =~ m|dangling_dir_sl is a dangling symbolic link| );
> unlink ':fa:dangling_file_sl', 'dangling_dir_sl';
>
> print "# check recursion\n";
> CheckDie( symlink(':fa:faa',':fa:faa:faa_sl') );
> undef $@;
> eval {File::Find::find( {wanted => \&simple_wanted, follow => 1},':fa' ); };
> print "# Died: $@";
> Check( $@ =~ m|:for_find:fa:faa:faa_sl is a recursive symbolic link| );
> unlink 'faa_sl';
> chdir ':::'; # chdir '../..';
>
> print "# check follow_skip (file)\n";
> CheckDie( symlink(':fa:fa_ord',':fa:fa_ord_sl') ); # symlink to a file
> undef $@;
> eval {File::Find::finddepth( {wanted => \&simple_wanted, follow => 1, follow_skip => 0},':fa' );};
> print "# Died: $@";
> Check( $@ =~ m|:for_find:fa:fa_ord encountered a second time| );
> chdir '::'; # chdir '..';
>
> %Expect=(':' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
> 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faba_ord' => 1,
> 'faa' => 1, 'faa_ord' => 1);
> %Expect_Dir = (':' => 1, 'fa' => 1, 'faa' => 1, 'fab' => 1, 'faba' => 1,
> 'fb' => 1, 'fba' => 1);
> File::Find::finddepth( {wanted => \&d_wanted, follow => 1, follow_skip => 1},':fa' );
> Check( scalar(keys %Expect) == 0 );
> unlink ':fa:fa_ord_sl';
>
> print "# check follow_skip (directory)\n";
> CheckDie( symlink(':fa:faa',':fa:faa_sl') ); # symlink to a directory
> undef $@;
> eval {File::Find::find( {wanted => \&simple_wanted, follow => 1, follow_skip => 0},':fa' );};
> print "# Died: $@";
> Check( $@ =~ m|:for_find:fa:faa: encountered a second time| );
> chdir '::'; # chdir '..';
>
> undef $@;
> eval {File::Find::find( {wanted => \&simple_wanted, follow => 1, follow_skip => 1},':fa' );};
> print "# Died: $@";
> Check( $@ =~ m|:for_find:fa:faa: encountered a second time| );
> chdir '::'; # chdir '..';
>
> %Expect=(':' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
> 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faba_ord' => 1,
> 'faa' => 1, 'faa_ord' => 1);
> %Expect_Dir = (':' => 1, 'fa' => 1, 'faa' => 1, 'fab' => 1, 'faba' => 1,
> 'fb' => 1, 'fba' => 1);
> File::Find::find( {wanted => \&d_wanted, follow => 1, follow_skip => 2},':fa' );
> Check( scalar(keys %Expect) == 0 );
> unlink ':fa:faa_sl';
> }
>
> } else {
>
> MkDir( 'for_find',0770 );
> CheckDie(chdir(for_find));
> MkDir( 'fa',0770 );
> MkDir( 'fb',0770 );
> touch('fb/fb_ord');
> MkDir( 'fb/fba',0770 );
> touch('fb/fba/fba_ord');
> CheckDie( symlink('../fb','fa/fsl') ) if $symlink_exists;
> touch('fa/fa_ord');
>
> MkDir( 'fa/faa',0770 );
> touch('fa/faa/faa_ord');
> MkDir( 'fa/fab',0770 );
> touch('fa/fab/fab_ord');
> MkDir( 'fa/fab/faba',0770 );
> touch('fa/fab/faba/faba_ord');
>
> %Expect = ('.' => 1, 'fsl' => 1, 'fa_ord' => 1, 'fab' => 1, 'fab_ord' => 1,
> 'faba' => 1, 'faa' => 1, 'faa_ord' => 1);
> delete $Expect{'fsl'} unless $symlink_exists;
> %Expect_Dir = ('fa' => 1, 'faa' => 1, 'fab' => 1, 'faba' => 1,
> 'fb' => 1, 'fba' => 1);
> delete @Expect_Dir{'fb','fba'} unless $symlink_exists;
> File::Find::find( {wanted => \&wanted, },'fa' );
> Check( scalar(keys %Expect) == 0 );
>
> %Expect=('fa' => 1, 'fa/fsl' => 1, 'fa/fa_ord' => 1, 'fa/fab' => 1,
> 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1,
> 'fa/fab/faba/faba_ord' => 1, 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
> delete $Expect{'fa/fsl'} unless $symlink_exists;
> %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
> 'fb' => 1, 'fb/fba' => 1);
> delete @Expect_Dir{'fb','fb/fba'} unless $symlink_exists;
> File::Find::find( {wanted => \&wanted, no_chdir => 1},'fa' );
> Check( scalar(keys %Expect) == 0 );
>
> %Expect=('.' => 1, './fa' => 1, './fa/fsl' => 1, './fa/fa_ord' => 1, './fa/fab' => 1,
> './fa/fab/fab_ord' => 1, './fa/fab/faba' => 1,
> './fa/fab/faba/faba_ord' => 1, './fa/faa' => 1, './fa/faa/faa_ord' => 1,
> './fb' => 1, './fb/fba' => 1, './fb/fba/fba_ord' => 1, './fb/fb_ord' => 1);
> delete $Expect{'./fa/fsl'} unless $symlink_exists;
> %Expect_Dir = ('./fa' => 1, './fa/faa' => 1, '/fa/fab' => 1, './fa/fab/faba' => 1,
> './fb' => 1, './fb/fba' => 1);
> delete @Expect_Dir{'./fb','./fb/fba'} unless $symlink_exists;
> File::Find::finddepth( {wanted => \&dn_wanted },'.' );
> Check( scalar(keys %Expect) == 0 );
107,112c343,352
< MkDir( 'fa/faa',0770 );
< touch('fa/faa/faa_ord');
< MkDir( 'fa/fab',0770 );
< touch('fa/fab/fab_ord');
< MkDir( 'fa/fab/faba',0770 );
< touch('fa/fab/faba/faba_ord');
---
> %Expect=('.' => 1, './fa' => 1, './fa/fsl' => 1, './fa/fa_ord' => 1, './fa/fab' => 1,
> './fa/fab/fab_ord' => 1, './fa/fab/faba' => 1,
> './fa/fab/faba/faba_ord' => 1, './fa/faa' => 1, './fa/faa/faa_ord' => 1,
> './fb' => 1, './fb/fba' => 1, './fb/fba/fba_ord' => 1, './fb/fb_ord' => 1);
> delete $Expect{'./fa/fsl'} unless $symlink_exists;
> %Expect_Dir = ('./fa' => 1, './fa/faa' => 1, '/fa/fab' => 1, './fa/fab/faba' => 1,
> './fb' => 1, './fb/fba' => 1);
> delete @Expect_Dir{'./fb','./fb/fba'} unless $symlink_exists;
> File::Find::finddepth( {wanted => \&d_wanted, no_chdir => 1 },'.' );
> Check( scalar(keys %Expect) == 0 );
114,121c354,362
< %Expect = ('.' => 1, 'fsl' => 1, 'fa_ord' => 1, 'fab' => 1, 'fab_ord' => 1,
< 'faba' => 1, 'faa' => 1, 'faa_ord' => 1);
< delete $Expect{'fsl'} unless $symlink_exists;
< %Expect_Dir = ('fa' => 1, 'faa' => 1, 'fab' => 1, 'faba' => 1,
< 'fb' => 1, 'fba' => 1);
< delete @Expect_Dir{'fb','fba'} unless $symlink_exists;
< File::Find::find( {wanted => \&wanted, },'fa' );
< Check( scalar(keys %Expect) == 0 );
---
> if ( $symlink_exists ) {
> $FastFileTests_OK= 1;
> %Expect=('.' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
> 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faa' => 1,
> 'faa_ord' => 1);
> %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
> 'fb' => 1, 'fb/fba' => 1);
> File::Find::find( {wanted => \&wanted, follow_fast => 1},'fa' );
> Check( scalar(keys %Expect) == 0 );
123,130c364,371
< %Expect=('fa' => 1, 'fa/fsl' => 1, 'fa/fa_ord' => 1, 'fa/fab' => 1,
< 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1,
< 'fa/fab/faba/faba_ord' => 1, 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
< delete $Expect{'fa/fsl'} unless $symlink_exists;
< %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
< 'fb' => 1, 'fb/fba' => 1);
< delete @Expect_Dir{'fb','fb/fba'} unless $symlink_exists;
< File::Find::find( {wanted => \&wanted, no_chdir => 1},'fa' );
---
> %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
> 'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
> 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
> 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
> %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
> 'fb' => 1, 'fb/fba' => 1);
> File::Find::find( {wanted => \&wanted, follow_fast => 1, no_chdir => 1},'fa' );
> Check( scalar(keys %Expect) == 0 );
132c373,380
< Check( scalar(keys %Expect) == 0 );
---
> %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
> 'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
> 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
> 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
> %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
> 'fb' => 1, 'fb/fba' => 1);
> File::Find::finddepth( {wanted => \&dn_wanted, follow_fast => 1},'fa' );
> Check( scalar(keys %Expect) == 0 );
134,143c382,389
< %Expect=('.' => 1, './fa' => 1, './fa/fsl' => 1, './fa/fa_ord' => 1, './fa/fab' => 1,
< './fa/fab/fab_ord' => 1, './fa/fab/faba' => 1,
< './fa/fab/faba/faba_ord' => 1, './fa/faa' => 1, './fa/faa/faa_ord' => 1,
< './fb' => 1, './fb/fba' => 1, './fb/fba/fba_ord' => 1, './fb/fb_ord' => 1);
< delete $Expect{'./fa/fsl'} unless $symlink_exists;
< %Expect_Dir = ('./fa' => 1, './fa/faa' => 1, '/fa/fab' => 1, './fa/fab/faba' => 1,
< './fb' => 1, './fb/fba' => 1);
< delete @Expect_Dir{'./fb','./fb/fba'} unless $symlink_exists;
< File::Find::finddepth( {wanted => \&dn_wanted },'.' );
< Check( scalar(keys %Expect) == 0 );
---
> %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
> 'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
> 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
> 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
> %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
> 'fb' => 1, 'fb/fba' => 1);
> File::Find::finddepth( {wanted => \&d_wanted, follow_fast => 1, no_chdir => 1},'fa' );
> Check( scalar(keys %Expect) == 0 );
145,154c391
< %Expect=('.' => 1, './fa' => 1, './fa/fsl' => 1, './fa/fa_ord' => 1, './fa/fab' => 1,
< './fa/fab/fab_ord' => 1, './fa/fab/faba' => 1,
< './fa/fab/faba/faba_ord' => 1, './fa/faa' => 1, './fa/faa/faa_ord' => 1,
< './fb' => 1, './fb/fba' => 1, './fb/fba/fba_ord' => 1, './fb/fb_ord' => 1);
< delete $Expect{'./fa/fsl'} unless $symlink_exists;
< %Expect_Dir = ('./fa' => 1, './fa/faa' => 1, '/fa/fab' => 1, './fa/fab/faba' => 1,
< './fb' => 1, './fb/fba' => 1);
< delete @Expect_Dir{'./fb','./fb/fba'} unless $symlink_exists;
< File::Find::finddepth( {wanted => \&d_wanted, no_chdir => 1 },'.' );
< Check( scalar(keys %Expect) == 0 );
---
> # tests below added by Thomas Wegner, 25-04-2001
156,162c393,399
< if ( $symlink_exists ) {
< $FastFileTests_OK= 1;
< %Expect=('.' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
< 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faa' => 1,
< 'faa_ord' => 1);
< %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
< 'fb' => 1, 'fb/fba' => 1);
---
> print "# check dangling symbolic links\n";
> MkDir( 'dangling_dir',0770 );
> CheckDie( symlink('dangling_dir','dangling_dir_sl') );
> rmdir 'dangling_dir';
> touch('dangling_file');
> CheckDie( symlink('dangling_file','fa/dangling_file_sl') );
> unlink 'dangling_file';
164,165c401,408
< File::Find::find( {wanted => \&wanted, follow_fast => 1},'fa' );
< Check( scalar(keys %Expect) == 0 );
---
> %Expect=('.' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
> 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faba_ord' => 1,
> 'faa' => 1, 'faa_ord' => 1);
> %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, 'fa/fab' => 1, 'fa/fab/faba' => 1,
> 'fb' => 1, 'fb/fba' => 1);
> File::Find::find( {wanted => \&d_wanted, follow => 1}, 'dangling_dir_sl', 'fa' );
> Check( $warn_msg =~ m|dangling_dir_sl is a dangling symbolic link| );
> unlink 'fa/dangling_file_sl', 'dangling_dir_sl';
167,174c410,434
< %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
< 'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
< 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
< 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
< %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
< 'fb' => 1, 'fb/fba' => 1);
< File::Find::find( {wanted => \&wanted, follow_fast => 1, no_chdir => 1},'fa' );
< Check( scalar(keys %Expect) == 0 );
---
> print "# check recursion\n";
> CheckDie( symlink('fa/faa','fa/faa/faa_sl') );
> undef $@;
> eval {File::Find::find( {wanted => \&simple_wanted, follow => 1},'fa' ); };
> print "# Died: $@";
> Check( $@ =~ m|for_find/fa/faa/faa_sl is a recursive symbolic link| );
> unlink 'faa_sl';
> chdir '../..';
>
> print "# check follow_skip (file)\n";
> CheckDie( symlink('fa/fa_ord','fa/fa_ord_sl') ); # symlink to a file
> undef $@;
> eval {File::Find::finddepth( {wanted => \&simple_wanted, follow => 1, follow_skip => 0},'fa' );};
> print "# Died: $@";
> Check( $@ =~ m|for_find/fa/fa_ord encountered a second time| );
> chdir '..';
>
> %Expect=('.' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
> 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faba_ord' => 1,
> 'faa' => 1, 'faa_ord' => 1);
> %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, 'fa/fab' => 1, 'fa/fab/faba' => 1,
> 'fb' => 1, 'fb/fba' => 1);
> File::Find::finddepth( {wanted => \&d_wanted, follow => 1, follow_skip => 1},'fa' );
> Check( scalar(keys %Expect) == 0 );
> unlink 'fa/fa_ord_sl';
176,181c436,442
< %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
< 'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
< 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
< 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
< %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
< 'fb' => 1, 'fb/fba' => 1);
---
> print "# check follow_skip (directory)\n";
> CheckDie( symlink('fa/faa','fa/faa_sl') ); # symlink to a directory
> undef $@;
> eval {File::Find::find( {wanted => \&simple_wanted, follow => 1, follow_skip => 0},'fa' );};
> print "# Died: $@";
> Check( $@ =~ m|for_find/fa/faa encountered a second time| );
> chdir '..';
183,184c444,448
< File::Find::finddepth( {wanted => \&dn_wanted, follow_fast => 1},'fa' );
< Check( scalar(keys %Expect) == 0 );
---
> undef $@;
> eval {File::Find::find( {wanted => \&simple_wanted, follow => 1, follow_skip => 1},'fa' );};
> print "# Died: $@";
> Check( $@ =~ m|for_find/fa/faa encountered a second time| );
> chdir '..';
186,191c450,457
< %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
< 'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
< 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
< 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
< %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, '/fa/fab' => 1, 'fa/fab/faba' => 1,
< 'fb' => 1, 'fb/fba' => 1);
---
> %Expect=('.' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
> 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faba_ord' => 1,
> 'faa' => 1, 'faa_ord' => 1);
> %Expect_Dir = ('fa' => 1, 'fa/faa' => 1, 'fa/fab' => 1, 'fa/fab/faba' => 1,
> 'fb' => 1, 'fb/fba' => 1);
> File::Find::find( {wanted => \&d_wanted, follow => 1, follow_skip => 2},'fa' );
> Check( scalar(keys %Expect) == 0 );
> unlink 'fa/faa_sl';
193,194c459
< File::Find::finddepth( {wanted => \&d_wanted, follow_fast => 1, no_chdir => 1},'fa' );
< Check( scalar(keys %Expect) == 0 );
---
> }
==== //depot/maint-5.6/macperl/t/lib/io_dir.t#2 (xtext) ====
22c22,24
< $dot = new IO::Dir ".";
---
> my $DIR = $^O eq 'MacOS' ? ":" : ".";
>
> $dot = new IO::Dir $DIR;
44c46
< tie %dir, IO::Dir, ".";
---
> tie %dir, IO::Dir, $DIR;
58c60
< tie %dirx, IO::Dir, ".", DIR_UNLINK;
---
> tie %dirx, IO::Dir, $DIR, DIR_UNLINK;
==== //depot/maint-5.6/macperl/t/lib/selfloader.t#2 (xtext) ====
5a6,12
> $sep = "/";
>
> if ($^O eq 'MacOS') {
> $dir = ":" . $dir;
> $sep = ":";
> }
>
14c21
< open(FOO, ">$dir/Foo.pm") or die;
---
> open(FOO, ">$dir${sep}Foo.pm") or die;
43c50
< open(BAR, ">$dir/Bar.pm") or die;
---
> open(BAR, ">$dir${sep}Bar.pm") or die;
199c206
< unlink "$dir/Foo.pm", "$dir/Bar.pm";
---
> unlink "$dir${sep}Foo.pm", "$dir${sep}Bar.pm";
==== //depot/maint-5.6/macperl/t/op/anonsub.t#2 (xtext) ====
6a7
> $Is_MacOS = $^O eq 'MacOS';
29,32c30,35
< `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
< $Is_MSWin32 ?
< `.\\perl -I../lib $switch $tmpfile 2>&1` :
< `./perl $switch $tmpfile 2>&1`;
---
> `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
> $Is_MSWin32 ?
> `.\\perl -I../lib $switch $tmpfile 2>&1` :
> $Is_MacOS ?
> `$^X -I::lib $switch $tmpfile` :
> `./perl $switch $tmpfile 2>&1`;
==== //depot/maint-5.6/macperl/t/op/closure.t#2 (xtext) ====
467a468
> : ($^O eq 'MacOS') ? $^X
==== //depot/maint-5.6/macperl/t/op/defins.t#2 (xtext) ====
14a15
> $saved_filename = $^O eq 'MacOS' ? ':0' : './0';
19c20
< open(FILE,">./0");
---
> open(FILE,">$saved_filename");
24c25
< open(FILE,"<./0");
---
> open(FILE,"<$saved_filename");
66c67
< opendir(DIR,'.');
---
> opendir(DIR,($^O eq 'MacOS' ? ':' : '.'));
119c120
< unlink("./0");
---
> unlink($saved_filename);
==== //depot/maint-5.6/macperl/t/op/die_exit.t#2 (xtext) ====
18c18
< my $perl = -e '../perl' ? '../perl' : -e './perl' ? './perl' : 'perl';
---
> my $perl = -e '../perl' ? '../perl' : -e './perl' ? './perl' : -e $^X ? $^X : 'perl';
==== //depot/maint-5.6/macperl/t/op/exec.t#2 (xtext) ====
13a14,19
> if ($^O eq 'MacOS') {
> # XXX the system tests could be written to use ./perl and so work on Win32
> print "1..0 # Mostly useless tests for Mac OS\n";
> exit(0);
> }
>
==== //depot/maint-5.6/macperl/t/op/goto.t#2 (xtext) ====
32c32
< $PERL = ($^O eq 'MSWin32') ? '.\perl' : './perl';
---
> $PERL = ($^O eq 'MSWin32') ? '.\perl' : ($^O eq 'MacOS') ? $^X : './perl';
==== //depot/maint-5.6/macperl/t/op/misc.t#2 (xtext) ====
20c20
< $CAT = (($^O eq 'MSWin32') ? '.\perl -e "print <>"' : 'cat');
---
> $CAT = (($^O eq 'MSWin32') ? '.\perl -e "print <>"' : ($^O eq 'MacOS') ? 'catenate' : 'cat');
36a37,38
> } elsif ($^O eq 'MacOS') {
> $results = `$^X -I::lib $switch $tmpfile`;
==== //depot/maint-5.6/macperl/t/op/pack.t#2 (xtext) ====
46c46
< open(BIN, "./perl") || open(BIN, "./perl.exe")
---
> open(BIN, "./perl") || open(BIN, "./perl.exe") || open(BIN, $^X)
==== //depot/maint-5.6/macperl/t/op/regexp.t#2 (xtext) ====
41c41
< open(TESTS,'op/re_tests') || open(TESTS,'t/op/re_tests') ||
---
> open(TESTS,'op/re_tests') || open(TESTS,'t/op/re_tests') || open(TESTS,':op:re_tests') ||
==== //depot/maint-5.6/macperl/t/op/regexp_noamp.t#2 (xtext) ====
4c4
< for $file ('op/regexp.t', 't/op/regexp.t') {
---
> for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
10c10
< die "Cannot find op/regexp.t or t/op/regexp.t\n";
---
> die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
==== //depot/maint-5.6/macperl/t/op/split.t#2 (xtext) ====
49a50
> elsif ($^O eq 'MacOS'){ $foo = `$^X "-D1024" -e "(\$a,\$b) = split;"` }
==== //depot/maint-5.6/macperl/t/op/write.t#2 (xtext) ====
5c5,6
< my $CAT = ($^O eq 'MSWin32') ? 'type' : 'cat';
---
> my $CAT = ($^O eq 'MSWin32') ? 'type'
> : ($^O eq 'MacOS') ? 'catenate' : 'cat';
==== //depot/maint-5.6/macperl/t/pragma/strict.t#2 (xtext) ====
20c20
< foreach (sort glob("pragma/strict-*")) {
---
> foreach (sort glob($^O eq 'MacOS' ? ":pragma:strict-*" : "pragma/strict-*")) {
56a57
> $code =~ s|\./abc|:abc|g if $^O eq 'MacOS';
63a65
> $prog =~ s|\./abc|:abc|g if $^O eq 'MacOS';
69a72,73
> $^O eq 'MacOS' ?
> `$^X -I::lib $switch $tmpfile` :
76a81,82
> $expected =~ s|(\./)?abc\.pm|:abc.pm|g if $^O eq 'MacOS';
> $expected =~ s|./abc|:abc|g if $^O eq 'MacOS';