Browse Source

gmp: Updated (4.2.2 -> 4.2.4)

karasz/new-early
Alejandro Mery 15 years ago
parent
commit
ea96487867
  1. 55
      base/gmp/gmp-4.2.2-mpf_set_str.c.patch
  2. 6
      base/gmp/gmp.desc

55
base/gmp/gmp-4.2.2-mpf_set_str.c.patch

@ -1,55 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gmp/gmp-4.2.2-mpf_set_str.c.patch
# Copyright (C) 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Origin: http://gmplib.org
Description: When using mpf_set_str, mpf_init_set_str, or mpf_inp_str with
a base > 36, the supplied base will actually be ignored, and
the exponent 0 will be supplanted.
--- gmp-4.2.2/mpf/set_str.c.orig 2007-08-30 18:31:40.000000000 +0000
+++ gmp-4.2.2/mpf/set_str.c 2008-02-25 18:20:36.000000000 +0000
@@ -271,8 +271,29 @@
}
if (expptr != 0)
- /* FIXME: Should do some error checking here. */
- exp_in_base = strtol (expptr, (char **) 0, exp_base);
+ {
+ /* Scan and convert the exponent, in base exp_base. */
+ long dig, neg = -(long) ('-' == expptr[0]);
+ expptr -= neg; /* conditional increment */
+ c = (unsigned char) *expptr++;
+ dig = digit_value[c];
+ if (dig >= exp_base)
+ {
+ TMP_FREE;
+ return -1;
+ }
+ exp_in_base = dig;
+ c = (unsigned char) *expptr++;
+ dig = digit_value[c];
+ while (dig < exp_base)
+ {
+ exp_in_base = exp_in_base * exp_base;
+ exp_in_base += dig;
+ c = (unsigned char) *expptr++;
+ dig = digit_value[c];
+ }
+ exp_in_base = (exp_in_base ^ neg) - neg; /* conditional negation */
+ }
else
exp_in_base = 0;
if (dotpos != 0)

6
base/gmp/gmp.desc

@ -2,7 +2,7 @@
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY]
[COPY] Filename: package/.../gmp/gmp.desc
[COPY] Copyright (C) 2006 - 2008 The OpenSDE Project
[COPY] Copyright (C) 2006 - 2009 The OpenSDE Project
[COPY] Copyright (C) 2004 - 2006 The T2 SDE Project
[COPY] Copyright (C) 1998 - 2003 Clifford Wolf
[COPY]
@ -41,7 +41,7 @@
[L] GPL
[S] Stable
[V] 4.2.2
[V] 4.2.4
[P] X --2--5---9 102.200
[D] 1816435636 gmp-4.2.2.tar.gz ftp://ftp.gnu.org/pub/gnu/gmp/
[D] 501604781 gmp-4.2.4.tar.gz ftp://ftp.gnu.org/pub/gnu/gmp/

Loading…
Cancel
Save