Hi Simon,
On mingw, the gethostname test fails for me:
gethostname failed, rc -1 errno 10093
FAIL: test-gethostname.exe
The reason is that the WSAStartup function has not been called. Why not make
this initialization implicitly in the gethostname function? And likewise for
the socket() function? With that, the unit tests (test-select.c and test-poll.c)
don't need to do this initialization explicitly any more. One less portability
problem when porting to mingw.
Here are two proposed patches. I verified that the behaviour of test-select
and test-poll does not change, and it fixes the gethostname failure.