From: Richard W.M. Jones Date: Fri, 28 Feb 2025 11:20:37 +0000 (+0000) Subject: build: Update non-gettext path for OCaml format type changes X-Git-Tag: v1.1.2~2 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=cd7f4eca0bf88af52e39702e72463a6830d273b9;p=virt-top.git build: Update non-gettext path for OCaml format type changes For printf and similar functions, OCaml now uses format6 instead of the old 4-argument format types. I'm not sure which OCaml version this change was introduced in, but this should work back to at least OCaml 4.05 (RHEL 7), and probably earlier. --- diff --git a/configure.ac b/configure.ac index 840eba2..e8df03c 100644 --- a/configure.ac +++ b/configure.ac @@ -146,12 +146,14 @@ else cat <>src/opt_gettext.ml module Gettext = struct external s_ : string -> string = "%identity" - external f_ : ('a -> 'b, 'c, 'd) format -> ('a -> 'b, 'c, 'd) format + external f_ : ('a, 'b, 'c, 'd, 'e, 'f) format6 + -> ('a, 'b, 'c, 'd, 'e, 'f) format6 = "%identity" let sn_ : string -> string -> int -> string = fun s p n -> if n = 1 then s else p - let fn_ : ('a -> 'b, 'c, 'd) format -> ('a -> 'b, 'c, 'd) format -> int - -> ('a -> 'b, 'c, 'd) format + let fn_ : ('a, 'b, 'c, 'd, 'e, 'f) format6 + -> ('a, 'b, 'c, 'd, 'e, 'f) format6 + -> int -> ('a, 'b, 'c, 'd, 'e, 'f) format6 = fun s p n -> if n = 1 then s else p end EOT