summaryrefslogtreecommitdiff
path: root/cpan/Win32API-File
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-01-28 19:22:39 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-01-28 19:22:39 +0000
commit113b1f2cec16524fab70408ae95f289ae8e096d3 (patch)
tree61be1941ff86eebb1960553d87cac4edea346ead /cpan/Win32API-File
parent483d2dbb51227340963639c47fe23c617648c5ae (diff)
downloadperl-113b1f2cec16524fab70408ae95f289ae8e096d3.tar.gz
Update Win32API-File to CPAN version 0.1201
[DELTA] 0.1201 by Alexandr Ciornii 2013-01-28 - Fix tests on Cygwin (RURBAN) - Constants for GetStdHandle and SetStdHandle
Diffstat (limited to 'cpan/Win32API-File')
-rw-r--r--cpan/Win32API-File/Changes4
-rw-r--r--cpan/Win32API-File/File.pm13
-rw-r--r--cpan/Win32API-File/Makefile.PL23
-rw-r--r--cpan/Win32API-File/cFile.pc3
-rw-r--r--cpan/Win32API-File/t/file.t10
5 files changed, 42 insertions, 11 deletions
diff --git a/cpan/Win32API-File/Changes b/cpan/Win32API-File/Changes
index 27e80d1a46..bb149daf17 100644
--- a/cpan/Win32API-File/Changes
+++ b/cpan/Win32API-File/Changes
@@ -1,5 +1,9 @@
Revision history for Perl extension Win32API::File.
+0.1201 by Alexandr Ciornii 2013-01-28
+ - Fix tests on Cygwin (RURBAN)
+ - Constants for GetStdHandle and SetStdHandle
+
0.1200 by Alexandr Ciornii 2011-07-01
- Spelling fixes by Peter John Acklam
- Upgraded Makefile.PL
diff --git a/cpan/Win32API-File/File.pm b/cpan/Win32API-File/File.pm
index cdaac67d23..03b736eb77 100644
--- a/cpan/Win32API-File/File.pm
+++ b/cpan/Win32API-File/File.pm
@@ -10,7 +10,7 @@ use Fcntl qw( O_RDONLY O_RDWR O_WRONLY O_APPEND O_BINARY O_TEXT );
use vars qw( $VERSION @ISA );
use vars qw( @EXPORT @EXPORT_OK @EXPORT_FAIL %EXPORT_TAGS );
-$VERSION= '0.1200';
+$VERSION= '0.1201';
use base qw( Exporter DynaLoader Tie::Handle IO::File );
@@ -146,6 +146,9 @@ my $FFFFFFFF = $_64BITINT ? 0xFFFFFFFF : Math::BigInt->new(0xFFFFFFFF);
PARTITION_XINT13 PARTITION_XINT13_EXTENDED
PARTITION_PREP PARTITION_UNIX
VALID_NTFT PARTITION_NTFT )],
+ STD_HANDLE_ => [qw(
+ STD_INPUT_HANDLE STD_OUTPUT_HANDLE
+ STD_ERROR_HANDLE )],
);
@EXPORT_OK= ();
{
@@ -3014,6 +3017,14 @@ Constants describing partition types.
PARTITION_PREP PARTITION_UNIX
VALID_NTFT PARTITION_NTFT
+=item C<":STD_HANDLE_">
+
+Constants for GetStdHandle and SetStdHandle
+
+ STD_ERROR_HANDLE
+ STD_INPUT_HANDLE
+ STD_OUTPUT_HANDLE
+
=item C<":ALL">
All of the above.
diff --git a/cpan/Win32API-File/Makefile.PL b/cpan/Win32API-File/Makefile.PL
index 7e31df764b..4b5f959ac4 100644
--- a/cpan/Win32API-File/Makefile.PL
+++ b/cpan/Win32API-File/Makefile.PL
@@ -19,20 +19,24 @@ WriteMakefile1(
IFDEF => "!/[a-z\\d]/",
CPLUSPLUS => 1,
WRITE_PERL => 1,
+ #PERL_FILE_LIST => ['File.pm'], #added by Chorny
+ #C_FILE_LIST => ['File.xs'], #added by Chorny
# Comment out next line to rebuild constants defs:
NO_REBUILD => 1,
},
( ! $Config{libperl} ? () : ( LIBPERL_A => $Config{libperl} ) ),
- 'INSTALLDIRS' => ($] >= 5.008009 ? 'perl' : 'site'),
+ 'INSTALLDIRS' => (($] >= 5.008009 and $] < 5.012) ? 'perl' : 'site'),
'LICENSE' => 'perl',
'MIN_PERL_VERSION' => 5.001,
'PREREQ_PM' => {
'Math::BigInt' => 0,
'Win32' => 0,
- },
- BUILD_REQUIRES => {
+ 'Carp' => 0,
'IO::File' => 0,
+ },
+ TEST_REQUIRES => {
'File::Spec' => 0,
+ 'Test::More' => 0,
},
META_MERGE => {
@@ -91,7 +95,7 @@ $outfile: @perlfiles @cfiles Makefile" . '
$m[-1] =~ s/^/##/gm if $noreb;
my( $key, $value );
while( ( $key, $value )= each %{$hvAttr->{$module}} ) {
- push @m, '-e "$$attribs{' . $key . '}= '
+ push @m, '-e "$$attribs{' . $key . '}= ' # try {{ }} for dmake
. neatvalue($value) . qq[;" \\\n\t ];
$m[-1] =~ s/^/##/gm if $noreb;
}
@@ -155,12 +159,21 @@ realclean ::
return join('',@m);
}
-sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade.
+
+sub WriteMakefile1 { #Compatibility code for old versions of EU::MM. Written by Alexandr Ciornii, version 0.23. Added by eumm-upgrade.
my %params=@_;
my $eumm_version=$ExtUtils::MakeMaker::VERSION;
$eumm_version=eval $eumm_version;
die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
die "License not specified" if not exists $params{LICENSE};
+ if ($params{AUTHOR} and ref($params{AUTHOR}) eq 'ARRAY' and $eumm_version < 6.5705) {
+ $params{META_ADD}->{author}=$params{AUTHOR};
+ $params{AUTHOR}=join(', ',@{$params{AUTHOR}});
+ }
+ if ($params{TEST_REQUIRES} and $eumm_version < 6.64) {
+ $params{BUILD_REQUIRES}={ %{$params{BUILD_REQUIRES} || {}} , %{$params{TEST_REQUIRES}} };
+ delete $params{TEST_REQUIRES};
+ }
if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) {
#EUMM 6.5502 has problems with BUILD_REQUIRES
$params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
diff --git a/cpan/Win32API-File/cFile.pc b/cpan/Win32API-File/cFile.pc
index da00f413aa..b44fbe8574 100644
--- a/cpan/Win32API-File/cFile.pc
+++ b/cpan/Win32API-File/cFile.pc
@@ -162,4 +162,7 @@ sub SEM_NOOPENFILEERRORBOX () { 32768 }
sub TRUNCATE_EXISTING () { 5 }
sub Unknown () { 0 }
sub VALID_NTFT () { 192 }
+sub STD_ERROR_HANDLE () { 0xfffffff4 }
+sub STD_INPUT_HANDLE () { 0xfffffff6 }
+sub STD_OUTPUT_HANDLE () { 0xfffffff5 }
1;
diff --git a/cpan/Win32API-File/t/file.t b/cpan/Win32API-File/t/file.t
index 0039b57435..cbc808c37f 100644
--- a/cpan/Win32API-File/t/file.t
+++ b/cpan/Win32API-File/t/file.t
@@ -16,7 +16,7 @@ BEGIN {
}
}
- print "1..267\n";
+ print "1..270\n";
}
END {print "not ok 1\n" unless $loaded;}
@@ -24,7 +24,7 @@ END {print "not ok 1\n" unless $loaded;}
# the ../lib directory in @INC will no longer work once
# we chdir() into the TEMP directory.
-require Win32 unless defined &Win32::FormatMessage;
+use Win32;
use File::Spec;
use Carp;
use Carp::Heavy;
@@ -342,8 +342,9 @@ if( !$ok ) {
}
print $ok ? "" : "not ", "ok ", ++$test, "\n"; # ok 49
-$ok= -f $let.substr($ENV{WINDIR},3)."/win.ini";
-$ok or print "# ",fileLastError(),"\n";
+my $path = $ENV{WINDIR};
+$ok= -f $let.substr($path,$^O eq 'cygwin'?2:3)."/win.ini";
+$ok or print "# ",$let.substr($path,3)."/win.ini ",fileLastError(),"\n";
print $ok ? "" : "not ", "ok ", ++$test, "\n"; # ok 50
$ok= DefineDosDevice( DDD_REMOVE_DEFINITION|DDD_EXACT_MATCH_ON_REMOVE
@@ -351,7 +352,6 @@ $ok= DefineDosDevice( DDD_REMOVE_DEFINITION|DDD_EXACT_MATCH_ON_REMOVE
$ok or print "# $let,$dev: ",fileLastError(),"\n";
print $ok ? "" : "not ", "ok ", ++$test, "\n"; # ok 51
-my $path = $ENV{WINDIR};
my $attrs = GetFileAttributes( $path );
$ok= $attrs != INVALID_FILE_ATTRIBUTES;
$ok or print "# $path gave invalid attribute value, attrs=$attrs: ",fileLastError(),"\n";