aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-11-29 16:28:01 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2017-11-29 16:28:01 -0800
commit7505954411a168f5c5b9adec23eac55b1532fbe6 (patch)
treea76d317f5108f618916c529052c7a87d048bf03c
parent8029e59279e861071234decddf6a493119e0cb98 (diff)
downloadgdb-7505954411a168f5c5b9adec23eac55b1532fbe6.zip
gdb-7505954411a168f5c5b9adec23eac55b1532fbe6.tar.gz
gdb-7505954411a168f5c5b9adec23eac55b1532fbe6.tar.bz2
Define MPFR_USE_INTMAX_T so that mpfr.h assumes intmax_t is available.
mpfr.h uses a non-portable test to guess if intmax_t is available and if API functions using intmax_t should be exposed. Define MPFR_USE_INTMAX_T to override the non-portable test and always expose these functions. This fixes the build on platforms where the test guesses incorrectly. gdb/ChangeLog: * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/target-float.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ca8c5df..d6cbba8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-29 John Baldwin <jhb@FreeBSD.org>
+
+ * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
+
2017-11-29 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (to_fixed_range_type): Make sure that the size
diff --git a/gdb/target-float.c b/gdb/target-float.c
index 32237ec..b40b641 100644
--- a/gdb/target-float.c
+++ b/gdb/target-float.c
@@ -1147,6 +1147,8 @@ host_float_ops<T>::compare (const gdb_byte *x, const struct type *type_x,
#ifdef HAVE_LIBMPFR
+#define MPFR_USE_INTMAX_T
+
#include <mpfr.h>
class mpfr_float_ops : public target_float_ops