Author: infinoid
Date: Sun Mar 23 08:39:27 2008
New Revision: 26521
Modified:
trunk/src/io/io_win32.c
Log:
[io] Apply patch from Andrew Whitworth in RT #51990. wknight8111++
* silence some warnings on win32.
* update documentation on error return value.
Modified: trunk/src/io/io_win32.c
==============================================================================
--- trunk/src/io/io_win32.c (original)
+++ trunk/src/io/io_win32.c Sun Mar 23 08:39:27 2008
@@ -509,7 +509,8 @@
=item C<static size_t PIO_win32_write>
Calls C<WriteFile()> to write C<len> bytes from the memory starting at
-C<buffer> to C<*io>'s file descriptor.
+C<buffer> to C<*io>'s file descriptor. Returns C<(size_t)-1> on
+failure.
=cut
@@ -535,7 +536,7 @@
&p.HighPart, FILE_END);
if (p.LowPart == 0xFFFFFFFF && (GetLastError() != NO_ERROR)) {
/* Error - exception */
- return -1;
+ return (size_t)-1;
}
}
@@ -670,7 +671,7 @@
if (sock >= 0) {
ParrotIO * const io = PIO_new(interp, PIO_F_SOCKET, 0,
PIO_F_READ|PIO_F_WRITE);
io->fd = (PIOHANDLE) sock;
- io->remote.sin_family = fam;
+ io->remote.sin_family = (short)fam;
return io;
}
perror("socket:");