aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan-Christofer Demay <jcdemay@gmail.com>2010-07-03 16:19:28 +0000
committerJonathan-Christofer Demay <jcdemay@gmail.com>2010-07-03 16:19:28 +0000
commitd02e91e810e1b7bbd83db1e72c9c2b1d0c5df4cb (patch)
treed8667df8bd58ea171551a4ae7a75779dad3177ff /dev-ml/mlgmpidl/files
parentRemove debug code (diff)
downloadsci-d02e91e810e1b7bbd83db1e72c9c2b1d0c5df4cb.tar.gz
sci-d02e91e810e1b7bbd83db1e72c9c2b1d0c5df4cb.tar.bz2
sci-d02e91e810e1b7bbd83db1e72c9c2b1d0c5df4cb.zip
dev-ml/mlgmpid: mpfr-3.0.0 compatibility
Diffstat (limited to 'dev-ml/mlgmpidl/files')
-rw-r--r--dev-ml/mlgmpidl/files/mlgmpidl-1.1-mpfr-3_compat.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/dev-ml/mlgmpidl/files/mlgmpidl-1.1-mpfr-3_compat.patch b/dev-ml/mlgmpidl/files/mlgmpidl-1.1-mpfr-3_compat.patch
new file mode 100644
index 000000000..efb07559d
--- /dev/null
+++ b/dev-ml/mlgmpidl/files/mlgmpidl-1.1-mpfr-3_compat.patch
@@ -0,0 +1,20 @@
+diff -Naurp mlgmpidl/gmp_caml.h mlgmpidl2/gmp_caml.h
+--- mlgmpidl/gmp_caml.h 2007-07-11 13:29:31.000000000 +0000
++++ mlgmpidl2/gmp_caml.h 2010-07-03 16:09:33.000000000 +0000
+@@ -14,6 +14,16 @@
+ #if defined(HAS_MPFR)
+ #if HAS_MPFR!=0
+ #include "mpfr.h"
++#ifndef GMP_RND_MAX
++#define GMP_RND_MAX (MPFR_RNDNA - 1)
++#define mpfr_random(x) \
++ {\
++ gmp_randstate_t s;\
++ gmp_randinit_default(s);\
++ mpfr_urandomb(x,s);\
++ gmp_randclear(s);\
++ }
++#endif
+ #endif
+ #endif
+ #include "caml/mlvalues.h"