diff options
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h b/Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h index 17b70fc95da..2c2c881c8b3 100644 --- a/Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h +++ b/Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h @@ -33,12 +33,18 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., # define MPFR_DEFAULT_RND mpfr_get_default_rounding_mode () #endif -/* mpf_init initalizes at 0 */ +/* mpf_init initializes at 0 */ #undef mpf_init #define mpf_init(x) mpfr_init_set_ui ((x), 0, MPFR_DEFAULT_RND) #undef mpf_init2 #define mpf_init2(x,p) (mpfr_init2((x),(p)), mpfr_set_ui ((x), 0, MPFR_DEFAULT_RND)) +/* Warning! This assumes that all pointer types have the same representation. */ +#undef mpf_inits +#define mpf_inits mpfr_inits +#undef mpf_clears +#define mpf_clears mpfr_clears + /* functions which don't take as argument the rounding mode */ #undef mpf_ceil #define mpf_ceil mpfr_ceil @@ -52,6 +58,11 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #define mpf_cmp_ui mpfr_cmp_ui #undef mpf_cmp_d #define mpf_cmp_d mpfr_cmp_d +/* mpf_cmp_z appeared in GMP 6.1.0 */ +#if __GNU_MP_VERSION > 6 || (__GNU_MP_VERSION == 6 && __GNU_MP_VERSION_MINOR >= 1) +#undef mpf_cmp_z +#define mpf_cmp_z mpfr_cmp_z +#endif #undef mpf_eq #define mpf_eq mpfr_eq #undef mpf_floor @@ -171,5 +182,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #undef mpz_set_f #define mpz_set_f(z,f) mpfr_get_z(z,f,MPFR_DEFAULT_RND) +#undef mpq_set_f +#define mpq_set_f(q,f) mpfr_get_q(q,f) #endif /* __MPFR_FROM_MPF__ */ |