From: Nikos Mavrogiannopoulos Date: Wed, 24 Aug 2016 14:17:20 +0000 (+0200) Subject: doc: be more explicit about the usage of gnutls_global_init/deinit [ci skip] X-Git-Tag: gnutls_3_5_4~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3b4f4224206fb6f6fabaefbb2d93b021347713e;p=thirdparty%2Fgnutls.git doc: be more explicit about the usage of gnutls_global_init/deinit [ci skip] --- diff --git a/lib/global.c b/lib/global.c index d75cea8330..0b57f3d6d7 100644 --- a/lib/global.c +++ b/lib/global.c @@ -194,6 +194,10 @@ static int _gnutls_init_ret = 0; /** * gnutls_global_init: * + * Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly + * called. To disable the implicit call (in a library constructor) of this + * function set the environment variable %GNUTLS_NO_EXPLICIT_INIT to 1. + * * This function performs any required precalculations, detects * the supported CPU capabilities and initializes the underlying * cryptographic backend. In order to free any resources @@ -207,11 +211,6 @@ static int _gnutls_init_ret = 0; * function can be called many times, but will only do something the * first time. * - * Since GnuTLS 3.3.0 this function is automatically called on library - * constructor. Since the same version this function is also thread safe. - * The automatic initialization can be avoided if the environment variable - * %GNUTLS_NO_EXPLICIT_INIT is set to be 1. - * * A subsequent call of this function if the initial has failed will * return the same error code. * @@ -456,6 +455,10 @@ static void _gnutls_global_deinit(unsigned destructor) * This function deinitializes the global data, that were initialized * using gnutls_global_init(). * + * Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly + * called. GnuTLS will automatically deinitialize on library destructor. See + * gnutls_global_init() for disabling the implicit initialization/deinitialization. + * **/ void gnutls_global_deinit(void) {