projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b3e4b6b
)
fix it for 5.005 without warnings
author
minima
<minima>
Fri, 11 Jan 2002 01:32:05 +0000
(
01:32
+0000)
committer
minima
<minima>
Fri, 11 Jan 2002 01:32:05 +0000
(
01:32
+0000)
perl/Msg.pm
patch
|
blob
|
history
diff --git
a/perl/Msg.pm
b/perl/Msg.pm
index 63383cdafe5a5d9c2de57dfa2752098827ccebe3..5aef961ee4f4162593228d0c1abd71a41dd52fef 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-53,13
+53,16
@@
BEGIN {
require Errno; Errno->import(qw(EAGAIN EINPROGRESS EWOULDBLOCK));
};
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 };';
+ unless ($^O eq 'MSWin32') {
+ if ($] >= 5.6) {
+ eval {
+ require Socket; Socket->import(qw(IPPROTO_TCP TCP_NODELAY));
+ };
+ } else {
+ dbg("IPPROTO_TCP and TCP_NODELAY manually defined");
+ eval 'sub IPPROTO_TCP { 6 };';
+ eval 'sub TCP_NODELAY { 1 };';
+ }
}
# http://support.microsoft.com/support/kb/articles/Q150/5/37.asp
# defines EINPROGRESS as 10035. We provide it here because some
}
# http://support.microsoft.com/support/kb/articles/Q150/5/37.asp
# defines EINPROGRESS as 10035. We provide it here because some