Re: pgsql: Remove unsafe calling of WSAStartup and WSA Cleanup from DllMain. - Mailing list pgsql-committers

From Dave Page
Subject Re: pgsql: Remove unsafe calling of WSAStartup and WSA Cleanup from DllMain.
Date
Msg-id 200703082050000000@263091613
Whole thread Raw
Responses Re: pgsql: Remove unsafe calling of WSAStartup and WSA Cleanup from DllMain.
List pgsql-committers

> ------- Original Message -------
> From: Magnus Hagander <magnus@hagander.net>
> To: Dave Page <dpage@postgresql.org>
> Sent: 08/03/07, 20:37:33
> Subject: Re: [COMMITTERS] pgsql: Remove unsafe calling of WSAStartup and WSACleanup from DllMain.
>
> No, it shouldn't.
>
> First, when on mingw, the file with WSAStartup() in it wasn't even
> linked in. And this is the DLL that we've been distributing in the MSI.

It wasn't? Ok... Anything else we've missed? :-p

> Second, they really shouldn't rely on that anyway - I don't think we've
> documented anywhere that libpq does this ;-) Because I assume you are
> referring to applications that use *other* winsock functions, but don't
> call WSAStartup() themselves?

Yeah - I'm not saying it's right having now seen the arguments against, but it happens. For example, do you recall us
beingconfused when we found we needed to call it in slon.exe? 

> Because libpq still calls wsastartup on
> the first attempt to open a connection.

Hmm, ok - did it always?

/D

pgsql-committers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pgsql: Remove unsafe calling of WSAStartup and WSA Cleanup from DllMain.
Next
From: Magnus Hagander
Date:
Subject: Re: pgsql: Remove unsafe calling of WSAStartup and WSA Cleanup from DllMain.