patches/mpfr/2.4.2/110-longlong.h.patch
author Johannes Stezenbach <js@sig21.net>
Tue Oct 30 00:22:25 2012 +0000 (2012-10-30)
changeset 3097 5c67476c7342
permissions -rw-r--r--
scripts/functions: fix endless loop in debug-shell with IO redirection

CT_DEBUG_INTERACTIVE is disabled when stdin, stdout or
stderr are redirected, but the check is only done at
the start of the build and doesn't catch when individual
build commands use redirection. When stdin is redirected
it will cause the debug shell to exit immediately, causing
and endless loop. Thus, save the stdin/our/err file handles
and restore them before invoking the debug shell.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121030102225.GA8303@sig21.net>
Patchwork-Id: 195409
     1 diff -Naurd mpfr-2.4.2-a/PATCHES mpfr-2.4.2-b/PATCHES
     2 --- mpfr-2.4.2-a/PATCHES	2009-12-18 12:03:30.000000000 +0000
     3 +++ mpfr-2.4.2-b/PATCHES	2009-12-18 12:05:19.000000000 +0000
     4 @@ -0,0 +1 @@
     5 +longlong.h
     6 diff -Naurd mpfr-2.4.2-a/VERSION mpfr-2.4.2-b/VERSION
     7 --- mpfr-2.4.2-a/VERSION	2009-12-07 13:37:12.000000000 +0000
     8 +++ mpfr-2.4.2-b/VERSION	2009-12-18 12:05:09.000000000 +0000
     9 @@ -1 +1 @@
    10 -2.4.2-p1
    11 +2.4.2-p2
    12 diff -Naurd mpfr-2.4.2-a/mpfr-longlong.h mpfr-2.4.2-b/mpfr-longlong.h
    13 --- mpfr-2.4.2-a/mpfr-longlong.h	2009-11-30 02:43:08.000000000 +0000
    14 +++ mpfr-2.4.2-b/mpfr-longlong.h	2009-12-18 12:04:29.000000000 +0000
    15 @@ -1011,7 +1011,15 @@
    16  #endif /* __m88000__ */
    17  
    18  #if defined (__mips) && W_TYPE_SIZE == 32
    19 -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    20 +#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
    21 +#define umul_ppmm(w1, w0, u, v) \
    22 +  do {									\
    23 +    UDItype _r;							\
    24 +    _r = (UDItype) u * v;						\
    25 +    (w1) = _r >> 32;							\
    26 +    (w0) = (USItype) _r;						\
    27 +  } while (0)
    28 +#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    29  #define umul_ppmm(w1, w0, u, v) \
    30    __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
    31  #else
    32 @@ -1024,7 +1032,16 @@
    33  #endif /* __mips */
    34  
    35  #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
    36 -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    37 +#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
    38 +typedef unsigned int UTItype __attribute__ ((mode (TI)));
    39 +#define umul_ppmm(w1, w0, u, v) \
    40 +  do {									\
    41 +    UTItype _r;							\
    42 +    _r = (UTItype) u * v;						\
    43 +    (w1) = _r >> 64;							\
    44 +    (w0) = (UDItype) _r;						\
    45 +  } while (0)
    46 +#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    47  #define umul_ppmm(w1, w0, u, v) \
    48    __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
    49  #else
    50 diff -Naurd mpfr-2.4.2-a/mpfr.h mpfr-2.4.2-b/mpfr.h
    51 --- mpfr-2.4.2-a/mpfr.h	2009-12-07 13:37:12.000000000 +0000
    52 +++ mpfr-2.4.2-b/mpfr.h	2009-12-18 12:05:09.000000000 +0000
    53 @@ -27,7 +27,7 @@
    54  #define MPFR_VERSION_MAJOR 2
    55  #define MPFR_VERSION_MINOR 4
    56  #define MPFR_VERSION_PATCHLEVEL 2
    57 -#define MPFR_VERSION_STRING "2.4.2-p1"
    58 +#define MPFR_VERSION_STRING "2.4.2-p2"
    59  
    60  /* Macros dealing with MPFR VERSION */
    61  #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
    62 diff -Naurd mpfr-2.4.2-a/version.c mpfr-2.4.2-b/version.c
    63 --- mpfr-2.4.2-a/version.c	2009-12-07 13:37:12.000000000 +0000
    64 +++ mpfr-2.4.2-b/version.c	2009-12-18 12:05:09.000000000 +0000
    65 @@ -25,5 +25,5 @@
    66  const char *
    67  mpfr_get_version (void)
    68  {
    69 -  return "2.4.2-p1";
    70 +  return "2.4.2-p2";
    71  }