summaryrefslogtreecommitdiff
path: root/src/mpfr-gmp.h
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2017-12-05 09:44:49 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2017-12-05 09:44:49 +0000
commit3d8a64cd6d35d717382270995ad3461aed1104d7 (patch)
tree76869a4612959bdd72a0a1fe8cafcf82323ac131 /src/mpfr-gmp.h
parent5315a10b93f9fef4df100008a5e5c10d8711e07c (diff)
downloadmpfr-3d8a64cd6d35d717382270995ad3461aed1104d7.tar.gz
fixed bug in replacement function for copyi and copyd (found with mini-gmp)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11900 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/mpfr-gmp.h')
-rw-r--r--src/mpfr-gmp.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mpfr-gmp.h b/src/mpfr-gmp.h
index 2c513dae1..33204c105 100644
--- a/src/mpfr-gmp.h
+++ b/src/mpfr-gmp.h
@@ -432,12 +432,13 @@ typedef struct {mp_limb_t inv32;} mpfr_pi1_t;
#endif
/* mpn_copyi and mpn_copyd are new exported functions in GMP 5.
- Defining them to memmove works in overlap cases. */
+ Defining them to memmove works in overlap cases.
+ Warning: mini-gmp does not define GMP_VERSION (as of gmp-6.1.2). */
#if !__MPFR_GMP(5,0,0)
# undef mpn_copyi
-# define mpn_copyi memmove
+# define mpn_copyi(d,s,n) memmove(d,s,n*sizeof(mp_limb_t))
# undef mpn_copyd
-# define mpn_copyd memmove
+# define mpn_copyd(d,s,n) memmove(d,s,n*sizeof(mp_limb_t))
#endif
/* The following macro is copied from GMP-6.1.1, file gmp-impl.h,