From 3c41324ef53f4345e0cb614549dfbc1f34bc4a54 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Nov 2021 10:08:03 +0000 Subject: [PATCH] Move minimum OCaml version to 4.04. Synchronize with common module which also requires 4.04. Small adjustment to use of List.sort_uniq because the signature changed slightly. --- common | 2 +- docs/guestfs-building.pod | 2 +- generator/UEFI.ml | 3 ++- m4/guestfs-ocaml.m4 | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common b/common index 19302b64c..62ccce447 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 19302b64c5f13a1c247ebbb5f9036e115f081675 +Subproject commit 62ccce447228ace3121051bacd9ecd250e92c1ac diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod index 803b89fd5..e46a1222e 100644 --- a/docs/guestfs-building.pod +++ b/docs/guestfs-building.pod @@ -119,7 +119,7 @@ virt tools which are still written in Perl. I. Part of Perl core. -=item OCaml E 4.01 +=item OCaml E 4.04 =item OCaml findlib diff --git a/generator/UEFI.ml b/generator/UEFI.ml index bca3fa1ae..953ef28ae 100644 --- a/generator/UEFI.ml +++ b/generator/UEFI.ml @@ -77,7 +77,8 @@ let firmware = [ []; ] -let arches = List.sort_uniq (List.map (fun (arch, _, _, _, _) -> arch) firmware) +let arches = + List.sort_uniq compare (List.map (fun (arch, _, _, _, _) -> arch) firmware) let generate_uefi_c () = generate_header CStyle LGPLv2plus; diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 index 24b9047af..8297a9d56 100644 --- a/m4/guestfs-ocaml.m4 +++ b/m4/guestfs-ocaml.m4 @@ -38,10 +38,10 @@ AC_ARG_ENABLE([ocaml], [], [enable_ocaml=yes]) -dnl OCaml >= 4.01 is required. -ocaml_ver_str=4.01 +dnl OCaml >= 4.04 is required. +ocaml_ver_str=4.04 ocaml_min_major=4 -ocaml_min_minor=1 +ocaml_min_minor=4 AC_MSG_CHECKING([if OCaml version >= $ocaml_ver_str]) ocaml_major="`echo $OCAMLVERSION | $AWK -F. '{print $1}'`" ocaml_minor="`echo $OCAMLVERSION | $AWK -F. '{print $2}' | sed 's/^0//'`"