Bruno Haible <[EMAIL PROTECTED]> writes:

>> > And it is necessary to still override the function, in order to
>> > WSAStartup before?
>> 
>> No, this doesn't seem to be necessary, at least under Wine.
>
> I don't think that you can judge the behaviour of Windows by testing on
> Wine. You know that Wine reimplements every DLL, so in particular Wine's
> winsock is a different implementation that Windows winsock.

I checked real Windows behaviour here, and it does indeed require that
WSAStartup is called before gethostname.  Otherwise, gethostname will
return -1 and doesn't populate the buffer.  So the gethostname
replacement module needs to call WSAStartup somehow.

I'll post an updated patch that uses the sockets module shortly.

/Simon


Reply via email to