← Back to team overview

drizzle-discuss team mailing list archive

Re: Drizzle on MS windows

 

On 07/29/2010 02:12 PM, Stewart Smith wrote:
> On Thu, 29 Jul 2010 13:46:46 -0700, Monty Taylor <mordred@xxxxxxxxxxxx> wrote:
>> I did not do anything with restructuring in this way. I'd put a flag
>> around it ( like if (wsa_initted) ) though rather than a library init
>> function ... if we can avoid requiring library users needing to call
>> "drizzle_lib_init" I'd really like to.
> 
> You may be able to do a constructor for the library that's automatically
> called on the equiv of dlopen()
> 
> (I do this in libeatmydata for example)
> 

Yes - but it's not even remotely portable (I did some research on this a
while ago.

You can do this in certain environments for certain usage patterns...
but sadly it's wonky enough that unless it's something like
libeatmydata, it's probably just not safe. (libdrizzle is gonna get
sucked in by all sorts of stuff)

In this case, doing the flag check should be _really_ easy.

Monty



Follow ups

References