This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge upstream fix for C++ mode build of Win32API-File
authorSteve Hay <steve.m.hay@googlemail.com>
Tue, 27 Jan 2015 08:36:02 +0000 (08:36 +0000)
committerSteve Hay <steve.m.hay@googlemail.com>
Tue, 27 Jan 2015 08:36:02 +0000 (08:36 +0000)
This is so we can have C++ mode builds on Windows without having to wait
for a new CPAN release of Win32API-File.

Porting/Maintainers.pl
cpan/Win32API-File/File.pm
cpan/Win32API-File/File.xs
t/porting/customized.dat

index 4b37146..28a49ad 100755 (executable)
@@ -1291,6 +1291,9 @@ use File::Glob qw(:case);
             qr{^ex/},
             't/pod.t',
         ],
+        # Already merged upstream:
+        # https://github.com/chorny/Win32API-File/commit/1657e97900
+        'CUSTOMIZED'   => [qw(File.pm File.xs)],
     },
 
     'XSLoader' => {
index 03b736e..bf2d531 100644 (file)
@@ -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.1201';
+$VERSION= '0.1201_01';
 
 use base qw( Exporter DynaLoader Tie::Handle IO::File );
 
index cff488f..83971d0 100644 (file)
@@ -148,7 +148,7 @@ CreateFileA( sPath, uAccess, uShare, pSecAttr, uCreate, uFlags, hModel )
        HANDLE  hModel
     CODE:
        RETVAL= CreateFileA( sPath, uAccess, uShare,
-         pSecAttr, uCreate, uFlags, hModel );
+         (LPSECURITY_ATTRIBUTES)pSecAttr, uCreate, uFlags, hModel );
        if(  INVALID_HANDLE_VALUE == RETVAL  ) {
            SaveErr( 1 );
            XSRETURN_NO;
@@ -170,7 +170,7 @@ CreateFileW( swPath, uAccess, uShare, pSecAttr, uCreate, uFlags, hModel )
        HANDLE  hModel
     CODE:
        RETVAL= CreateFileW( swPath, uAccess, uShare,
-         pSecAttr, uCreate, uFlags, hModel );
+         (LPSECURITY_ATTRIBUTES)pSecAttr, uCreate, uFlags, hModel );
        if(  INVALID_HANDLE_VALUE == RETVAL  ) {
            SaveErr( 1 );
            XSRETURN_NO;
@@ -246,7 +246,7 @@ DeviceIoControl( hDevice, uIoControlCode, pInBuf, lInBuf, opOutBuf, lOutBuf, olR
        }
        grow_buf_l( opOutBuf,ST(4),char *, lOutBuf,ST(5) );
        RETVAL= DeviceIoControl( hDevice, uIoControlCode, pInBuf, lInBuf,
-                 opOutBuf, lOutBuf, &olRetBytes, pOverlapped );
+                 opOutBuf, lOutBuf, &olRetBytes, (LPOVERLAPPED)pOverlapped );
        SaveErr( !RETVAL );
     OUTPUT:
        RETVAL
@@ -553,7 +553,8 @@ ReadFile( hFile, opBuffer, lBytes, olBytesRead, pOverlapped )
        if(  0 == lBytes  &&  autosize(ST(2))  ) {
            lBytes= SvLEN( ST(1) ) - 1;
        }
-       RETVAL= ReadFile( hFile, opBuffer, lBytes, &olBytesRead, pOverlapped );
+       RETVAL= ReadFile( hFile, opBuffer, lBytes, &olBytesRead,
+                 (LPOVERLAPPED)pOverlapped );
        SaveErr( !RETVAL );
     OUTPUT:
        RETVAL
@@ -640,7 +641,7 @@ WriteFile( hFile, pBuffer, lBytes, ouBytesWritten, pOverlapped )
              "Win32API::File::WriteFile", SvCUR(ST(1)), lBytes );
        }
        RETVAL= WriteFile( hFile, pBuffer, lBytes,
-                 &ouBytesWritten, pOverlapped );
+                 &ouBytesWritten, (LPOVERLAPPED)pOverlapped );
        SaveErr( !RETVAL );
     OUTPUT:
        RETVAL
index 9bde2de..d32b788 100644 (file)
@@ -13,6 +13,8 @@ Text::Balanced cpan/Text-Balanced/t/08_extvar.t 0776ef2cbdad5b1fbefb300541d07921
 Text::Balanced cpan/Text-Balanced/t/09_gentag.t 42361b5dfb3bb728bce20f4fb0d92ccfb27c2ba7
 Text::ParseWords cpan/Text-ParseWords/t/ParseWords.t 9bae51c9b944cd5c0bbabe9d397e573976a2be8e
 Text::ParseWords cpan/Text-ParseWords/t/taint.t 3cff0dae812801f7aa1738d6070508f2c5bcc2e5
+Win32API::File cpan/Win32API-File/File.pm 91709e8f13b262807816e727e678c9e322bf6d41
+Win32API::File cpan/Win32API-File/File.xs 772b60e157d8d617715b93775e868686554a5a69
 podlators cpan/podlators/scripts/pod2man.PL f81acf53f3ff46cdcc5ebdd661c5d13eb35d20d6
 podlators cpan/podlators/scripts/pod2text.PL b4693fcfe4a0a1b38a215cfb8985a65d5d025d69
 threads dist/threads/lib/threads.pm e1b210ff6d66a0e1d43aa8f040954fc811e3d250