forked from rescript-lang/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compdynlink.mlno
57 lines (47 loc) · 2.14 KB
/
compdynlink.mlno
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#2 "driver/compdynlink.mlno"
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Xavier Leroy, projet Gallium, INRIA Rocquencourt *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* en Automatique. *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(* Dynamic loading of .cmx files *)
type linking_error =
Undefined_global of string
| Unavailable_primitive of string
| Uninitialized_global of string
type error =
Not_a_bytecode_file of string
| Inconsistent_import of string
| Unavailable_unit of string
| Unsafe_file
| Linking_error of string * linking_error
| Corrupted_interface of string
| File_not_found of string
| Cannot_open_dll of string
| Inconsistent_implementation of string
exception Error of error
let not_available _ =
failwith "No support for native dynlink on this OS"
let default_available_units = not_available
let init = not_available
let loadfile = not_available
let loadfile_private = not_available
let allow_only = not_available
let prohibit = not_available
let digest_interface = not_available
let add_interfaces = not_available
let add_available_units = not_available
let clear_available_units = not_available
let allow_unsafe_modules = not_available
let error_message = not_available
let is_native = true
let adapt_filename f = Filename.chop_extension f ^ ".cmxs"