patches/gmp/4.2.2/100-mpf_set_str.c.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jun 24 16:24:09 2008 +0000 (2008-06-24)
changeset 611 eac4dc8da8a9
permissions -rw-r--r--
New patches from Ioannis E. VENETIS to allow building more up-to-date Alpha x-compilers.
Some patches are still missing, though.
See: http://sourceware.org/ml/libc-help/2008-06/msg00061.html

/trunk/patches/glibc/2.5.1/270-glibc-alpha-cfi.patch | 25 25 0 0 ++++++++++
/trunk/patches/glibc/2.5.1/280-glibc-alpha-sigsuspend.patch | 24 24 0 0 ++++++++++
/trunk/patches/glibc/2.5/270-glibc-alpha-cfi.patch | 25 25 0 0 ++++++++++
/trunk/patches/glibc/2.5/280-glibc-alpha-sigsuspend.patch | 24 24 0 0 ++++++++++
/trunk/patches/glibc/linuxthreads-2.3.6/270-glibc-linuxthreads-alpha-cfi.patch | 25 25 0 0 ++++++++++
/trunk/patches/gcc/4.2.0/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.2.1/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.3.0/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.2.2/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.3.1/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.2.3/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
11 files changed, 225 insertions(+)
     1 Original patch from http://gmplib.org/patches/mpf_set_str.c.diff
     2 Re-diffed to match crosstool-NG conventions.
     3 
     4 diff -dur gmp-4.2.2.orig/mpf/set_str.c gmp-4.2.2/mpf/set_str.c
     5 --- gmp-4.2.2.orig/mpf/set_str.c	2007-08-30 20:31:40.000000000 +0200
     6 +++ gmp-4.2.2/mpf/set_str.c	2008-01-28 23:05:29.000000000 +0100
     7 @@ -271,8 +271,29 @@
     8        }
     9  
    10      if (expptr != 0)
    11 -      /* FIXME: Should do some error checking here.  */
    12 -      exp_in_base = strtol (expptr, (char **) 0, exp_base);
    13 +      {
    14 +	/* Scan and convert the exponent, in base exp_base.  */
    15 +	long dig, neg = -(long) ('-' == expptr[0]);
    16 +	expptr -= neg;			/* conditional increment */
    17 +	c = (unsigned char) *expptr++;
    18 +	dig = digit_value[c];
    19 +	if (dig >= exp_base)
    20 +	  {
    21 +	    TMP_FREE;
    22 +	    return -1;
    23 +	  }
    24 +	exp_in_base = dig;
    25 +	c = (unsigned char) *expptr++;
    26 +	dig = digit_value[c];
    27 +	while (dig < exp_base)
    28 +	  {
    29 +	    exp_in_base = exp_in_base * exp_base;
    30 +	    exp_in_base += dig;
    31 +	    c = (unsigned char) *expptr++;
    32 +	    dig = digit_value[c];
    33 +	  }
    34 +	exp_in_base = (exp_in_base ^ neg) - neg; /* conditional negation */
    35 +      }
    36      else
    37        exp_in_base = 0;
    38      if (dotpos != 0)