Skip to content

Commit e912963

Browse files
committed
Unconditionally use the WSA equivalents of Socket error constants.
This change will only apply to mingw compilers, and has been found necessary by late versions of the mingw-w64 compiler. It's the same as what is done elsewhere for the Microsoft compilers. Backpatch of commit 73838b5. Problem reported by Michael Cronenworth, although not his patch.
1 parent 005f583 commit e912963

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

src/include/port/win32.h

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -270,36 +270,26 @@ typedef int pid_t;
270270
#undef EINTR
271271
#define EINTR WSAEINTR
272272
#define EAGAIN WSAEWOULDBLOCK
273-
#ifndef EMSGSIZE
273+
#undef EMSGSIZE
274274
#define EMSGSIZE WSAEMSGSIZE
275-
#endif
276-
#ifndef EAFNOSUPPORT
275+
#undef EAFNOSUPPORT
277276
#define EAFNOSUPPORT WSAEAFNOSUPPORT
278-
#endif
279-
#ifndef EWOULDBLOCK
277+
#undef EWOULDBLOCK
280278
#define EWOULDBLOCK WSAEWOULDBLOCK
281-
#endif
282-
#ifndef ECONNRESET
279+
#undef ECONNRESET
283280
#define ECONNRESET WSAECONNRESET
284-
#endif
285-
#ifndef EINPROGRESS
281+
#undef EINPROGRESS
286282
#define EINPROGRESS WSAEINPROGRESS
287-
#endif
288-
#ifndef ENOBUFS
283+
#undef ENOBUFS
289284
#define ENOBUFS WSAENOBUFS
290-
#endif
291-
#ifndef EPROTONOSUPPORT
285+
#undef EPROTONOSUPPORT
292286
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
293-
#endif
294-
#ifndef ECONNREFUSED
287+
#undef ECONNREFUSED
295288
#define ECONNREFUSED WSAECONNREFUSED
296-
#endif
297-
#ifndef EBADFD
289+
#undef EBADFD
298290
#define EBADFD WSAENOTSOCK
299-
#endif
300-
#ifndef EOPNOTSUPP
291+
#undef EOPNOTSUPP
301292
#define EOPNOTSUPP WSAEOPNOTSUPP
302-
#endif
303293

304294
/*
305295
* For Microsoft Visual Studio 2010 and above we intentionally redefine

0 commit comments

Comments
 (0)