[Pkg-ocaml-maint-commits] [dose3] 02/03: Fix max_int on 32bits archs
Mehdi Dogguy
mehdi at moszumanska.debian.org
Sat Jan 9 19:04:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
mehdi pushed a commit to branch master
in repository dose3.
commit 7dd7ca23ad75b2b2642fb88b9f07af5fed0f05cb
Author: Mehdi Dogguy <mehdi at debian.org>
Date: Sat Jan 9 19:45:56 2016 +0100
Fix max_int on 32bits archs
---
debian/changelog | 2 ++
debian/patches/cudf_max_int | 31 +++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 34 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 36ee530..f017a63 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ dose3 (4.1-3) UNRELEASED; urgency=medium
* Fix META file: debian.cm{,x}a needs pef.cm{,x}a. The latter must
appear first in the META file.
+ * Add patch to correclty compute max_int on 32bits architectures
+ (Closes: #810513). Thanks to Julian Andres Klode for the patch.
-- Mehdi Dogguy <mehdi at debian.org> Sat, 09 Jan 2016 18:15:56 +0100
diff --git a/debian/patches/cudf_max_int b/debian/patches/cudf_max_int
new file mode 100644
index 0000000..0d90661
--- /dev/null
+++ b/debian/patches/cudf_max_int
@@ -0,0 +1,31 @@
+--- a/common/cudfAdd.ml
++++ b/common/cudfAdd.ml
+@@ -140,6 +140,8 @@
+ let l = (f false fields)@(f true default_fields) in
+ (decode p,decode v,l)
+
++let max32int = if Int32.to_int(Int32.max_int) < 0 then max_int else Int32.to_int(Int32.max_int);;
++
+ let pp_vpkg pp fmt vpkg =
+ let string_of_relop = function
+ `Eq -> "="
+@@ -154,7 +156,7 @@
+ let (p,_,_) =
+ pp {Cudf.default_package with
+ Cudf.package = p ;
+- version = Int32.to_int(Int32.max_int)}
++ version = max32int}
+ in
+ Format.fprintf fmt "%s" p
+ |(p,Some(c,v)) ->
+--- a/deb/debcudf.ml
++++ b/deb/debcudf.ml
+@@ -27,7 +27,7 @@
+ let label = __label ;;
+ include Util.Logging(struct let label = label end) ;;
+
+-let max32int = Int32.to_int(Int32.max_int);;
++let max32int = if Int32.to_int(Int32.max_int) < 0 then max_int else Int32.to_int(Int32.max_int);;
+
+ module SMap = Map.Make (String)
+
diff --git a/debian/patches/series b/debian/patches/series
index 980f079..2278e84 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ binaries-prefix-edos
disable_dot
fix_ftbfs_on_bytecode_arch
fix_META
+cudf_max_int
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/dose3.git
More information about the Pkg-ocaml-maint-commits
mailing list