Skip Menu |
 

This queue is for tickets about the IO-Multiplex CPAN distribution.

Report information
The Basics
Id: 66096
Status: resolved
Priority: 0/
Queue: IO-Multiplex

People
Owner: Nobody in particular
Requestors: mdootson [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.11
Fixed in: (no value)



Subject: MSWin broken
Download (untitled) / with headers
text/plain 152b
Hi, Attached patch for seems to fix Win32 usage with sockets It contains 1) Fix for ioctl call 2) removal of warnings on some sub defs Regards Mark
Subject: iomp.diff
Download iomp.diff
text/x-diff 1.8k
diff -ruNw IO-Multiplex-1.11/lib/IO/Multiplex.pm IO-Multiplex-1.11a/lib/IO/Multiplex.pm --- IO-Multiplex-1.11/lib/IO/Multiplex.pm 2011-02-02 16:41:16.000000000 +0000 +++ IO-Multiplex-1.11a/lib/IO/Multiplex.pm 2011-02-23 20:39:11.201768600 +0000 @@ -278,13 +278,16 @@ # Can optionally use Hi Res timers if available require Time::HiRes; Time::HiRes->import('time'); - } }; +} # This is what you want. Trust me. $SIG{PIPE} = 'IGNORE'; -if(IsWin) { *EWOULDBLOCK = sub {10035} } +{ + no warnings; + if(IsWin()) { sub EWOULDBLOCK () { 10035 } } +} =head2 new @@ -938,7 +941,8 @@ { my $fh = shift; if(IsWin) - { ioctl($fh, 0x8004667e, 1); + { + ioctl($fh, 0x8004667e, pack("L!", 1)); } else { my $flags = fcntl($fh, F_GETFL, 0) diff -ruNw IO-Multiplex-1.11/t/110_ntest.t IO-Multiplex-1.11a/t/110_ntest.t --- IO-Multiplex-1.11/t/110_ntest.t 2002-11-25 23:47:12.000000000 +0000 +++ IO-Multiplex-1.11a/t/110_ntest.t 2011-02-23 20:28:26.365168600 +0000 @@ -58,10 +58,17 @@ print "ok 10\n"; my $flags = 0; + +if($^O eq 'MSWin32') { + ioctl($server_socket, 0x8004667e, pack("L!", 0)); + +} else { + fcntl($server_socket, F_GETFL, $flags) or die "fcntl F_GETFL: $!\n"; fcntl($server_socket, F_SETFL, $flags & ~O_NONBLOCK) or die "fcntl F_SETFL $!\n"; +} if (syswrite ($client_socket, $test_msg1, length $test_msg1) == 10) { print "ok 11\n"; diff -ruNw IO-Multiplex-1.11/t/200_udp.t IO-Multiplex-1.11a/t/200_udp.t --- IO-Multiplex-1.11/t/200_udp.t 2011-02-02 11:28:24.000000000 +0000 +++ IO-Multiplex-1.11a/t/200_udp.t 2011-02-23 19:41:28.190168600 +0000 @@ -19,8 +19,10 @@ use IO::Socket; use IO::Multiplex; use POSIX qw(ENOTCONN EDESTADDRREQ); - +{ + no warnings; if($^O eq 'MSWin32') { *ENOTCONN = sub(){10057} } +} $| = 1; plan tests => 15;
Subject: Re: [rt.cpan.org #66096] MSWin broken
Date: Wed, 23 Feb 2011 22:49:37 +0100
To: Mark Dootson via RT <bug-IO-Multiplex [...] rt.cpan.org>
From: Mark Overmeer <secretaris [...] nluug.nl>
Download (untitled) / with headers
text/plain 921b
* Mark Dootson via RT (bug-IO-Multiplex@rt.cpan.org) [110223 20:47]: Show quoted text
> Wed Feb 23 15:47:33 2011: Request 66096 was acted upon. > Transaction: Ticket created by MDOOTSON > Queue: IO-Multiplex > Subject: MSWin broken > Broken in: 1.11 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=66096 > > > Attached patch for seems to fix Win32 usage with sockets > 1) Fix for ioctl call > 2) removal of warnings on some sub defs
Thank you! I was getting complains via cpan-testers, but have no Windows at all... glad you contribute these fixes. It has been released as 1.12. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Thanks. Works on my various Win installations now.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.