summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2011-07-04 10:39:45 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2011-07-04 10:39:45 +0100
commit00f02a57b905350669ea478bce60c82b13e16425 (patch)
treea06d3da861586eb74d79812abc1d2897f658bd3e
parent0cb4637e2e588d1cd19e0660a7566b3cd756091b (diff)
downloadperl-00f02a57b905350669ea478bce60c82b13e16425.tar.gz
Update Win32API-File to CPAN version 0.1200
[DELTA] 0.1200 by Alexandr Ciornii 2011-07-01 - Spelling fixes by Peter John Acklam - Upgraded Makefile.PL - Don't bother checking $[ 0.1101_01 by Alexandr Ciornii 2011-02-26 - More metadata in META.yml - [Set|Get]StdHandle functions added (Chris 'BinGOs' Williams)
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/Win32API-File/Changes9
-rw-r--r--cpan/Win32API-File/File.pm18
-rw-r--r--cpan/Win32API-File/File.xs20
-rw-r--r--cpan/Win32API-File/Makefile.PL52
-rw-r--r--cpan/Win32API-File/README4
-rw-r--r--cpan/Win32API-File/buffers.h14
-rw-r--r--cpan/Win32API-File/t/tie.t4
-rw-r--r--pod/perldelta.pod6
9 files changed, 100 insertions, 29 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index b04249e7f8..661043e66e 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -2051,7 +2051,7 @@ use File::Glob qw(:case);
'Win32API::File' =>
{
'MAINTAINER' => 'chorny',
- 'DISTRIBUTION' => 'CHORNY/Win32API-File-0.1101.zip',
+ 'DISTRIBUTION' => 'CHORNY/Win32API-File-0.1200.tar.gz',
'FILES' => q[cpan/Win32API-File],
'EXCLUDED' => [ qr{^ex/},
qw{t/pod.t},
diff --git a/cpan/Win32API-File/Changes b/cpan/Win32API-File/Changes
index 9a691017a8..27e80d1a46 100644
--- a/cpan/Win32API-File/Changes
+++ b/cpan/Win32API-File/Changes
@@ -1,5 +1,14 @@
Revision history for Perl extension Win32API::File.
+0.1200 by Alexandr Ciornii 2011-07-01
+ - Spelling fixes by Peter John Acklam
+ - Upgraded Makefile.PL
+ - Don't bother checking $[
+
+0.1101_01 by Alexandr Ciornii 2011-02-26
+ - More metadata in META.yml
+ - [Set|Get]StdHandle functions added (Chris 'BinGOs' Williams)
+
0.1101 by Alexandr Ciornii 2008-11-17
- require Win32.pm (not core on Cygwin 5.8.8)
- file.t uses Win32.pm only if necessary
diff --git a/cpan/Win32API-File/File.pm b/cpan/Win32API-File/File.pm
index a6473520ae..cdaac67d23 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.1101';
+$VERSION= '0.1200';
use base qw( Exporter DynaLoader Tie::Handle IO::File );
@@ -716,7 +716,7 @@ sub READLINE {
my $self = shift;
my $line = "";
- while ((index $line, $/) == $[-1) { # read until end of line marker
+ while ((index $line, $/) == -1) { # read until end of line marker
my $char = $self->GETC();
last if !defined $char || $char eq '';
@@ -2195,7 +2195,7 @@ Only bits set in C<$uMask> will be modified by C<SetHandleInformation>.
C<$uFlags> is an unsigned value having zero or more of the bits
C<HANDLE_FLAG_INHERIT> and C<HANDLE_FLAG_PROTECT_FROM_CLOSE> set.
For each bit set in C<$uMask>, the cooresponding bit in the handle's
-flags is set to the value of the cooresponding bit in C<$uFlags>.
+flags is set to the value of the corresponding bit in C<$uFlags>.
If C<$uOldFlags> were the value of the handle's flags before the
call to C<SetHandleInformation>, then the value of the handle's
@@ -2471,7 +2471,7 @@ the media is currently accessible.
Allows the device's media to be locked or unlocked. C<$opOutBuf> should
be C<[]>. C<$pInBuf> should be a C<PREVENT_MEDIA_REMOVAL> data structure,
-which is simply an interger containing a boolean value:
+which is simply an integer containing a boolean value:
$pInBuf= pack( "i", $bPreventMediaRemoval );
@@ -2559,7 +2559,7 @@ argument to C<DeviceIoControl>. Most of these are to be used on
physical drive devices like C<"//./PhysicalDrive0">. However,
C<IOCTL_DISK_GET_PARTITION_INFO> and C<IOCTL_DISK_SET_PARTITION_INFO>
should only be used on a single-partition device like C<"//./C:">. Also,
-C<IOCTL_DISK_GET_MEDIA_TYPES> is documented as having been superceded but
+C<IOCTL_DISK_GET_MEDIA_TYPES> is documented as having been superseded but
is still useful when used on a floppy device like C<"//./A:">.
Includes C<IOCTL_DISK_FORMAT_TRACKS>, C<IOCTL_DISK_FORMAT_TRACKS_EX>,
@@ -2631,7 +2631,7 @@ offset of the partition, measured in bytes.
=item C<$ucHiddenSects>
The number of "hidden" sectors for this partition. Actually this is
-the number of sectors found prior to this partiton, that is, the
+the number of sectors found prior to this partition, that is, the
starting offset [as found in C<$uStartLow> and C<$ivStartHigh>]
divided by the number of bytes per sector.
@@ -2640,7 +2640,7 @@ divided by the number of bytes per sector.
The sequence number of this partition. Partitions are numbered
starting as C<1> [with "partition 0" meaning the entire disk].
Sometimes this field may be C<0> and you'll have to infer the
-partition sequence number from how many partitions preceed it on
+partition sequence number from how many partitions precede it on
the disk.
=item C<$uPartitionType>
@@ -2834,7 +2834,7 @@ Stop loggin each disk request:
=item DISK_LOGGING_DUMP
-Copy the interal log into the supplied buffer:
+Copy the internal log into the supplied buffer:
$pLogBuffer= ' ' x $uLogBufferSize
$pInBuf= pack( "C P L", 2, $pLogBuffer, $uLogBufferSize );
@@ -3026,7 +3026,7 @@ None known at this time.
=head1 AUTHOR
-Tye McQueen, tye@metronet.com, http://www.metronet.com/~tye/.
+Tye McQueen, tye@metronet.com, http://perlmonks.org/?node=tye.
=head1 SEE ALSO
diff --git a/cpan/Win32API-File/File.xs b/cpan/Win32API-File/File.xs
index 7dbe783c0e..cff488f8a6 100644
--- a/cpan/Win32API-File/File.xs
+++ b/cpan/Win32API-File/File.xs
@@ -645,3 +645,23 @@ WriteFile( hFile, pBuffer, lBytes, ouBytesWritten, pOverlapped )
OUTPUT:
RETVAL
ouBytesWritten
+
+void
+GetStdHandle(fd)
+ DWORD fd
+PPCODE:
+#ifdef _WIN64
+ XSRETURN_IV((DWORD_PTR)GetStdHandle(fd));
+#else
+ XSRETURN_IV((DWORD)GetStdHandle(fd));
+#endif
+
+void
+SetStdHandle(fd,handle)
+ DWORD fd
+ HANDLE handle
+PPCODE:
+ if (SetStdHandle(fd, handle))
+ XSRETURN_YES;
+ else
+ XSRETURN_NO;
diff --git a/cpan/Win32API-File/Makefile.PL b/cpan/Win32API-File/Makefile.PL
index 6e5511a4bf..7e31df764b 100644
--- a/cpan/Win32API-File/Makefile.PL
+++ b/cpan/Win32API-File/Makefile.PL
@@ -9,7 +9,7 @@ unless ($^O eq "MSWin32" || $^O eq "cygwin" || $^O eq "interix") { #not tested o
die "OS unsupported\n";
}
-WriteMakefile(
+WriteMakefile1(
'NAME' => 'Win32API::File',
'VERSION_FROM' => 'File.pm', # finds $VERSION
( $Config{archname} =~ /-object\b/i ? ( 'CAPI' => 'TRUE' ) : () ),
@@ -24,16 +24,28 @@ WriteMakefile(
},
( ! $Config{libperl} ? () : ( LIBPERL_A => $Config{libperl} ) ),
'INSTALLDIRS' => ($] >= 5.008009 ? 'perl' : 'site'),
- ($ExtUtils::MakeMaker::VERSION ge '6.31'?
- ('LICENSE' => 'perl', ) : ()),
- ($ExtUtils::MakeMaker::VERSION ge '6.48'?
- ('MIN_PERL_VERSION' => 5.001,) : ()),
+ 'LICENSE' => 'perl',
+ 'MIN_PERL_VERSION' => 5.001,
'PREREQ_PM' => {
- 'IO::File' => 0, #build
- 'File::Spec' => 0, #build
'Math::BigInt' => 0,
'Win32' => 0,
- }
+ },
+ BUILD_REQUIRES => {
+ 'IO::File' => 0,
+ 'File::Spec' => 0,
+ },
+
+ META_MERGE => {
+ resources => {
+ repository => 'http://github.com/chorny/Win32API-File',
+ },
+ },
+ $^O =~/win/i ? (
+ dist => {
+ TAR => 'ptar',
+ TARFLAGS => '-c -C -f',
+ },
+ ) : (),
);
# Replacement for MakeMaker's "const2perl section" for versions
@@ -142,3 +154,27 @@ realclean ::
$self->{RM_F} @realclean\n" if @realclean;
return join('',@m);
}
+
+sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. 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{BUILD_REQUIRES} and $eumm_version < 6.5503) {
+ #EUMM 6.5502 has problems with BUILD_REQUIRES
+ $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
+ delete $params{BUILD_REQUIRES};
+ }
+ delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
+ delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
+ delete $params{META_MERGE} if $eumm_version < 6.46;
+ delete $params{META_ADD} if $eumm_version < 6.46;
+ delete $params{LICENSE} if $eumm_version < 6.31;
+ delete $params{AUTHOR} if $] < 5.005;
+ delete $params{ABSTRACT_FROM} if $] < 5.005;
+ delete $params{BINARY_LOCATION} if $] < 5.005;
+
+ WriteMakefile(%params);
+}
+
diff --git a/cpan/Win32API-File/README b/cpan/Win32API-File/README
index 93d287a2d5..056bfb28d5 100644
--- a/cpan/Win32API-File/README
+++ b/cpan/Win32API-File/README
@@ -1,4 +1,4 @@
-Win32API::File v0.08 -- Low-level access to Win32 API calls for files.
+Win32API::File v0.1200 -- Low-level access to Win32 API calls for files.
New since v0.07:
@@ -130,7 +130,7 @@ technical questions that are not full bug reports to
http://perlmonks.org/index.pl?node=Seekers%20of%20Perl%20Wisdom
-Tye McQueen, tye@metronet.com, http://www.metronet.com/~tye/.
+Tye McQueen, tye@metronet.com, http://perlmonks.org/?node=tye.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
diff --git a/cpan/Win32API-File/buffers.h b/cpan/Win32API-File/buffers.h
index 934e57b9ac..cc114e5e58 100644
--- a/cpan/Win32API-File/buffers.h
+++ b/cpan/Win32API-File/buffers.h
@@ -52,7 +52,7 @@
* the size of the written data. This is what the trunc_*() macros are for.
*
* The size sometimes does and sometimes doesn't include the trailing '\0'
- * [or L'\0'], so we always add or substract 1 in the appropriate places so
+ * [or L'\0'], so we always add or subtract 1 in the appropriate places so
* we don't care about this detail.
*
* A call may 1) request a pointer to the buffer size which means that
@@ -70,7 +70,7 @@
*
* The user can pass in C<[]> or C<0> to indicate that they don't care about
* the buffer size [we aren't programming in C here, after all] and just try
- * to get the data. This will work if either the buffer already alloated for
+ * to get the data. This will work if either the buffer already allocated for
* the SV [scalar value] is large enough to hold the data or the API provides
* an easy way to determine the required size [and the XS code uses it].
*
@@ -96,7 +96,7 @@
* section [grow_*()], the INIT: section [init_*()], or the OUTPUT: section
* [trunc_*()].
*
- * Buffer arguments should be initialied with C<= NO_INIT> [or C<= NULL;>].
+ * Buffer arguments should be initialised with C<= NO_INIT> [or C<= NULL;>].
*
* See also the F<typemap> file. C<oDWORD>, for example, is for an output-
* only parameter of type C<DWORD> and you should simply C<#define> it to be
@@ -119,9 +119,9 @@
* determine the size of data written based on the size of the scalar we
* output anyway.
*
- * This second difference doesn't apply unless the paremter is listed in
+ * This second difference doesn't apply unless the parameter is listed in
* the OUTPUT: section without specific output instructions. We define
- * no macros for outputing buffer length parameters so be careful to use
+ * no macros for outputting buffer length parameters so be careful to use
* C<oDWORD> [for example] for them if and only if they are output-only.
*
* Note that C<oDWORD> is the same as C<DWORD> in that, if a defined value
@@ -372,7 +372,7 @@
SvCUR_set( svBuf, lSize ); \
} } STMT_END
-/* Same as above except we have a poitner to the returned length: */
+/* Same as above except we have a pointer to the returned length: */
#define trunc_buf_pl( bOkay, sBuf,svBuf, plSize ) \
trunc_buf_l( bOkay, sBuf,svBuf, *plSize )
@@ -383,7 +383,7 @@
SvCUR_set( svBuf, (lwSize)*sizeof(WCHAR) ); \
} } STMT_END
-/* Same as above except we have a poitner to the returned length: */
+/* Same as above except we have a pointer to the returned length: */
#define trunc_buf_plw( bOkay, swBuf,svBuf, plwSize ) \
trunc_buf_lw( bOkay, swBuf,svBuf, *plwSize )
diff --git a/cpan/Win32API-File/t/tie.t b/cpan/Win32API-File/t/tie.t
index ec4ab83e63..34b1cd7306 100644
--- a/cpan/Win32API-File/t/tie.t
+++ b/cpan/Win32API-File/t/tie.t
@@ -28,7 +28,7 @@ print "ok 1\n";
unlink "foo.txt";
-my $fh = new Win32API::File "+> foo.txt"
+my $fh = Win32API::File->new("+> foo.txt")
or die fileLastError();
my $tell = tell $fh;
@@ -77,7 +77,7 @@ print "ok 9\n";
# Test out binmode (should be only LF with print, no CR).
-$fh = new Win32API::File "+> foo.txt"
+$fh = Win32API::File->new("+> foo.txt")
or die fileLastError();
binmode $fh;
print $fh "hello there\n";
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index eb4c9cd6e6..43b27d8243 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -190,6 +190,12 @@ L<Unicode::Collate> has been upgraded from version 0.76 to version 0.77
Applied [perl #93470] silencing compiler warnings with -Wwrite-strings
+=item *
+
+L<Win32API::File> has been upgraded from version 0.1101 to version 0.1200
+
+Added SetStdHandle and GetStdHandle functions
+
=back
=head2 Removed Modules and Pragmata