[Pkg-ocaml-maint-commits] [SCM] biniou packaging branch, master, updated. debian/1.0.6-1-8-gcdf16d4

Stephane Glondu steph at glondu.net
Thu Jul 11 09:40:28 UTC 2013


The following commit has been merged in the master branch:
commit bcefd15b84e3110b5f9a3ada257c2c7cb7536198
Author: Stephane Glondu <steph at glondu.net>
Date:   Thu Jul 11 11:32:55 2013 +0200

    Refresh patches
    
    The fix in bi_stream conflicts with upstream changes that seem to deal
    with 32-bit platforms now, hence we drop this patch.

diff --git a/debian/patches/0001-byte-compilation-rules-for-executables.patch b/debian/patches/0001-byte-compilation-rules-for-executables.patch
index f8d7efc..60e1cad 100644
--- a/debian/patches/0001-byte-compilation-rules-for-executables.patch
+++ b/debian/patches/0001-byte-compilation-rules-for-executables.patch
@@ -7,7 +7,7 @@ Subject: byte compilation rules for executables
  1 file changed, 11 insertions(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index c38df65..a99ee70 100644
+index 21d4253..1c4a5c1 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -56,11 +56,21 @@ bdump$(EXE): $(SOURCES) bdump.ml
diff --git a/debian/patches/0002-fix-bi_stream-for-32-bit-OCaml.patch b/debian/patches/0002-fix-bi_stream-for-32-bit-OCaml.patch
deleted file mode 100644
index 5a36dd1..0000000
--- a/debian/patches/0002-fix-bi_stream-for-32-bit-OCaml.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From: Hendrik Tews <hendrik at askra.de>
-Date: Thu, 11 Jul 2013 11:27:17 +0200
-Subject: fix bi_stream for 32 bit OCaml
-
----
- bi_stream.ml  |   18 ++++++++++--------
- bi_stream.mli |    8 +++++++-
- 2 files changed, 17 insertions(+), 9 deletions(-)
-
-diff --git a/bi_stream.ml b/bi_stream.ml
-index 03fba00..21f3f0c 100644
---- a/bi_stream.ml
-+++ b/bi_stream.ml
-@@ -3,10 +3,10 @@ open Printf
- let error s = failwith s
- 
- let input_int64 ic =
--  let n = ref 0 in
-+  let n = ref Int64.zero in
-   for i = 1 to 8 do
--    n := (!n lsl 8) lor (input_byte ic);
--    if !n < 0 then
-+    n := Int64.logor (Int64.shift_left !n 8) (Int64.of_int (input_byte ic));
-+    if !n < 0L then
-       error "Corrupted stream: excessive chunk length"
-   done;
-   !n
-@@ -14,18 +14,20 @@ let input_int64 ic =
- let output_int64 oc n =
-   let n = ref n in
-   for i = 1 to 8 do
--    output_char oc (char_of_int (!n lsr 56));
--    n := !n lsl 8
-+    output_char oc
-+      (char_of_int (Int64.to_int (Int64.shift_right_logical !n 56)));
-+    n := Int64.shift_left !n 8
-   done
- 
- let rec read_chunk of_string ic =
-   match input_char ic with
-       '\001' ->
-         let len = input_int64 ic in
--        if len > Sys.max_string_length then
-+        if len > Int64.of_int Sys.max_string_length then
-           error
-             (sprintf
--               "Corrupted stream: excessive chunk length (%i bytes)" len);
-+               "Corrupted stream: excessive chunk length (%Li bytes)" len);
-+	let len = Int64.to_int len in
-         let s = String.create len in
-         really_input ic s 0 len;
-         Some (of_string s)
-@@ -85,7 +87,7 @@ let write_stream ?(chunk_len = 1024) to_string oc st =
-     n := 0;
-     let s = to_string a in
-     output_char oc '\001';
--    output_int64 oc (String.length s);
-+    output_int64 oc (Int64.of_int (String.length s));
-     output_string oc s
-   in
-   Stream.iter (
-diff --git a/bi_stream.mli b/bi_stream.mli
-index b2a8d02..631aa61 100644
---- a/bi_stream.mli
-+++ b/bi_stream.mli
-@@ -20,7 +20,11 @@ v}
- val read_stream : (string -> 'a array) -> in_channel -> 'a Stream.t
-   (** [read_stream of_string ic] creates an OCaml stream from
-       an input channel [ic]. The data come in chunks and each chunk
--      is converted from a string to an array by calling [of_string]. *)
-+      is converted from a string to an array by calling [of_string].
-+
-+      Raises [Failure] if the data in the channel is corrupted or if a
-+      chunk is larger then [Sys.max_string_length].
-+  *)
- 
- val write_stream :
-   ?chunk_len:int ->
-@@ -28,6 +32,8 @@ val write_stream :
-   (** [write_stream to_string oc st] writes an OCaml stream to the
-       output channel [oc]. It creates chunks of [chunk_len],
-       except for the last chunk which is usually smaller.
-+      [chunk_len] must be chosen such that the resulting strings are
-+      smaller then [Sys.max_string_length].
-       @param chunk_len  has a default value of 1024.
-   *)
- 
--- 
diff --git a/debian/patches/series b/debian/patches/series
index 98c0aed..22050ca 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
 0001-byte-compilation-rules-for-executables.patch
-0002-fix-bi_stream-for-32-bit-OCaml.patch

-- 
biniou packaging



More information about the Pkg-ocaml-maint-commits mailing list