svn commit: r427405 - head/math/octave-forge-interval/files
Stephen Montgomery-Smith
stephen at FreeBSD.org
Tue Nov 29 23:01:50 UTC 2016
Author: stephen
Date: Tue Nov 29 23:01:49 2016
New Revision: 427405
URL: https://svnweb.freebsd.org/changeset/ports/427405
Log:
- 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.
Modified:
head/math/octave-forge-interval/files/patch-mpfr__to__string__d.cc
Modified: head/math/octave-forge-interval/files/patch-mpfr__to__string__d.cc
==============================================================================
--- head/math/octave-forge-interval/files/patch-mpfr__to__string__d.cc Tue Nov 29 23:00:58 2016 (r427404)
+++ head/math/octave-forge-interval/files/patch-mpfr__to__string__d.cc Tue Nov 29 23:01:49 2016 (r427405)
@@ -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);
More information about the svn-ports-all
mailing list