pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/math/fgmp Fix a bug in the mpz_random*() routines, by ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bf1307a37bf0
branches:  trunk
changeset: 523264:bf1307a37bf0
user:      agc <agc%pkgsrc.org@localhost>
date:      Thu Jan 04 19:37:51 2007 +0000

description:
Fix a bug in the mpz_random*() routines, by setting the sn field in the
MP_INT.

diffstat:

 math/fgmp/distinfo         |   3 ++-
 math/fgmp/patches/patch-ab |  22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 49542fb538af -r bf1307a37bf0 math/fgmp/distinfo
--- a/math/fgmp/distinfo        Thu Jan 04 15:20:57 2007 +0000
+++ b/math/fgmp/distinfo        Thu Jan 04 19:37:51 2007 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/01/03 07:53:37 agc Exp $
+$NetBSD: distinfo,v 1.2 2007/01/04 19:37:51 agc Exp $
 
 SHA1 (fgmp-1.0b5-src-10.10.tar.gz) = ff34ef4033958ad3ad130b74aea8b7e16acfb6bc
 RMD160 (fgmp-1.0b5-src-10.10.tar.gz) = b85db676643fab4b5af18372fb719b6946cf11cf
 Size (fgmp-1.0b5-src-10.10.tar.gz) = 13429 bytes
 SHA1 (patch-aa) = 78b2dc3acd641e9b5b96e7de2f4ab12d71028ed1
+SHA1 (patch-ab) = c42db304c0412d0d7be1f6724eb8ee93c550cdb9
diff -r 49542fb538af -r bf1307a37bf0 math/fgmp/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fgmp/patches/patch-ab        Thu Jan 04 19:37:51 2007 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1 2007/01/04 19:37:51 agc Exp $
+
+Fix a bug in the random routines which don't set the 'sn' flag
+
+--- gmp.c      2007/01/04 13:17:13     1.1
++++ gmp.c      2007/01/04 13:15:45
+@@ -1230,6 +1230,7 @@
+     }
+     if (oflow) 
+         (x->p)[digits-1] &= (((mp_limb)1 << oflow) - 1);
++    x->sn = 1;
+ }
+ void mpz_random2(x,size)
+ MP_INT *x; unsigned int size;
+@@ -1251,6 +1252,7 @@
+     }
+     if (oflow) 
+         (x->p)[digits-1] &= (((mp_limb)1 << oflow) - 1);
++    x->sn = 1;
+ }
+ 
+ size_t mpz_size(x)



Home | Main Index | Thread Index | Old Index