This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix Win32 build with MinGW/gcc-4.8+ which define some errno.h values >= 100
authorSteve Hay <steve.m.hay@googlemail.com>
Thu, 17 Oct 2013 12:29:28 +0000 (13:29 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Thu, 17 Oct 2013 12:29:50 +0000 (13:29 +0100)
commit4f79e9b1610788006c48772dfecc571fc1e1a7ac
treebd349cb33b7151c4e2d361e9a5f1230c1f9740a8
parentbe08498a8ddf361c675f545c51ba12a6443977cb
Fix Win32 build with MinGW/gcc-4.8+ which define some errno.h values >= 100

Commit ea95436966 made changes to how errno.h constants are handled for
VC++ 2010 and above, which have added new values in the range 100-140.

Some versions of gcc-4.8.0 and above are now catching up and provide some
of these new values too (e.g. binaries from http://mingw-w64.sourceforge.net/
but not currently those from http://www.mingw.org/), but they don't provide
all of them. EADDRINUSE is provided, so convert_errno_to_wsa_error() gets
included, but the compilation fails because the following #defines which
VC++ 2010 and above provide are missing:

EBADMSG
EIDRM
ENODATA
ENOLINK
ENOMSG
ENOSR
ENOSTR
ENOTRECOVERABLE
EOTHER
ETIME
ETXTBSY

Simply ignore (#ifdef away) these constants for those compilers that don't
provide them.
win32/include/sys/errno2.h
win32/win32.c
win32/win32sck.c