Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ocaml-ctypes for openSUSE:Factory 
checked in at 2023-07-25 11:49:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-ctypes (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml-ctypes.new.1467 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml-ctypes"

Tue Jul 25 11:49:35 2023 rev:5 rq:1099663 version:0.21.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-ctypes/ocaml-ctypes.changes        
2023-06-01 17:19:23.910117031 +0200
+++ /work/SRC/openSUSE:Factory/.ocaml-ctypes.new.1467/ocaml-ctypes.changes      
2023-07-25 11:50:00.453067553 +0200
@@ -1,0 +2,6 @@
+Fri Jul  7 07:07:07 UTC 2023 - oher...@suse.de
+
+- Update to version 0.21.0
+  * build with dune
+
+-------------------------------------------------------------------

Old:
----
  ocaml-ctypes-0.20.1.tar.xz

New:
----
  ocaml-ctypes-0.21.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocaml-ctypes.spec ++++++
--- /var/tmp/diff_new_pack.YYMY5G/_old  2023-07-25 11:50:01.181071815 +0200
+++ /var/tmp/diff_new_pack.YYMY5G/_new  2023-07-25 11:50:01.189071863 +0200
@@ -32,7 +32,7 @@
 
 %define     pkg ocaml-ctypes
 Name:           %pkg%nsuffix
-Version:        0.20.1
+Version:        0.21.0
 Release:        0
 %{?ocaml_preserve_bytecode}
 Summary:        Combinators for binding to C libraries without writing any C
@@ -41,7 +41,7 @@
 URL:            https://opam.ocaml.org/packages/ctypes
 Source0:        %pkg-%version.tar.xz
 BuildRequires:  ocaml
-BuildRequires:  ocaml-dune >= 2.8
+BuildRequires:  ocaml-dune >= 2.9
 BuildRequires:  ocaml-rpm-macros >= 20230101
 BuildRequires:  ocamlfind(bigarray-compat)
 BuildRequires:  ocamlfind(bisect_ppx)

++++++ _service ++++++
--- /var/tmp/diff_new_pack.YYMY5G/_old  2023-07-25 11:50:01.237072143 +0200
+++ /var/tmp/diff_new_pack.YYMY5G/_new  2023-07-25 11:50:01.241072167 +0200
@@ -1,10 +1,10 @@
 <services>
   <service name="tar_scm" mode="disabled">
     <param name="filename">ocaml-ctypes</param>
-    <param name="revision">a9345c589051788d2e6efab716ca0510641543e1</param>
+    <param name="revision">8a7fd3d08c9a3a5b43febd06c74a3c3dc6fb5bab</param>
     <param name="scm">git</param>
     <param name="submodules">disable</param>
-    <param name="url">https://github.com/avsm/ocaml-ctypes.git</param>
+    <param name="url">https://github.com/yallop/ocaml-ctypes.git</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">[v]?([^\+]+)(.*)</param>
     <param name="versionrewrite-pattern">v(.*)</param>

++++++ ocaml-ctypes-0.20.1.tar.xz -> ocaml-ctypes-0.21.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/.github/workflows/test.yml 
new/ocaml-ctypes-0.21.0/.github/workflows/test.yml
--- old/ocaml-ctypes-0.20.1/.github/workflows/test.yml  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/.github/workflows/test.yml  2023-07-12 
21:04:48.000000000 +0200
@@ -37,6 +37,8 @@
             ocaml-compiler: 4.13.1
           - os: ubuntu-latest
             ocaml-compiler: 4.14.0
+          - os: ubuntu-latest
+            ocaml-compiler: 5.0.0
           - os: windows-latest
             ocaml-compiler: 4.13.1
           - os: macos-latest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/CHANGES.md 
new/ocaml-ctypes-0.21.0/CHANGES.md
--- old/ocaml-ctypes-0.20.1/CHANGES.md  2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/CHANGES.md  2023-07-12 21:04:48.000000000 +0200
@@ -1,3 +1,26 @@
+## ctypes 0.21.0
+
+* Switch to dune  
+  https://github.com/yallop/ocaml-ctypes/pull/588
+
+Thanks to Anil Madhavapeddy (@avsm) and Etienne Millon (@emillon) for
+contributing to this release.
+
+## ctypes 0.20.2
+
+* Restore compilation of cmxs for 5.0  
+  https://github.com/ocamllabs/ocaml-ctypes/pull/727
+
+* Update build rules to make .o files a dependency of cmxs  
+  https://github.com/ocamllabs/ocaml-ctypes/pull/723
+
+* update CArray.of_string comment to accurately reflect the length  
+  https://github.com/ocamllabs/ocaml-ctypes/pull/716
+
+Thanks to @houseofsuns, @ygrek, Alpha Diallo (@moyodiallo), François
+Bobot (@bobot) and Alfredo Tupone (@atupone) for contributions to this
+release.
+
 ## ctypes 0.20.1
 
 * Fix warning 9 [missing-record-field-pattern] in generated OCaml code  
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/ctypes-foreign.opam 
new/ocaml-ctypes-0.21.0/ctypes-foreign.opam
--- old/ocaml-ctypes-0.20.1/ctypes-foreign.opam 2022-04-15 17:07:04.000000000 
+0200
+++ new/ocaml-ctypes-0.21.0/ctypes-foreign.opam 2023-07-12 21:04:48.000000000 
+0200
@@ -13,16 +13,18 @@
 doc: "https://ocamllabs.github.io/ocaml-ctypes/";
 bug-reports: "https://github.com/ocamllabs/ocaml-ctypes/issues";
 depends: [
-  "dune" {>= "2.8"}
+  "dune" {>= "2.9"}
   "ocaml" {>= "4.03.0"}
+  "integers" {with-test & >= "0.2.2"}
   "ctypes" {= version}
   "dune-configurator"
   "conf-pkg-config"
-  "lwt" {with-test}
-  "ounit" {with-test}
+  "lwt" {with-test & >= "2.4.7"}
+  "ounit2" {with-test}
   "conf-ncurses" {with-test}
   "stdlib-shims" {with-test}
-  "conf-fts" {with-test}
+  "conf-fts" {with-test & os != "win32"}
+  "conf-libffi" {>= "2.0.0"}
   "odoc" {with-doc}
 ]
 build: [
@@ -34,22 +36,11 @@
     name
     "-j"
     jobs
+    "--promote-install-files=false"
     "@install"
     "@runtest" {with-test}
     "@doc" {with-doc}
   ]
+  ["dune" "install" "-p" name "--create-install-files" name]
 ]
 dev-repo: "git+https://github.com/ocamllabs/ocaml-ctypes.git";
-post-messages: "This package requires libffi on your system" {failure}
-depexts: [
-  ["libffi-dev"] {os-distribution = "debian"}
-  ["libffi-dev"] {os-distribution = "ubuntu"}
-  ["libffi"] {os = "macos" & os-distribution = "homebrew"}
-  ["libffi"] {os = "macos" & os-distribution = "macports"}
-  ["libffi-devel"] {os-distribution = "centos"}
-  ["libffi-devel"] {os-distribution = "oraclelinux"}
-  ["libffi"] {os = "win32" & os-distribution = "cygwinports"}
-  ["libffi-devel"] {os-distribution = "fedora"}
-  ["libffi-dev"] {os-distribution = "alpine"}
-  ["libffi-devel"] {os-family = "suse"}
-]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/ctypes-foreign.opam.template 
new/ocaml-ctypes-0.21.0/ctypes-foreign.opam.template
--- old/ocaml-ctypes-0.20.1/ctypes-foreign.opam.template        2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/ctypes-foreign.opam.template        1970-01-01 
01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-post-messages: "This package requires libffi on your system" {failure}
-depexts: [
-  ["libffi-dev"] {os-distribution = "debian"}
-  ["libffi-dev"] {os-distribution = "ubuntu"}
-  ["libffi"] {os = "macos" & os-distribution = "homebrew"}
-  ["libffi"] {os = "macos" & os-distribution = "macports"}
-  ["libffi-devel"] {os-distribution = "centos"}
-  ["libffi-devel"] {os-distribution = "oraclelinux"}
-  ["libffi"] {os = "win32" & os-distribution = "cygwinports"}
-  ["libffi-devel"] {os-distribution = "fedora"}
-  ["libffi-dev"] {os-distribution = "alpine"}
-  ["libffi-devel"] {os-family = "suse"}
-]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/ctypes.opam 
new/ocaml-ctypes-0.21.0/ctypes.opam
--- old/ocaml-ctypes-0.20.1/ctypes.opam 2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/ctypes.opam 2023-07-12 21:04:48.000000000 +0200
@@ -11,7 +11,7 @@
 to call, then bind directly to those functions -- all without writing or
 generating any C!
 
-To install the optional `ctypes.foreign` interface (which uses `libffi` to
+To install the optional `ctypes-foreign` interface (which uses `libffi` to
 provide dynamic access to foreign libraries), you will need to also install
 the `ctypes-foreign` package.
 
@@ -26,13 +26,14 @@
 doc: "https://ocamllabs.github.io/ocaml-ctypes/";
 bug-reports: "https://github.com/ocamllabs/ocaml-ctypes/issues";
 depends: [
-  "dune" {>= "2.8"}
+  "dune" {>= "2.9"}
   "ocaml" {>= "4.03.0"}
   "integers"
   "dune-configurator"
   "bigarray-compat"
-  "ounit" {with-test}
-  "conf-fts" {with-test}
+  "ounit2" {with-test}
+  "conf-fts" {with-test & os != "win32"}
+  "conf-pkg-config" {with-test}
   "odoc" {with-doc}
 ]
 build: [
@@ -44,9 +45,11 @@
     name
     "-j"
     jobs
+    "--promote-install-files=false"
     "@install"
     "@runtest" {with-test}
     "@doc" {with-doc}
   ]
+  ["dune" "install" "-p" name "--create-install-files" name]
 ]
 dev-repo: "git+https://github.com/ocamllabs/ocaml-ctypes.git";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/dune new/ocaml-ctypes-0.21.0/dune
--- old/ocaml-ctypes-0.20.1/dune        2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/dune        2023-07-12 21:04:48.000000000 +0200
@@ -6,7 +6,3 @@
 (deprecated_library_name
  (old_public_name "ctypes.foreign")
  (new_public_name "ctypes-foreign"))
-
-(deprecated_library_name
- (old_public_name "ctypes.foreign.base")
- (new_public_name "ctypes-foreign.base"))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/dune-project 
new/ocaml-ctypes-0.21.0/dune-project
--- old/ocaml-ctypes-0.20.1/dune-project        2022-04-15 17:07:04.000000000 
+0200
+++ new/ocaml-ctypes-0.21.0/dune-project        2023-07-12 21:04:48.000000000 
+0200
@@ -1,4 +1,4 @@
-(lang dune 2.8)
+(lang dune 2.9)
 (name ctypes)
 (formatting (enabled_for dune))
 (use_standard_c_and_cxx_flags true)
@@ -19,8 +19,9 @@
   integers
   dune-configurator
   bigarray-compat
-  (ounit :with-test)
-  (conf-fts :with-test))
+  (ounit2 :with-test)
+  (conf-fts (and :with-test (<> :os win32)))
+  (conf-pkg-config :with-test))
  (synopsis "Combinators for binding to C libraries without writing any C")
  (description "
 ctypes is a library for binding to C libraries using pure OCaml. The primary
@@ -31,7 +32,7 @@
 to call, then bind directly to those functions -- all without writing or
 generating any C!
 
-To install the optional `ctypes.foreign` interface (which uses `libffi` to
+To install the optional `ctypes-foreign` interface (which uses `libffi` to
 provide dynamic access to foreign libraries), you will need to also install
 the `ctypes-foreign` package.
 
@@ -44,14 +45,16 @@
  (tags (org:mirage org:ocamllabs))
  (depends
   (ocaml (>= 4.03.0))
+  (integers (and :with-test (>= 0.2.2)))
   (ctypes (= :version))
   dune-configurator
   conf-pkg-config
-  (lwt :with-test)
-  (ounit :with-test)
+  (lwt (and :with-test (>= 2.4.7)))
+  (ounit2 :with-test)
   (conf-ncurses :with-test)
   (stdlib-shims :with-test)
-  (conf-fts :with-test))
+  (conf-fts (and :with-test (<> :os win32)))
+  (conf-libffi (>= 2.0.0)))
  (synopsis "Dynamic access to foreign C libraries using Ctypes")
  (description "
 This installs the `ctypes-foreign` interface which
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/examples/fts/foreign/dune 
new/ocaml-ctypes-0.21.0/examples/fts/foreign/dune
--- old/ocaml-ctypes-0.20.1/examples/fts/foreign/dune   2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/examples/fts/foreign/dune   2023-07-12 
21:04:48.000000000 +0200
@@ -1,13 +1,7 @@
-(executables
- (names fts_cmd)
- (enabled_if
-  (= %{os_type} Unix))
- (libraries ctypes-foreign))
-
-(rule
- (alias runtest)
+(test
+ (name fts_cmd)
  (enabled_if
   (= %{os_type} Unix))
+ (libraries ctypes-foreign)
  (package ctypes-foreign)
- (action (progn))
- (deps ./fts_cmd.exe))
+ (action (progn)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/config/discover.ml 
new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/config/discover.ml
--- old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/config/discover.ml     
1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/config/discover.ml     
2023-07-12 21:04:48.000000000 +0200
@@ -0,0 +1,25 @@
+module C = Configurator.V1
+
+let prepend opt flags =
+  if flags = [] then
+    []
+  else
+    opt :: flags
+
+let () =
+  C.main ~name:"fts_example" (fun c ->
+      let default : C.Pkg_config.package_conf = {
+        libs = [];
+        cflags = []
+      } in
+      let conf =
+        match C.Pkg_config.get c with
+        | None -> default
+        | Some pc ->
+          (match C.Pkg_config.query pc ~package:"libfts" with
+           | None -> default
+           | Some v -> v)
+      in
+      C.Flags.write_sexp "c_flags.sexp" (prepend "-ccopt" conf.cflags);
+      C.Flags.write_sexp "c_library_flags.sexp" (prepend "-cclib" conf.libs)
+    )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/config/discover.mli 
new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/config/discover.mli
--- old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/config/discover.mli    
1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/config/discover.mli    
2023-07-12 21:04:48.000000000 +0200
@@ -0,0 +1 @@
+(* empty *)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/config/dune 
new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/config/dune
--- old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/config/dune    
1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/config/dune    
2023-07-12 21:04:48.000000000 +0200
@@ -0,0 +1,8 @@
+(executable
+ (name discover)
+ (libraries dune-configurator))
+
+(rule
+ (targets c_flags.sexp c_library_flags.sexp)
+ (action
+  (run ./discover.exe)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/dune 
new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/dune
--- old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/dune   2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/dune   2023-07-12 
21:04:48.000000000 +0200
@@ -1,13 +1,18 @@
-(executable
- (name fts_cmd)
- (enabled_if
-  (= %{os_type} Unix))
- (libraries fts_stubs fts_generated))
+(* -*- tuareg -*- *)
 
-(rule
- (alias runtest)
+(* This can be ported to build_if once available, ocaml/dune#7899 *)
+
+let unix = List.mem ("os_type", "Unix") Jbuild_plugin.V1.ocamlc_config
+
+let () = Jbuild_plugin.V1.send @@ if not unix then "" else {|
+(test
+ (name fts_cmd)
  (enabled_if
   (= %{os_type} Unix))
+ (libraries fts_stubs fts_generated)
  (package ctypes)
  (action (progn))
- (deps ./fts_cmd.exe))
+ (link_flags
+  :standard
+  (:include config/c_library_flags.sexp)))
+|}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/stub-generator/dune 
new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/stub-generator/dune
--- old/ocaml-ctypes-0.20.1/examples/fts/stub-generation/stub-generator/dune    
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/examples/fts/stub-generation/stub-generator/dune    
2023-07-12 21:04:48.000000000 +0200
@@ -20,5 +20,8 @@
  (modules fts_generated)
  (foreign_stubs
   (language c)
-  (names fts_stubs))
+  (names fts_stubs)
+  (flags
+   :standard
+   (:include ../config/c_flags.sexp)))
  (libraries ctypes.stubs))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/src/cstubs/cstubs_structs.ml 
new/ocaml-ctypes-0.21.0/src/cstubs/cstubs_structs.ml
--- old/ocaml-ctypes-0.20.1/src/cstubs/cstubs_structs.ml        2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/src/cstubs/cstubs_structs.ml        2023-07-12 
21:04:48.000000000 +0200
@@ -136,7 +136,7 @@
     let open Ctypes_primitive_types in
     let sprintf = Printf.sprintf in
     let fail () =
-      Printf.kprintf failwith "Cannot retrieve constants of type %s"
+      Printf.ksprintf failwith "Cannot retrieve constants of type %s"
         (Ctypes_primitives.name p)
     in
     match p, Ctypes_primitives.format_string p with
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/src/cstubs/dune 
new/ocaml-ctypes-0.21.0/src/cstubs/dune
--- old/ocaml-ctypes-0.20.1/src/cstubs/dune     2022-04-15 17:07:04.000000000 
+0200
+++ new/ocaml-ctypes-0.21.0/src/cstubs/dune     2023-07-12 21:04:48.000000000 
+0200
@@ -4,4 +4,6 @@
  (instrumentation
   (backend bisect_ppx))
  (wrapped false)
- (libraries ctypes str))
+ (libraries
+  (re_export ctypes)
+  str))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/src/ctypes/ctypes.mli 
new/ocaml-ctypes-0.21.0/src/ctypes/ctypes.mli
--- old/ocaml-ctypes-0.20.1/src/ctypes/ctypes.mli       2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/src/ctypes/ctypes.mli       2023-07-12 
21:04:48.000000000 +0200
@@ -276,8 +276,9 @@
       [n] between [0] and [(CArray.length a - 1)] is not performed. *)
 
   val of_string : string -> char t
-  (** [of_string s] builds an array of the same length as [s], and writes
-      the elements of [s] to the corresponding elements of the array. *)
+  (** [of_string s] builds an array of the same length as [s] plus one, and 
writes
+      the elements of [s] to the corresponding elements of the array with the
+      null character '\0' as a last element. *)
 
   val of_list : 'a typ -> 'a list -> 'a t
   (** [of_list t l] builds an array of type [t] of the same length as [l], and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/src/ctypes/ctypes_memory_stubs.ml 
new/ocaml-ctypes-0.21.0/src/ctypes/ctypes_memory_stubs.ml
--- old/ocaml-ctypes-0.20.1/src/ctypes/ctypes_memory_stubs.ml   2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/src/ctypes/ctypes_memory_stubs.ml   2023-07-12 
21:04:48.000000000 +0200
@@ -9,8 +9,6 @@
 
 open Ctypes_ptr
 
-[@@@warning "-3"] (* TODO check when @@noalloc was introduced to ocaml *)
-
 (* A reference, managed by the garbage collector, to a region of memory in the
    C heap. *)
 type managed_buffer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/src/ctypes/ctypes_std_views.ml 
new/ocaml-ctypes-0.21.0/src/ctypes/ctypes_std_views.ml
--- old/ocaml-ctypes-0.20.1/src/ctypes/ctypes_std_views.ml      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/src/ctypes/ctypes_std_views.ml      2023-07-12 
21:04:48.000000000 +0200
@@ -74,7 +74,7 @@
            let t = Ctypes_static.(typedef int32_t name) end)
   | 8 -> (module struct include Signed.Int64
            let t = Ctypes_static.(typedef int64_t name) end)
-  | n -> Printf.kprintf failwith "size %d not supported for %s\n" n name
+  | n -> Printf.ksprintf failwith "size %d not supported for %s\n" n name
 
 let unsigned_typedef name ~size : (module Unsigned_type) =
   match size with
@@ -86,7 +86,7 @@
            let t = Ctypes_static.(typedef uint32_t name) end)
   | 8 -> (module struct include Unsigned.UInt64
            let t = Ctypes_static.(typedef uint64_t name) end)
-  | n -> Printf.kprintf failwith "size %d not supported for %s\n" n name
+  | n -> Printf.ksprintf failwith "size %d not supported for %s\n" n name
 
 module Intptr = (val signed_typedef "intptr_t"
                     ~size:(Ctypes_std_view_stubs.intptr_t_size ()))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/src/ctypes/dune 
new/ocaml-ctypes-0.21.0/src/ctypes/dune
--- old/ocaml-ctypes-0.20.1/src/ctypes/dune     2022-04-15 17:07:04.000000000 
+0200
+++ new/ocaml-ctypes-0.21.0/src/ctypes/dune     2023-07-12 21:04:48.000000000 
+0200
@@ -14,7 +14,7 @@
  (name ctypes)
  (public_name ctypes)
  (wrapped false)
- (libraries bytes integers bigarray-compat)
+ (libraries integers bigarray-compat)
  (modules_without_implementation ctypes_types)
  (instrumentation
   (backend bisect_ppx))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/clib/dune 
new/ocaml-ctypes-0.21.0/tests/clib/dune
--- old/ocaml-ctypes-0.20.1/tests/clib/dune     2022-04-15 17:07:04.000000000 
+0200
+++ new/ocaml-ctypes-0.21.0/tests/clib/dune     2023-07-12 21:04:48.000000000 
+0200
@@ -6,3 +6,20 @@
   (names test_functions))
  (c_library_flags -pthread)
  (libraries ctypes))
+
+(rule
+ (target clib%{ext_dll})
+ (deps
+  (source_tree ../../src/ctypes)
+  test_functions.h)
+ (action
+  (run
+   %{cc}
+   -I
+   ../../src/ctypes
+   -I
+   %{ocaml_where}
+   -o
+   %{target}
+   -shared
+   %{dep:test_functions.c})))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-alignment/dune 
new/ocaml-ctypes-0.21.0/tests/test-alignment/dune
--- old/ocaml-ctypes-0.20.1/tests/test-alignment/dune   2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-alignment/dune   2023-07-12 
21:04:48.000000000 +0200
@@ -1,4 +1,4 @@
 (test
  (package ctypes-foreign)
  (name test_alignment)
- (libraries oUnit ctypes ctypes-foreign))
+ (libraries ounit2 ctypes ctypes-foreign))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-arrays/dune 
new/ocaml-ctypes-0.21.0/tests/test-arrays/dune
--- old/ocaml-ctypes-0.20.1/tests/test-arrays/dune      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-arrays/dune      2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_array)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-arrays/test_array.ml 
new/ocaml-ctypes-0.21.0/tests/test-arrays/test_array.ml
--- old/ocaml-ctypes-0.20.1/tests/test-arrays/test_array.ml     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-arrays/test_array.ml     2023-07-12 
21:04:48.000000000 +0200
@@ -6,8 +6,10 @@
  *)
 
 open OUnit2
+module Float_ = struct let float = float end (*has to be above the module 
Ctypes*)
 open Ctypes
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 (*
   Creating multidimensional arrays, and reading and writing elements.
@@ -44,7 +46,7 @@
 
   (* three dimensions *)
   let three = Array.make (array 2 (array 5 float)) 10 in
-  let float = Stdlib.float in
+  let float = Float_.float in
 
   for i = 0 to 9 do
     for j = 0 to 1 do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-bigarrays/dune 
new/ocaml-ctypes-0.21.0/tests/test-bigarrays/dune
--- old/ocaml-ctypes-0.20.1/tests/test-bigarrays/dune   2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-bigarrays/dune   2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_bigarrays)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-bigarrays/test_bigarrays.ml 
new/ocaml-ctypes-0.21.0/tests/test-bigarrays/test_bigarrays.ml
--- old/ocaml-ctypes-0.20.1/tests/test-bigarrays/test_bigarrays.ml      
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-bigarrays/test_bigarrays.ml      
2023-07-12 21:04:48.000000000 +0200
@@ -8,6 +8,8 @@
 module Std_array = Array
 type 'a std_array = 'a array
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
+
 open OUnit2
 open Ctypes
 module BA = Bigarray_compat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-bools/dune 
new/ocaml-ctypes-0.21.0/tests/test-bools/dune
--- old/ocaml-ctypes-0.20.1/tests/test-bools/dune       2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-bools/dune       2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_bools)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-bools/test_bools.ml 
new/ocaml-ctypes-0.21.0/tests/test-bools/test_bools.ml
--- old/ocaml-ctypes-0.20.1/tests/test-bools/test_bools.ml      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-bools/test_bools.ml      2023-07-12 
21:04:48.000000000 +0200
@@ -7,6 +7,8 @@
 
 open OUnit2
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
+
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
                                         and type 'a return = 'a) =
 struct
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-builtins/dune 
new/ocaml-ctypes-0.21.0/tests/test-builtins/dune
--- old/ocaml-ctypes-0.20.1/tests/test-builtins/dune    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-builtins/dune    2023-07-12 
21:04:48.000000000 +0200
@@ -2,7 +2,7 @@
  (name test_builtins)
  (package ctypes-foreign)
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-callback_lifetime/dune 
new/ocaml-ctypes-0.21.0/tests/test-callback_lifetime/dune
--- old/ocaml-ctypes-0.20.1/tests/test-callback_lifetime/dune   2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-callback_lifetime/dune   2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_callback_lifetime)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-callback_lifetime/test_callback_lifetime.ml 
new/ocaml-ctypes-0.21.0/tests/test-callback_lifetime/test_callback_lifetime.ml
--- 
old/ocaml-ctypes-0.20.1/tests/test-callback_lifetime/test_callback_lifetime.ml  
    2022-04-15 17:07:04.000000000 +0200
+++ 
new/ocaml-ctypes-0.21.0/tests/test-callback_lifetime/test_callback_lifetime.ml  
    2023-07-12 21:04:48.000000000 +0200
@@ -10,6 +10,7 @@
 open OUnit2
 open Foreign
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
                                         and type 'a return = 'a) =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-closure-type-promotion/dune 
new/ocaml-ctypes-0.21.0/tests/test-closure-type-promotion/dune
--- old/ocaml-ctypes-0.20.1/tests/test-closure-type-promotion/dune      
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-closure-type-promotion/dune      
2023-07-12 21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_closure_type_promotion)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-closure-type-promotion/test_closure_type_promotion.ml
 
new/ocaml-ctypes-0.21.0/tests/test-closure-type-promotion/test_closure_type_promotion.ml
--- 
old/ocaml-ctypes-0.20.1/tests/test-closure-type-promotion/test_closure_type_promotion.ml
    2022-04-15 17:07:04.000000000 +0200
+++ 
new/ocaml-ctypes-0.21.0/tests/test-closure-type-promotion/test_closure_type_promotion.ml
    2023-07-12 21:04:48.000000000 +0200
@@ -5,6 +5,8 @@
 
 open OUnit2
 
+let _testlib = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
+
 (*
  *  Using the closure API of libffi is error prone due to differences
  *  in endianess and calling conventions.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-coercions/dune 
new/ocaml-ctypes-0.21.0/tests/test-coercions/dune
--- old/ocaml-ctypes-0.20.1/tests/test-coercions/dune   2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-coercions/dune   2023-07-12 
21:04:48.000000000 +0200
@@ -2,7 +2,7 @@
  (name test_coercions)
  (package ctypes-foreign)
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-complex/dune 
new/ocaml-ctypes-0.21.0/tests/test-complex/dune
--- old/ocaml-ctypes-0.20.1/tests/test-complex/dune     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-complex/dune     2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_complex)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-complex/test_complex.ml 
new/ocaml-ctypes-0.21.0/tests/test-complex/test_complex.ml
--- old/ocaml-ctypes-0.20.1/tests/test-complex/test_complex.ml  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-complex/test_complex.ml  2023-07-12 
21:04:48.000000000 +0200
@@ -8,6 +8,8 @@
 open OUnit2
 open Ctypes
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
+
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
                                         and type 'a return = 'a) =
 struct
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-constants/dune 
new/ocaml-ctypes-0.21.0/tests/test-constants/dune
--- old/ocaml-ctypes-0.20.1/tests/test-constants/dune   2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-constants/dune   2023-07-12 
21:04:48.000000000 +0200
@@ -51,9 +51,10 @@
 (test
  (name test_constants)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (modules test_constants)
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-constants/test_constants.ml 
new/ocaml-ctypes-0.21.0/tests/test-constants/test_constants.ml
--- old/ocaml-ctypes-0.20.1/tests/test-constants/test_constants.ml      
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-constants/test_constants.ml      
2023-07-12 21:04:48.000000000 +0200
@@ -9,7 +9,7 @@
 open Ctypes
 
 
-let testlib = Dl.(dlopen ~filename:"../clib/dlltest_functions_stubs.so" 
~flags:[RTLD_NOW])
+let testlib = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 module Constants = Types.Struct_stubs(Generated_struct_bindings)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-cstdlib/dune 
new/ocaml-ctypes-0.21.0/tests/test-cstdlib/dune
--- old/ocaml-ctypes-0.20.1/tests/test-cstdlib/dune     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-cstdlib/dune     2023-07-12 
21:04:48.000000000 +0200
@@ -2,7 +2,7 @@
  (name test_cstdlib)
  (package ctypes-foreign)
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-cstdlib/test_cstdlib.ml 
new/ocaml-ctypes-0.21.0/tests/test-cstdlib/test_cstdlib.ml
--- old/ocaml-ctypes-0.20.1/tests/test-cstdlib/test_cstdlib.ml  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-cstdlib/test_cstdlib.ml  2023-07-12 
21:04:48.000000000 +0200
@@ -179,7 +179,7 @@
     let cmpi m1 m2 =
       let mi1 = from_voidp mi m1 in
       let mi2 = from_voidp mi m2 in
-      Stdlib.compare
+      compare
         (as_string (!@(mi1 |-> name)))
         (as_string (!@(mi2 |-> name)))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-custom_ops/dune 
new/ocaml-ctypes-0.21.0/tests/test-custom_ops/dune
--- old/ocaml-ctypes-0.20.1/tests/test-custom_ops/dune  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-custom_ops/dune  2023-07-12 
21:04:48.000000000 +0200
@@ -1,3 +1,3 @@
 (test
  (name test_custom_ops)
- (libraries oUnit ctypes))
+ (libraries ounit2 ctypes))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-enums/dune 
new/ocaml-ctypes-0.21.0/tests/test-enums/dune
--- old/ocaml-ctypes-0.20.1/tests/test-enums/dune       2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-enums/dune       2023-07-12 
21:04:48.000000000 +0200
@@ -44,4 +44,4 @@
  (name test_enums)
  (modules test_enums)
  (package ctypes-foreign)
- (libraries oUnit ctypes test_enums_generated test_enums_stubs))
+ (libraries ounit2 ctypes test_enums_generated test_enums_stubs))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-finalisers/dune 
new/ocaml-ctypes-0.21.0/tests/test-finalisers/dune
--- old/ocaml-ctypes-0.20.1/tests/test-finalisers/dune  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-finalisers/dune  2023-07-12 
21:04:48.000000000 +0200
@@ -1,3 +1,3 @@
 (test
  (name test_finalisers)
- (libraries ctypes oUnit))
+ (libraries ctypes ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-foreign-errno/dune 
new/ocaml-ctypes-0.21.0/tests/test-foreign-errno/dune
--- old/ocaml-ctypes-0.20.1/tests/test-foreign-errno/dune       2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-foreign-errno/dune       2023-07-12 
21:04:48.000000000 +0200
@@ -1,4 +1,4 @@
 (test
  (name test_errno)
  (package ctypes-foreign)
- (libraries oUnit ctypes ctypes-foreign))
+ (libraries ounit2 ctypes ctypes-foreign))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-foreign_values/dune 
new/ocaml-ctypes-0.21.0/tests/test-foreign_values/dune
--- old/ocaml-ctypes-0.20.1/tests/test-foreign_values/dune      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-foreign_values/dune      2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_foreign_values)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-foreign_values/test_foreign_values.ml 
new/ocaml-ctypes-0.21.0/tests/test-foreign_values/test_foreign_values.ml
--- old/ocaml-ctypes-0.20.1/tests/test-foreign_values/test_foreign_values.ml    
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-foreign_values/test_foreign_values.ml    
2023-07-12 21:04:48.000000000 +0200
@@ -8,6 +8,7 @@
 open OUnit2
 open Ctypes
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
                                         and type 'a return = 'a) =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-funptrs/TODO 
new/ocaml-ctypes-0.21.0/tests/test-funptrs/TODO
--- old/ocaml-ctypes-0.20.1/tests/test-funptrs/TODO     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-funptrs/TODO     1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-needs dune file!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-funptrs/dune 
new/ocaml-ctypes-0.21.0/tests/test-funptrs/dune
--- old/ocaml-ctypes-0.20.1/tests/test-funptrs/dune     1970-01-01 
01:00:00.000000000 +0100
+++ new/ocaml-ctypes-0.21.0/tests/test-funptrs/dune     2023-07-12 
21:04:48.000000000 +0200
@@ -0,0 +1,12 @@
+(test
+ (name test_funptrs)
+ (link_flags
+  (:include ../flags/link-flags.sexp))
+ (libraries
+  ounit2
+  ctypes
+  ctypes-foreign
+  test_funptrs_stubs
+  ctypes.stubs
+  tests_common
+  test_funptrs_bindings))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-funptrs/stub-generator/dune 
new/ocaml-ctypes-0.21.0/tests/test-funptrs/stub-generator/dune
--- old/ocaml-ctypes-0.20.1/tests/test-funptrs/stub-generator/dune      
1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-ctypes-0.21.0/tests/test-funptrs/stub-generator/dune      
2023-07-12 21:04:48.000000000 +0200
@@ -0,0 +1,24 @@
+(executable
+ (name driver)
+ (modules driver)
+ (libraries test_funptrs_stubs tests_common))
+
+(rule
+ (targets generated_stubs.c)
+ (action
+  (run %{exe:driver.exe} --c-file %{targets})))
+
+(rule
+ (targets generated_bindings.ml)
+ (action
+  (run %{exe:driver.exe} --ml-file %{targets})))
+
+(library
+ (name test_funptrs_bindings)
+ (wrapped false)
+ (foreign_stubs
+  (language c)
+  (names generated_stubs))
+ (modules generated_bindings)
+ (flags :standard -w -11)
+ (libraries ctypes test_functions))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-funptrs/stubs/dune 
new/ocaml-ctypes-0.21.0/tests/test-funptrs/stubs/dune
--- old/ocaml-ctypes-0.20.1/tests/test-funptrs/stubs/dune       1970-01-01 
01:00:00.000000000 +0100
+++ new/ocaml-ctypes-0.21.0/tests/test-funptrs/stubs/dune       2023-07-12 
21:04:48.000000000 +0200
@@ -0,0 +1,4 @@
+(library
+ (name test_funptrs_stubs)
+ (wrapped false)
+ (libraries ctypes ctypes-foreign))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-funptrs/test_funptrs.ml 
new/ocaml-ctypes-0.21.0/tests/test-funptrs/test_funptrs.ml
--- old/ocaml-ctypes-0.20.1/tests/test-funptrs/test_funptrs.ml  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-funptrs/test_funptrs.ml  2023-07-12 
21:04:48.000000000 +0200
@@ -7,7 +7,8 @@
 
 open OUnit2
 open Ctypes
-open Foreign
+
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 (* Explicitly raise on leaked funptrs. *)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-higher_order/dune 
new/ocaml-ctypes-0.21.0/tests/test-higher_order/dune
--- old/ocaml-ctypes-0.20.1/tests/test-higher_order/dune        2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-higher_order/dune        2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_higher_order)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-higher_order/test_higher_order.ml 
new/ocaml-ctypes-0.21.0/tests/test-higher_order/test_higher_order.ml
--- old/ocaml-ctypes-0.20.1/tests/test-higher_order/test_higher_order.ml        
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-higher_order/test_higher_order.ml        
2023-07-12 21:04:48.000000000 +0200
@@ -7,6 +7,7 @@
 
 open OUnit2
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
                                         and type 'a return = 'a) =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-integers/dune 
new/ocaml-ctypes-0.21.0/tests/test-integers/dune
--- old/ocaml-ctypes-0.20.1/tests/test-integers/dune    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-integers/dune    2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_integers)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-integers/test_integers.ml 
new/ocaml-ctypes-0.21.0/tests/test-integers/test_integers.ml
--- old/ocaml-ctypes-0.20.1/tests/test-integers/test_integers.ml        
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-integers/test_integers.ml        
2023-07-12 21:04:48.000000000 +0200
@@ -9,6 +9,8 @@
 open Ctypes
 open Unsigned
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
+
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
                                         and type 'a return = 'a) =
 struct
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-ldouble/dune 
new/ocaml-ctypes-0.21.0/tests/test-ldouble/dune
--- old/ocaml-ctypes-0.20.1/tests/test-ldouble/dune     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-ldouble/dune     2023-07-12 
21:04:48.000000000 +0200
@@ -1,3 +1,3 @@
 (test
  (name test_ldouble)
- (libraries ctypes oUnit))
+ (libraries ctypes ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-ldouble/test_ldouble.ml 
new/ocaml-ctypes-0.21.0/tests/test-ldouble/test_ldouble.ml
--- old/ocaml-ctypes-0.20.1/tests/test-ldouble/test_ldouble.ml  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-ldouble/test_ldouble.ml  2023-07-12 
21:04:48.000000000 +0200
@@ -259,12 +259,14 @@
 
 let test_int_conversions _ =
   begin
-    assert_equal max_int (LDouble.to_int
-                           (LDouble.of_int max_int))
+    let max_ok = 1 lsr 53 in
+    let min_ok = -max_ok in
+    assert_equal max_ok (LDouble.to_int
+                           (LDouble.of_int max_ok))
       ~printer:string_of_int;
 
-    assert_equal min_int (LDouble.to_int
-                           (LDouble.of_int min_int))
+    assert_equal min_ok (LDouble.to_int
+                           (LDouble.of_int min_ok))
       ~printer:string_of_int;
   end
     
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-lifetime/dune 
new/ocaml-ctypes-0.21.0/tests/test-lifetime/dune
--- old/ocaml-ctypes-0.20.1/tests/test-lifetime/dune    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-lifetime/dune    2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_lifetime)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-lifetime/test_lifetime.ml 
new/ocaml-ctypes-0.21.0/tests/test-lifetime/test_lifetime.ml
--- old/ocaml-ctypes-0.20.1/tests/test-lifetime/test_lifetime.ml        
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-lifetime/test_lifetime.ml        
2023-07-12 21:04:48.000000000 +0200
@@ -9,6 +9,7 @@
 open OUnit2
 open Ctypes
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
                                         and type 'a return = 'a) =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-lwt-jobs/dune 
new/ocaml-ctypes-0.21.0/tests/test-lwt-jobs/dune
--- old/ocaml-ctypes-0.20.1/tests/test-lwt-jobs/dune    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-lwt-jobs/dune    2023-07-12 
21:04:48.000000000 +0200
@@ -55,7 +55,7 @@
  (action
   (run %{test} -runner sequential))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-lwt-preemptive/dune 
new/ocaml-ctypes-0.21.0/tests/test-lwt-preemptive/dune
--- old/ocaml-ctypes-0.20.1/tests/test-lwt-preemptive/dune      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-lwt-preemptive/dune      2023-07-12 
21:04:48.000000000 +0200
@@ -55,7 +55,7 @@
  (action
   (run %{test} -runner sequential))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-macros/dune 
new/ocaml-ctypes-0.21.0/tests/test-macros/dune
--- old/ocaml-ctypes-0.20.1/tests/test-macros/dune      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-macros/dune      2023-07-12 
21:04:48.000000000 +0200
@@ -2,7 +2,7 @@
  (name test_macros)
  (package ctypes-foreign)
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-marshal/dune 
new/ocaml-ctypes-0.21.0/tests/test-marshal/dune
--- old/ocaml-ctypes-0.20.1/tests/test-marshal/dune     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-marshal/dune     2023-07-12 
21:04:48.000000000 +0200
@@ -1,3 +1,3 @@
 (test
  (name test_marshal)
- (libraries ctypes oUnit))
+ (libraries ctypes ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-oo_style/dune 
new/ocaml-ctypes-0.21.0/tests/test-oo_style/dune
--- old/ocaml-ctypes-0.20.1/tests/test-oo_style/dune    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-oo_style/dune    2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_oo_style)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-oo_style/test_oo_style.ml 
new/ocaml-ctypes-0.21.0/tests/test-oo_style/test_oo_style.ml
--- old/ocaml-ctypes-0.20.1/tests/test-oo_style/test_oo_style.ml        
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-oo_style/test_oo_style.ml        
2023-07-12 21:04:48.000000000 +0200
@@ -8,6 +8,8 @@
 open OUnit2
 open Ctypes
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
+
 [@@@warning "-6-27-37"]
 
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-passable/dune 
new/ocaml-ctypes-0.21.0/tests/test-passable/dune
--- old/ocaml-ctypes-0.20.1/tests/test-passable/dune    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-passable/dune    2023-07-12 
21:04:48.000000000 +0200
@@ -1,4 +1,4 @@
 (test
  (name test_passable)
  (package ctypes-foreign)
- (libraries ctypes ctypes.stubs ctypes-foreign oUnit))
+ (libraries ctypes ctypes.stubs ctypes-foreign ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-passing-ocaml-values/dune 
new/ocaml-ctypes-0.21.0/tests/test-passing-ocaml-values/dune
--- old/ocaml-ctypes-0.20.1/tests/test-passing-ocaml-values/dune        
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-passing-ocaml-values/dune        
2023-07-12 21:04:48.000000000 +0200
@@ -2,7 +2,7 @@
  (name test_passing_ocaml_values)
  (package ctypes-foreign)
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-pointers/dune 
new/ocaml-ctypes-0.21.0/tests/test-pointers/dune
--- old/ocaml-ctypes-0.20.1/tests/test-pointers/dune    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-pointers/dune    2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_pointers)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-pointers/test_pointers.ml 
new/ocaml-ctypes-0.21.0/tests/test-pointers/test_pointers.ml
--- old/ocaml-ctypes-0.20.1/tests/test-pointers/test_pointers.ml        
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-pointers/test_pointers.ml        
2023-07-12 21:04:48.000000000 +0200
@@ -13,7 +13,7 @@
 
 [@@@warning "-6"]
 
-let testlib = Dl.(dlopen ~filename:"../clib/dlltest_functions_stubs.so" 
~flags:[RTLD_NOW])
+let testlib = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
                                         and type 'a return = 'a) =
@@ -64,7 +64,7 @@
       (allocate (ptr (ptr int)) (allocate (ptr int) (allocate int 4))) in
 
     assert_equal ~msg:"Passing pointers to pointers"
-      Stdlib.(1 + 2 + 3 + 4)
+      (1 + 2 + 3 + 4)
       (accept_pointers_to_pointers p pp ppp pppp)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-raw/dune 
new/ocaml-ctypes-0.21.0/tests/test-raw/dune
--- old/ocaml-ctypes-0.20.1/tests/test-raw/dune 2022-04-15 17:07:04.000000000 
+0200
+++ new/ocaml-ctypes-0.21.0/tests/test-raw/dune 2023-07-12 21:04:48.000000000 
+0200
@@ -1,4 +1,4 @@
 (test
  (name test_raw)
  (package ctypes-foreign)
- (libraries ctypes ctypes-foreign oUnit))
+ (libraries ctypes ctypes-foreign ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-returning-errno/dune 
new/ocaml-ctypes-0.21.0/tests/test-returning-errno/dune
--- old/ocaml-ctypes-0.20.1/tests/test-returning-errno/dune     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-returning-errno/dune     2023-07-12 
21:04:48.000000000 +0200
@@ -55,7 +55,7 @@
   (run %{test} -runner sequential))
  (package ctypes-foreign)
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-returning-errno-lwt-jobs/dune 
new/ocaml-ctypes-0.21.0/tests/test-returning-errno-lwt-jobs/dune
--- old/ocaml-ctypes-0.20.1/tests/test-returning-errno-lwt-jobs/dune    
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-returning-errno-lwt-jobs/dune    
2023-07-12 21:04:48.000000000 +0200
@@ -55,7 +55,7 @@
  (action
   (run %{test} -runner sequential))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-returning-errno-lwt-preemptive/dune 
new/ocaml-ctypes-0.21.0/tests/test-returning-errno-lwt-preemptive/dune
--- old/ocaml-ctypes-0.20.1/tests/test-returning-errno-lwt-preemptive/dune      
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-returning-errno-lwt-preemptive/dune      
2023-07-12 21:04:48.000000000 +0200
@@ -55,7 +55,7 @@
  (action
   (run %{test} -runner sequential))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-roots/dune 
new/ocaml-ctypes-0.21.0/tests/test-roots/dune
--- old/ocaml-ctypes-0.20.1/tests/test-roots/dune       2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-roots/dune       2023-07-12 
21:04:48.000000000 +0200
@@ -1,4 +1,5 @@
 (test
  (name test_roots)
  (package ctypes-foreign)
- (libraries ctypes ctypes-foreign oUnit))
+ (deps ../clib/clib%{ext_dll})
+ (libraries ctypes ctypes-foreign ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-roots/test_roots.ml 
new/ocaml-ctypes-0.21.0/tests/test-roots/test_roots.ml
--- old/ocaml-ctypes-0.20.1/tests/test-roots/test_roots.ml      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-roots/test_roots.ml      2023-07-12 
21:04:48.000000000 +0200
@@ -10,7 +10,7 @@
 open Foreign
 
 
-let testlib = Dl.(dlopen ~filename:"../clib/dlltest_functions_stubs.so" 
~flags:[RTLD_NOW])
+let testlib = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 
 (*
@@ -23,7 +23,7 @@
     let v = [| 1; 2; 3 |] in
     Gc.finalise (fun _ -> alive := false) v;
   in
-  Gc.compact ();
+  Gc.full_major ();
   assert_equal false !alive
     ~msg:"values not registered as roots are collected";
 
@@ -34,7 +34,7 @@
     Gc.finalise (fun _ -> alive := false) v;
     Root.create v
   in
-  Gc.compact ();
+  Gc.full_major ();
   assert_equal true !alive
     ~msg:"registered roots are not collected";
 
@@ -46,7 +46,7 @@
     Root.create v
   in
   Root.release r;
-  Gc.compact ();
+  Gc.full_major ();
   assert_equal false !alive
     ~msg:"released roots are collected";
 
@@ -58,7 +58,7 @@
     let r = Root.create () in
     Root.set r v;
   in
-  Gc.compact ();
+  Gc.full_major ();
   assert_equal true !alive
     ~msg:"values assigned to roots are not collected";
 
@@ -70,7 +70,7 @@
     Root.create v
   in
   Root.set r ();
-  Gc.compact ();
+  Gc.full_major ();
   assert_equal false !alive
     ~msg:"overwritten roots are collected";
 
@@ -92,7 +92,7 @@
 
   begin
     save r;
-    Gc.compact ();
+    Gc.full_major ();
     let fs : (int -> int) array = Root.get (retrieve ()) in
     assert_equal 11 (fs.(0) 10);
     assert_equal 20 (fs.(1) 10)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-sizeof/dune 
new/ocaml-ctypes-0.21.0/tests/test-sizeof/dune
--- old/ocaml-ctypes-0.20.1/tests/test-sizeof/dune      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-sizeof/dune      2023-07-12 
21:04:48.000000000 +0200
@@ -1,4 +1,4 @@
 (test
  (name test_sizeof)
  (package ctypes-foreign)
- (libraries ctypes ctypes-foreign oUnit))
+ (libraries ctypes ctypes-foreign ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-structs/dune 
new/ocaml-ctypes-0.21.0/tests/test-structs/dune
--- old/ocaml-ctypes-0.20.1/tests/test-structs/dune     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-structs/dune     2023-07-12 
21:04:48.000000000 +0200
@@ -52,12 +52,13 @@
  (name test_structs)
  (modules test_structs)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (action
   (run %{test} -runner sequential))
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-structs/test_structs.ml 
new/ocaml-ctypes-0.21.0/tests/test-structs/test_structs.ml
--- old/ocaml-ctypes-0.20.1/tests/test-structs/test_structs.ml  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-structs/test_structs.ml  2023-07-12 
21:04:48.000000000 +0200
@@ -10,7 +10,7 @@
 open Ctypes
 
 
-let testlib = Dl.(dlopen ~filename:"../clib/dlltest_functions_stubs.so" 
~flags:[RTLD_NOW])
+let testlib = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 
 module Build_foreign_tests(S : Cstubs.FOREIGN with type 'a result = 'a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-stubs/dune 
new/ocaml-ctypes-0.21.0/tests/test-stubs/dune
--- old/ocaml-ctypes-0.20.1/tests/test-stubs/dune       2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-stubs/dune       2023-07-12 
21:04:48.000000000 +0200
@@ -1,4 +1,4 @@
 (test
  (name test_stubs)
  (package ctypes-foreign)
- (libraries ctypes-foreign oUnit))
+ (libraries ctypes-foreign ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-threads/dune 
new/ocaml-ctypes-0.21.0/tests/test-threads/dune
--- old/ocaml-ctypes-0.20.1/tests/test-threads/dune     2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-threads/dune     2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_threads)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-threads/test_threads.ml 
new/ocaml-ctypes-0.21.0/tests/test-threads/test_threads.ml
--- old/ocaml-ctypes-0.20.1/tests/test-threads/test_threads.ml  2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-threads/test_threads.ml  2023-07-12 
21:04:48.000000000 +0200
@@ -13,7 +13,7 @@
 let () =
   (* temporary workaround due to flexlink limitations *)
   if Sys.os_type = "Win32" then
-    ignore (Dl.(dlopen ~filename:"clib/libtest_functions.so" 
~flags:[RTLD_NOW]))
+    ignore (Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW]))
 
 
 let callback_with_pointers = Foreign.foreign "passing_pointers_to_callback"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-type_printing/dune 
new/ocaml-ctypes-0.21.0/tests/test-type_printing/dune
--- old/ocaml-ctypes-0.20.1/tests/test-type_printing/dune       2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-type_printing/dune       2023-07-12 
21:04:48.000000000 +0200
@@ -53,7 +53,7 @@
  (modules test_type_printing)
  (package ctypes-foreign)
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-unions/dune 
new/ocaml-ctypes-0.21.0/tests/test-unions/dune
--- old/ocaml-ctypes-0.20.1/tests/test-unions/dune      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-unions/dune      2023-07-12 
21:04:48.000000000 +0200
@@ -51,13 +51,14 @@
 (test
  (name test_unions)
  (modules test_unions)
+ (deps ../clib/clib%{ext_dll})
  (package ctypes-foreign)
  (action
   (run %{test} -runner sequential))
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-unions/test_unions.ml 
new/ocaml-ctypes-0.21.0/tests/test-unions/test_unions.ml
--- old/ocaml-ctypes-0.20.1/tests/test-unions/test_unions.ml    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-unions/test_unions.ml    2023-07-12 
21:04:48.000000000 +0200
@@ -10,7 +10,7 @@
 open Unsigned
 
 
-let testlib = Dl.(dlopen ~filename:"../clib/dlltest_functions_stubs.so" 
~flags:[RTLD_NOW])
+let testlib = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 
 (* 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-value_printing/dune 
new/ocaml-ctypes-0.21.0/tests/test-value_printing/dune
--- old/ocaml-ctypes-0.20.1/tests/test-value_printing/dune      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-value_printing/dune      2023-07-12 
21:04:48.000000000 +0200
@@ -1,10 +1,11 @@
 (test
  (name test_value_printing)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
  (libraries
-  oUnit
+  ounit2
   ctypes
   ctypes.stubs
   ctypes-foreign
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-ctypes-0.20.1/tests/test-value_printing/test_value_printing.ml 
new/ocaml-ctypes-0.21.0/tests/test-value_printing/test_value_printing.ml
--- old/ocaml-ctypes-0.20.1/tests/test-value_printing/test_value_printing.ml    
2022-04-15 17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-value_printing/test_value_printing.ml    
2023-07-12 21:04:48.000000000 +0200
@@ -8,6 +8,7 @@
 open OUnit2
 open Ctypes
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
 
 let strip_whitespace = Str.(global_replace (regexp "[\n ]+") "")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-variadic/dune 
new/ocaml-ctypes-0.21.0/tests/test-variadic/dune
--- old/ocaml-ctypes-0.20.1/tests/test-variadic/dune    2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-variadic/dune    2023-07-12 
21:04:48.000000000 +0200
@@ -2,7 +2,7 @@
  (name test_variadic)
  (package ctypes-foreign)
  (libraries
-  oUnit
+  ounit2
   ctypes
   integers
   test_variadic_stubs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-views/dune 
new/ocaml-ctypes-0.21.0/tests/test-views/dune
--- old/ocaml-ctypes-0.20.1/tests/test-views/dune       2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-views/dune       2023-07-12 
21:04:48.000000000 +0200
@@ -1,6 +1,7 @@
 (test
  (name test_views)
  (package ctypes-foreign)
+ (deps ../clib/clib%{ext_dll})
  (link_flags
   (:include ../flags/link-flags.sexp))
- (libraries oUnit ctypes test_views_stubs test_views_bindings tests_common))
+ (libraries ounit2 ctypes test_views_stubs test_views_bindings tests_common))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-ctypes-0.20.1/tests/test-views/test_views.ml 
new/ocaml-ctypes-0.21.0/tests/test-views/test_views.ml
--- old/ocaml-ctypes-0.20.1/tests/test-views/test_views.ml      2022-04-15 
17:07:04.000000000 +0200
+++ new/ocaml-ctypes-0.21.0/tests/test-views/test_views.ml      2023-07-12 
21:04:48.000000000 +0200
@@ -8,6 +8,8 @@
 open OUnit2
 open Ctypes
 
+let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])
+
 [@@@warning "-3-35"]
 
 module Common_tests(S : Cstubs.FOREIGN with type 'a result = 'a
@@ -80,7 +82,7 @@
         (-1) (accepting_possibly_null_funptr None 2 3);
 
       assert_equal ~msg:"passing non-null function pointer"
-        5 (accepting_possibly_null_funptr (Some Pervasives.(+)) 2 3);
+        5 (accepting_possibly_null_funptr (Some (+)) 2 3);
 
       assert_equal ~msg:"passing non-null function pointer obtained from C"
         6 (accepting_possibly_null_funptr (returning_funptr 1) 2 3);

Reply via email to