diff options
author | dholland <dholland@pkgsrc.org> | 2018-03-14 09:14:05 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2018-03-14 09:14:05 +0000 |
commit | 2c6f522f57a7cb55bc05a4c90e7e8c9d08f1f63e (patch) | |
tree | 0d6a76e8d60af1502cd4a85a012e447716c33066 /time/wyrd | |
parent | 96eec6bbe1930c5406a6e7c0d5181656c392cd65 (diff) | |
download | pkgsrc-2c6f522f57a7cb55bc05a4c90e7e8c9d08f1f63e.tar.gz |
Fix build with ocaml 4.06.
Diffstat (limited to 'time/wyrd')
-rw-r--r-- | time/wyrd/distinfo | 3 | ||||
-rw-r--r-- | time/wyrd/patches/patch-utility.ml | 39 |
2 files changed, 41 insertions, 1 deletions
diff --git a/time/wyrd/distinfo b/time/wyrd/distinfo index 78363365d73..4a538a8c748 100644 --- a/time/wyrd/distinfo +++ b/time/wyrd/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2015/11/02 23:31:46 agc Exp $ +$NetBSD: distinfo,v 1.7 2018/03/14 09:14:05 dholland Exp $ SHA1 (wyrd-1.4.6.tar.gz) = aaeca29b844825f45aadcf5207f4d1c875e4dc82 RMD160 (wyrd-1.4.6.tar.gz) = 47319812942195d4b56f861b7cbb527e94e7495f @@ -6,3 +6,4 @@ SHA512 (wyrd-1.4.6.tar.gz) = fc09c4567ea8d6225638ee6851ddab716665913b7d7b2f6b5a3 Size (wyrd-1.4.6.tar.gz) = 425829 bytes SHA1 (patch-Makefile.in) = 0dbd5042fa40810a76cb89b677ce3a71ececde9e SHA1 (patch-curses_Makefile.in) = 26602a2b71bacd37555ad6a1c3966f7b25721f34 +SHA1 (patch-utility.ml) = 529b15bc306bddf41992a299001966e00f631e69 diff --git a/time/wyrd/patches/patch-utility.ml b/time/wyrd/patches/patch-utility.ml new file mode 100644 index 00000000000..f92f0dd5840 --- /dev/null +++ b/time/wyrd/patches/patch-utility.ml @@ -0,0 +1,39 @@ +$NetBSD: patch-utility.ml,v 1.1 2018/03/14 09:14:05 dholland Exp $ + +Fix build with ocaml 4.06. + +--- utility.ml~ 2013-02-03 03:40:39.000000000 +0000 ++++ utility.ml +@@ -270,7 +270,7 @@ let read_all_shell_command_output shell_ + let (read_list, _, _) = Unix.select (out_lst @ err_lst) [] [] (10.0) in + if List.length read_list > 0 then begin + let chan = List.hd read_list in +- let buf = String.make 256 ' ' in ++ let buf = Bytes.make 256 ' ' in + let chars_read = Unix.read chan buf 0 256 in + if chars_read = 0 then + (* no chars read indicates EOF *) +@@ -281,7 +281,7 @@ let read_all_shell_command_output shell_ + else + (* if 1-256 characters are read, append them to the proper + * buffer and continue *) +- let s = String.sub buf 0 chars_read in ++ let s = Bytes.to_string (Bytes.sub buf 0 chars_read) in + if chan = out_read then + read_output (out_str ^ s) err_str out_done err_done + else +@@ -354,11 +354,11 @@ let utf8_string_before s n = + substr + else + let num_new_bytes = utf8_width s.[byte_pos] in +- let new_bytes = String.make num_new_bytes s.[byte_pos] in ++ let new_bytes = Bytes.make num_new_bytes s.[byte_pos] in + for i = 1 to pred num_new_bytes do +- new_bytes.[i] <- s.[byte_pos + i] ++ Bytes.set new_bytes i s.[byte_pos + i] + done; +- build_substr (substr ^ new_bytes) (succ utf8_pos) ++ build_substr (substr ^ (Bytes.to_string new_bytes)) (succ utf8_pos) + (byte_pos + num_new_bytes) + in + if Curses.Curses_config.wide_ncurses then |