← Back to team overview

drizzle-discuss team mailing list archive

Re: Drizzle on MS windows

 

On 07/29/2010 03:04 PM, Trond Norbye wrote:
> 
> On 29. juli 2010, at 23.48, Monty Taylor wrote:
> 
>> 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.
> 
> Isn't this something the application that use libdrizzle should do, and not something that the library should do automatically? Other parts of the application may also use sockets....

Hrm. I dunno. Why does windows suck?

What's the best practice here?



References