Re: ecpg thread-safe descriptor - Mailing list pgsql-patches

From Tom Lane
Subject Re: ecpg thread-safe descriptor
Date
Msg-id 24219.1191350260@sss.pgh.pa.us
Whole thread Raw
In response to Re: ecpg thread-safe descriptor  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ecpg thread-safe descriptor
List pgsql-patches
I wrote:
> Michael Meskes <meskes@postgresql.org> writes:
>> Since I do not know whether we really need DllMain could anyone please
>> test whether ecpg builds correctly without it?

> It looks to me like we should not need it, if we instead add code to
> initialize the mutexes properly on Windows (a la the way it's done
> in libpq).

Hm, I take that back --- the other reason it's there is as a kluge to
avoid supporting pthread_once().  This code all looks pretty darn hokey,
not to mention that it ought to be merged with libpq's pthread-win32.c,
but fixing it seems not a one-hour proposition.

>> AFAIRC (and hopefully I'm right this time)
>> multithreading never worked under msvc so we might have to set
>> thread-safety to disabled on these systems for ecpg for the time being.

If it didn't work then this seems clearly new-feature-development.

I think Magnus' idea of providing an exports list would be worth trying,
if someone can try it promptly; failing that, we need to revert this
patch.

            regards, tom lane

pgsql-patches by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: ecpg thread-safe descriptor
Next
From: Magnus Hagander
Date:
Subject: Re: Loose check was corrected of win32.mak.