mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Replace Pervasives.* with Stdlib.*
Since OCaml 4.07 (released 2018-07-10) the always-loaded standard
library module has been called Stdlib. The old Pervasives module was
finally removed in OCaml 5.
$ perl -pi.bak -e 's/Pervasives\./Stdlib./g' -- `git ls-files`
OCaml >= 4.07 is now required.
Also update the common submodule with:
commit d61cd820b49e403848d15c5deaccbf8dd7045370
Author: Jürgen Hötzel
Date: Sat May 20 18:16:40 2023 +0200
Add support for OCaml 5.0
(cherry picked from commit 3cb094083e)
This commit is contained in:
@@ -51,7 +51,7 @@ let f t func arg =
|
||||
try
|
||||
let chan = out_channel_of_descr wfd in
|
||||
output_value chan ret;
|
||||
Pervasives.flush chan;
|
||||
Stdlib.flush chan;
|
||||
Exit._exit 0
|
||||
with
|
||||
exn ->
|
||||
|
||||
@@ -119,7 +119,7 @@ virt tools which are still written in Perl.
|
||||
|
||||
I<Required>. Part of Perl core.
|
||||
|
||||
=item OCaml E<ge> 4.04
|
||||
=item OCaml E<ge> 4.07
|
||||
|
||||
=item OCaml findlib
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ open Std_utils
|
||||
open Utils
|
||||
|
||||
(* Output channel, 'pr' prints to this. *)
|
||||
let chan = ref Pervasives.stdout
|
||||
let chan = ref Stdlib.stdout
|
||||
|
||||
(* Number of lines generated. *)
|
||||
let lines = ref 0
|
||||
@@ -53,7 +53,7 @@ let output_to ?(perm = 0o444) filename k =
|
||||
chan := open_out filename_new;
|
||||
k ();
|
||||
close_out !chan;
|
||||
chan := Pervasives.stdout;
|
||||
chan := Stdlib.stdout;
|
||||
|
||||
(* Is the new file different from the current file? *)
|
||||
if Sys.file_exists filename && files_equal filename filename_new then
|
||||
|
||||
@@ -38,10 +38,10 @@ AC_ARG_ENABLE([ocaml],
|
||||
[],
|
||||
[enable_ocaml=yes])
|
||||
|
||||
dnl OCaml >= 4.04 is required.
|
||||
ocaml_ver_str=4.04
|
||||
dnl OCaml >= 4.07 is required.
|
||||
ocaml_ver_str=4.07
|
||||
ocaml_min_major=4
|
||||
ocaml_min_minor=4
|
||||
ocaml_min_minor=7
|
||||
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//'`"
|
||||
|
||||
Reference in New Issue
Block a user