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
This commit is contained in:
Richard W.M. Jones
2023-05-22 16:40:21 +01:00
parent 32408a9c36
commit 3cb094083e
5 changed files with 8 additions and 8 deletions

2
common

Submodule common updated: b636c3f20a...d61cd820b4

View File

@@ -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 ->

View File

@@ -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

View File

@@ -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

View File

@@ -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//'`"