summaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <mb@g10code.com>2004-03-11 01:44:44 +0000
committerMarcus Brinkmann <mb@g10code.com>2004-03-11 01:44:44 +0000
commit7995b7f73dce3b2b48d85066fca134cb24b8a4dc (patch)
tree8d544b18e7cc5b6ff45e26f182674d8df0c4978f /src/global.c
parentfe6cf2d0fb865f9d6c1d0944a8c128c8d4f70989 (diff)
downloadlibgcrypt-7995b7f73dce3b2b48d85066fca134cb24b8a4dc.tar.gz
2004-03-10 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (LIBGCRYPT_CONFIG_LIBS_PTHREAD, LIBGCRYPT_CONFIG_CFLAGS_PTHREAD, LIBGCRYPT_CONFIG_LIBS_PTH, LIBGCRYPT_CONFIG_CFLAGS_PTH, have_pth, have_pthread, AC_CHECK_PTH, AC_CHECK_LIB(pthread), HAVE_PTH, HAVE_PTHREAD): Removed. doc/ 2004-03-11 Marcus Brinkmann <marcus@g10code.de> * gcrypt.texi (Multi Threading): Partially document new thread support. src/ 2004-03-10 Marcus Brinkmann <marcus@g10code.de> * Makefile.am (ltlib_libgcrypt_pthread, ltlib_libgcrypt_pth): Removed. (lib_LTLIBRARIES): Remove those variables from here. (libgcrypt_pthread_la_SOURCES, libgcrypt_pthread_la_LDFLAGS, (libgcrypt_pthread_la_DEPENDENCIES, libgcrypt_pthread_la_LIBADD, (libgcrypt_pth_la_SOURCES, libgcrypt_pth_la_LDFLAGS, (libgcrypt_pth_la_DEPENDENCIES, libgcrypt_pth_la_LIBADD, (noinst_LTLIBRARIES): Removed. (libgcrypt_real_la_SOURCES): Merge with ... (libgcrypt_la_SOURCES): ... likewise. (libgcrypt_real_la_DEPENDENCIES): Merge with ... (libgcrypt_la_DEPENDENCIES): ... this. (libgcrypt_real_la_LIBADD): Merge with ... (libgcrypt_la_LIBADD): ... this. * libgcrypt-config.in (libs_pthread, libs_pth, cflags_pth) (cflags_pthread, thread_module, thread_modules): Removed. (Options): Remove --thread option from help output. If the option is specified, output an error and exit. For --cflags and --libs option, remove pth and pthread from output. * gcrypt.h: Include <sys/types.h> and <sys/socket.h>. (enum gcry_ctl_cmds): Add GCRYCTL_SET_THREAD_CBS. (gcry_thread_cbs): New struct. * global.c (gcry_control): Implement GCRYCTL_SET_THREAD_CBS. (global_init): Don't call ath_init here. * ath.h: Rewritten. * ath.c: Rewritten.
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/global.c b/src/global.c
index 56d81145..162e8451 100644
--- a/src/global.c
+++ b/src/global.c
@@ -63,8 +63,8 @@ global_init (void)
if (any_init_done)
return;
any_init_done = 1;
- ath_init ();
+ err = ath_init ();
if (! err)
_gcry_cipher_init ();
if (! err)
@@ -274,6 +274,10 @@ gcry_control (enum gcry_ctl_cmds cmd, ...)
}
break;
+ case GCRYCTL_SET_THREAD_CBS:
+ err = ath_install (va_arg (arg_ptr, void *), any_init_done);
+ break;
+
default:
err = GPG_ERR_INV_OP;
}