diff options
author | stephen <stephen@FreeBSD.org> | 2016-11-30 07:01:49 +0800 |
---|---|---|
committer | stephen <stephen@FreeBSD.org> | 2016-11-30 07:01:49 +0800 |
commit | 3e05f16dda37e188b1feb48d86ffae6009eb73e5 (patch) | |
tree | 92a9a46cec89929d8472ac92ac0e1e2795523116 /math | |
parent | 014c575946d9cc85d3a30b2cb95ee9b25c13e000 (diff) | |
download | freebsd-ports-graphics-3e05f16dda37e188b1feb48d86ffae6009eb73e5.tar.gz freebsd-ports-graphics-3e05f16dda37e188b1feb48d86ffae6009eb73e5.tar.zst freebsd-ports-graphics-3e05f16dda37e188b1feb48d86ffae6009eb73e5.zip |
- Another attempt to get port to build on FreeBSD <=9.
- No portrevision bump, because I don't believe this change will effect the
final result on other OS versions.
Diffstat (limited to 'math')
-rw-r--r-- | math/octave-forge-interval/files/patch-mpfr__to__string__d.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/math/octave-forge-interval/files/patch-mpfr__to__string__d.cc b/math/octave-forge-interval/files/patch-mpfr__to__string__d.cc index 110ec181d5f..acc19a5addc 100644 --- a/math/octave-forge-interval/files/patch-mpfr__to__string__d.cc +++ b/math/octave-forge-interval/files/patch-mpfr__to__string__d.cc @@ -9,3 +9,21 @@ std::numeric_limits <double>::min_exponent - 1 - exponent); +@@ -219,7 +219,7 @@ DEFUN_DLD (mpfr_to_string_d, args, nargo + + // shift mantissa by 32 bits to format the first part + // sprintf (... "%x" ...) requires an unsigned 4-byte int +- mantissa *= std::pow (2.0, sizeof (uint32_t) * 8); ++ mantissa *= uint64_t (1) << (sizeof (uint32_t) * 8); + uint32_t first_part = static_cast <uint32_t> (mantissa); + + // remove first mantissa part +@@ -227,7 +227,7 @@ DEFUN_DLD (mpfr_to_string_d, args, nargo + + // shift mantissa by remaining 20 bits such that + // it is an integer +- mantissa *= std::pow (2.0, ++ mantissa *= uint64_t (1) << ( + std::numeric_limits + <double>::digits - 1 - 32); + uint32_t second_part = static_cast <uint32_t> (mantissa); |