diff options
Diffstat (limited to 'dev-ml/dose3/files/ocaml406.patch')
-rw-r--r-- | dev-ml/dose3/files/ocaml406.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-ml/dose3/files/ocaml406.patch b/dev-ml/dose3/files/ocaml406.patch new file mode 100644 index 000000000000..867c2ca4848c --- /dev/null +++ b/dev-ml/dose3/files/ocaml406.patch @@ -0,0 +1,39 @@ +Index: dose3-5.0.1/common/criteria_lexer.mll +=================================================================== +--- dose3-5.0.1.orig/common/criteria_lexer.mll ++++ dose3-5.0.1/common/criteria_lexer.mll +@@ -18,7 +18,7 @@ + let c = Lexing.lexeme_char lexbuf 2 in (* the delimiter can be any character *) + (* find the terminating delimiter *) + let endpos = +- try String.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with ++ try Bytes.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with + |Invalid_argument _ -> + raise (Format822.Syntax_error ( + Format822.error lexbuf "String too short")) +@@ -27,9 +27,9 @@ + Format822.error lexbuf (Printf.sprintf "cannot find: %c" c))) + in + let len = endpos - (lexbuf.lex_start_pos + 3) in +- let s = String.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in +- lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((String.length s)+4); +- s ++ let s = Bytes.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in ++ lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((Bytes.length s)+4); ++ Bytes.to_string s + + } + +Index: dose3-5.0.1/common/input.ml +=================================================================== +--- dose3-5.0.1.orig/common/input.ml ++++ dose3-5.0.1/common/input.ml +@@ -47,7 +47,7 @@ let bzip_open_file file = + in + IO.create_in + ~read:(fun () -> input_char ch) +- ~input:(read ch) ++ ~input:(fun x -> read ch (Bytes.to_string x)) + ~close:(fun () -> Bz2.close_in ch) + #else + fatal "bzip not supported. re-configure with --with-bz2" |