summaryrefslogtreecommitdiff
path: root/ext/Errno
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2013-09-07 21:53:35 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2013-09-16 15:37:36 +0100
commit4eaf3102d69324863df3d6e00970832384cdf452 (patch)
treea9b608feef6f22e15d613ab5160705e08afb2906 /ext/Errno
parent7b9b1b4e943aea8e8d16d497f20e2d3366df5eae (diff)
downloadperl-4eaf3102d69324863df3d6e00970832384cdf452.tar.gz
Fix the #include of winsock2.h in win32/include/sys/errno2.h
For some reason (I didn't figure out why) cpan/Win32/Win32.xs did not compile as of the previous commit, but in any case we cannot just blindly include winsock2.h because (a) it is too late if winsock.h has already been included and (b) early WinCE doesn't have it. The definition of _WINSOCKAPI_ was also wrongly not updated to _WINSOCK2API_ but was mistaken in its comment "Don't drag in everything" anyway: it's actually just an old-fashioned "include guard", not a means to include a minimal API from the file. (The mistaken comment came from the original ext/Errno/Errno_pm.PL before this round of $!-related changes. That file also had a redundant "#include <winsock.h>" left in it which should have been removed along with earlier work that removed the other one, so tidy that up too.) Steal a hopefully more correct incantation from win32/include/sys/socket.h instead. Now that we allow for the possibility of winsock.h being used again, we must take care not to make use of WSAECANCELLED if it is not defined. (That is the only WSAExxx constant which we use that was new in winsock2.h.)
Diffstat (limited to 'ext/Errno')
-rw-r--r--ext/Errno/Errno_pm.PL1
1 files changed, 0 insertions, 1 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 8267cbc153..776a5e56be 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -209,7 +209,6 @@ sub write_errno_pm {
print CPPI "#include <errno.h>\n";
}
if ($IsMSWin32) {
- print CPPI "#include <winsock.h>\n";
print CPPI qq[#include "../../win32/include/sys/errno2.h"\n];
}