wok rev 6517

Up: mpfr, mpfr-dev to 3.0.0.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Oct 02 14:39:44 2010 +0000 (2010-10-02)
parents 30a97b458420
children 0169e132cc40
files mpfr-dev/receipt mpfr/receipt mpfr/stuff/mpfr-3.0.0-p3.patch
line diff
     1.1 --- a/mpfr-dev/receipt	Sat Oct 02 05:32:35 2010 +0000
     1.2 +++ b/mpfr-dev/receipt	Sat Oct 02 14:39:44 2010 +0000
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt
     1.5  
     1.6  PACKAGE="mpfr-dev"
     1.7 -VERSION="2.4.2"
     1.8 +VERSION="3.0.0"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="GNU Multiple Precision Arithmetic devel files."
    1.11  MAINTAINER="pankso@slitaz.org"
     2.1 --- a/mpfr/receipt	Sat Oct 02 05:32:35 2010 +0000
     2.2 +++ b/mpfr/receipt	Sat Oct 02 14:39:44 2010 +0000
     2.3 @@ -1,7 +1,7 @@
     2.4  # SliTaz package receipt
     2.5  
     2.6  PACKAGE="mpfr"
     2.7 -VERSION="2.4.2"
     2.8 +VERSION="3.0.0"
     2.9  CATEGORY="development"
    2.10  SHORT_DESC="C library for multiple-precision floating-point computations."
    2.11  MAINTAINER="pankso@slitaz.org"
    2.12 @@ -15,6 +15,7 @@
    2.13  compile_rules()
    2.14  {	
    2.15  	cd $src
    2.16 +	patch -Np1 -i ../stuff/mpfr-3.0.0-p3.patch 
    2.17  	./configure \
    2.18  		--prefix=/usr \
    2.19  		--infodir=/usr/share/info \
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/mpfr/stuff/mpfr-3.0.0-p3.patch	Sat Oct 02 14:39:44 2010 +0000
     3.3 @@ -0,0 +1,685 @@
     3.4 +diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
     3.5 +--- mpfr-3.0.0-a/PATCHES	2010-06-23 11:02:49.000000000 +0000
     3.6 ++++ mpfr-3.0.0-b/PATCHES	2010-06-23 11:03:36.000000000 +0000
     3.7 +@@ -0,0 +1 @@
     3.8 ++mpfr_out_str
     3.9 +diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
    3.10 +--- mpfr-3.0.0-a/VERSION	2010-06-10 11:00:14.000000000 +0000
    3.11 ++++ mpfr-3.0.0-b/VERSION	2010-06-23 11:03:20.000000000 +0000
    3.12 +@@ -1 +1 @@
    3.13 +-3.0.0
    3.14 ++3.0.0-p1
    3.15 +diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
    3.16 +--- mpfr-3.0.0-a/mpfr.h	2010-06-10 11:00:14.000000000 +0000
    3.17 ++++ mpfr-3.0.0-b/mpfr.h	2010-06-23 11:03:20.000000000 +0000
    3.18 +@@ -27,7 +27,7 @@
    3.19 + #define MPFR_VERSION_MAJOR 3
    3.20 + #define MPFR_VERSION_MINOR 0
    3.21 + #define MPFR_VERSION_PATCHLEVEL 0
    3.22 +-#define MPFR_VERSION_STRING "3.0.0"
    3.23 ++#define MPFR_VERSION_STRING "3.0.0-p1"
    3.24 + 
    3.25 + /* Macros dealing with MPFR VERSION */
    3.26 + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
    3.27 +diff -Naurd mpfr-3.0.0-a/mpfr.texi mpfr-3.0.0-b/mpfr.texi
    3.28 +--- mpfr-3.0.0-a/mpfr.texi	2010-06-10 11:00:14.000000000 +0000
    3.29 ++++ mpfr-3.0.0-b/mpfr.texi	2010-06-23 11:03:12.000000000 +0000
    3.30 +@@ -2050,7 +2050,7 @@
    3.31 + are printed. If @var{base} is greater than 10, @samp{@@} will be used
    3.32 + instead of @samp{e} as exponent delimiter.
    3.33 + 
    3.34 +-Return the number of bytes written, or if an error occurred, return 0.
    3.35 ++Return the number of characters written, or if an error occurred, return 0.
    3.36 + @end deftypefun
    3.37 + 
    3.38 + @deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd})
    3.39 +diff -Naurd mpfr-3.0.0-a/out_str.c mpfr-3.0.0-b/out_str.c
    3.40 +--- mpfr-3.0.0-a/out_str.c	2010-06-10 11:00:14.000000000 +0000
    3.41 ++++ mpfr-3.0.0-b/out_str.c	2010-06-23 11:03:12.000000000 +0000
    3.42 +@@ -22,6 +22,16 @@
    3.43 + 
    3.44 + #include "mpfr-impl.h"
    3.45 + 
    3.46 ++/* Warning! S should not contain "%". */
    3.47 ++#define OUT_STR_RET(S)                          \
    3.48 ++  do                                            \
    3.49 ++    {                                           \
    3.50 ++      int r;                                    \
    3.51 ++      r = fprintf (stream, (S));                \
    3.52 ++      return r < 0 ? 0 : r;                     \
    3.53 ++    }                                           \
    3.54 ++  while (0)
    3.55 ++
    3.56 + size_t
    3.57 + mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op,
    3.58 +               mpfr_rnd_t rnd_mode)
    3.59 +@@ -29,6 +39,7 @@
    3.60 +   char *s, *s0;
    3.61 +   size_t l;
    3.62 +   mpfr_exp_t e;
    3.63 ++  int err;
    3.64 + 
    3.65 +   MPFR_ASSERTN (base >= 2 && base <= 62);
    3.66 + 
    3.67 +@@ -36,37 +47,16 @@
    3.68 +   if (stream == NULL)
    3.69 +     stream = stdout;
    3.70 + 
    3.71 +-  if (MPFR_IS_NAN(op))
    3.72 +-    {
    3.73 +-      fprintf (stream, "@NaN@");
    3.74 +-      return 3;
    3.75 +-    }
    3.76 +-
    3.77 +-  if (MPFR_IS_INF(op))
    3.78 +-    {
    3.79 +-      if (MPFR_SIGN(op) > 0)
    3.80 +-        {
    3.81 +-          fprintf (stream, "@Inf@");
    3.82 +-          return 3;
    3.83 +-        }
    3.84 +-      else
    3.85 +-        {
    3.86 +-          fprintf (stream, "-@Inf@");
    3.87 +-          return 4;
    3.88 +-        }
    3.89 +-    }
    3.90 +-
    3.91 +-  if (MPFR_IS_ZERO(op))
    3.92 ++  if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op)))
    3.93 +     {
    3.94 +-      if (MPFR_SIGN(op) > 0)
    3.95 +-        {
    3.96 +-          fprintf(stream, "0");
    3.97 +-          return 1;
    3.98 +-        }
    3.99 ++      if (MPFR_IS_NAN (op))
   3.100 ++        OUT_STR_RET ("@NaN@");
   3.101 ++      else if (MPFR_IS_INF (op))
   3.102 ++        OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@");
   3.103 +       else
   3.104 +         {
   3.105 +-          fprintf(stream, "-0");
   3.106 +-          return 2;
   3.107 ++          MPFR_ASSERTD (MPFR_IS_ZERO (op));
   3.108 ++          OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0");
   3.109 +         }
   3.110 +     }
   3.111 + 
   3.112 +@@ -77,21 +67,31 @@
   3.113 + 
   3.114 +   l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str
   3.115 +                          - may be incorrect, as only an upper bound? */
   3.116 +-  if (*s == '-')
   3.117 +-    fputc (*s++, stream);
   3.118 + 
   3.119 +-  /* outputs mantissa */
   3.120 +-  fputc (*s++, stream); e--; /* leading digit */
   3.121 +-  fputc ((unsigned char) MPFR_DECIMAL_POINT, stream);
   3.122 +-  fputs (s, stream);         /* rest of mantissa */
   3.123 ++  /* outputs possible sign and significand */
   3.124 ++  err = (*s == '-' && fputc (*s++, stream) == EOF)
   3.125 ++    || fputc (*s++, stream) == EOF  /* leading digit */
   3.126 ++    || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF
   3.127 ++    || fputs (s, stream) == EOF;     /* trailing significand */
   3.128 +   (*__gmp_free_func) (s0, l);
   3.129 ++  if (MPFR_UNLIKELY (err))
   3.130 ++    return 0;
   3.131 ++
   3.132 ++  e--;  /* due to the leading digit */
   3.133 + 
   3.134 +   /* outputs exponent */
   3.135 +   if (e)
   3.136 +     {
   3.137 ++      int r;
   3.138 ++
   3.139 +       MPFR_ASSERTN(e >= LONG_MIN);
   3.140 +       MPFR_ASSERTN(e <= LONG_MAX);
   3.141 +-      l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e);
   3.142 ++
   3.143 ++      r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e);
   3.144 ++      if (MPFR_UNLIKELY (r < 0))
   3.145 ++        return 0;
   3.146 ++
   3.147 ++      l += r;
   3.148 +     }
   3.149 + 
   3.150 +   return l;
   3.151 +diff -Naurd mpfr-3.0.0-a/tests/tout_str.c mpfr-3.0.0-b/tests/tout_str.c
   3.152 +--- mpfr-3.0.0-a/tests/tout_str.c	2010-06-10 11:00:13.000000000 +0000
   3.153 ++++ mpfr-3.0.0-b/tests/tout_str.c	2010-06-23 11:03:12.000000000 +0000
   3.154 +@@ -46,22 +46,54 @@
   3.155 + special (void)
   3.156 + {
   3.157 +   mpfr_t x;
   3.158 ++  unsigned int n;
   3.159 + 
   3.160 +   mpfr_init (x);
   3.161 + 
   3.162 +   mpfr_set_nan (x);
   3.163 +-  mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.164 ++  n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.165 ++  if (n != 5)
   3.166 ++    {
   3.167 ++      printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u "
   3.168 ++              "characters instead of 5.\n", n);
   3.169 ++      exit (1);
   3.170 ++    }
   3.171 + 
   3.172 +   mpfr_set_inf (x, 1);
   3.173 +-  mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.174 ++  n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.175 ++  if (n != 5)
   3.176 ++    {
   3.177 ++      printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u "
   3.178 ++               "characters instead of 5.\n", n);
   3.179 ++      exit (1);
   3.180 ++    }
   3.181 + 
   3.182 +   mpfr_set_inf (x, -1);
   3.183 +-  mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.184 ++  n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.185 ++  if (n != 6)
   3.186 ++    {
   3.187 ++      printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u "
   3.188 ++               "characters instead of 6.\n", n);
   3.189 ++      exit (1);
   3.190 ++    }
   3.191 + 
   3.192 +   mpfr_set_ui (x, 0, MPFR_RNDN);
   3.193 +-  mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.194 ++  n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.195 ++  if (n != 1)
   3.196 ++    {
   3.197 ++      printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u "
   3.198 ++               "characters instead of 1.\n", n);
   3.199 ++      exit (1);
   3.200 ++    }
   3.201 ++
   3.202 +   mpfr_neg (x, x, MPFR_RNDN);
   3.203 +-  mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.204 ++  n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
   3.205 ++  if (n != 2)
   3.206 ++    {
   3.207 ++      printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u "
   3.208 ++               "characters instead of 2.\n", n);
   3.209 ++      exit (1);
   3.210 ++    }
   3.211 + 
   3.212 +   mpfr_clear (x);
   3.213 + }
   3.214 +diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
   3.215 +--- mpfr-3.0.0-a/version.c	2010-06-10 11:00:14.000000000 +0000
   3.216 ++++ mpfr-3.0.0-b/version.c	2010-06-23 11:03:20.000000000 +0000
   3.217 +@@ -25,5 +25,5 @@
   3.218 + const char *
   3.219 + mpfr_get_version (void)
   3.220 + {
   3.221 +-  return "3.0.0";
   3.222 ++  return "3.0.0-p1";
   3.223 + }
   3.224 +diff -Naurd mpfr-3.0.0-a/Makefile.in mpfr-3.0.0-b/Makefile.in
   3.225 +--- mpfr-3.0.0-a/Makefile.in	2010-06-10 11:00:52.000000000 +0000
   3.226 ++++ mpfr-3.0.0-b/Makefile.in	2010-06-10 11:00:52.000000000 +0000
   3.227 +@@ -239,6 +239,7 @@
   3.228 + distuninstallcheck_listfiles = find . -type f -print
   3.229 + distcleancheck_listfiles = find . -type f -print
   3.230 + ACLOCAL = @ACLOCAL@
   3.231 ++ALLOCA = @ALLOCA@
   3.232 + AMTAR = @AMTAR@
   3.233 + AR = @AR@
   3.234 + AS = @AS@
   3.235 +diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
   3.236 +--- mpfr-3.0.0-a/PATCHES	2010-06-23 11:03:36.000000000 +0000
   3.237 ++++ mpfr-3.0.0-b/PATCHES	2010-06-25 13:23:13.000000000 +0000
   3.238 +@@ -0,0 +1 @@
   3.239 ++alloca
   3.240 +diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
   3.241 +--- mpfr-3.0.0-a/VERSION	2010-06-23 11:03:20.000000000 +0000
   3.242 ++++ mpfr-3.0.0-b/VERSION	2010-06-25 13:23:13.000000000 +0000
   3.243 +@@ -1 +1 @@
   3.244 +-3.0.0-p1
   3.245 ++3.0.0-p2
   3.246 +diff -Naurd mpfr-3.0.0-a/acinclude.m4 mpfr-3.0.0-b/acinclude.m4
   3.247 +--- mpfr-3.0.0-a/acinclude.m4	2010-06-10 11:00:14.000000000 +0000
   3.248 ++++ mpfr-3.0.0-b/acinclude.m4	2010-06-10 11:00:14.000000000 +0000
   3.249 +@@ -59,6 +59,9 @@
   3.250 + dnl sys/fpu.h - MIPS specific
   3.251 + AC_CHECK_HEADERS([sys/time.h sys/fpu.h])
   3.252 + 
   3.253 ++dnl Check how to get `alloca'
   3.254 ++AC_FUNC_ALLOCA
   3.255 ++
   3.256 + dnl SIZE_MAX macro
   3.257 + gl_SIZE_MAX
   3.258 + 
   3.259 +diff -Naurd mpfr-3.0.0-a/configure mpfr-3.0.0-b/configure
   3.260 +--- mpfr-3.0.0-a/configure	2010-06-10 11:00:51.000000000 +0000
   3.261 ++++ mpfr-3.0.0-b/configure	2010-06-25 13:23:05.000000000 +0000
   3.262 +@@ -783,6 +783,7 @@
   3.263 + OBJDUMP
   3.264 + DLLTOOL
   3.265 + AS
   3.266 ++ALLOCA
   3.267 + MPFR_LIBM
   3.268 + ANSI2KNR
   3.269 + U
   3.270 +@@ -5622,6 +5623,197 @@
   3.271 + done
   3.272 + 
   3.273 + 
   3.274 ++# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
   3.275 ++# for constant arguments.  Useless!
   3.276 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
   3.277 ++$as_echo_n "checking for working alloca.h... " >&6; }
   3.278 ++if test "${ac_cv_working_alloca_h+set}" = set; then :
   3.279 ++  $as_echo_n "(cached) " >&6
   3.280 ++else
   3.281 ++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   3.282 ++/* end confdefs.h.  */
   3.283 ++#include <alloca.h>
   3.284 ++int
   3.285 ++main ()
   3.286 ++{
   3.287 ++char *p = (char *) alloca (2 * sizeof (int));
   3.288 ++			  if (p) return 0;
   3.289 ++  ;
   3.290 ++  return 0;
   3.291 ++}
   3.292 ++_ACEOF
   3.293 ++if ac_fn_c_try_link "$LINENO"; then :
   3.294 ++  ac_cv_working_alloca_h=yes
   3.295 ++else
   3.296 ++  ac_cv_working_alloca_h=no
   3.297 ++fi
   3.298 ++rm -f core conftest.err conftest.$ac_objext \
   3.299 ++    conftest$ac_exeext conftest.$ac_ext
   3.300 ++fi
   3.301 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
   3.302 ++$as_echo "$ac_cv_working_alloca_h" >&6; }
   3.303 ++if test $ac_cv_working_alloca_h = yes; then
   3.304 ++
   3.305 ++$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
   3.306 ++
   3.307 ++fi
   3.308 ++
   3.309 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
   3.310 ++$as_echo_n "checking for alloca... " >&6; }
   3.311 ++if test "${ac_cv_func_alloca_works+set}" = set; then :
   3.312 ++  $as_echo_n "(cached) " >&6
   3.313 ++else
   3.314 ++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   3.315 ++/* end confdefs.h.  */
   3.316 ++#ifdef __GNUC__
   3.317 ++# define alloca __builtin_alloca
   3.318 ++#else
   3.319 ++# ifdef _MSC_VER
   3.320 ++#  include <malloc.h>
   3.321 ++#  define alloca _alloca
   3.322 ++# else
   3.323 ++#  ifdef HAVE_ALLOCA_H
   3.324 ++#   include <alloca.h>
   3.325 ++#  else
   3.326 ++#   ifdef _AIX
   3.327 ++ #pragma alloca
   3.328 ++#   else
   3.329 ++#    ifndef alloca /* predefined by HP cc +Olibcalls */
   3.330 ++char *alloca ();
   3.331 ++#    endif
   3.332 ++#   endif
   3.333 ++#  endif
   3.334 ++# endif
   3.335 ++#endif
   3.336 ++
   3.337 ++int
   3.338 ++main ()
   3.339 ++{
   3.340 ++char *p = (char *) alloca (1);
   3.341 ++				    if (p) return 0;
   3.342 ++  ;
   3.343 ++  return 0;
   3.344 ++}
   3.345 ++_ACEOF
   3.346 ++if ac_fn_c_try_link "$LINENO"; then :
   3.347 ++  ac_cv_func_alloca_works=yes
   3.348 ++else
   3.349 ++  ac_cv_func_alloca_works=no
   3.350 ++fi
   3.351 ++rm -f core conftest.err conftest.$ac_objext \
   3.352 ++    conftest$ac_exeext conftest.$ac_ext
   3.353 ++fi
   3.354 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
   3.355 ++$as_echo "$ac_cv_func_alloca_works" >&6; }
   3.356 ++
   3.357 ++if test $ac_cv_func_alloca_works = yes; then
   3.358 ++
   3.359 ++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
   3.360 ++
   3.361 ++else
   3.362 ++  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
   3.363 ++# that cause trouble.  Some versions do not even contain alloca or
   3.364 ++# contain a buggy version.  If you still want to use their alloca,
   3.365 ++# use ar to extract alloca.o from them instead of compiling alloca.c.
   3.366 ++
   3.367 ++ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
   3.368 ++
   3.369 ++$as_echo "#define C_ALLOCA 1" >>confdefs.h
   3.370 ++
   3.371 ++
   3.372 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
   3.373 ++$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
   3.374 ++if test "${ac_cv_os_cray+set}" = set; then :
   3.375 ++  $as_echo_n "(cached) " >&6
   3.376 ++else
   3.377 ++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   3.378 ++/* end confdefs.h.  */
   3.379 ++#if defined CRAY && ! defined CRAY2
   3.380 ++webecray
   3.381 ++#else
   3.382 ++wenotbecray
   3.383 ++#endif
   3.384 ++
   3.385 ++_ACEOF
   3.386 ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   3.387 ++  $EGREP "webecray" >/dev/null 2>&1; then :
   3.388 ++  ac_cv_os_cray=yes
   3.389 ++else
   3.390 ++  ac_cv_os_cray=no
   3.391 ++fi
   3.392 ++rm -f conftest*
   3.393 ++
   3.394 ++fi
   3.395 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
   3.396 ++$as_echo "$ac_cv_os_cray" >&6; }
   3.397 ++if test $ac_cv_os_cray = yes; then
   3.398 ++  for ac_func in _getb67 GETB67 getb67; do
   3.399 ++    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
   3.400 ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
   3.401 ++eval as_val=\$$as_ac_var
   3.402 ++   if test "x$as_val" = x""yes; then :
   3.403 ++
   3.404 ++cat >>confdefs.h <<_ACEOF
   3.405 ++#define CRAY_STACKSEG_END $ac_func
   3.406 ++_ACEOF
   3.407 ++
   3.408 ++    break
   3.409 ++fi
   3.410 ++
   3.411 ++  done
   3.412 ++fi
   3.413 ++
   3.414 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
   3.415 ++$as_echo_n "checking stack direction for C alloca... " >&6; }
   3.416 ++if test "${ac_cv_c_stack_direction+set}" = set; then :
   3.417 ++  $as_echo_n "(cached) " >&6
   3.418 ++else
   3.419 ++  if test "$cross_compiling" = yes; then :
   3.420 ++  ac_cv_c_stack_direction=0
   3.421 ++else
   3.422 ++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   3.423 ++/* end confdefs.h.  */
   3.424 ++$ac_includes_default
   3.425 ++int
   3.426 ++find_stack_direction ()
   3.427 ++{
   3.428 ++  static char *addr = 0;
   3.429 ++  auto char dummy;
   3.430 ++  if (addr == 0)
   3.431 ++    {
   3.432 ++      addr = &dummy;
   3.433 ++      return find_stack_direction ();
   3.434 ++    }
   3.435 ++  else
   3.436 ++    return (&dummy > addr) ? 1 : -1;
   3.437 ++}
   3.438 ++
   3.439 ++int
   3.440 ++main ()
   3.441 ++{
   3.442 ++  return find_stack_direction () < 0;
   3.443 ++}
   3.444 ++_ACEOF
   3.445 ++if ac_fn_c_try_run "$LINENO"; then :
   3.446 ++  ac_cv_c_stack_direction=1
   3.447 ++else
   3.448 ++  ac_cv_c_stack_direction=-1
   3.449 ++fi
   3.450 ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   3.451 ++  conftest.$ac_objext conftest.beam conftest.$ac_ext
   3.452 ++fi
   3.453 ++
   3.454 ++fi
   3.455 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
   3.456 ++$as_echo "$ac_cv_c_stack_direction" >&6; }
   3.457 ++cat >>confdefs.h <<_ACEOF
   3.458 ++#define STACK_DIRECTION $ac_cv_c_stack_direction
   3.459 ++_ACEOF
   3.460 ++
   3.461 ++
   3.462 ++fi
   3.463 ++
   3.464 ++
   3.465 + 
   3.466 +   for ac_header in stdint.h
   3.467 + do :
   3.468 +@@ -7564,13 +7756,13 @@
   3.469 + else
   3.470 +   lt_cv_nm_interface="BSD nm"
   3.471 +   echo "int some_variable = 0;" > conftest.$ac_ext
   3.472 +-  (eval echo "\"\$as_me:7567: $ac_compile\"" >&5)
   3.473 ++  (eval echo "\"\$as_me:7759: $ac_compile\"" >&5)
   3.474 +   (eval "$ac_compile" 2>conftest.err)
   3.475 +   cat conftest.err >&5
   3.476 +-  (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   3.477 ++  (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   3.478 +   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   3.479 +   cat conftest.err >&5
   3.480 +-  (eval echo "\"\$as_me:7573: output\"" >&5)
   3.481 ++  (eval echo "\"\$as_me:7765: output\"" >&5)
   3.482 +   cat conftest.out >&5
   3.483 +   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
   3.484 +     lt_cv_nm_interface="MS dumpbin"
   3.485 +@@ -8772,7 +8964,7 @@
   3.486 +   ;;
   3.487 + *-*-irix6*)
   3.488 +   # Find out which ABI we are using.
   3.489 +-  echo '#line 8775 "configure"' > conftest.$ac_ext
   3.490 ++  echo '#line 8967 "configure"' > conftest.$ac_ext
   3.491 +   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   3.492 +   (eval $ac_compile) 2>&5
   3.493 +   ac_status=$?
   3.494 +@@ -10032,11 +10224,11 @@
   3.495 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   3.496 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   3.497 +    -e 's:$: $lt_compiler_flag:'`
   3.498 +-   (eval echo "\"\$as_me:10035: $lt_compile\"" >&5)
   3.499 ++   (eval echo "\"\$as_me:10227: $lt_compile\"" >&5)
   3.500 +    (eval "$lt_compile" 2>conftest.err)
   3.501 +    ac_status=$?
   3.502 +    cat conftest.err >&5
   3.503 +-   echo "$as_me:10039: \$? = $ac_status" >&5
   3.504 ++   echo "$as_me:10231: \$? = $ac_status" >&5
   3.505 +    if (exit $ac_status) && test -s "$ac_outfile"; then
   3.506 +      # The compiler can only warn and ignore the option if not recognized
   3.507 +      # So say no if there are warnings other than the usual output.
   3.508 +@@ -10371,11 +10563,11 @@
   3.509 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   3.510 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   3.511 +    -e 's:$: $lt_compiler_flag:'`
   3.512 +-   (eval echo "\"\$as_me:10374: $lt_compile\"" >&5)
   3.513 ++   (eval echo "\"\$as_me:10566: $lt_compile\"" >&5)
   3.514 +    (eval "$lt_compile" 2>conftest.err)
   3.515 +    ac_status=$?
   3.516 +    cat conftest.err >&5
   3.517 +-   echo "$as_me:10378: \$? = $ac_status" >&5
   3.518 ++   echo "$as_me:10570: \$? = $ac_status" >&5
   3.519 +    if (exit $ac_status) && test -s "$ac_outfile"; then
   3.520 +      # The compiler can only warn and ignore the option if not recognized
   3.521 +      # So say no if there are warnings other than the usual output.
   3.522 +@@ -10476,11 +10668,11 @@
   3.523 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   3.524 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   3.525 +    -e 's:$: $lt_compiler_flag:'`
   3.526 +-   (eval echo "\"\$as_me:10479: $lt_compile\"" >&5)
   3.527 ++   (eval echo "\"\$as_me:10671: $lt_compile\"" >&5)
   3.528 +    (eval "$lt_compile" 2>out/conftest.err)
   3.529 +    ac_status=$?
   3.530 +    cat out/conftest.err >&5
   3.531 +-   echo "$as_me:10483: \$? = $ac_status" >&5
   3.532 ++   echo "$as_me:10675: \$? = $ac_status" >&5
   3.533 +    if (exit $ac_status) && test -s out/conftest2.$ac_objext
   3.534 +    then
   3.535 +      # The compiler can only warn and ignore the option if not recognized
   3.536 +@@ -10531,11 +10723,11 @@
   3.537 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   3.538 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   3.539 +    -e 's:$: $lt_compiler_flag:'`
   3.540 +-   (eval echo "\"\$as_me:10534: $lt_compile\"" >&5)
   3.541 ++   (eval echo "\"\$as_me:10726: $lt_compile\"" >&5)
   3.542 +    (eval "$lt_compile" 2>out/conftest.err)
   3.543 +    ac_status=$?
   3.544 +    cat out/conftest.err >&5
   3.545 +-   echo "$as_me:10538: \$? = $ac_status" >&5
   3.546 ++   echo "$as_me:10730: \$? = $ac_status" >&5
   3.547 +    if (exit $ac_status) && test -s out/conftest2.$ac_objext
   3.548 +    then
   3.549 +      # The compiler can only warn and ignore the option if not recognized
   3.550 +@@ -12915,7 +13107,7 @@
   3.551 +   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   3.552 +   lt_status=$lt_dlunknown
   3.553 +   cat > conftest.$ac_ext <<_LT_EOF
   3.554 +-#line 12918 "configure"
   3.555 ++#line 13110 "configure"
   3.556 + #include "confdefs.h"
   3.557 + 
   3.558 + #if HAVE_DLFCN_H
   3.559 +@@ -13011,7 +13203,7 @@
   3.560 +   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   3.561 +   lt_status=$lt_dlunknown
   3.562 +   cat > conftest.$ac_ext <<_LT_EOF
   3.563 +-#line 13014 "configure"
   3.564 ++#line 13206 "configure"
   3.565 + #include "confdefs.h"
   3.566 + 
   3.567 + #if HAVE_DLFCN_H
   3.568 +diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
   3.569 +--- mpfr-3.0.0-a/mpfr.h	2010-06-23 11:03:20.000000000 +0000
   3.570 ++++ mpfr-3.0.0-b/mpfr.h	2010-06-25 13:23:13.000000000 +0000
   3.571 +@@ -27,7 +27,7 @@
   3.572 + #define MPFR_VERSION_MAJOR 3
   3.573 + #define MPFR_VERSION_MINOR 0
   3.574 + #define MPFR_VERSION_PATCHLEVEL 0
   3.575 +-#define MPFR_VERSION_STRING "3.0.0-p1"
   3.576 ++#define MPFR_VERSION_STRING "3.0.0-p2"
   3.577 + 
   3.578 + /* Macros dealing with MPFR VERSION */
   3.579 + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
   3.580 +diff -Naurd mpfr-3.0.0-a/tests/Makefile.in mpfr-3.0.0-b/tests/Makefile.in
   3.581 +--- mpfr-3.0.0-a/tests/Makefile.in	2010-06-10 11:00:52.000000000 +0000
   3.582 ++++ mpfr-3.0.0-b/tests/Makefile.in	2010-06-10 11:00:52.000000000 +0000
   3.583 +@@ -960,6 +960,7 @@
   3.584 + red=; grn=; lgn=; blu=; std=
   3.585 + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
   3.586 + ACLOCAL = @ACLOCAL@
   3.587 ++ALLOCA = @ALLOCA@
   3.588 + AMTAR = @AMTAR@
   3.589 + AR = @AR@
   3.590 + AS = @AS@
   3.591 +diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
   3.592 +--- mpfr-3.0.0-a/version.c	2010-06-23 11:03:20.000000000 +0000
   3.593 ++++ mpfr-3.0.0-b/version.c	2010-06-25 13:23:13.000000000 +0000
   3.594 +@@ -25,5 +25,5 @@
   3.595 + const char *
   3.596 + mpfr_get_version (void)
   3.597 + {
   3.598 +-  return "3.0.0-p1";
   3.599 ++  return "3.0.0-p2";
   3.600 + }
   3.601 +diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
   3.602 +--- mpfr-3.0.0-a/PATCHES	2010-07-10 00:11:19.000000000 +0000
   3.603 ++++ mpfr-3.0.0-b/PATCHES	2010-07-10 00:12:50.000000000 +0000
   3.604 +@@ -0,0 +1 @@
   3.605 ++gamma_underflow
   3.606 +diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
   3.607 +--- mpfr-3.0.0-a/VERSION	2010-06-25 13:23:13.000000000 +0000
   3.608 ++++ mpfr-3.0.0-b/VERSION	2010-07-10 00:11:53.000000000 +0000
   3.609 +@@ -1 +1 @@
   3.610 +-3.0.0-p2
   3.611 ++3.0.0-p3
   3.612 +diff -Naurd mpfr-3.0.0-a/gamma.c mpfr-3.0.0-b/gamma.c
   3.613 +--- mpfr-3.0.0-a/gamma.c	2010-06-10 11:00:14.000000000 +0000
   3.614 ++++ mpfr-3.0.0-b/gamma.c	2010-07-10 00:11:46.000000000 +0000
   3.615 +@@ -274,7 +274,7 @@
   3.616 +       /* we want an upper bound for x * [log(2-x)-1].
   3.617 +          since x < 0, we need a lower bound on log(2-x) */
   3.618 +       mpfr_ui_sub (xp, 2, x, MPFR_RNDD);
   3.619 +-      mpfr_log (xp, xp, MPFR_RNDD);
   3.620 ++      mpfr_log2 (xp, xp, MPFR_RNDD);
   3.621 +       mpfr_sub_ui (xp, xp, 1, MPFR_RNDD);
   3.622 +       mpfr_mul (xp, xp, x, MPFR_RNDU);
   3.623 + 
   3.624 +@@ -303,8 +303,8 @@
   3.625 +         {
   3.626 +           mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */
   3.627 +           mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */
   3.628 +-          mpfr_log (tmp, tmp, MPFR_RNDU);
   3.629 +-          mpfr_add (tmp, tmp, xp, MPFR_RNDU);
   3.630 ++          mpfr_log2 (tmp, tmp, MPFR_RNDU);
   3.631 ++          mpfr_add (xp, tmp, xp, MPFR_RNDU);
   3.632 +           underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0;
   3.633 +         }
   3.634 + 
   3.635 +diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
   3.636 +--- mpfr-3.0.0-a/mpfr.h	2010-06-25 13:23:13.000000000 +0000
   3.637 ++++ mpfr-3.0.0-b/mpfr.h	2010-07-10 00:11:53.000000000 +0000
   3.638 +@@ -27,7 +27,7 @@
   3.639 + #define MPFR_VERSION_MAJOR 3
   3.640 + #define MPFR_VERSION_MINOR 0
   3.641 + #define MPFR_VERSION_PATCHLEVEL 0
   3.642 +-#define MPFR_VERSION_STRING "3.0.0-p2"
   3.643 ++#define MPFR_VERSION_STRING "3.0.0-p3"
   3.644 + 
   3.645 + /* Macros dealing with MPFR VERSION */
   3.646 + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
   3.647 +diff -Naurd mpfr-3.0.0-a/tests/tgamma.c mpfr-3.0.0-b/tests/tgamma.c
   3.648 +--- mpfr-3.0.0-a/tests/tgamma.c	2010-06-10 11:00:13.000000000 +0000
   3.649 ++++ mpfr-3.0.0-b/tests/tgamma.c	2010-07-10 00:11:46.000000000 +0000
   3.650 +@@ -461,6 +461,20 @@
   3.651 +   mpfr_clear (x);
   3.652 + }
   3.653 + 
   3.654 ++/* bug found by Stathis, only occurs on 32-bit machines */
   3.655 ++static void
   3.656 ++test20100709 (void)
   3.657 ++{
   3.658 ++  mpfr_t x;
   3.659 ++  int inex;
   3.660 ++
   3.661 ++  mpfr_init2 (x, 100);
   3.662 ++  mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN);
   3.663 ++  inex = mpfr_gamma (x, x, MPFR_RNDN);
   3.664 ++  MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0);
   3.665 ++  mpfr_clear (x);
   3.666 ++}
   3.667 ++
   3.668 + int
   3.669 + main (int argc, char *argv[])
   3.670 + {
   3.671 +@@ -471,6 +485,7 @@
   3.672 +   test_generic (2, 100, 2);
   3.673 +   gamma_integer ();
   3.674 +   test20071231 ();
   3.675 ++  test20100709 ();
   3.676 + 
   3.677 +   data_check ("data/gamma", mpfr_gamma, "mpfr_gamma");
   3.678 + 
   3.679 +diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
   3.680 +--- mpfr-3.0.0-a/version.c	2010-06-25 13:23:13.000000000 +0000
   3.681 ++++ mpfr-3.0.0-b/version.c	2010-07-10 00:11:53.000000000 +0000
   3.682 +@@ -25,5 +25,5 @@
   3.683 + const char *
   3.684 + mpfr_get_version (void)
   3.685 + {
   3.686 +-  return "3.0.0-p2";
   3.687 ++  return "3.0.0-p3";
   3.688 + }