[Pkg-ocaml-maint-commits] [SCM] bin-prot packaging branch, master, updated. debian/1.2.24-1-17-ga2c5a54
Stephane Glondu
steph at glondu.net
Wed Jul 13 21:17:47 UTC 2011
The following commit has been merged in the master branch:
commit 12c93c1c303bc1adcaafa86bcf4fe52041f9fa6f
Author: Stephane Glondu <steph at glondu.net>
Date: Wed Jul 13 09:18:55 2011 +0200
Fix bigstring layout bug (and FTBFS with OCaml 3.12.1)
diff --git a/debian/patches/0001-Disable-bigstring-tests-temporary-measure.patch b/debian/patches/0001-Disable-bigstring-tests-temporary-measure.patch
deleted file mode 100644
index 299e57f..0000000
--- a/debian/patches/0001-Disable-bigstring-tests-temporary-measure.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Stephane Glondu <steph at glondu.net>
-Date: Mon, 27 Jun 2011 15:21:47 +0200
-Subject: Disable bigstring tests (temporary measure)
-
-They are failing because of changes in comparisons of big arrays in
-OCaml 3.12.1...
----
- lib_test/bin_prot_test.ml | 15 ---------------
- 1 files changed, 0 insertions(+), 15 deletions(-)
-
-diff --git a/lib_test/bin_prot_test.ml b/lib_test/bin_prot_test.ml
-index 75b7f31..d245f69 100644
---- a/lib_test/bin_prot_test.ml
-+++ b/lib_test/bin_prot_test.ml
-@@ -854,21 +854,6 @@ module Make (Spec : SPEC) (Read : Reader_spec) (Write : Writer_spec) = struct
- ]
- );
-
-- "bigstring" >::
-- (fun () ->
-- let n = 128 in
-- let header = 3 in
-- let size = header + n in
-- let bstr = mk_bigstring n in
-- check_all size "bigstring"
-- Read.bin_read_bigstring
-- Write.bin_write_bigstring
-- [
-- (bstr, "[| ... |]", size);
-- (mk_bigstring 0, "[||]", 1);
-- ]
-- );
--
- "variant_tag" >::
- (fun () ->
- check_all 4 "variant_tag"
---
diff --git a/debian/patches/0001-Fix-bigstring-layout-bug.patch b/debian/patches/0001-Fix-bigstring-layout-bug.patch
new file mode 100644
index 0000000..cd327d5
--- /dev/null
+++ b/debian/patches/0001-Fix-bigstring-layout-bug.patch
@@ -0,0 +1,76 @@
+From: Markus Mottl <markus.mottl at gmail.com>
+Date: Wed, 13 Jul 2011 09:16:25 +0200
+Subject: Fix bigstring layout bug
+
+This should only affect value comparisons with OCaml 3.12.1 or later
+(and fixes FTBFS). Extracted from Markus Mottl's repository.
+
+Origin: http://hg.ocaml.info/release/bin-prot/raw-rev/bf832c1bc4af
+---
+ lib/read_ml.ml | 2 +-
+ lib/read_stubs.c | 8 ++++----
+ lib/unsafe_read_c.ml | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/read_ml.ml b/lib/read_ml.ml
+index dacb49e..6f054fc 100644
+--- a/lib/read_ml.ml
++++ b/lib/read_ml.ml
+@@ -398,7 +398,7 @@ let bin_read_list bin_read_el buf ~pos_ref =
+ List.rev rev_lst
+
+ #ifndef ARCH_SIXTYFOUR
+-let dummy_float_buf = Array1.create char c_layout 8
++let dummy_float_buf = create_buf 8
+ let () = ignore (Write_ml.bin_write_float dummy_float_buf ~pos:0 3.1)
+ let max_array_length_2 = Sys.max_array_length / 2
+ #endif
+diff --git a/lib/read_stubs.c b/lib/read_stubs.c
+index 396c345..dfdef9e 100644
+--- a/lib/read_stubs.c
++++ b/lib/read_stubs.c
+@@ -517,7 +517,7 @@ CAMLprim inline value read_raw_string_stub(
+
+ /* Reading bigarrays */
+
+-#define MK_BA1_READER(NAME, TYPE, TFLAG) \
++#define MK_BA1_READER(NAME, TYPE, TFLAG, TLAYOUT) \
+ CAMLprim inline value read_##NAME##_stub(char **sptr_ptr, char *eptr) \
+ { \
+ unsigned long len = read_nat0(sptr_ptr, eptr); \
+@@ -531,7 +531,7 @@ CAMLprim inline value read_raw_string_stub(
+ dim = len; \
+ v_res = \
+ caml_ba_alloc( \
+- CAML_BA_##TFLAG | CAML_BA_FORTRAN_LAYOUT, 1, NULL, &dim); \
++ CAML_BA_##TFLAG | CAML_BA_##TLAYOUT##_LAYOUT, 1, NULL, &dim); \
+ *sptr_ptr = next; \
+ if (unlikely(tot_size > 65536)) { \
+ Begin_roots1(v_res); \
+@@ -545,10 +545,10 @@ CAMLprim inline value read_raw_string_stub(
+ \
+ MK_ML_READER(NAME)
+
+-MK_BA1_READER(bigstring, char, UINT8)
++MK_BA1_READER(bigstring, char, UINT8, C)
+
+ #define MK_VEC_MAT_READERS(NAME, TYPE, TFLAG) \
+- MK_BA1_READER(NAME##_vec, TYPE, TFLAG) \
++ MK_BA1_READER(NAME##_vec, TYPE, TFLAG, FORTRAN) \
+ \
+ CAMLprim inline value read_##NAME##_mat_stub(char **sptr_ptr, char *eptr) \
+ { \
+diff --git a/lib/unsafe_read_c.ml b/lib/unsafe_read_c.ml
+index 731a366..10f5d2c 100644
+--- a/lib/unsafe_read_c.ml
++++ b/lib/unsafe_read_c.ml
+@@ -98,7 +98,7 @@ let bin_read_list bin_read_el sptr_ptr eptr =
+ List.rev rev_lst
+
+ #ifndef ARCH_SIXTYFOUR
+-let dummy_float_buf = Array1.create char c_layout 8
++let dummy_float_buf = create_buf 8
+ let () = ignore (Write_ml.bin_write_float dummy_float_buf ~pos:0 3.1)
+ let dummy_float_buf_eptr = get_eptr dummy_float_buf ~pos:0
+ let max_array_length_2 = Sys.max_array_length / 2
+--
diff --git a/debian/patches/series b/debian/patches/series
index 4623feb..0b8bff1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-0001-Disable-bigstring-tests-temporary-measure.patch
+0001-Fix-bigstring-layout-bug.patch
--
bin-prot packaging
More information about the Pkg-ocaml-maint-commits
mailing list