--- deliantra/Deliantra-Client/DC.pm 2007/04/06 07:45:33 1.140 +++ deliantra/Deliantra-Client/DC.pm 2007/04/06 21:53:56 1.141 @@ -29,6 +29,7 @@ use Pod::POM (); use File::Path (); use Storable (); # finally +use Fcntl (); BEGIN { use Crossfire::Protocol::Base (); @@ -228,6 +229,18 @@ $res } +sub fh_nonblocking($$) { + my ($fh, $nb) = @_; + + if ($^O =~ /Win32/) { + $nb = ! ! $nb; + ioctl $fh, 0x8004667e, $nb; # FIONBIO + } else { + fcntl $fh, &Fcntl::F_SETFL, $nb ? &Fcntl::O_NONBLOCK : 0; + } + +} + package CFPlus::Layout; $CFPlus::OpenGL::SHUTDOWN_HOOK{"CFPlus::Layout"} = sub {