[gnutls-dev] Re: living without global variables

Simon Josefsson jas at extundo.com
Mon Jan 30 17:30:46 CET 2006


Florian Weimer <fw at deneb.enyo.de> writes:

> * Simon Josefsson:
>
>> The problem with libgcrypt is that gnutls cannot initialize it
>> correctly, because libgcrypt need to know about threads, of which
>> gnutls know nothing.
>
> This means that you probably need to do away with the need for
> initialization in libgcrypt.
>
> Use .init sections (aka C++ constructors)?  Nowadays, they are
> available on most systems.  Or what about pthread_once?  You only need
> a static initialize to use it.

That seems like a libgcrypt improvement... perhaps the gcrypt-dev list
is more appropriate.

It sounds somewhat unportable to me, though.  I don't know, and doubt,
that even fairly popular targets such as mingw32 has it.

Thanks!




More information about the Gnutls-devel mailing list