From: Yasuhiro Matsumoto Date: Thu, 26 Feb 2009 08:09:33 +0000 (+0100) Subject: Make non-blocking mode work on Windows in IO::Socket::INET X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=20caf59dc5a2137cdf1de6dae458da063417a8d2;p=p5sagit%2Fp5-mst-13.2.git Make non-blocking mode work on Windows in IO::Socket::INET CPAN RT bug #43573 --- diff --git a/ext/IO/IO.pm b/ext/IO/IO.pm index ac06642..5f42651 100644 --- a/ext/IO/IO.pm +++ b/ext/IO/IO.pm @@ -7,7 +7,7 @@ use Carp; use strict; use warnings; -our $VERSION = "1.23_01"; +our $VERSION = "1.23_02"; XSLoader::load 'IO', $VERSION; sub import { diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index c81cb93..7d0d4db 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -121,7 +121,12 @@ io_blocking(pTHX_ InputStream f, int block) } return RETVAL; #else +# ifdef WIN32 + unsigned long flags = block; + return ioctl(PerlIO_fileno(f), FIONBIO, &flags); +# else return -1; +# endif #endif }