summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--otherlibs/dynlink/Makefile4
-rw-r--r--otherlibs/dynlink/dynlink.ml5
-rw-r--r--otherlibs/dynlink/dynlink.mli5
-rw-r--r--otherlibs/dynlink/natdynlink.ml6
4 files changed, 2 insertions, 18 deletions
diff --git a/otherlibs/dynlink/Makefile b/otherlibs/dynlink/Makefile
index fcac76cc0..d0bd0924c 100644
--- a/otherlibs/dynlink/Makefile
+++ b/otherlibs/dynlink/Makefile
@@ -58,9 +58,9 @@ dynlinkaux.cmo: $(COMPILEROBJS)
dynlinkaux.cmi: dynlinkaux.cmo
dynlink.cmx: dynlink.cmi natdynlink.ml
- sed -e 's|%%NATDYNLINK%%|$(NATDYNLINK)|' natdynlink.ml > dynlink.mlopt
+ cp natdynlink.ml dynlink.mlopt
$(CAMLOPT) -c $(COMPFLAGS) -impl dynlink.mlopt
-# rm -f dynlink.mlopt
+ rm -f dynlink.mlopt
extract_crc: dynlink.cma extract_crc.cmo
$(CAMLC) $(COMPFLAGS) -o extract_crc dynlink.cma extract_crc.cmo
diff --git a/otherlibs/dynlink/dynlink.ml b/otherlibs/dynlink/dynlink.ml
index d8d2f1162..0d324a854 100644
--- a/otherlibs/dynlink/dynlink.ml
+++ b/otherlibs/dynlink/dynlink.ml
@@ -18,8 +18,6 @@
open Dynlinkaux (* REMOVE_ME for ../../debugger/dynlink.ml *)
open Cmo_format
-let supported = true
-
type linking_error =
Undefined_global of string
| Unavailable_primitive of string
@@ -35,7 +33,6 @@ type error =
| File_not_found of string
| Cannot_open_dll of string
| Inconsistent_implementation of string
- | Dynlink_not_supported
exception Error of error
@@ -271,8 +268,6 @@ let error_message = function
"error loading shared library: " ^ reason
| Inconsistent_implementation name ->
"implementation mismatch on " ^ name
- | Dynlink_not_supported ->
- "dynlink not supported"
let is_native = false
let adapt_filename f = f
diff --git a/otherlibs/dynlink/dynlink.mli b/otherlibs/dynlink/dynlink.mli
index ae8754798..7cca68c5a 100644
--- a/otherlibs/dynlink/dynlink.mli
+++ b/otherlibs/dynlink/dynlink.mli
@@ -19,10 +19,6 @@ val is_native: bool
(** [true] if the program is native,
[false] if the program is bytecode. *)
-val supported: bool
-(** [true] if dynlink is supported for the current platform (always
- [true] in bytecode, can be [false] for native code). *)
-
(** {6 Dynamic loading of compiled files} *)
val loadfile : string -> unit
@@ -131,7 +127,6 @@ type error =
| File_not_found of string
| Cannot_open_dll of string
| Inconsistent_implementation of string
- | Dynlink_not_supported
exception Error of error
(** Errors in dynamic linking are reported by raising the [Error]
diff --git a/otherlibs/dynlink/natdynlink.ml b/otherlibs/dynlink/natdynlink.ml
index e481dd870..6ab9b9850 100644
--- a/otherlibs/dynlink/natdynlink.ml
+++ b/otherlibs/dynlink/natdynlink.ml
@@ -15,8 +15,6 @@
(* Dynamic loading of .cmx files *)
-let supported = %%NATDYNLINK%%
-
type handle
external ndl_open: string -> bool -> handle * string = "caml_natdynlink_open"
@@ -39,7 +37,6 @@ type error =
| File_not_found of string
| Cannot_open_dll of string
| Inconsistent_implementation of string
- | Dynlink_not_supported
exception Error of error
@@ -96,7 +93,6 @@ let allow_extension = ref true
let inited = ref false
let default_available_units () =
- if not supported then raise (Error Dynlink_not_supported);
let map : (string*Digest.t*Digest.t*string list) list =
Marshal.from_string (ndl_getmap ()) 0 in
let exe = Sys.executable_name in
@@ -248,8 +244,6 @@ let error_message = function
"error loading shared library: " ^ reason
| Inconsistent_implementation name ->
"implementation mismatch on " ^ name
- | Dynlink_not_supported ->
- "dynlink not supported"
let is_native = true
let adapt_filename f = Filename.chop_extension f ^ ".cmxs"