mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Remove thread callbacks for libgcrypt >= 1.6.
* agent/gpg-agent.c (GCRY_THREAD_OPTION_PTH_IMPL): Do not use with libgcrypt >= 1.6. (main): Ditto. * scd/scdaemon.c (GCRY_THREAD_OPTION_PTH_IMPL): Ditto. (main): Ditto. -- This is not anymore needed but kept for compatibility with Libgcrypt < 1.6.
This commit is contained in:
parent
2daa112a74
commit
aacb43a730
2 changed files with 14 additions and 3 deletions
|
@ -308,6 +308,7 @@ static int check_for_running_agent (int silent, int mode);
|
|||
/* Pth wrapper function definitions. */
|
||||
ASSUAN_SYSTEM_PTH_IMPL;
|
||||
|
||||
#if GCRYPT_VERSION_NUMBER < 0x010600
|
||||
GCRY_THREAD_OPTION_PTH_IMPL;
|
||||
#if GCRY_THREAD_OPTION_VERSION < 1
|
||||
static int fixed_gcry_pth_init (void)
|
||||
|
@ -315,6 +316,7 @@ static int fixed_gcry_pth_init (void)
|
|||
return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
|
||||
}
|
||||
#endif
|
||||
#endif /*GCRYPT_VERSION_NUMBER < 0x10600*/
|
||||
|
||||
#ifndef PTH_HAVE_PTH_THREAD_ID
|
||||
static unsigned long pth_thread_id (void)
|
||||
|
@ -625,7 +627,8 @@ main (int argc, char **argv )
|
|||
init_common_subsystems ();
|
||||
|
||||
|
||||
/* Libgcrypt requires us to register the threading model first.
|
||||
#if GCRYPT_VERSION_NUMBER < 0x010600
|
||||
/* Libgcrypt < 1.6 requires us to register the threading model first.
|
||||
Note that this will also do the pth_init. */
|
||||
#if GCRY_THREAD_OPTION_VERSION < 1
|
||||
gcry_threads_pth.init = fixed_gcry_pth_init;
|
||||
|
@ -636,6 +639,7 @@ main (int argc, char **argv )
|
|||
log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
|
||||
gpg_strerror (err));
|
||||
}
|
||||
#endif /*GCRYPT_VERSION_NUMBER < 0x010600*/
|
||||
|
||||
|
||||
/* Check that the libraries are suitable. Do it here because
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue