Change 33174 by [EMAIL PROTECTED] on 2008/02/01 20:08:10
Integrate:
[ 30718]
Subject: [PATCH] Cwd doesn't need ppport.h in core
From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
Date: Tue, 20 Mar 2007 13:16:46 -0700 (PDT)
Message-ID: <[EMAIL PROTECTED]>
[ 31382]
Upgrade to PathTools 3.25
[ 31431]
Make File::Spec::VMS->splitdir stop returning an empty first directory
when passed a relative path. Also, don't split on escaped directory
delimiters.
[ 31432]
Skip a test that causes list assignment to %ENV errors on VMS.
[ 31436]
Subject: [perl #40103] File::Spec->case_tolerant() should return true
on Cygwin
From: "Reini Urban via RT" <[EMAIL PROTECTED]>
Date: Wed, 20 Jun 2007 11:50:21 -0700
Message-ID: <[EMAIL PROTECTED]>
[ 31440]
Subject: [PATCH] File::Spec::Cygwin more tests and silence warning
From: Reini Urban <[EMAIL PROTECTED]>
Date: Wed, 20 Jun 2007 21:10:05 +0200
Message-ID: <[EMAIL PROTECTED]>
[ 31686]
From #43633: Cwd::cwd() use in File::Spec::Unix use causes unnecessary
fork()
[ 31709]
Subject: [PATCH] CYG07-File-Spec-case_tolerant
From: Reini Urban <[EMAIL PROTECTED]>
Date: Tue, 14 Aug 2007 08:45:34 +0200
Message-Id: <[EMAIL PROTECTED]>
[ 31715]
Subject: Re: Test failure @recent bleadperls (31712,31711)
From: Reini Urban <[EMAIL PROTECTED]>
Date: Wed, 15 Aug 2007 09:44:29 +0200
Message-Id: <[EMAIL PROTECTED]>
[ 31720]
Fix syntax error introduced by #31715
Fix "Useless use of a constant in void context" warning introduced by
#31709 which was causing failures in ext/Compress/Zlib/t/05examples.t
and ext/IO_Compress_Zlib/t/010examples.t on Win32.
[ 31772]
Bump $VERSION due to #31686
[ 32006]
Subject: [PATCH - 2nd revision] /cygdrive is configurable
From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
Date: Mon, 1 Oct 2007 19:32:19 -0400
Message-ID: <[EMAIL PROTECTED]>
[ 32053]
Add symlink support to Cwd::_vms_abs_path.
[ 32550]
Subject: Re: [EMAIL PROTECTED] VMS symbolic links part 4 of 4 - Final
part
From: "John E. Malmberg" <[EMAIL PROTECTED]>
Date: Mon, 26 Nov 2007 23:35:30 -0600
Message-id: <[EMAIL PROTECTED]>
[ 32604]
Bump $VERSION of all PathTools modules to 3.2501
Affected files ...
... //depot/maint-5.8/perl/README.cygwin#11 integrate
... //depot/maint-5.8/perl/cygwin/cygwin.c#12 integrate
... //depot/maint-5.8/perl/ext/Cwd/Changes#12 integrate
... //depot/maint-5.8/perl/ext/Cwd/Cwd.xs#11 integrate
... //depot/maint-5.8/perl/ext/Cwd/Makefile.PL#2 integrate
... //depot/maint-5.8/perl/ext/Cwd/t/cwd.t#18 integrate
... //depot/maint-5.8/perl/lib/Cwd.pm#22 integrate
... //depot/maint-5.8/perl/lib/File/Spec.pm#19 integrate
... //depot/maint-5.8/perl/lib/File/Spec/Cygwin.pm#11 integrate
... //depot/maint-5.8/perl/lib/File/Spec/Epoc.pm#7 integrate
... //depot/maint-5.8/perl/lib/File/Spec/Functions.pm#6 integrate
... //depot/maint-5.8/perl/lib/File/Spec/Mac.pm#12 integrate
... //depot/maint-5.8/perl/lib/File/Spec/OS2.pm#12 integrate
... //depot/maint-5.8/perl/lib/File/Spec/Unix.pm#20 integrate
... //depot/maint-5.8/perl/lib/File/Spec/VMS.pm#15 integrate
... //depot/maint-5.8/perl/lib/File/Spec/Win32.pm#15 integrate
... //depot/maint-5.8/perl/lib/File/Spec/t/Spec.t#15 integrate
... //depot/maint-5.8/perl/lib/File/Spec/t/tmpdir.t#2 integrate
... //depot/maint-5.8/perl/mkppport.lst#9 integrate
... //depot/maint-5.8/perl/t/lib/cygwin.t#3 integrate
Differences ...
==== //depot/maint-5.8/perl/README.cygwin#11 (text) ====
Index: perl/README.cygwin
--- perl/README.cygwin#10~32406~ 2007-11-19 09:03:26.000000000 -0800
+++ perl/README.cygwin 2008-02-01 12:08:10.000000000 -0800
@@ -543,14 +543,15 @@
system|user,binmode|textmode,exec,cygexec,cygdrive,mixed,
notexec,managed,nosuid,devfs,proc,noumount
-If the argument is "/cygdrive", just the volume mount settings are returned.
+If the argument is "/cygdrive", then just the volume mount settings,
+and the cygdrive mount prefix are returned.
User mounts override system mounts.
$ perl -e 'print Cygwin::mount_flags "/usr/bin"'
system,binmode,cygexec
$ perl -e 'print Cygwin::mount_flags "/cygdrive"'
- binmode,cygdrive
+ binmode,cygdrive,/cygdrive
=item C<Cygwin::is_binmount>
==== //depot/maint-5.8/perl/cygwin/cygwin.c#12 (text) ====
Index: perl/cygwin/cygwin.c
--- perl/cygwin/cygwin.c#11~32406~ 2007-11-19 09:03:26.000000000 -0800
+++ perl/cygwin/cygwin.c 2008-02-01 12:08:10.000000000 -0800
@@ -292,28 +292,31 @@
char flags[260];
if (items != 1)
- Perl_croak(aTHX_ "Usage: Cygwin::mount_flags(mnt_dir)");
+ Perl_croak(aTHX_ "Usage: Cygwin::mount_flags(mnt_dir|'/cygwin')");
pathname = SvPV_nolen(ST(0));
-
- /* TODO: check for cygdrive registry setting. use CW_GET_CYGDRIVE_INFO then
+
+ /* TODO: Check for cygdrive registry setting,
+ * and then use CW_GET_CYGDRIVE_INFO
*/
if (!strcmp(pathname, "/cygdrive")) {
char user[260];
char system[260];
char user_flags[260];
char system_flags[260];
+
cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags,
system_flags);
- if (strlen(system) > 0)
- strcpy (flags, system_flags);
- if (strlen(user) > 0)
- strcpy(flags, user_flags);
- if (strlen(flags) > 0)
- strcat(flags, ",");
- strcat(flags, "cygdrive");
+
+ if (strlen(user) > 0) {
+ sprintf(flags, "%s,cygdrive,%s", user_flags, user);
+ } else {
+ sprintf(flags, "%s,cygdrive,%s", system_flags, system);
+ }
+
ST(0) = sv_2mortal(newSVpv(flags, 0));
XSRETURN(1);
+
} else {
struct mntent *mnt;
setmntent (0, 0);
==== //depot/maint-5.8/perl/ext/Cwd/Changes#12 (text) ====
Index: perl/ext/Cwd/Changes
--- perl/ext/Cwd/Changes#11~30133~ 2007-02-05 10:05:43.000000000 -0800
+++ perl/ext/Cwd/Changes 2008-02-01 12:08:10.000000000 -0800
@@ -1,5 +1,16 @@
Revision history for Perl distribution PathTools.
+ - Added a workaround for auto-vivication-of-function-args Perl bug
+ (triggered by OS/2-specific code). [Ilya Zakharevich]
+
+ - Sync with a bleadperl change: miniperl can no longer use Win32::*
+ functions because it cannot load Win32.dll. [Jan Dubois]
+
+ - We only need to load ppport.h when building outside the core, so we
+ avoid using it when in the core.
+
+3.24 - Sun Nov 19 22:52:49 2006
+
- Fixed a bug in the $ENV{PWD}-updating of Cwd::chdir() when a
dirhandle is passed in. [Steve Peters]
==== //depot/maint-5.8/perl/ext/Cwd/Cwd.xs#11 (text) ====
Index: perl/ext/Cwd/Cwd.xs
--- perl/ext/Cwd/Cwd.xs#10~30133~ 2007-02-05 10:05:43.000000000 -0800
+++ perl/ext/Cwd/Cwd.xs 2008-02-01 12:08:10.000000000 -0800
@@ -1,8 +1,10 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#define NEED_sv_2pv_nolen
-#include "ppport.h"
+#ifndef NO_PPPORT_H
+# define NEED_sv_2pv_nolen
+# include "ppport.h"
+#endif
#ifdef I_UNISTD
# include <unistd.h>
==== //depot/maint-5.8/perl/ext/Cwd/Makefile.PL#2 (text) ====
Index: perl/ext/Cwd/Makefile.PL
--- perl/ext/Cwd/Makefile.PL#1~17645~ 2002-07-19 12:29:57.000000000 -0700
+++ perl/ext/Cwd/Makefile.PL 2008-02-01 12:08:10.000000000 -0800
@@ -1,5 +1,7 @@
+# core-only Makefile.PL
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Cwd',
VERSION_FROM => '../../lib/Cwd.pm',
+ 'DEFINE' => '-DNO_PPPORT_H',
);
==== //depot/maint-5.8/perl/ext/Cwd/t/cwd.t#18 (text) ====
Index: perl/ext/Cwd/t/cwd.t
--- perl/ext/Cwd/t/cwd.t#17~30133~ 2007-02-05 10:05:43.000000000 -0800
+++ perl/ext/Cwd/t/cwd.t 2008-02-01 12:08:10.000000000 -0800
@@ -173,14 +173,18 @@
my $abs_path = Cwd::abs_path("linktest");
my $fast_abs_path = Cwd::fast_abs_path("linktest");
- my $want = File::Spec->catdir("t", $Test_Dir);
-
- like($abs_path, qr|$want$|);
- like($fast_abs_path, qr|$want$|);
- like(Cwd::_perl_abs_path("linktest"), qr|$want$|) if $EXTRA_ABSPATH_TESTS;
+ my $want = quotemeta(
+ File::Spec->rel2abs(
+ $ENV{PERL_CORE} ? $Test_Dir :
File::Spec->catdir('t', $Test_Dir)
+ )
+ );
+
+ like($abs_path, qr|$want$|i);
+ like($fast_abs_path, qr|$want$|i);
+ like(Cwd::_perl_abs_path("linktest"), qr|$want$|i) if $EXTRA_ABSPATH_TESTS;
rmtree($test_dirs[0], 0, 0);
- unlink "linktest";
+ 1 while unlink "linktest";
}
if ($ENV{PERL_CORE}) {
==== //depot/maint-5.8/perl/lib/Cwd.pm#22 (text) ====
Index: perl/lib/Cwd.pm
--- perl/lib/Cwd.pm#21~30734~ 2007-03-23 14:48:10.000000000 -0700
+++ perl/lib/Cwd.pm 2008-02-01 12:08:10.000000000 -0800
@@ -171,7 +171,7 @@
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
-$VERSION = '3.24';
+$VERSION = '3.2501';
@ISA = qw/ Exporter /;
@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
@@ -644,11 +644,19 @@
sub _vms_abs_path {
return $ENV{'DEFAULT'} unless @_;
+ my $path = shift;
- # may need to turn foo.dir into [.foo]
- my $path = VMS::Filespec::pathify($_[0]);
- $path = $_[0] unless defined $path;
+ if (-l $path) {
+ my $link_target = readlink($path);
+ die "Can't resolve link $path: $!" unless defined $link_target;
+
+ return _vms_abs_path($link_target);
+ }
+ # may need to turn foo.dir into [.foo]
+ my $pathified = VMS::Filespec::pathify($path);
+ $path = $pathified if defined $pathified;
+
return VMS::Filespec::rmsexpand($path);
}
==== //depot/maint-5.8/perl/lib/File/Spec.pm#19 (text) ====
Index: perl/lib/File/Spec.pm
--- perl/lib/File/Spec.pm#18~30133~ 2007-02-05 10:05:43.000000000 -0800
+++ perl/lib/File/Spec.pm 2008-02-01 12:08:10.000000000 -0800
@@ -3,7 +3,7 @@
use strict;
use vars qw(@ISA $VERSION);
-$VERSION = '3.24';
+$VERSION = '3.2501';
$VERSION = eval $VERSION;
my %module = (MacOS => 'Mac',
==== //depot/maint-5.8/perl/lib/File/Spec/Cygwin.pm#11 (text) ====
Index: perl/lib/File/Spec/Cygwin.pm
--- perl/lib/File/Spec/Cygwin.pm#10~30133~ 2007-02-05 10:05:43.000000000
-0800
+++ perl/lib/File/Spec/Cygwin.pm 2008-02-01 12:08:10.000000000 -0800
@@ -4,7 +4,7 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '1.1';
+$VERSION = '3.2501';
@ISA = qw(File::Spec::Unix);
@@ -53,7 +53,7 @@
my $self = shift;
# Don't create something that looks like a //network/path
- if ($_[0] eq '/' or $_[0] eq '\\') {
+ if ($_[0] and ($_[0] eq '/' or $_[0] eq '\\')) {
shift;
return $self->SUPER::catdir('', @_);
}
@@ -84,6 +84,8 @@
$ENV{TMPDIR}
/tmp
+ $ENV{'TMP'}
+ $ENV{'TEMP'}
C:/temp
Since Perl 5.8.0, if running under taint mode, and if the environment
@@ -94,14 +96,52 @@
my $tmpdir;
sub tmpdir {
return $tmpdir if defined $tmpdir;
- $tmpdir = $_[0]->_tmpdir( $ENV{TMPDIR}, "/tmp", 'C:/temp' );
+ $tmpdir = $_[0]->_tmpdir( $ENV{TMPDIR}, "/tmp", $ENV{'TMP'}, $ENV{'TEMP'},
'C:/temp' );
+}
+
+=item case_tolerant
+
+Override Unix. Cygwin case-tolerance depends on managed mount settings and
+as with MsWin32 on GetVolumeInformation() $ouFsFlags == FS_CASE_SENSITIVE,
+indicating the case significance when comparing file specifications.
+Default: 1
+
+=cut
+
+sub case_tolerant () {
+ if ($^O ne 'cygwin') {
+ return 1;
+ }
+ my $drive = shift;
+ if (! $drive) {
+ my @flags = split(/,/, Cygwin::mount_flags('/cygwin'));
+ my $prefix = pop(@flags);
+ if (! $prefix || $prefix eq 'cygdrive') {
+ $drive = '/cygdrive/c';
+ } elsif ($prefix eq '/') {
+ $drive = '/c';
+ } else {
+ $drive = "$prefix/c";
+ }
+ }
+ my $mntopts = Cygwin::mount_flags($drive);
+ if ($mntopts and ($mntopts =~ /,managed/)) {
+ return 0;
+ }
+ eval { require Win32API::File; } or return 1;
+ my $osFsType = "\0"x256;
+ my $osVolName = "\0"x256;
+ my $ouFsFlags = 0;
+ Win32API::File::GetVolumeInformation($drive, $osVolName, 256, [], [],
$ouFsFlags, $osFsType, 256 );
+ if ($ouFsFlags & Win32API::File::FS_CASE_SENSITIVE()) { return 0; }
+ else { return 1; }
}
=back
=head1 COPYRIGHT
-Copyright (c) 2004 by the Perl 5 Porters. All rights reserved.
+Copyright (c) 2004,2007 by the Perl 5 Porters. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
==== //depot/maint-5.8/perl/lib/File/Spec/Epoc.pm#7 (text) ====
Index: perl/lib/File/Spec/Epoc.pm
--- perl/lib/File/Spec/Epoc.pm#6~24144~ 2005-04-03 08:18:11.000000000 -0700
+++ perl/lib/File/Spec/Epoc.pm 2008-02-01 12:08:10.000000000 -0800
@@ -3,7 +3,7 @@
use strict;
use vars qw($VERSION @ISA);
-$VERSION = '1.1';
+$VERSION = '3.2501';
require File::Spec::Unix;
@ISA = qw(File::Spec::Unix);
==== //depot/maint-5.8/perl/lib/File/Spec/Functions.pm#6 (text) ====
Index: perl/lib/File/Spec/Functions.pm
--- perl/lib/File/Spec/Functions.pm#5~24144~ 2005-04-03 08:18:11.000000000
-0700
+++ perl/lib/File/Spec/Functions.pm 2008-02-01 12:08:10.000000000 -0800
@@ -5,7 +5,7 @@
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
-$VERSION = '1.3';
+$VERSION = '3.2501';
require Exporter;
==== //depot/maint-5.8/perl/lib/File/Spec/Mac.pm#12 (text) ====
Index: perl/lib/File/Spec/Mac.pm
--- perl/lib/File/Spec/Mac.pm#11~30133~ 2007-02-05 10:05:43.000000000 -0800
+++ perl/lib/File/Spec/Mac.pm 2008-02-01 12:08:10.000000000 -0800
@@ -4,7 +4,7 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '1.4';
+$VERSION = '3.2501';
@ISA = qw(File::Spec::Unix);
==== //depot/maint-5.8/perl/lib/File/Spec/OS2.pm#12 (text) ====
Index: perl/lib/File/Spec/OS2.pm
--- perl/lib/File/Spec/OS2.pm#11~25376~ 2005-09-10 12:39:28.000000000 -0700
+++ perl/lib/File/Spec/OS2.pm 2008-02-01 12:08:10.000000000 -0800
@@ -4,7 +4,7 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '1.2';
+$VERSION = '3.2501';
@ISA = qw(File::Spec::Unix);
@@ -37,9 +37,8 @@
my $tmpdir;
sub tmpdir {
return $tmpdir if defined $tmpdir;
- $tmpdir = $_[0]->_tmpdir( @ENV{qw(TMPDIR TEMP TMP)},
- '/tmp',
- '/' );
+ my @d = @ENV{qw(TMPDIR TEMP TMP)}; # function call could autovivivy
+ $tmpdir = $_[0]->_tmpdir( @d, '/tmp', '/' );
}
sub catdir {
==== //depot/maint-5.8/perl/lib/File/Spec/Unix.pm#20 (text) ====
Index: perl/lib/File/Spec/Unix.pm
--- perl/lib/File/Spec/Unix.pm#19~30133~ 2007-02-05 10:05:43.000000000
-0800
+++ perl/lib/File/Spec/Unix.pm 2008-02-01 12:08:10.000000000 -0800
@@ -3,7 +3,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '1.5';
+$VERSION = '3.2501';
=head1 NAME
@@ -475,7 +475,7 @@
# File::Spec subclasses use this.
sub _cwd {
require Cwd;
- Cwd::cwd();
+ Cwd::getcwd();
}
==== //depot/maint-5.8/perl/lib/File/Spec/VMS.pm#15 (text) ====
Index: perl/lib/File/Spec/VMS.pm
--- perl/lib/File/Spec/VMS.pm#14~30133~ 2007-02-05 10:05:43.000000000 -0800
+++ perl/lib/File/Spec/VMS.pm 2008-02-01 12:08:10.000000000 -0800
@@ -4,7 +4,7 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '1.4';
+$VERSION = '3.2501';
@ISA = qw(File::Spec::Unix);
@@ -36,6 +36,8 @@
sub canonpath {
my($self,$path) = @_;
+ return undef unless defined $path;
+
if ($path =~ m|/|) { # Fake Unix
my $pathify = $path =~ m|/\Z(?!\n)|;
$path = $self->SUPER::canonpath($path);
@@ -260,6 +262,8 @@
sub splitdir {
my($self,$dirspec) = @_;
+ my @dirs = ();
+ return @dirs if ( (!defined $dirspec) || ('' eq $dirspec) );
$dirspec =~ tr/<>/[]/; # < and > ==> [ and ]
$dirspec =~ s/\]\[\./\.\]\[/g; # ][. ==> .][
$dirspec =~ s/\[000000\.\]\[/\[/g; # [000000.][ ==> [
@@ -274,7 +278,8 @@
# .--] ==> .-.-]
# [--] ==> [-.-]
$dirspec = "[$dirspec]" unless $dirspec =~ /[\[<]/; # make legal
- my(@dirs) = split('\.', vmspath($dirspec));
+ $dirspec =~ s/^(\[|<)\./$1/;
+ @dirs = split /(?<!\^)\./, vmspath($dirspec);
$dirs[0] =~ s/^[\[<]//s; $dirs[-1] =~ s/[\]>]\Z(?!\n)//s;
@dirs;
}
==== //depot/maint-5.8/perl/lib/File/Spec/Win32.pm#15 (text) ====
Index: perl/lib/File/Spec/Win32.pm
--- perl/lib/File/Spec/Win32.pm#14~30133~ 2007-02-05 10:05:43.000000000
-0800
+++ perl/lib/File/Spec/Win32.pm 2008-02-01 12:08:10.000000000 -0800
@@ -5,7 +5,7 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '1.6';
+$VERSION = '3.2501';
@ISA = qw(File::Spec::Unix);
@@ -77,13 +77,35 @@
'/' );
}
-sub case_tolerant {
- return 1;
+=item case_tolerant
+
+MSWin32 case-tolerance depends on GetVolumeInformation() $ouFsFlags ==
FS_CASE_SENSITIVE,
+indicating the case significance when comparing file specifications.
+Since XP FS_CASE_SENSITIVE is effectively disabled for the NT subsubsystem.
+See http://cygwin.com/ml/cygwin/2007-07/msg00891.html
+Default: 1
+
+=cut
+
+sub case_tolerant () {
+ eval { require Win32API::File; } or return 1;
+ my $drive = shift || "C:";
+ my $osFsType = "\0"x256;
+ my $osVolName = "\0"x256;
+ my $ouFsFlags = 0;
+ Win32API::File::GetVolumeInformation($drive, $osVolName, 256, [], [],
$ouFsFlags, $osFsType, 256 );
+ if ($ouFsFlags & Win32API::File::FS_CASE_SENSITIVE()) { return 0; }
+ else { return 1; }
}
+=item file_name_is_absolute
+
+As of right now, this returns 2 if the path is absolute with a
+volume, 1 if it's absolute with no volume, 0 otherwise.
+
+=cut
+
sub file_name_is_absolute {
- # As of right now, this returns 2 if the path is absolute with a
- # volume, 1 if it's absolute with no volume, 0 otherwise.
my ($self,$file) = @_;
@@ -341,7 +363,7 @@
=head1 COPYRIGHT
-Copyright (c) 2004 by the Perl 5 Porters. All rights reserved.
+Copyright (c) 2004,2007 by the Perl 5 Porters. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
==== //depot/maint-5.8/perl/lib/File/Spec/t/Spec.t#15 (text) ====
Index: perl/lib/File/Spec/t/Spec.t
--- perl/lib/File/Spec/t/Spec.t#14~30133~ 2007-02-05 10:05:43.000000000
-0800
+++ perl/lib/File/Spec/t/Spec.t 2008-02-01 12:08:10.000000000 -0800
@@ -358,16 +358,17 @@
[ "VMS->splitdir('[]')", '' ],
[ "VMS->splitdir('d1.d2.d3')", 'd1,d2,d3' ],
[ "VMS->splitdir('[d1.d2.d3]')", 'd1,d2,d3' ],
-[ "VMS->splitdir('.d1.d2.d3')", ',d1,d2,d3' ],
-[ "VMS->splitdir('[.d1.d2.d3]')", ',d1,d2,d3' ],
-[ "VMS->splitdir('.-.d2.d3')", ',-,d2,d3' ],
-[ "VMS->splitdir('[.-.d2.d3]')", ',-,d2,d3' ],
+[ "VMS->splitdir('.d1.d2.d3')", 'd1,d2,d3' ],
+[ "VMS->splitdir('[.d1.d2.d3]')", 'd1,d2,d3' ],
+[ "VMS->splitdir('.-.d2.d3')", '-,d2,d3' ],
+[ "VMS->splitdir('[.-.d2.d3]')", '-,d2,d3' ],
[ "VMS->splitdir('[d1.d2]')", 'd1,d2' ],
[ "VMS->splitdir('[d1-.--d2]')", 'd1-,--d2' ],
[ "VMS->splitdir('[d1---.-.d2]')", 'd1---,-,d2' ],
[ "VMS->splitdir('[d1.---.d2]')", 'd1,-,-,-,d2' ],
[ "VMS->splitdir('[d1---d2]')", 'd1---d2' ],
[ "VMS->splitdir('[d1.][000000.d2]')", 'd1,d2' ],
+[ "VMS->splitdir('[.d1.d2^.d3]')", 'd1,d2^.d3' ],
[ "VMS->catdir('')", ''
],
[ "VMS->catdir('d1','d2','d3')",
'[.d1.d2.d3]' ],
@@ -618,9 +619,82 @@
#[ "Epoc->canonpath('/a/.')", '/a' ],
#[ "Epoc->canonpath('/.')", '/' ],
-[ "Cygwin->case_tolerant()", '0' ],
+[ "Cygwin->case_tolerant()", '1' ],
+[ "Cygwin->catfile('a','b','c')", 'a/b/c' ],
+[ "Cygwin->catfile('a','b','./c')", 'a/b/c' ],
+[ "Cygwin->catfile('./a','b','c')", 'a/b/c' ],
+[ "Cygwin->catfile('c')", 'c' ],
+[ "Cygwin->catfile('./c')", 'c' ],
+
+[ "Cygwin->splitpath('file')", ',,file' ],
+[ "Cygwin->splitpath('/d1/d2/d3/')", ',/d1/d2/d3/,' ],
+[ "Cygwin->splitpath('d1/d2/d3/')", ',d1/d2/d3/,' ],
+[ "Cygwin->splitpath('/d1/d2/d3/.')", ',/d1/d2/d3/.,' ],
+[ "Cygwin->splitpath('/d1/d2/d3/..')", ',/d1/d2/d3/..,' ],
+[ "Cygwin->splitpath('/d1/d2/d3/.file')", ',/d1/d2/d3/,.file' ],
+[ "Cygwin->splitpath('d1/d2/d3/file')", ',d1/d2/d3/,file' ],
+[ "Cygwin->splitpath('/../../d1/')", ',/../../d1/,' ],
+[ "Cygwin->splitpath('/././d1/')", ',/././d1/,' ],
+
+[ "Cygwin->catpath('','','file')", 'file' ],
+[ "Cygwin->catpath('','/d1/d2/d3/','')", '/d1/d2/d3/' ],
+[ "Cygwin->catpath('','d1/d2/d3/','')", 'd1/d2/d3/' ],
+[ "Cygwin->catpath('','/d1/d2/d3/.','')", '/d1/d2/d3/.' ],
+[ "Cygwin->catpath('','/d1/d2/d3/..','')", '/d1/d2/d3/..' ],
+[ "Cygwin->catpath('','/d1/d2/d3/','.file')", '/d1/d2/d3/.file' ],
+[ "Cygwin->catpath('','d1/d2/d3/','file')", 'd1/d2/d3/file' ],
+[ "Cygwin->catpath('','/../../d1/','')", '/../../d1/' ],
+[ "Cygwin->catpath('','/././d1/','')", '/././d1/' ],
+[ "Cygwin->catpath('d1','d2/d3/','')", 'd2/d3/' ],
+[ "Cygwin->catpath('d1','d2','d3/')", 'd2/d3/' ],
+
+[ "Cygwin->splitdir('')", '' ],
+[ "Cygwin->splitdir('/d1/d2/d3/')", ',d1,d2,d3,' ],
+[ "Cygwin->splitdir('d1/d2/d3/')", 'd1,d2,d3,' ],
+[ "Cygwin->splitdir('/d1/d2/d3')", ',d1,d2,d3' ],
+[ "Cygwin->splitdir('d1/d2/d3')", 'd1,d2,d3' ],
+
+[ "Cygwin->catdir()", '' ],
+[ "Cygwin->catdir('/')", '/' ],
+[ "Cygwin->catdir('','d1','d2','d3','')", '/d1/d2/d3' ],
+[ "Cygwin->catdir('d1','d2','d3','')", 'd1/d2/d3' ],
+[ "Cygwin->catdir('','d1','d2','d3')", '/d1/d2/d3' ],
+[ "Cygwin->catdir('d1','d2','d3')", 'd1/d2/d3' ],
[ "Cygwin->catdir('/','d2/d3')", '/d2/d3' ],
+[ "Cygwin->canonpath('///../../..//./././a//b/.././c/././')", '/a/b/../c' ],
+[ "Cygwin->canonpath('')", '' ],
+[ "Cygwin->canonpath('a/../../b/c')", 'a/../../b/c' ],
+[ "Cygwin->canonpath('/.')", '/' ],
+[ "Cygwin->canonpath('/./')", '/' ],
+[ "Cygwin->canonpath('/a/./')", '/a' ],
+[ "Cygwin->canonpath('/a/.')", '/a' ],
+[ "Cygwin->canonpath('/../../')", '/' ],
+[ "Cygwin->canonpath('/../..')", '/' ],
+
+[ "Cygwin->abs2rel('/t1/t2/t3','/t1/t2/t3')", '.' ],
+[ "Cygwin->abs2rel('/t1/t2/t4','/t1/t2/t3')", '../t4' ],
+[ "Cygwin->abs2rel('/t1/t2','/t1/t2/t3')", '..' ],
+[ "Cygwin->abs2rel('/t1/t2/t3/t4','/t1/t2/t3')", 't4' ],
+[ "Cygwin->abs2rel('/t4/t5/t6','/t1/t2/t3')", '../../../t4/t5/t6' ],
+#[ "Cygwin->abs2rel('../t4','/t1/t2/t3')", '../t4' ],
+[ "Cygwin->abs2rel('/','/t1/t2/t3')", '../../..' ],
+[ "Cygwin->abs2rel('///','/t1/t2/t3')", '../../..' ],
+[ "Cygwin->abs2rel('/.','/t1/t2/t3')", '../../..' ],
+[ "Cygwin->abs2rel('/./','/t1/t2/t3')", '../../..' ],
+#[ "Cygwin->abs2rel('../t4','/t1/t2/t3')", '../t4' ],
+[ "Cygwin->abs2rel('/t1/t2/t3', '/')", 't1/t2/t3' ],
+[ "Cygwin->abs2rel('/t1/t2/t3', '/t1')", 't2/t3' ],
+[ "Cygwin->abs2rel('t1/t2/t3', 't1')", 't2/t3' ],
+[ "Cygwin->abs2rel('t1/t2/t3', 't4')", '../t1/t2/t3' ],
+
+[ "Cygwin->rel2abs('t4','/t1/t2/t3')", '/t1/t2/t3/t4' ],
+[ "Cygwin->rel2abs('t4/t5','/t1/t2/t3')", '/t1/t2/t3/t4/t5' ],
+[ "Cygwin->rel2abs('.','/t1/t2/t3')", '/t1/t2/t3' ],
+[ "Cygwin->rel2abs('..','/t1/t2/t3')", '/t1/t2/t3/..' ],
+[ "Cygwin->rel2abs('../t4','/t1/t2/t3')", '/t1/t2/t3/../t4' ],
+[ "Cygwin->rel2abs('/t1','/t1/t2/t3')", '/t1' ],
+
) ;
==== //depot/maint-5.8/perl/lib/File/Spec/t/tmpdir.t#2 (text) ====
Index: perl/lib/File/Spec/t/tmpdir.t
--- perl/lib/File/Spec/t/tmpdir.t#1~30133~ 2007-02-05 10:05:43.000000000
-0800
+++ perl/lib/File/Spec/t/tmpdir.t 2008-02-01 12:08:10.000000000 -0800
@@ -5,7 +5,7 @@
use File::Spec;
use File::Spec::Win32;
-plan tests => 3;
+plan tests => 4;
ok 1, 1, "Loaded";
@@ -13,5 +13,14 @@
File::Spec->tmpdir;
ok scalar keys %ENV, $num_keys, "tmpdir() shouldn't change the contents of
%ENV";
+if ($^O eq 'VMS') {
+ skip('Can\'t make list assignment to \%ENV on this system', 1);
+}
+else {
+ local %ENV;
+ File::Spec::Win32->tmpdir;
+ ok scalar keys %ENV, 0, "Win32->tmpdir() shouldn't change the contents of
%ENV";
+}
+
File::Spec::Win32->tmpdir;
ok scalar keys %ENV, $num_keys, "Win32->tmpdir() shouldn't change the contents
of %ENV";
==== //depot/maint-5.8/perl/mkppport.lst#9 (text) ====
Index: perl/mkppport.lst
--- perl/mkppport.lst#8~32287~ 2007-11-12 10:07:41.000000000 -0800
+++ perl/mkppport.lst 2008-02-01 12:08:10.000000000 -0800
@@ -5,6 +5,5 @@
# This file is read by mkppport at build time.
#
-ext/Cwd
ext/Time/HiRes
ext/Win32API/File
==== //depot/maint-5.8/perl/t/lib/cygwin.t#3 (text) ====
Index: perl/t/lib/cygwin.t
--- perl/t/lib/cygwin.t#2~32406~ 2007-11-19 09:03:26.000000000 -0800
+++ perl/t/lib/cygwin.t 2008-02-01 12:08:10.000000000 -0800
@@ -9,7 +9,7 @@
}
}
-use Test::More tests => 14;
+use Test::More tests => 16;
is(Cygwin::winpid_to_pid(Cygwin::pid_to_winpid($$)), $$,
"perl pid translates to itself");
@@ -51,6 +51,17 @@
ok($binmode ? ($rootmnt =~ /,binmode/) : ($rootmnt =~ /,textmode/), "check /
mount_flags");
is(Cygwin::mount_flags("/cygdrive") =~ /,cygdrive/, 1, "check cygdrive
mount_flags");
+# Cygdrive mount prefix
+my @flags = split(/,/, Cygwin::mount_flags('/cygdrive'));
+my $prefix = pop(@flags);
+ok($prefix, "cygdrive mount prefix = " . (($prefix) ? $prefix : '<none>'));
+chomp(my $prefix2 = `df | grep -i '^c: ' | cut -d% -f2 | xargs`);
+$prefix2 =~ s/\/c$//i;
+if (! $prefix2) {
+ $prefix2 = '/';
+}
+is($prefix, $prefix2, 'cygdrive mount prefix');
+
my @mnttbl = Cygwin::mount_table();
ok(@mnttbl > 0, "non empty mount_table");
for $i (@mnttbl) {
End of Patch.