[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gethostname, socket need startup code
From: |
Simon Josefsson |
Subject: |
Re: gethostname, socket need startup code |
Date: |
Mon, 03 Aug 2009 15:27:51 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> 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.
Looks fine to me, please push it.
/Simon