[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-3-ga2d9e48

by Marcus Brinkmann cvs at cvs.gnupg.org
Tue Jan 3 01:21:27 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  a2d9e48fcca6cfc2dfadef6dbd3579a30314676b (commit)
      from  c6aaf024651c7d55ac9fb77a53c084efb3adc1a9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a2d9e48fcca6cfc2dfadef6dbd3579a30314676b
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date:   Mon Jan 2 22:15:00 2012 +0100

    Only set gcrypt thread callback for older version of gcrypt.
    
    * agent/gpg-agent.c, dirmngr/dirmngr.c, g13/g13.c, scd/scdaemon.c
    (USE_GCRY_THREAD_CBS): New macro, defined if
    GCRY_THREAD_OPTION_VERSION is 0.
    (fixed_gcry_pth_init) [!USE_GCRY_THREAD_CBS]: Don't define.
    (main) [!USE_GCRY_THREAD_CBS]: Do not install thread callbacks.

diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 6dcde26..f98d821 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -289,11 +289,18 @@ static int check_for_running_agent (int silent, int mode);
 /* Pth wrapper function definitions. */
 ASSUAN_SYSTEM_PTH_IMPL;
 
+#if defined(GCRY_THREAD_OPTION_VERSION) && (GCRY_THREAD_OPTION_VERSION == 0)
+#define USE_GCRY_THREAD_CBS 1
+#endif
+
+#ifdef USE_GCRY_THREAD_CBS
 GCRY_THREAD_OPTION_PTH_IMPL;
+
 static int fixed_gcry_pth_init (void)
 {
   return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
 }
+#endif
 
 
 #ifndef PTH_HAVE_PTH_THREAD_ID
@@ -618,6 +625,7 @@ main (int argc, char **argv )
   init_common_subsystems (&argc, &argv);
 
 
+#ifdef USE_GCRY_THREAD_CBS
   /* Libgcrypt requires us to register the threading model first.
      Note that this will also do the pth_init. */
   gcry_threads_pth.init = fixed_gcry_pth_init;
@@ -627,6 +635,7 @@ main (int argc, char **argv )
       log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
                  gpg_strerror (err));
     }
+#endif
 
 
   /* Check that the libraries are suitable.  Do it here because
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index e1bae7e..7d478b3 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -280,11 +280,17 @@ static void handle_connections (assuan_fd_t listen_fd);
 /* Pth wrapper function definitions. */
 ASSUAN_SYSTEM_PTH_IMPL;
 
+#if GCRY_THREAD_OPTION_VERSION == 0
+#define FIX_GCRY_PTH_INIT 1
+#endif
+
+#ifdef FIX_GCRY_PTH_INIT
 GCRY_THREAD_OPTION_PTH_IMPL;
 static int fixed_gcry_pth_init (void)
 {
   return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
 }
+#endif
 
 #ifndef PTH_HAVE_PTH_THREAD_ID
 static unsigned long pth_thread_id (void)
@@ -618,6 +624,7 @@ main (int argc, char **argv)
   i18n_init ();
   init_common_subsystems (&argc, &argv);
 
+#ifdef USE_GCRY_THREAD_CBS
   /* Libgcrypt requires us to register the threading model first.
      Note that this will also do the pth_init.  */
   gcry_threads_pth.init = fixed_gcry_pth_init;
@@ -627,6 +634,7 @@ main (int argc, char **argv)
       log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
                  gpg_strerror (rc));
     }
+#endif
   gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
 
  /* Check that the libraries are suitable.  Do it here because
diff --git a/g13/g13.c b/g13/g13.c
index 8e5532c..e38f211 100644
--- a/g13/g13.c
+++ b/g13/g13.c
@@ -204,11 +204,18 @@ static void join_idle_task (void);
 /* Begin Pth wrapper functions. */
 ASSUAN_SYSTEM_PTH_IMPL;
 
+#if GCRY_THREAD_OPTION_VERSION == 0
+#define FIX_GCRY_PTH_INIT 1
+#endif
+
+#ifdef FIX_GCRY_PTH_INIT
 GCRY_THREAD_OPTION_PTH_IMPL;
 static int fixed_gcry_pth_init (void)
 {
   return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
 }
+#endif
+
 /* End Pth wrapper functions. */
 
 
@@ -361,6 +368,8 @@ main ( int argc, char **argv)
   i18n_init ();
   init_common_subsystems (&argc, &argv);
 
+
+#ifdef USE_GCRY_THREAD_CBS
   /* Libgcrypt requires us to register the threading model first.
      Note that this will also do the pth_init. */
   gcry_threads_pth.init = fixed_gcry_pth_init;
@@ -370,6 +379,7 @@ main ( int argc, char **argv)
       log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
                  gpg_strerror (err));
     }
+#endif
 
   /* Check that the Libgcrypt is suitable.  */
   if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index c8905d4..128ecc3 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -208,12 +208,18 @@ static void handle_connections (int listen_fd);
 /* Pth wrapper function definitions. */
 ASSUAN_SYSTEM_PTH_IMPL;
 
+#if defined(GCRY_THREAD_OPTION_VERSION) && (GCRY_THREAD_OPTION_VERSION == 0)
+#define USE_GCRY_THREAD_CBS 1
+#endif
+
+#ifdef USE_GCRY_THREAD_CBS
 GCRY_THREAD_OPTION_PTH_IMPL;
+
 static int fixed_gcry_pth_init (void)
 {
   return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
 }
-
+#endif
 
 
 static char *
@@ -413,6 +419,7 @@ main (int argc, char **argv )
 
   /* Libgcrypt requires us to register the threading model first.
      Note that this will also do the pth_init. */
+#ifdef USE_GCRY_THREAD_CBS
   gcry_threads_pth.init = fixed_gcry_pth_init;
   err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
   if (err)
@@ -420,6 +427,7 @@ main (int argc, char **argv )
       log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
                  gpg_strerror (err));
     }
+#endif
 
   /* Check that the libraries are suitable.  Do it here because
      the option parsing may need services of the library */

-----------------------------------------------------------------------

Summary of changes:
 agent/gpg-agent.c |    9 +++++++++
 dirmngr/dirmngr.c |    8 ++++++++
 g13/g13.c         |   10 ++++++++++
 scd/scdaemon.c    |   10 +++++++++-
 4 files changed, 36 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list