ocaml/driver/compdynlink.mlno

58 lines
2.1 KiB
Plaintext

#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"