diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-01-04 10:25:40 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-01-04 10:25:40 +0000 |
commit | 41f5a88a498029745338d130bf6444d57c3ddf36 (patch) | |
tree | 5b1826c43f4bbfc6b67ce79bd8c3e9a616a58683 /mpfr-gmp.h | |
parent | 44869a6ca71f643bde742c484873469793d47198 (diff) | |
download | mpfr-41f5a88a498029745338d130bf6444d57c3ddf36.tar.gz |
Fix bug if not gmp-impl.h (mpn_sub_nc is internal).
Move MPFR_SET_EXP after checking the exponent range.
Minor change in the way to return the ternary value.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3163 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-gmp.h')
-rw-r--r-- | mpfr-gmp.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mpfr-gmp.h b/mpfr-gmp.h index 0b134f383..5765d28a8 100644 --- a/mpfr-gmp.h +++ b/mpfr-gmp.h @@ -48,6 +48,10 @@ char *alloca (); # endif #endif +#if defined (__cplusplus) +extern "C" { +#endif + /* Define BITS_PER_MP_LIMB Can't use sizeof(mp_limb_t) since it should be a preprocessor constant */ #if defined(GMP_NUMB_BITS) /* GMP 4.1.2 or above */ @@ -244,6 +248,13 @@ void mpfr_rand_raw _MPFR_PROTO((mp_ptr, gmp_randstate_t, unsigned long int)); void mpfr_init_gmp_rand _MPFR_PROTO((void)); #define MPFR_TEST_USE_RANDS() mpfr_init_gmp_rand (); +/* Not defined in gmp.h but in gmp-impl.h */ +mp_limb_t mpfr_sub_nc _MPFR_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, + mp_limb_t )); +#ifndef mpn_sub_nc +# define mpn_sub_nc mpfr_sub_nc +#endif + /* Allocate func are defined in gmp-impl.h */ /* In newer GMP, there aren't anymore __gmp_allocate_func, @@ -274,4 +285,8 @@ void *__gmp_default_allocate _MPFR_PROTO ((size_t)); void *__gmp_default_reallocate _MPFR_PROTO ((void *, size_t, size_t)); void __gmp_default_free _MPFR_PROTO ((void *, size_t)); +#if defined (__cplusplus) +} +#endif + #endif /* Gmp internal emulator */ |