gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, gnutls_3_1_x, updated. gnutls_3_1_1-5-gd0ccff9


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, gnutls_3_1_x, updated. gnutls_3_1_1-5-gd0ccff9
Date: Wed, 12 Sep 2012 21:25:35 +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=d0ccff94c253f9e15afe1d89d4d466c0b8e76416

The branch, gnutls_3_1_x has been updated
       via  d0ccff94c253f9e15afe1d89d4d466c0b8e76416 (commit)
      from  981725a8ae8d34074f94df50a1ae98eb8854d906 (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 d0ccff94c253f9e15afe1d89d4d466c0b8e76416
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]