[Clfs-commits] [Cross-LFS]Cross-LFS Book branch, systemd, updated. Add master changelog entry for mpfr patch update.

git git at cross-lfs.org
Mon Mar 10 19:25:16 PDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cross-LFS Book".

The branch, systemd has been updated
       via  c229db07f677adc3a13224b071b28fec64817c11 (commit)
       via  b2bbca40dc94767012ad38833c87cddcca452b16 (commit)
       via  c8b646b1ff7fde5762d67f866198f446a15bc7b8 (commit)
      from  9d71b20dd48d847aa7f2b7f631c2689429bebc3d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c229db07f677adc3a13224b071b28fec64817c11
Author: William Harrington <kb0iic at cross-lfs.org>
Date:   Mon Mar 10 21:25:07 2014 -0500

    Add master changelog entry for mpfr patch update.

diff --git a/BOOK/introduction/common/changelog.xml b/BOOK/introduction/common/changelog.xml
index 2520176..59f5f17 100644
--- a/BOOK/introduction/common/changelog.xml
+++ b/BOOK/introduction/common/changelog.xml
@@ -42,6 +42,9 @@
         <listitem>
           <para>[William Harrington] - Update TZData to 2014a.</para>
         </listitem>
+        <listitem>
+          <para>[William Harrington] - Update MPFR fixes patch to patch level 5.</para>
+        </listitem>
       </itemizedlist>
     </listitem>
 

commit b2bbca40dc94767012ad38833c87cddcca452b16
Author: William Harrington <kb0iic at cross-lfs.org>
Date:   Mon Mar 10 21:24:50 2014 -0500

    Adjust mpfr fixes patch version, size, and md5 hash.

diff --git a/BOOK/patches.ent b/BOOK/patches.ent
index d5acc5f..3e3a229 100644
--- a/BOOK/patches.ent
+++ b/BOOK/patches.ent
@@ -46,9 +46,9 @@
 <!ENTITY man-i18n-patch-md5 "a5aba0cb5a95a7945db8c882334b7dab">
 <!ENTITY man-i18n-patch-size "11 KB">
 
-<!ENTITY mpfr-fixes-patch "mpfr-&mpfr-version;-fixes-1.patch">
-<!ENTITY mpfr-fixes-patch-md5 "9c3b271ded070f8cb202459165a87f88">
-<!ENTITY mpfr-fixes-patch-size "23 KB">
+<!ENTITY mpfr-fixes-patch "mpfr-&mpfr-version;-fixes-2.patch">
+<!ENTITY mpfr-fixes-patch-md5 "2951be1103eb20a4acff2a8fce29ca22">
+<!ENTITY mpfr-fixes-patch-size "30 KB">
 
 <!ENTITY ncurses-bashfix-patch "ncurses-&ncurses-version;-bash_fix-1.patch">
 <!ENTITY ncurses-bashfix-patch-md5 "c6f7f2ab0ebaf7721ebeb266641352db">

commit c8b646b1ff7fde5762d67f866198f446a15bc7b8
Author: William Harrington <kb0iic at cross-lfs.org>
Date:   Mon Mar 10 21:24:30 2014 -0500

    Add MPFR patch level 5 patch.

diff --git a/patches/mpfr-3.1.2-fixes-1.patch b/patches/mpfr-3.1.2-fixes-2.patch
similarity index 67%
rename from patches/mpfr-3.1.2-fixes-1.patch
rename to patches/mpfr-3.1.2-fixes-2.patch
index c19b74e..e4a4a2e 100644
--- a/patches/mpfr-3.1.2-fixes-1.patch
+++ b/patches/mpfr-3.1.2-fixes-2.patch
@@ -1,26 +1,24 @@
 Submitted By: William Harrington (kb0iic at cross-lfs dot org)
-Date: 2013-11-11
+Date: 2014-03-10
 Initial Package Version: 3.1.2
 Origin: Upstream
 Upstream Status: Applied
-Description: Contains all upstream patches of mpfr current.
+Description: Contains all upstream patches of mpfr current to patch level 5.
 
-diff -Naur mpfr-3.1.2.orig/PATCHES mpfr-3.1.2/PATCHES
---- mpfr-3.1.2.orig/PATCHES	2013-03-13 15:37:38.000000000 +0000
-+++ mpfr-3.1.2/PATCHES	2013-11-11 23:55:16.818732551 +0000
-@@ -0,0 +1,3 @@
-+clang-divby0
-+fits-smallneg
+diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
+--- mpfr-3.1.2-a/PATCHES	2013-09-26 10:52:52.000000000 +0000
++++ mpfr-3.1.2-b/PATCHES	2013-09-26 10:52:52.000000000 +0000
+@@ -0,0 +1 @@
 +exp_2
-diff -Naur mpfr-3.1.2.orig/VERSION mpfr-3.1.2/VERSION
---- mpfr-3.1.2.orig/VERSION	2013-03-13 15:37:28.000000000 +0000
-+++ mpfr-3.1.2/VERSION	2013-11-11 23:55:16.818732551 +0000
+diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
+--- mpfr-3.1.2-a/VERSION	2013-03-13 15:37:28.000000000 +0000
++++ mpfr-3.1.2-b/VERSION	2013-09-26 10:52:52.000000000 +0000
 @@ -1 +1 @@
 -3.1.2
-+3.1.2-p3
-diff -Naur mpfr-3.1.2.orig/src/exp_2.c mpfr-3.1.2/src/exp_2.c
---- mpfr-3.1.2.orig/src/exp_2.c	2013-03-13 15:37:28.000000000 +0000
-+++ mpfr-3.1.2/src/exp_2.c	2013-11-11 23:55:16.810732551 +0000
++3.1.2-p1
+diff -Naurd mpfr-3.1.2-a/src/exp_2.c mpfr-3.1.2-b/src/exp_2.c
+--- mpfr-3.1.2-a/src/exp_2.c	2013-03-13 15:37:28.000000000 +0000
++++ mpfr-3.1.2-b/src/exp_2.c	2013-09-26 10:52:52.000000000 +0000
 @@ -204,7 +204,7 @@
            for (k = 0; k < K; k++)
              {
@@ -30,9 +28,42 @@ diff -Naur mpfr-3.1.2.orig/src/exp_2.c mpfr-3.1.2/src/exp_2.c
                exps += mpz_normalize (ss, ss, q);
              }
            mpfr_set_z (s, ss, MPFR_RNDN);
-diff -Naur mpfr-3.1.2.orig/src/fits_u.h mpfr-3.1.2/src/fits_u.h
---- mpfr-3.1.2.orig/src/fits_u.h	2013-03-13 15:37:35.000000000 +0000
-+++ mpfr-3.1.2/src/fits_u.h	2013-11-11 23:55:16.818732551 +0000
+diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
+--- mpfr-3.1.2-a/src/mpfr.h	2013-03-13 15:37:37.000000000 +0000
++++ mpfr-3.1.2-b/src/mpfr.h	2013-09-26 10:52:52.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 1
+ #define MPFR_VERSION_PATCHLEVEL 2
+-#define MPFR_VERSION_STRING "3.1.2"
++#define MPFR_VERSION_STRING "3.1.2-p1"
+ 
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
+--- mpfr-3.1.2-a/src/version.c	2013-03-13 15:37:34.000000000 +0000
++++ mpfr-3.1.2-b/src/version.c	2013-09-26 10:52:52.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+-  return "3.1.2";
++  return "3.1.2-p1";
+ }
+diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
+--- mpfr-3.1.2-a/PATCHES	2013-09-26 10:56:55.000000000 +0000
++++ mpfr-3.1.2-b/PATCHES	2013-09-26 10:56:55.000000000 +0000
+@@ -0,0 +1 @@
++fits-smallneg
+diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
+--- mpfr-3.1.2-a/VERSION	2013-09-26 10:52:52.000000000 +0000
++++ mpfr-3.1.2-b/VERSION	2013-09-26 10:56:55.000000000 +0000
+@@ -1 +1 @@
+-3.1.2-p1
++3.1.2-p2
+diff -Naurd mpfr-3.1.2-a/src/fits_u.h mpfr-3.1.2-b/src/fits_u.h
+--- mpfr-3.1.2-a/src/fits_u.h	2013-03-13 15:37:35.000000000 +0000
++++ mpfr-3.1.2-b/src/fits_u.h	2013-09-26 10:56:55.000000000 +0000
 @@ -32,17 +32,20 @@
    int res;
  
@@ -62,9 +93,9 @@ diff -Naur mpfr-3.1.2.orig/src/fits_u.h mpfr-3.1.2/src/fits_u.h
    /* first compute prec(MAXIMUM); fits in an int */
    for (s = MAXIMUM, prec = 0; s != 0; s /= 2, prec ++);
  
-diff -Naur mpfr-3.1.2.orig/src/fits_uintmax.c mpfr-3.1.2/src/fits_uintmax.c
---- mpfr-3.1.2.orig/src/fits_uintmax.c	2013-03-13 15:37:33.000000000 +0000
-+++ mpfr-3.1.2/src/fits_uintmax.c	2013-11-11 23:55:16.818732551 +0000
+diff -Naurd mpfr-3.1.2-a/src/fits_uintmax.c mpfr-3.1.2-b/src/fits_uintmax.c
+--- mpfr-3.1.2-a/src/fits_uintmax.c	2013-03-13 15:37:33.000000000 +0000
++++ mpfr-3.1.2-b/src/fits_uintmax.c	2013-09-26 10:56:55.000000000 +0000
 @@ -27,51 +27,19 @@
  #include "mpfr-intmax.h"
  #include "mpfr-impl.h"
@@ -92,13 +123,7 @@ diff -Naur mpfr-3.1.2.orig/src/fits_uintmax.c mpfr-3.1.2/src/fits_uintmax.c
 -     (b) round(f, prec(slong), rnd) <= MAXIMUM */
 -
 -  e = MPFR_GET_EXP (f);
-+/* Note: though mpfr-impl.h is included in fits_u.h, we also include it
-+   above so that it gets included even when _MPFR_H_HAVE_INTMAX_T is not
-+   defined; this is necessary to avoid an empty translation unit, which
-+   is forbidden by ISO C. Without this, a failing test can be reproduced
-+   by creating an invalid stdint.h somewhere in the default include path
-+   and by compiling MPFR with "gcc -ansi -pedantic-errors". */
- 
+-
 -  /* first compute prec(MAXIMUM); fits in an int */
 -  for (s = MPFR_UINTMAX_MAX, prec = 0; s != 0; s /= 2, prec ++);
 -
@@ -107,7 +132,13 @@ diff -Naur mpfr-3.1.2.orig/src/fits_uintmax.c mpfr-3.1.2/src/fits_uintmax.c
 -  /* if e <= prec - 1, then f < 2^(prec-1) < MAXIMUM */
 -  if (e <= prec - 1)
 -    return 1;
--
++/* Note: though mpfr-impl.h is included in fits_u.h, we also include it
++   above so that it gets included even when _MPFR_H_HAVE_INTMAX_T is not
++   defined; this is necessary to avoid an empty translation unit, which
++   is forbidden by ISO C. Without this, a failing test can be reproduced
++   by creating an invalid stdint.h somewhere in the default include path
++   and by compiling MPFR with "gcc -ansi -pedantic-errors". */
+ 
 -  /* if e >= prec + 1, then f >= 2^prec > MAXIMUM */
 -  if (e >= prec + 1)
 -    return 0;
@@ -128,62 +159,31 @@ diff -Naur mpfr-3.1.2.orig/src/fits_uintmax.c mpfr-3.1.2/src/fits_uintmax.c
 +#include "fits_u.h"
  
  #endif
-diff -Naur mpfr-3.1.2.orig/src/mpfr-impl.h mpfr-3.1.2/src/mpfr-impl.h
---- mpfr-3.1.2.orig/src/mpfr-impl.h	2013-03-13 15:37:36.000000000 +0000
-+++ mpfr-3.1.2/src/mpfr-impl.h	2013-11-11 23:55:16.818732551 +0000
-@@ -468,8 +468,16 @@
- #define MPFR_LIMBS_PER_FLT ((IEEE_FLT_MANT_DIG-1)/GMP_NUMB_BITS+1)
- 
- /* Visual C++ doesn't support +1.0/0.0, -1.0/0.0 and 0.0/0.0
--   at compile time. */
--#if defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)
-+   at compile time.
-+   Clang with -fsanitize=undefined is a bit similar due to a bug:
-+     http://llvm.org/bugs/show_bug.cgi?id=17381
-+   but even without its sanitizer, it may be better to use the
-+   double_zero version until IEEE 754 division by zero is properly
-+   supported:
-+     http://llvm.org/bugs/show_bug.cgi?id=17000
-+*/
-+#if (defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)) || \
-+    defined(__clang__)
- static double double_zero = 0.0;
- # define DBL_NAN (double_zero/double_zero)
- # define DBL_POS_INF ((double) 1.0/double_zero)
-@@ -501,6 +509,8 @@
-    (with Xcode 2.4.1, i.e. the latest one). */
- #define LVALUE(x) (&(x) == &(x) || &(x) != &(x))
- #define DOUBLE_ISINF(x) (LVALUE(x) && ((x) > DBL_MAX || (x) < -DBL_MAX))
-+/* The DOUBLE_ISNAN(x) macro is also valid on long double x
-+   (assuming that the compiler isn't too broken). */
- #ifdef MPFR_NANISNAN
- /* Avoid MIPSpro / IRIX64 / gcc -ffast-math (incorrect) optimizations.
-    The + must not be replaced by a ||. With gcc -ffast-math, NaN is
-diff -Naur mpfr-3.1.2.orig/src/mpfr.h mpfr-3.1.2/src/mpfr.h
---- mpfr-3.1.2.orig/src/mpfr.h	2013-03-13 15:37:37.000000000 +0000
-+++ mpfr-3.1.2/src/mpfr.h	2013-11-11 23:55:16.818732551 +0000
+diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
+--- mpfr-3.1.2-a/src/mpfr.h	2013-09-26 10:52:52.000000000 +0000
++++ mpfr-3.1.2-b/src/mpfr.h	2013-09-26 10:56:55.000000000 +0000
 @@ -27,7 +27,7 @@
  #define MPFR_VERSION_MAJOR 3
  #define MPFR_VERSION_MINOR 1
  #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2"
-+#define MPFR_VERSION_STRING "3.1.2-p3"
+-#define MPFR_VERSION_STRING "3.1.2-p1"
++#define MPFR_VERSION_STRING "3.1.2-p2"
  
  /* Macros dealing with MPFR VERSION */
  #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naur mpfr-3.1.2.orig/src/version.c mpfr-3.1.2/src/version.c
---- mpfr-3.1.2.orig/src/version.c	2013-03-13 15:37:34.000000000 +0000
-+++ mpfr-3.1.2/src/version.c	2013-11-11 23:55:16.818732551 +0000
+diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
+--- mpfr-3.1.2-a/src/version.c	2013-09-26 10:52:52.000000000 +0000
++++ mpfr-3.1.2-b/src/version.c	2013-09-26 10:56:55.000000000 +0000
 @@ -25,5 +25,5 @@
  const char *
  mpfr_get_version (void)
  {
--  return "3.1.2";
-+  return "3.1.2-p3";
+-  return "3.1.2-p1";
++  return "3.1.2-p2";
  }
-diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
---- mpfr-3.1.2.orig/tests/tfits.c	2013-03-13 15:37:45.000000000 +0000
-+++ mpfr-3.1.2/tests/tfits.c	2013-11-11 23:55:16.818732551 +0000
+diff -Naurd mpfr-3.1.2-a/tests/tfits.c mpfr-3.1.2-b/tests/tfits.c
+--- mpfr-3.1.2-a/tests/tfits.c	2013-03-13 15:37:45.000000000 +0000
++++ mpfr-3.1.2-b/tests/tfits.c	2013-09-26 10:56:55.000000000 +0000
 @@ -33,155 +33,176 @@
  #include "mpfr-intmax.h"
  #include "mpfr-test.h"
@@ -228,7 +228,9 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -    ERROR1;
 -  if (mpfr_fits_sshort_p (x, MPFR_RNDN))
 -    ERROR1;
--
++  RND_LOOP (r)
++    {
+ 
 -  /* Check INF */
 -  mpfr_set_inf (x, 1);
 -  if (mpfr_fits_ulong_p (x, MPFR_RNDN))
@@ -243,7 +245,21 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -    ERROR1;
 -  if (mpfr_fits_sshort_p (x, MPFR_RNDN))
 -    ERROR1;
--
++      /* Check NAN */
++      mpfr_set_nan (x);
++      if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (1);
++      if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (2);
++      if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (3);
++      if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (4);
++      if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (5);
++      if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (6);
+ 
 -  /* Check Zero */
 -  MPFR_SET_ZERO (x);
 -  if (!mpfr_fits_ulong_p (x, MPFR_RNDN))
@@ -258,7 +274,21 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -    ERROR2;
 -  if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
 -    ERROR2;
--
++      /* Check INF */
++      mpfr_set_inf (x, 1);
++      if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (7);
++      if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (8);
++      if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (9);
++      if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (10);
++      if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (11);
++      if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (12);
+ 
 -  /* Check small op */
 -  mpfr_set_str1 (x, "1 at -1");
 -  if (!mpfr_fits_ulong_p (x, MPFR_RNDN))
@@ -273,7 +303,21 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -    ERROR2;
 -  if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
 -    ERROR2;
--
++      /* Check Zero */
++      MPFR_SET_ZERO (x);
++      if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (13);
++      if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (14);
++      if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (15);
++      if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (16);
++      if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (17);
++      if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (18);
+ 
 -  /* Check 17 */
 -  mpfr_set_ui (x, 17, MPFR_RNDN);
 -  if (!mpfr_fits_ulong_p (x, MPFR_RNDN))
@@ -288,7 +332,21 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -    ERROR2;
 -  if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
 -    ERROR2;
--
++      /* Check small positive op */
++      mpfr_set_str1 (x, "1 at -1");
++      if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (19);
++      if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (20);
++      if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (21);
++      if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (22);
++      if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (23);
++      if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (24);
+ 
 -  /* Check all other values */
 -  mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
 -  mpfr_mul_2exp (x, x, 1, MPFR_RNDN);
@@ -307,7 +365,21 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -    ERROR1;
 -  if (mpfr_fits_sshort_p (x, MPFR_RNDN))
 -    ERROR1;
--
++      /* Check 17 */
++      mpfr_set_ui (x, 17, MPFR_RNDN);
++      if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (25);
++      if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
++        ERROR1 (26);
++      if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (27);
++      if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
++        ERROR1 (28);
++      if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (29);
++      if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
++        ERROR1 (30);
+ 
 -  mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
 -  if (!mpfr_fits_ulong_p (x, MPFR_RNDN))
 -    ERROR2;
@@ -326,105 +398,6 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -  mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN);
 -  if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
 -    ERROR2;
--
--  mpfr_set_si (x, 1, MPFR_RNDN);
--  if (!mpfr_fits_sint_p (x, MPFR_RNDN))
--    ERROR2;
--  if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
--    ERROR2;
--
--  /* Check negative value */
--  mpfr_set_si (x, -1, MPFR_RNDN);
--  if (!mpfr_fits_sint_p (x, MPFR_RNDN))
--    ERROR2;
--  if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
--    ERROR2;
--  if (!mpfr_fits_slong_p (x, MPFR_RNDN))
--    ERROR2;
--  if (mpfr_fits_uint_p (x, MPFR_RNDN))
--    ERROR1;
--  if (mpfr_fits_ushort_p (x, MPFR_RNDN))
--    ERROR1;
--  if (mpfr_fits_ulong_p (x, MPFR_RNDN))
--    ERROR1;
-+  RND_LOOP (r)
-+    {
-+
-+      /* Check NAN */
-+      mpfr_set_nan (x);
-+      if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (1);
-+      if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (2);
-+      if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (3);
-+      if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (4);
-+      if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (5);
-+      if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (6);
-+
-+      /* Check INF */
-+      mpfr_set_inf (x, 1);
-+      if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (7);
-+      if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (8);
-+      if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (9);
-+      if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (10);
-+      if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (11);
-+      if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (12);
-+
-+      /* Check Zero */
-+      MPFR_SET_ZERO (x);
-+      if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (13);
-+      if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (14);
-+      if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (15);
-+      if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (16);
-+      if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (17);
-+      if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (18);
-+
-+      /* Check small positive op */
-+      mpfr_set_str1 (x, "1 at -1");
-+      if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (19);
-+      if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (20);
-+      if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (21);
-+      if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (22);
-+      if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (23);
-+      if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (24);
-+
-+      /* Check 17 */
-+      mpfr_set_ui (x, 17, MPFR_RNDN);
-+      if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (25);
-+      if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (26);
-+      if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (27);
-+      if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (28);
-+      if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (29);
-+      if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (30);
-+
 +      /* Check all other values */
 +      mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
 +      mpfr_mul_2exp (x, x, 1, MPFR_RNDN);
@@ -443,7 +416,12 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 +        ERROR1 (36);
 +      if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
 +        ERROR1 (37);
-+
+ 
+-  mpfr_set_si (x, 1, MPFR_RNDN);
+-  if (!mpfr_fits_sint_p (x, MPFR_RNDN))
+-    ERROR2;
+-  if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
+-    ERROR2;
 +      mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
 +      if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
 +        ERROR1 (38);
@@ -462,7 +440,21 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 +      mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN);
 +      if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
 +        ERROR1 (43);
-+
+ 
+-  /* Check negative value */
+-  mpfr_set_si (x, -1, MPFR_RNDN);
+-  if (!mpfr_fits_sint_p (x, MPFR_RNDN))
+-    ERROR2;
+-  if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
+-    ERROR2;
+-  if (!mpfr_fits_slong_p (x, MPFR_RNDN))
+-    ERROR2;
+-  if (mpfr_fits_uint_p (x, MPFR_RNDN))
+-    ERROR1;
+-  if (mpfr_fits_ushort_p (x, MPFR_RNDN))
+-    ERROR1;
+-  if (mpfr_fits_ulong_p (x, MPFR_RNDN))
+-    ERROR1;
 +      mpfr_set_si (x, 1, MPFR_RNDN);
 +      if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
 +        ERROR1 (44);
@@ -520,42 +512,80 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -    ERROR1;
 -  if (mpfr_fits_intmax_p (x, MPFR_RNDN))
 -    ERROR1;
--
++  RND_LOOP (r)
++    {
++      /* Check NAN */
++      mpfr_set_nan (x);
++      if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (52);
++      if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (53);
+ 
 -  /* Check INF */
 -  mpfr_set_inf (x, 1);
 -  if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
 -    ERROR1;
 -  if (mpfr_fits_intmax_p (x, MPFR_RNDN))
 -    ERROR1;
--
++      /* Check INF */
++      mpfr_set_inf (x, 1);
++      if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (54);
++      if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (55);
+ 
 -  /* Check Zero */
 -  MPFR_SET_ZERO (x);
 -  if (!mpfr_fits_uintmax_p (x, MPFR_RNDN))
 -    ERROR2;
 -  if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
 -    ERROR2;
--
++      /* Check Zero */
++      MPFR_SET_ZERO (x);
++      if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (56);
++      if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (57);
+ 
 -  /* Check small op */
 -  mpfr_set_str1 (x, "1 at -1");
 -  if (!mpfr_fits_uintmax_p (x, MPFR_RNDN))
 -    ERROR2;
 -  if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
 -    ERROR2;
--
++      /* Check positive small op */
++      mpfr_set_str1 (x, "1 at -1");
++      if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (58);
++      if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (59);
+ 
 -  /* Check 17 */
 -  mpfr_set_ui (x, 17, MPFR_RNDN);
 -  if (!mpfr_fits_uintmax_p (x, MPFR_RNDN))
 -    ERROR2;
 -  if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
 -    ERROR2;
--
++      /* Check 17 */
++      mpfr_set_ui (x, 17, MPFR_RNDN);
++      if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (60);
++      if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (61);
+ 
 -  /* Check hugest */
 -  mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN);
 -  if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
 -    ERROR1;
 -  if (mpfr_fits_intmax_p (x, MPFR_RNDN))
 -    ERROR1;
--
++      /* Check hugest */
++      mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN);
++      if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (62);
++      if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
++        ERROR1 (63);
+ 
 -  /* Check all other values */
 -  mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN);
 -  mpfr_add_ui (x, x, 1, MPFR_RNDN);
@@ -577,57 +607,6 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 -  mpfr_sub_ui (x, x, 1, MPFR_RNDN);
 -  if (mpfr_fits_intmax_p (x, MPFR_RNDN))
 -    ERROR1;
--
--  /* Check negative value */
--  mpfr_set_si (x, -1, MPFR_RNDN);
--  if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
--    ERROR2;
--  if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
--    ERROR1;
-+  RND_LOOP (r)
-+    {
-+      /* Check NAN */
-+      mpfr_set_nan (x);
-+      if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (52);
-+      if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (53);
-+
-+      /* Check INF */
-+      mpfr_set_inf (x, 1);
-+      if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (54);
-+      if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (55);
-+
-+      /* Check Zero */
-+      MPFR_SET_ZERO (x);
-+      if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (56);
-+      if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (57);
-+
-+      /* Check positive small op */
-+      mpfr_set_str1 (x, "1 at -1");
-+      if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (58);
-+      if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (59);
-+
-+      /* Check 17 */
-+      mpfr_set_ui (x, 17, MPFR_RNDN);
-+      if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (60);
-+      if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (61);
-+
-+      /* Check hugest */
-+      mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN);
-+      if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (62);
-+      if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+        ERROR1 (63);
-+
 +      /* Check all other values */
 +      mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN);
 +      mpfr_add_ui (x, x, 1, MPFR_RNDN);
@@ -649,7 +628,13 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
 +      mpfr_sub_ui (x, x, 1, MPFR_RNDN);
 +      if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
 +        ERROR1 (69);
-+
+ 
+-  /* Check negative value */
+-  mpfr_set_si (x, -1, MPFR_RNDN);
+-  if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
+-    ERROR2;
+-  if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
+-    ERROR1;
 +      /* Check negative op */
 +      for (i = 1; i <= 4; i++)
 +        {
@@ -670,9 +655,73 @@ diff -Naur mpfr-3.1.2.orig/tests/tfits.c mpfr-3.1.2/tests/tfits.c
  #endif
  }
 -
-diff -Naur mpfr-3.1.2.orig/tests/tget_flt.c mpfr-3.1.2/tests/tget_flt.c
---- mpfr-3.1.2.orig/tests/tget_flt.c	2013-03-13 15:37:44.000000000 +0000
-+++ mpfr-3.1.2/tests/tget_flt.c	2013-11-11 23:55:16.818732551 +0000
+diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
+--- mpfr-3.1.2-a/PATCHES	2013-10-09 13:34:21.000000000 +0000
++++ mpfr-3.1.2-b/PATCHES	2013-10-09 13:34:21.000000000 +0000
+@@ -0,0 +1 @@
++clang-divby0
+diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
+--- mpfr-3.1.2-a/VERSION	2013-09-26 10:52:52.000000000 +0000
++++ mpfr-3.1.2-b/VERSION	2013-10-09 13:34:21.000000000 +0000
+@@ -1 +1 @@
+-3.1.2-p2
++3.1.2-p3
+diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h
+--- mpfr-3.1.2-a/src/mpfr-impl.h	2013-03-13 15:37:36.000000000 +0000
++++ mpfr-3.1.2-b/src/mpfr-impl.h	2013-10-09 13:34:21.000000000 +0000
+@@ -468,8 +468,16 @@
+ #define MPFR_LIMBS_PER_FLT ((IEEE_FLT_MANT_DIG-1)/GMP_NUMB_BITS+1)
+ 
+ /* Visual C++ doesn't support +1.0/0.0, -1.0/0.0 and 0.0/0.0
+-   at compile time. */
+-#if defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)
++   at compile time.
++   Clang with -fsanitize=undefined is a bit similar due to a bug:
++     http://llvm.org/bugs/show_bug.cgi?id=17381
++   but even without its sanitizer, it may be better to use the
++   double_zero version until IEEE 754 division by zero is properly
++   supported:
++     http://llvm.org/bugs/show_bug.cgi?id=17000
++*/
++#if (defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)) || \
++    defined(__clang__)
+ static double double_zero = 0.0;
+ # define DBL_NAN (double_zero/double_zero)
+ # define DBL_POS_INF ((double) 1.0/double_zero)
+@@ -501,6 +509,8 @@
+    (with Xcode 2.4.1, i.e. the latest one). */
+ #define LVALUE(x) (&(x) == &(x) || &(x) != &(x))
+ #define DOUBLE_ISINF(x) (LVALUE(x) && ((x) > DBL_MAX || (x) < -DBL_MAX))
++/* The DOUBLE_ISNAN(x) macro is also valid on long double x
++   (assuming that the compiler isn't too broken). */
+ #ifdef MPFR_NANISNAN
+ /* Avoid MIPSpro / IRIX64 / gcc -ffast-math (incorrect) optimizations.
+    The + must not be replaced by a ||. With gcc -ffast-math, NaN is
+diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
+--- mpfr-3.1.2-a/src/mpfr.h	2013-09-26 10:52:52.000000000 +0000
++++ mpfr-3.1.2-b/src/mpfr.h	2013-10-09 13:34:21.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 1
+ #define MPFR_VERSION_PATCHLEVEL 2
+-#define MPFR_VERSION_STRING "3.1.2-p2"
++#define MPFR_VERSION_STRING "3.1.2-p3"
+ 
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
+--- mpfr-3.1.2-a/src/version.c	2013-09-26 10:52:52.000000000 +0000
++++ mpfr-3.1.2-b/src/version.c	2013-10-09 13:34:21.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+-  return "3.1.2-p2";
++  return "3.1.2-p3";
+ }
+diff -Naurd mpfr-3.1.2-a/tests/tget_flt.c mpfr-3.1.2-b/tests/tget_flt.c
+--- mpfr-3.1.2-a/tests/tget_flt.c	2013-03-13 15:37:44.000000000 +0000
++++ mpfr-3.1.2-b/tests/tget_flt.c	2013-10-09 13:34:21.000000000 +0000
 @@ -28,9 +28,17 @@
  main (void)
  {
@@ -683,9 +732,9 @@ diff -Naur mpfr-3.1.2.orig/tests/tget_flt.c mpfr-3.1.2/tests/tget_flt.c
 +#if !defined(MPFR_ERRDIVZERO)
 +  float infp;
 +#endif
- 
-+  tests_start_mpfr ();
 +
++  tests_start_mpfr ();
+ 
 +#if !defined(MPFR_ERRDIVZERO)
 +  /* The definition of DBL_POS_INF involves a division by 0. This makes
 +     "clang -O2 -fsanitize=undefined -fno-sanitize-recover" fail. */
@@ -718,9 +767,9 @@ diff -Naur mpfr-3.1.2.orig/tests/tget_flt.c mpfr-3.1.2/tests/tget_flt.c
  
    mpfr_clear (x);
    mpfr_clear (y);
-diff -Naur mpfr-3.1.2.orig/tests/tset_ld.c mpfr-3.1.2/tests/tset_ld.c
---- mpfr-3.1.2.orig/tests/tset_ld.c	2013-03-13 15:37:44.000000000 +0000
-+++ mpfr-3.1.2/tests/tset_ld.c	2013-11-11 23:55:16.818732551 +0000
+diff -Naurd mpfr-3.1.2-a/tests/tset_ld.c mpfr-3.1.2-b/tests/tset_ld.c
+--- mpfr-3.1.2-a/tests/tset_ld.c	2013-03-13 15:37:44.000000000 +0000
++++ mpfr-3.1.2-b/tests/tset_ld.c	2013-10-09 13:34:21.000000000 +0000
 @@ -47,8 +47,11 @@
  static int
  Isnan_ld (long double d)
@@ -735,3 +784,129 @@ diff -Naur mpfr-3.1.2.orig/tests/tset_ld.c mpfr-3.1.2/tests/tset_ld.c
      return 1;
    LONGDOUBLE_NAN_ACTION (d, goto yes);
    return 0;
+diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
+--- mpfr-3.1.2-a/PATCHES	2013-11-15 00:51:49.211333830 +0000
++++ mpfr-3.1.2-b/PATCHES	2013-11-15 00:51:49.323334999 +0000
+@@ -0,0 +1 @@
++printf-alt0
+diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
+--- mpfr-3.1.2-a/VERSION	2013-11-15 00:51:49.211333830 +0000
++++ mpfr-3.1.2-b/VERSION	2013-11-15 00:51:49.323334999 +0000
+@@ -1 +1 @@
+-3.1.2-p3
++3.1.2-p4
+diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
+--- mpfr-3.1.2-a/src/mpfr.h	2013-11-15 00:51:49.211333830 +0000
++++ mpfr-3.1.2-b/src/mpfr.h	2013-11-15 00:51:49.323334999 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 1
+ #define MPFR_VERSION_PATCHLEVEL 2
+-#define MPFR_VERSION_STRING "3.1.2-p3"
++#define MPFR_VERSION_STRING "3.1.2-p4"
+ 
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c
+--- mpfr-3.1.2-a/src/vasprintf.c	2013-03-13 15:37:37.000000000 +0000
++++ mpfr-3.1.2-b/src/vasprintf.c	2013-11-15 00:51:49.267334408 +0000
+@@ -1040,7 +1040,7 @@
+ }
+ 
+ /* Determine the different parts of the string representation of the regular
+-   number P when SPEC.SPEC is 'e', 'E', 'g', or 'G'.
++   number P when spec.spec is 'e', 'E', 'g', or 'G'.
+    DEC_INFO contains the previously computed exponent and string or is NULL.
+ 
+    return -1 if some field > INT_MAX */
+@@ -1167,7 +1167,7 @@
+ }
+ 
+ /* Determine the different parts of the string representation of the regular
+-   number P when SPEC.SPEC is 'f', 'F', 'g', or 'G'.
++   number P when spec.spec is 'f', 'F', 'g', or 'G'.
+    DEC_INFO contains the previously computed exponent and string or is NULL.
+ 
+    return -1 if some field of number_parts is greater than INT_MAX */
+@@ -1559,7 +1559,7 @@
+             /* fractional part */
+             {
+               np->point = MPFR_DECIMAL_POINT;
+-              np->fp_trailing_zeros = (spec.spec == 'g' && spec.spec == 'G') ?
++              np->fp_trailing_zeros = (spec.spec == 'g' || spec.spec == 'G') ?
+                 spec.prec - 1 : spec.prec;
+             }
+           else if (spec.alt)
+diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
+--- mpfr-3.1.2-a/src/version.c	2013-11-15 00:51:49.211333830 +0000
++++ mpfr-3.1.2-b/src/version.c	2013-11-15 00:51:49.323334999 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+-  return "3.1.2-p3";
++  return "3.1.2-p4";
+ }
+diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c
+--- mpfr-3.1.2-a/tests/tsprintf.c	2013-03-13 15:37:44.000000000 +0000
++++ mpfr-3.1.2-b/tests/tsprintf.c	2013-11-15 00:51:49.267334408 +0000
+@@ -456,10 +456,16 @@
+   check_sprintf ("1.999900  ", "%-#10.7RG", x);
+   check_sprintf ("1.9999    ", "%-10.7RG", x);
+   mpfr_set_ui (x, 1, MPFR_RNDN);
++  check_sprintf ("1.", "%#.1Rg", x);
++  check_sprintf ("1.   ", "%-#5.1Rg", x);
++  check_sprintf ("  1.0", "%#5.2Rg", x);
+   check_sprintf ("1.00000000000000000000000000000", "%#.30Rg", x);
+   check_sprintf ("1", "%.30Rg", x);
+   mpfr_set_ui (x, 0, MPFR_RNDN);
+-  check_sprintf ("0.000000000000000000000000000000", "%#.30Rg", x);
++  check_sprintf ("0.", "%#.1Rg", x);
++  check_sprintf ("0.   ", "%-#5.1Rg", x);
++  check_sprintf ("  0.0", "%#5.2Rg", x);
++  check_sprintf ("0.00000000000000000000000000000", "%#.30Rg", x);
+   check_sprintf ("0", "%.30Rg", x);
+ 
+   /* following tests with precision 53 bits */
+diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
+--- mpfr-3.1.2-a/PATCHES	2013-12-01 11:07:49.575329762 +0000
++++ mpfr-3.1.2-b/PATCHES	2013-12-01 11:07:49.751331625 +0000
+@@ -0,0 +1 @@
++custom_init_set
+diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
+--- mpfr-3.1.2-a/VERSION	2013-12-01 11:07:49.571329714 +0000
++++ mpfr-3.1.2-b/VERSION	2013-12-01 11:07:49.747331585 +0000
+@@ -1 +1 @@
+-3.1.2-p4
++3.1.2-p5
+diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
+--- mpfr-3.1.2-a/src/mpfr.h	2013-12-01 11:07:49.571329714 +0000
++++ mpfr-3.1.2-b/src/mpfr.h	2013-12-01 11:07:49.747331585 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 1
+ #define MPFR_VERSION_PATCHLEVEL 2
+-#define MPFR_VERSION_STRING "3.1.2-p4"
++#define MPFR_VERSION_STRING "3.1.2-p5"
+ 
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+@@ -861,7 +861,7 @@
+     _t = (mpfr_kind_t) _k;                                     \
+     _s = 1;                                                    \
+   } else {                                                     \
+-    _t = (mpfr_kind_t) -k;                                     \
++    _t = (mpfr_kind_t) - _k;                                   \
+     _s = -1;                                                   \
+   }                                                            \
+   _e = _t == MPFR_REGULAR_KIND ? (e) :                         \
+diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
+--- mpfr-3.1.2-a/src/version.c	2013-12-01 11:07:49.575329762 +0000
++++ mpfr-3.1.2-b/src/version.c	2013-12-01 11:07:49.747331585 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+-  return "3.1.2-p4";
++  return "3.1.2-p5";
+ }

-----------------------------------------------------------------------

Summary of changes:
 BOOK/introduction/common/changelog.xml             |    3 +
 BOOK/patches.ent                                   |    6 +-
 ....1.2-fixes-1.patch => mpfr-3.1.2-fixes-2.patch} |  667 ++++++++++++-------
 3 files changed, 427 insertions(+), 249 deletions(-)
 rename patches/{mpfr-3.1.2-fixes-1.patch => mpfr-3.1.2-fixes-2.patch} (67%)


hooks/post-receive
-- 
Cross-LFS Book



More information about the Clfs-commits mailing list