diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2013-09-07 17:28:29 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2013-09-16 15:37:33 +0100 |
commit | e85fa3eb953b7b7e5f4298f665a205cdd81761b9 (patch) | |
tree | 26c6116313c22b4ea19bb0d9c0c59b3c67f7bb54 /win32/win32.c | |
parent | d31f3d6062be558a1c70f31e080a94bed0f4e7aa (diff) | |
download | perl-e85fa3eb953b7b7e5f4298f665a205cdd81761b9.tar.gz |
Fix Windows build for compilers other than VC10+
The new errno2.h only ensures that those new Exxx constants which are
required by convert_wsa_error_to_errno() have definitions; the other new
Exxx constants will remain undefined on compilers other than VC10+, so we
must take care not to use them unless we know they are defined.
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index 3802a54b1e..9f996d60ca 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2586,7 +2586,9 @@ win32_feof(FILE *fp) return (feof(fp)); } +#ifdef ERRNO_HAS_POSIX_SUPPLEMENT extern int convert_errno_to_wsa_error(int err); /* in win32sck.c */ +#endif /* * Since the errors returned by the socket error function @@ -2607,7 +2609,7 @@ win32_strerror(int e) dTHXa(NULL); if (e < 0) e = GetLastError(); -#if EADDRINUSE != WSAEADDRINUSE +#ifdef ERRNO_HAS_POSIX_SUPPLEMENT /* VC10+ define a "POSIX supplement" of errno values ranging from * EADDRINUSE (100) to EWOULDBLOCK (140), but sys_nerr is still 43 and * strerror() returns "Unknown error" for them. We must therefore still |