mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
DBD-SQLite: reverted cygwin hacks
This commit is contained in:
parent
f5886b6514
commit
81ee8cbe1e
3 changed files with 7 additions and 24 deletions
|
@ -212,9 +212,6 @@ WriteMakefile(
|
||||||
( WINLIKE ? (
|
( WINLIKE ? (
|
||||||
'Win32' => '0.30',
|
'Win32' => '0.30',
|
||||||
) : () ),
|
) : () ),
|
||||||
( ($^O eq 'cygwin' && $] < 5.010) ? (
|
|
||||||
'Filesys::CygwinPaths' => '0',
|
|
||||||
) : () ),
|
|
||||||
},
|
},
|
||||||
OPTIONAL( '6.48',
|
OPTIONAL( '6.48',
|
||||||
MIN_PERL_VERSION => '5.006',
|
MIN_PERL_VERSION => '5.006',
|
||||||
|
|
|
@ -65,7 +65,7 @@ sub connect {
|
||||||
|
|
||||||
# To avoid unicode and long file name problems on Windows,
|
# To avoid unicode and long file name problems on Windows,
|
||||||
# convert to the shortname if the file (or parent directory) exists.
|
# 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 Win32;
|
||||||
require File::Basename;
|
require File::Basename;
|
||||||
my ($file, $dir, $suffix) = File::Basename::fileparse($real);
|
my ($file, $dir, $suffix) = File::Basename::fileparse($real);
|
||||||
|
@ -81,14 +81,6 @@ sub connect {
|
||||||
# SQLite can't do mkpath anyway.
|
# SQLite can't do mkpath anyway.
|
||||||
# So let it go through as it and fail.
|
# 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
|
# Hand off to the actual login function
|
||||||
|
|
|
@ -13,7 +13,7 @@ use t::lib::Test;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
BEGIN {
|
BEGIN {
|
||||||
if ( $] >= 5.008005 ) {
|
if ( $] >= 5.008005 ) {
|
||||||
plan( tests => 25 );
|
plan( tests => (($^O eq 'cygwin') ? 13 : 25) );
|
||||||
} else {
|
} else {
|
||||||
plan( skip_all => 'Unicode is not supported before 5.8.5' );
|
plan( skip_all => 'Unicode is not supported before 5.8.5' );
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,9 @@ die $@ if $@;
|
||||||
|
|
||||||
my $dir = File::Temp::tempdir( CLEANUP => 1 );
|
my $dir = File::Temp::tempdir( CLEANUP => 1 );
|
||||||
foreach my $subdir ( 'longascii', 'adatbázis', 'name with spaces', 'żżż żżżżżż') {
|
foreach my $subdir ( 'longascii', 'adatbázis', 'name with spaces', 'żżż żżżżżż') {
|
||||||
|
if ($^O eq 'cygwin') {
|
||||||
|
next if (($subdir eq 'adatbázis') || ($subdir eq '¿¿¿ ¿¿¿¿¿¿'));
|
||||||
|
}
|
||||||
utf8::upgrade($subdir);
|
utf8::upgrade($subdir);
|
||||||
ok(
|
ok(
|
||||||
mkdir(catdir($dir, $subdir)),
|
mkdir(catdir($dir, $subdir)),
|
||||||
|
@ -75,7 +78,7 @@ foreach my $subdir ( 'longascii', 'adatb
|
||||||
sub _path { # copied from DBD::SQLite::connect
|
sub _path { # copied from DBD::SQLite::connect
|
||||||
my $path = shift;
|
my $path = shift;
|
||||||
|
|
||||||
if ($^O =~ /MSWin32|cygwin/) {
|
if ($^O =~ /MSWin32/) {
|
||||||
require Win32;
|
require Win32;
|
||||||
require File::Basename;
|
require File::Basename;
|
||||||
|
|
||||||
|
@ -87,15 +90,6 @@ sub _path { # copied from DBD::SQLite::connect
|
||||||
} elsif ( -d $dir ) {
|
} elsif ( -d $dir ) {
|
||||||
$path = join '', grep { defined } Win32::GetShortPathName($dir), $file, $suffix;
|
$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;
|
return $path;
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue