Other fixes for Ocaml-4.03

(upstream git commit f8d595df4fe01512fd945bb6d524958d1361a0a8)

...And regen patches while here
This commit is contained in:
dcoppa 2016-11-23 14:16:10 +00:00
parent 8aa0111f1b
commit 916511bcd0
6 changed files with 64 additions and 15 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.17 2016/06/06 10:15:53 dcoppa Exp $
# $OpenBSD: Makefile,v 1.18 2016/11/23 14:16:10 dcoppa Exp $
COMMENT = e-donkey client
DISTNAME = mldonkey-3.1.5
REVISION = 3
REVISION = 4
CATEGORIES = net
HOMEPAGE = http://mldonkey.sourceforge.net/Main_Page

View File

@ -1,6 +1,6 @@
--- src/networks/donkey/donkeyGlobals.ml.orig Wed May 18 21:26:47 2016
+++ src/networks/donkey/donkeyGlobals.ml Wed May 18 21:27:00 2016
@@ -781,7 +781,6 @@
--- src/networks/donkey/donkeyGlobals.ml.orig Wed Nov 23 14:46:53 2016
+++ src/networks/donkey/donkeyGlobals.ml Wed Nov 23 14:46:57 2016
@@ -781,7 +781,6 @@ let set_client_name c name md4 =
c.client_md4 <- md4;
end

View File

@ -0,0 +1,49 @@
$OpenBSD: patch-src_networks_donkey_donkeyOvernet_ml,v 1.1 2016/11/23 14:16:10 dcoppa Exp $
commit f8d595df4fe01512fd945bb6d524958d1361a0a8
Author: ygrek <ygrek@autistici.org>
Date: Mon Jul 25 19:44:40 2016 -0700
other fixes for 4.03
--- src/networks/donkey/donkeyOvernet.ml.orig Wed Nov 23 14:54:30 2016
+++ src/networks/donkey/donkeyOvernet.ml Wed Nov 23 14:55:33 2016
@@ -1446,25 +1446,20 @@ let compute_to_ping () =
(* start max three searches for sources *)
let start_max_source_searches () =
+ let current_files2 = ref [] in
+ while (List.length !overnet_searches) < 3 && !current_files <> [] do
+ match !current_files with
+ | [] -> assert false
+ | (file, start, last) :: tl ->
+ current_files := tl;
+ if file_state file = FileDownloading && (last + 900) < last_time () then
begin
- let current_files2 = ref [] in
- (try
- while (List.length !overnet_searches) < 3 && !current_files <> [] do
- let (file, start, last) = List.hd !current_files in
- current_files := List.tl !current_files;
- if file_state file = FileDownloading &&
- (last + 900) < last_time () then begin
- ignore (create_search (FileSearch file) file.file_md4);
- current_files2 := (file, start, last_time ()) :: !current_files2;
- end else
- current_files2 := (file, start, last) :: !current_files2;
- done;
- with Failure "hd" -> ()
- | Failure "tl" -> (); );
- List.iter (fun (file, start, last) ->
- current_files := (file, start, last) :: !current_files
- ) !current_files2;
- end
+ ignore (create_search (FileSearch file) file.file_md4);
+ current_files2 := (file, start, last_time ()) :: !current_files2;
+ end else
+ current_files2 := (file, start, last) :: !current_files2;
+ done;
+ List.iter (fun (file, start, last) -> current_files := (file, start, last) :: !current_files) !current_files2
let enable () =
if !!enable_overnet && not !is_enabled then begin

View File

@ -1,5 +1,5 @@
--- src/utils/cdk/gdstubs.c.orig Wed May 18 21:11:18 2016
+++ src/utils/cdk/gdstubs.c Wed May 18 21:11:50 2016
--- src/utils/cdk/gdstubs.c.orig Wed Nov 23 14:46:54 2016
+++ src/utils/cdk/gdstubs.c Wed Nov 23 14:46:57 2016
@@ -23,6 +23,7 @@
#include "../../../config/config.h"
@ -8,7 +8,7 @@
#include <stdlib.h>
#include <caml/mlvalues.h>
@@ -489,7 +490,7 @@
@@ -489,7 +490,7 @@ int ml_image_pngversion(void)
CAMLlocal1 (v);
#ifdef HAVE_PNGVERSION
#include <png.h>

View File

@ -1,6 +1,6 @@
--- src/utils/cdk/zip.ml.orig Wed May 18 21:06:49 2016
+++ src/utils/cdk/zip.ml Wed May 18 21:07:02 2016
@@ -72,8 +72,6 @@
--- src/utils/cdk/zip.ml.orig Wed Nov 23 14:46:54 2016
+++ src/utils/cdk/zip.ml Wed Nov 23 14:46:57 2016
@@ -72,8 +72,6 @@ type out_file =
mutable of_entries: entry list;
of_comment: string }

View File

@ -1,6 +1,6 @@
--- src/utils/lib/options.ml4.orig Thu May 19 13:07:14 2016
+++ src/utils/lib/options.ml4 Thu May 19 13:09:55 2016
@@ -330,45 +330,6 @@
--- src/utils/lib/options.ml4.orig Wed Nov 23 14:46:55 2016
+++ src/utils/lib/options.ml4 Wed Nov 23 14:46:57 2016
@@ -330,45 +330,6 @@ the last defined one ("defined" in the order of the pr
let exit_exn = Exit
@ -46,7 +46,7 @@
let safe_string s =
if s = "" then "\"\""
else
@@ -388,7 +349,7 @@
@@ -388,7 +349,7 @@ let safe_string s =
s
else raise exit_exn
with