[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-292-g2f767f6

by Werner Koch cvs at cvs.gnupg.org
Wed Oct 2 18:10:40 CEST 2013


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 crypto library".

The branch, master has been updated
       via  2f767f6a17f7e99da4075882f7fe3ca597b31bdb (commit)
      from  6410152338a2b2ac1216e70c153cd16f9199c94e (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 2f767f6a17f7e99da4075882f7fe3ca597b31bdb
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Oct 2 16:56:46 2013 +0200

    Provide Pth compatiblity for use with GnuPG 2.0.
    
    * src/ath.c (ath_install): Call ath_init and declare Pth as
    compatible.
    --
    
    GnuPG 2.0 requires GNU Pth which is a plain userland thread
    implementation.  Given that decent versions of GNU Pth seem to work
    together with pthread, we can declare Pth as compatible.  Native
    pthreads in Libgcrypt are only used internal to Libgcrypt and any
    internal blocking should be invisible to Pth.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/ath.c b/src/ath.c
index 1363d9e..7a7035d 100644
--- a/src/ath.c
+++ b/src/ath.c
@@ -134,8 +134,14 @@ ath_get_model (int *r_model)
 gpg_err_code_t
 ath_install (struct ath_ops *ath_ops)
 {
+  gpg_err_code_t rc;
   unsigned int thread_option;
 
+  /* Fist call ath_init so that we know our thread model.  */
+  rc = ath_init ();
+  if (rc)
+    return rc;
+
   /* Check if the requested thread option is compatible to the
      thread option we are already committed to.  */
   thread_option = ath_ops? GET_OPTION (ath_ops->option) : 0;
@@ -149,8 +155,15 @@ ath_install (struct ath_ops *ath_ops)
     {
       if (thread_option == ATH_THREAD_OPTION_PTHREAD)
         return 0; /* Okay - compatible.  */
+      if (thread_option == ATH_THREAD_OPTION_PTH)
+        return 0; /* Okay - compatible.  */
     }
 #endif /*USE_POSIX_THREADS_WEAK*/
+  else if (thread_option == ATH_THREAD_OPTION_PTH)
+    {
+      if (thread_model == ath_model_none)
+        return 0; /* Okay - compatible.  */
+    }
   else if (thread_option == ATH_THREAD_OPTION_DEFAULT)
     return 0; /* No thread support requested.  */
 

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

Summary of changes:
 src/ath.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org


_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits




More information about the Gcrypt-devel mailing list