1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) Index Data
3 * See the file LICENSE for details.
8 * \brief Initialize global things
20 #include <gnutls/gnutls.h>
27 static int yaz_init_flag = 0;
29 static pthread_mutex_t yaz_init_mutex = PTHREAD_MUTEX_INITIALIZER;
32 extern void yaz_log_init_globals(void);
34 void yaz_init_globals(void)
39 pthread_mutex_lock(&yaz_init_mutex);
43 yaz_log_init_globals();
48 /* most likely, GnuTLS has already initialized libgcrypt */
49 if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0)
51 gcry_control(GCRYCTL_INITIALIZATION_FINISHED, NULL, 0);
57 pthread_mutex_unlock(&yaz_init_mutex);
64 * c-file-style: "Stroustrup"
65 * indent-tabs-mode: nil
67 * vim: shiftwidth=4 tabstop=8 expandtab