projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bundle sha1 rather than use libgcrypt/nettle
[yaz-moved-to-github.git]
/
src
/
init_globals.c
diff --git
a/src/init_globals.c
b/src/init_globals.c
index
786cb9c
..
5442c4b
100644
(file)
--- a/
src/init_globals.c
+++ b/
src/init_globals.c
@@
-12,7
+12,7
@@
#include <config.h>
#endif
#include <config.h>
#endif
-#include <yaz/yconfig.h>
+#include <yaz/log.h>
#if YAZ_POSIX_THREADS
#include <pthread.h>
#if YAZ_POSIX_THREADS
#include <pthread.h>
@@
-23,10
+23,6
@@
#include <gnutls/gnutls.h>
#endif
#include <gnutls/gnutls.h>
#endif
-#if HAVE_GCRYPT_H
-#include <gcrypt.h>
-#endif
-
#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#endif
#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#endif
@@
-45,10
+41,7
@@
static pthread_mutex_t yaz_init_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
extern void yaz_log_init_globals(void);
#endif
extern void yaz_log_init_globals(void);
-
-#if HAVE_GCRYPT_H
-GCRY_THREAD_OPTION_PTHREAD_IMPL;
-#endif
+extern void yaz_log_deinit_globals(void);
void yaz_init_globals(void)
{
void yaz_init_globals(void)
{
@@
-60,20
+53,9
@@
void yaz_init_globals(void)
if (!yaz_init_flag)
{
yaz_log_init_globals();
if (!yaz_init_flag)
{
yaz_log_init_globals();
-#if HAVE_GCRYPT_H
- /* POSIX threads locking. In case gnutls_global_init do not override */
- gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
-#endif
#if HAVE_GNUTLS_H
gnutls_global_init();
#endif
#if HAVE_GNUTLS_H
gnutls_global_init();
#endif
-#if HAVE_GCRYPT_H
- /* most likely, GnuTLS has already initialized libgcrypt */
- if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0)
- {
- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, NULL, 0);
- }
-#endif
#if YAZ_HAVE_XML2
xmlInitParser();
#endif
#if YAZ_HAVE_XML2
xmlInitParser();
#endif
@@
-99,6
+81,7
@@
void yaz_deinit_globals(void)
#endif
if (yaz_init_flag)
{
#endif
if (yaz_init_flag)
{
+ yaz_log_deinit_globals();
#if HAVE_GNUTLS_H
gnutls_global_deinit();
#endif
#if HAVE_GNUTLS_H
gnutls_global_deinit();
#endif