The following commit has been merged in the master branch:
commit ff9282cbca3ddbc90b2f845a1537f19acd7ae30e
Author: Mehdi Dogguy <me...@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 <me...@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 <me...@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

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to