Rename a GMP patch.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 05 21:16:37 2009 +0000 (2009-05-05)
changeset 13232790edc36b62
parent 1322 135e90f9b2ed
child 1324 48c12c696778
Rename a GMP patch.

-------- diffstat follows --------
/trunk/patches/gmp/4.2.2/100-mpf_set_str.c.patch | 38 0 38 0 ------------------------------
1 file changed, 38 deletions(-)
patches/gmp/4.2.2/100-mpf_set_str.c.patch
patches/gmp/4.2.2/100-mpf_set_str.patch
     1.1 --- a/patches/gmp/4.2.2/100-mpf_set_str.c.patch	Tue May 05 20:49:08 2009 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,38 +0,0 @@
     1.4 -Original patch from http://gmplib.org/patches/mpf_set_str.c.diff
     1.5 -Re-diffed to match crosstool-NG conventions.
     1.6 -
     1.7 -diff -dur gmp-4.2.2.orig/mpf/set_str.c gmp-4.2.2/mpf/set_str.c
     1.8 ---- gmp-4.2.2.orig/mpf/set_str.c	2007-08-30 20:31:40.000000000 +0200
     1.9 -+++ gmp-4.2.2/mpf/set_str.c	2008-01-28 23:05:29.000000000 +0100
    1.10 -@@ -271,8 +271,29 @@
    1.11 -       }
    1.12 - 
    1.13 -     if (expptr != 0)
    1.14 --      /* FIXME: Should do some error checking here.  */
    1.15 --      exp_in_base = strtol (expptr, (char **) 0, exp_base);
    1.16 -+      {
    1.17 -+	/* Scan and convert the exponent, in base exp_base.  */
    1.18 -+	long dig, neg = -(long) ('-' == expptr[0]);
    1.19 -+	expptr -= neg;			/* conditional increment */
    1.20 -+	c = (unsigned char) *expptr++;
    1.21 -+	dig = digit_value[c];
    1.22 -+	if (dig >= exp_base)
    1.23 -+	  {
    1.24 -+	    TMP_FREE;
    1.25 -+	    return -1;
    1.26 -+	  }
    1.27 -+	exp_in_base = dig;
    1.28 -+	c = (unsigned char) *expptr++;
    1.29 -+	dig = digit_value[c];
    1.30 -+	while (dig < exp_base)
    1.31 -+	  {
    1.32 -+	    exp_in_base = exp_in_base * exp_base;
    1.33 -+	    exp_in_base += dig;
    1.34 -+	    c = (unsigned char) *expptr++;
    1.35 -+	    dig = digit_value[c];
    1.36 -+	  }
    1.37 -+	exp_in_base = (exp_in_base ^ neg) - neg; /* conditional negation */
    1.38 -+      }
    1.39 -     else
    1.40 -       exp_in_base = 0;
    1.41 -     if (dotpos != 0)
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/gmp/4.2.2/100-mpf_set_str.patch	Tue May 05 21:16:37 2009 +0000
     2.3 @@ -0,0 +1,38 @@
     2.4 +Original patch from http://gmplib.org/patches/mpf_set_str.c.diff
     2.5 +Re-diffed to match crosstool-NG conventions.
     2.6 +
     2.7 +diff -dur gmp-4.2.2.orig/mpf/set_str.c gmp-4.2.2/mpf/set_str.c
     2.8 +--- gmp-4.2.2.orig/mpf/set_str.c	2007-08-30 20:31:40.000000000 +0200
     2.9 ++++ gmp-4.2.2/mpf/set_str.c	2008-01-28 23:05:29.000000000 +0100
    2.10 +@@ -271,8 +271,29 @@
    2.11 +       }
    2.12 + 
    2.13 +     if (expptr != 0)
    2.14 +-      /* FIXME: Should do some error checking here.  */
    2.15 +-      exp_in_base = strtol (expptr, (char **) 0, exp_base);
    2.16 ++      {
    2.17 ++	/* Scan and convert the exponent, in base exp_base.  */
    2.18 ++	long dig, neg = -(long) ('-' == expptr[0]);
    2.19 ++	expptr -= neg;			/* conditional increment */
    2.20 ++	c = (unsigned char) *expptr++;
    2.21 ++	dig = digit_value[c];
    2.22 ++	if (dig >= exp_base)
    2.23 ++	  {
    2.24 ++	    TMP_FREE;
    2.25 ++	    return -1;
    2.26 ++	  }
    2.27 ++	exp_in_base = dig;
    2.28 ++	c = (unsigned char) *expptr++;
    2.29 ++	dig = digit_value[c];
    2.30 ++	while (dig < exp_base)
    2.31 ++	  {
    2.32 ++	    exp_in_base = exp_in_base * exp_base;
    2.33 ++	    exp_in_base += dig;
    2.34 ++	    c = (unsigned char) *expptr++;
    2.35 ++	    dig = digit_value[c];
    2.36 ++	  }
    2.37 ++	exp_in_base = (exp_in_base ^ neg) - neg; /* conditional negation */
    2.38 ++      }
    2.39 +     else
    2.40 +       exp_in_base = 0;
    2.41 +     if (dotpos != 0)