[Pkg-ocaml-maint-commits] [SCM] ocaml-zarith packaging branch, master, updated. debian/1.0-4-1-gff9282c
Mehdi Dogguy
mehdi at debian.org
Fri Nov 4 13:52:43 UTC 2011
The following commit has been merged in the master branch:
commit ff9282cbca3ddbc90b2f845a1537f19acd7ae30e
Author: Mehdi Dogguy <mehdi at debian.org>
Date: Fri Nov 4 14:42:11 2011 +0100
Fix FTBFS on sparc
diff --git a/debian/changelog b/debian/changelog
index d05eff6..dfcdc05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ocaml-zarith (1.0-5) unstable; urgency=low
+
+ * Fix FTBFS on sparc
+ - Add 0006-Use-memcpy-instead-of-cast-ing.patch
+
+ -- Mehdi Dogguy <mehdi at debian.org> Fri, 04 Nov 2011 14:41:46 +0100
+
ocaml-zarith (1.0-4) unstable; urgency=low
* Release to unstable.
diff --git a/debian/patches/0006-Use-memcpy-instead-of-cast-ing.patch b/debian/patches/0006-Use-memcpy-instead-of-cast-ing.patch
new file mode 100644
index 0000000..cde6443
--- /dev/null
+++ b/debian/patches/0006-Use-memcpy-instead-of-cast-ing.patch
@@ -0,0 +1,26 @@
+From: Mehdi Dogguy <mehdi at debian.org>
+Date: Fri, 4 Nov 2011 14:40:30 +0100
+Subject: [PATCH] Use memcpy instead of cast'ing
+
+Fixes an FTBFS on sparc machines.
+---
+ caml_z.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/caml_z.c b/caml_z.c
+index fcb0fc1..23eee61 100644
+--- a/caml_z.c
++++ b/caml_z.c
+@@ -490,7 +490,11 @@ CAMLprim value ml_z_of_float(value v)
+ #endif
+ Z_MARK_SLOW;
+ if (isinf(x) || isnan(x)) ml_z_raise_overflow();
++#if __sparc__
++ memcpy(&y, v, sizeof(int64));
++#else
+ y = *((int64*)v);
++#endif
+ exp = ((y >> 52) & 0x7ff) - 1023; /* exponent */
+ if (exp < 0) return(Val_long(0));
+ m = (y & 0x000fffffffffffffLL) | 0x0010000000000000LL; /* mantissa */
+--
diff --git a/debian/patches/series b/debian/patches/series
index 7fac211..f867c60 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
0003-Disable-charset-when-calling-ocamldoc.patch
0004-ocamlopt-is-not-really-required.patch
0005-Detect-more-arch-triplets.patch
+0006-Use-memcpy-instead-of-cast-ing.patch
--
ocaml-zarith packaging
More information about the Pkg-ocaml-maint-commits
mailing list