[gnutls-devel] Automatic library initialization

Andrew W. Nosenko andrew.w.nosenko at gmail.com
Mon Nov 16 18:10:02 CET 2015


On Mon, Nov 16, 2015 at 6:24 PM, Nikos Mavrogiannopoulos <nmav at gnutls.org>
wrote:

> On Mon, Nov 16, 2015 at 4:54 PM, Tim Ruehsen <tim.ruehsen at gmx.de> wrote:
> >> Something like the following. Have each program not wishing to use
> >> global initialization to define a symbol which overrides a weak one
> >> from gnutls. In practice that would mean setting:
> >> GNUTLS_SKIP_GLOBAL_INIT
> >> in some global section in your program. That can also be easily
> >> backported in 3.3.x and you can check for that feature with an ifdef.
> >> Would that be acceptable?
> > Brilliant idea. I'll use it for my projects... but other projects won't
> > benefit immediately (they first have to know).
>
> I'll then include it in 3.4.x and 3.3.x releases.
>
>
First at all, IMHO, _current_ API, which eliminates requirement to call
explicitly some init function is a good.  And the "old-style API" with
requirement to call some init function before any thread and/or child
processes will be forked, which you want to resurrect, is a bad.

Very simple example: DSO uses some library, which have requirement to
global init.  DSO loaded on demand.  How you meet this "global init before
any thread forked" requirement?

-- 
Andrew W. Nosenko <andrew.w.nosenko at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20151116/03ea6302/attachment.html>


More information about the Gnutls-devel mailing list