gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_1_0-60-g85f627c


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_1_0-60-g85f627c
Date: Wed, 12 Sep 2012 21:25:39 +0000

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 "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=85f627caa4b623bf0d9166a48c5d634c9e076538

The branch, master has been updated
       via  85f627caa4b623bf0d9166a48c5d634c9e076538 (commit)
      from  7b3839b4fff469a341fbbc125fe72468af9b7df4 (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 85f627caa4b623bf0d9166a48c5d634c9e076538
Author: Ilya Tumaykin <address@hidden>
Date:   Tue Sep 11 11:42:47 2012 +0400

    Fix mpz_unitstbit compilation with GMP versions < 5.
    
    Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>

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

Summary of changes:
 lib/nettle/wmnaf.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/lib/nettle/wmnaf.c b/lib/nettle/wmnaf.c
index 778518a..b7eb092 100644
--- a/lib/nettle/wmnaf.c
+++ b/lib/nettle/wmnaf.c
@@ -33,19 +33,23 @@
 
 #define ABS(x) ((x) >= 0 ? (x) : -(x))
 
+/* GMP lacks this typedef in versions prior to 5 */
+#if __GNU_MP__ < 5
+typedef unsigned long int mp_bitcnt_t;
+#endif
+
 /*
  * A local replacement for mpz_tstbit.
- * It is needed because for negative numbers original mpz_tstbit
- * returns an infinite number of `1`s after all bits of input number.
- * For positive numbers it returns zeros after all bits of input number.
+ * It is needed because original mpz_tstbit process negative numbers
+ * in a two-complement manner and we don't want it.
  * This function mimics mpz_tstbit behavior for positive numbers in both cases.
  */
 static int
-mpz_unitstbit (mpz_srcptr u, mp_bitcnt_t bit_index)
+mpz_unitstbit (mpz_t u, mp_bitcnt_t bit_index)
   __GMP_NOTHROW
 {
-  mp_srcptr u_ptr = (u)->_mp_d;
-  mp_size_t size = (u)->_mp_size;
+  mp_srcptr u_ptr = u->_mp_d;
+  mp_size_t size = u->_mp_size;
   unsigned abs_size = ABS (size);
   mp_size_t limb_index = bit_index / GMP_NUMB_BITS;
   mp_srcptr p = u_ptr + limb_index;


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]