mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
(main): Use new libgcrypt thread library register
scheme.
This commit is contained in:
parent
8c03a61f94
commit
cd3e11add8
@ -1,3 +1,8 @@
|
|||||||
|
2004-04-06 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* gpg-agent.c (main): Use new libgcrypt thread library register
|
||||||
|
scheme.
|
||||||
|
|
||||||
2004-03-23 Marcus Brinkmann <marcus@g10code.de>
|
2004-03-23 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* gpg-agent.c (main): For now, always print the default config
|
* gpg-agent.c (main): For now, always print the default config
|
||||||
|
@ -159,7 +159,11 @@ static const char *debug_level;
|
|||||||
static void create_directories (void);
|
static void create_directories (void);
|
||||||
#ifdef USE_GNU_PTH
|
#ifdef USE_GNU_PTH
|
||||||
static void handle_connections (int listen_fd);
|
static void handle_connections (int listen_fd);
|
||||||
#endif
|
|
||||||
|
/* Pth wrapper function definitions. */
|
||||||
|
GCRY_THREAD_OPTION_PTH_IMPL;
|
||||||
|
|
||||||
|
#endif /*USE_GNU_PTH*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -378,6 +382,7 @@ main (int argc, char **argv )
|
|||||||
int debug_wait = 0;
|
int debug_wait = 0;
|
||||||
int disable_pth = 0;
|
int disable_pth = 0;
|
||||||
int gpgconf_list = 0;
|
int gpgconf_list = 0;
|
||||||
|
gpg_error_t err;
|
||||||
|
|
||||||
set_strusage (my_strusage);
|
set_strusage (my_strusage);
|
||||||
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
||||||
@ -391,20 +396,19 @@ main (int argc, char **argv )
|
|||||||
|
|
||||||
i18n_init ();
|
i18n_init ();
|
||||||
|
|
||||||
/* We need to initialize Pth before libgcrypt, because the libgcrypt
|
/* Libgcrypt requires us to register the threading model first.
|
||||||
initialization done by gcry_check_version internally sets up its
|
Note that this will also do the pth_init. */
|
||||||
mutex system. Note that one must not link against pth if
|
|
||||||
USE_GNU_PTH is not defined. */
|
|
||||||
#ifdef USE_GNU_PTH
|
#ifdef USE_GNU_PTH
|
||||||
if (!pth_init ())
|
err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
|
||||||
|
if (err)
|
||||||
{
|
{
|
||||||
log_error ("failed to initialize the Pth library\n");
|
log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
|
||||||
exit (1);
|
gpg_strerror (err));
|
||||||
}
|
}
|
||||||
#endif /*USE_GNU_PTH*/
|
#endif /*USE_GNU_PTH*/
|
||||||
|
|
||||||
/* check that the libraries are suitable. Do it here because
|
/* Check that the libraries are suitable. Do it here because
|
||||||
the option parsing may need services of the library */
|
the option parsing may need services of the library. */
|
||||||
if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
|
if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
|
||||||
{
|
{
|
||||||
log_fatal( _("libgcrypt is too old (need %s, have %s)\n"),
|
log_fatal( _("libgcrypt is too old (need %s, have %s)\n"),
|
||||||
@ -533,7 +537,8 @@ main (int argc, char **argv )
|
|||||||
case oTTYname: default_ttyname = xstrdup (pargs.r.ret_str); break;
|
case oTTYname: default_ttyname = xstrdup (pargs.r.ret_str); break;
|
||||||
case oTTYtype: default_ttytype = xstrdup (pargs.r.ret_str); break;
|
case oTTYtype: default_ttytype = xstrdup (pargs.r.ret_str); break;
|
||||||
case oLCctype: default_lc_ctype = xstrdup (pargs.r.ret_str); break;
|
case oLCctype: default_lc_ctype = xstrdup (pargs.r.ret_str); break;
|
||||||
case oLCmessages: default_lc_messages = xstrdup (pargs.r.ret_str); break;
|
case oLCmessages: default_lc_messages = xstrdup (pargs.r.ret_str);
|
||||||
|
break;
|
||||||
|
|
||||||
case oKeepTTY: opt.keep_tty = 1; break;
|
case oKeepTTY: opt.keep_tty = 1; break;
|
||||||
case oKeepDISPLAY: opt.keep_display = 1; break;
|
case oKeepDISPLAY: opt.keep_display = 1; break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user