projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tidy it up a bit more
[spider.git]
/
perl
/
Msg.pm
diff --git
a/perl/Msg.pm
b/perl/Msg.pm
index c9ad34338952888b03fa4c563bae15cef172c993..63383cdafe5a5d9c2de57dfa2752098827ccebe3 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-52,6
+52,15
@@
BEGIN {
eval {
require Errno; Errno->import(qw(EAGAIN EINPROGRESS EWOULDBLOCK));
};
eval {
require Errno; Errno->import(qw(EAGAIN EINPROGRESS EWOULDBLOCK));
};
+
+ eval {
+ require Socket; Socket->import(qw(IPPROTO_TCP TCP_NODELAY));
+ };
+ if ($@ && !$^O =~ /^MS/) {
+ dbg("IPPROTO_TCP and TCP_NODELAY manually defined");
+ eval '*IPPROTO_TCP = sub { 6 };';
+ eval '*TCP_NODELAY = sub { 1 };';
+ }
# http://support.microsoft.com/support/kb/articles/Q150/5/37.asp
# defines EINPROGRESS as 10035. We provide it here because some
# Win32 users report POSIX::EINPROGRESS is not vendor-supported.
# http://support.microsoft.com/support/kb/articles/Q150/5/37.asp
# defines EINPROGRESS as 10035. We provide it here because some
# Win32 users report POSIX::EINPROGRESS is not vendor-supported.
@@
-375,11
+384,6
@@
sub new_server {
return $self;
}
return $self;
}
-eval "use Socket qw(IPPROTO_TCP TCP_NODELAY)";
-if ($@ && !$main::is_win) {
- sub IPPROTO_TCP {6;}
- sub TCP_NODELAY {1;};
-}
sub nolinger
{
sub nolinger
{