bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mingw32 and sockets


From: John Vandenberg
Subject: Re: mingw32 and sockets
Date: Thu, 22 Sep 2005 12:46:56 +1000

On 9/22/05, Simon Josefsson <address@hidden> wrote:
> Mingw32 doesn't have sys/types.h, arpa/inet.h or netinet/in.h.  But if
> you include winsock2.h instead of those three header files, most (?)
> POSIX socket functions work.

I doubt that any POSIX socket functions in winsock2 will conform to
the specification, or even reasonably reliably be useful.  There are a
number of gotchas that need to be considered. e.g. errno is not set.

plibc is a very good POSIX compatibility library for mingw, and as an
example, here is the select implementation:

http://cvs.sourceforge.net/viewcvs.py/plibc/plibc/src/select.c?view=markup

Existing modules inet_ntop, getaddrinfo and poll, and any module that
depends on those (canon-host?), appear to use these headers, but only
a small part of the socket implementation is needed; supporting those
modules on Window sounds like a good start.

> Perhaps this should be considered a mingw32 bug instead?  Problem is
> this mingw32 cross compiler will likely be around for a while, since
> it is shipped with the latest Debian release..  So it might be useful
> to support even if it is broken.

MinGW does not consider this a bug because it aims to provide a
complete and compatible Win32 API, in order that programmers can
interchange MSVC and MinGW.

http://marc.theaimsgroup.com/?t=112472681900001&r=1&w=2

--
John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]