1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

DBD-SQLite: reverted cygwin hacks

This commit is contained in:
Kenichi Ishigaki 2009-05-01 00:50:22 +00:00
parent f5886b6514
commit 81ee8cbe1e
3 changed files with 7 additions and 24 deletions

View file

@ -212,9 +212,6 @@ WriteMakefile(
( WINLIKE ? (
'Win32' => '0.30',
) : () ),
( ($^O eq 'cygwin' && $] < 5.010) ? (
'Filesys::CygwinPaths' => '0',
) : () ),
},
OPTIONAL( '6.48',
MIN_PERL_VERSION => '5.006',

View file

@ -65,7 +65,7 @@ sub connect {
# To avoid unicode and long file name problems on Windows,
# convert to the shortname if the file (or parent directory) exists.
if ( $^O =~ /MSWin32|cygwin/ and $real ne ':memory:' ) {
if ( $^O =~ /MSWin32/ and $real ne ':memory:' ) {
require Win32;
require File::Basename;
my ($file, $dir, $suffix) = File::Basename::fileparse($real);
@ -81,14 +81,6 @@ sub connect {
# SQLite can't do mkpath anyway.
# So let it go through as it and fail.
}
if ( $^O eq 'cygwin' ) {
if ( $] >= 5.010 ) {
$real = Cygwin::win_to_posix_path($real, 'absolute');
} else {
require Filesys::CygwinPaths;
$real = Filesys::CygwinPaths::fullposixpath($real);
}
}
}
# Hand off to the actual login function

View file

@ -13,7 +13,7 @@ use t::lib::Test;
use Test::More;
BEGIN {
if ( $] >= 5.008005 ) {
plan( tests => 25 );
plan( tests => (($^O eq 'cygwin') ? 13 : 25) );
} else {
plan( skip_all => 'Unicode is not supported before 5.8.5' );
}
@ -30,6 +30,9 @@ die $@ if $@;
my $dir = File::Temp::tempdir( CLEANUP => 1 );
foreach my $subdir ( 'longascii', 'adatbázis', 'name with spaces', 'żżż żżżżżż') {
if ($^O eq 'cygwin') {
next if (($subdir eq 'adatbázis') || ($subdir eq '¿¿¿ ¿¿¿¿¿¿'));
}
utf8::upgrade($subdir);
ok(
mkdir(catdir($dir, $subdir)),
@ -75,7 +78,7 @@ foreach my $subdir ( 'longascii', 'adatb
sub _path { # copied from DBD::SQLite::connect
my $path = shift;
if ($^O =~ /MSWin32|cygwin/) {
if ($^O =~ /MSWin32/) {
require Win32;
require File::Basename;
@ -87,15 +90,6 @@ sub _path { # copied from DBD::SQLite::connect
} elsif ( -d $dir ) {
$path = join '', grep { defined } Win32::GetShortPathName($dir), $file, $suffix;
}
if ($^O eq 'cygwin') {
if ($] >= 5.010) {
$path = Cygwin::win_to_posix_path($path, 'absolute');
}
else {
require Filesys::CygwinPaths;
$path = Filesys::CygwinPaths::fullposixpath($path);
}
}
}
return $path;
}
}