summaryrefslogtreecommitdiff
path: root/otherlibs
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs')
-rw-r--r--otherlibs/Makefile8
-rw-r--r--otherlibs/Makefile.nt8
-rw-r--r--otherlibs/Makefile.shared16
-rw-r--r--otherlibs/bigarray/.depend30
-rw-r--r--otherlibs/bigarray/bigarray.h12
-rw-r--r--otherlibs/bigarray/bigarray.ml101
-rw-r--r--otherlibs/bigarray/bigarray.mli94
-rw-r--r--otherlibs/bigarray/bigarray_stubs.c23
-rw-r--r--otherlibs/bigarray/mmap_unix.c2
-rw-r--r--otherlibs/bigarray/mmap_win32.c2
-rw-r--r--otherlibs/dynlink/Makefile6
-rw-r--r--otherlibs/graph/.depend160
-rw-r--r--otherlibs/num/.depend20
-rw-r--r--otherlibs/str/.depend10
-rw-r--r--otherlibs/str/str.mli1
-rw-r--r--otherlibs/systhreads/.depend20
-rw-r--r--otherlibs/systhreads/Makefile9
-rw-r--r--otherlibs/systhreads/Makefile.nt5
-rw-r--r--otherlibs/threads/.depend43
-rw-r--r--otherlibs/threads/Makefile10
-rw-r--r--otherlibs/unix/.depend758
-rw-r--r--otherlibs/unix/access.c12
-rw-r--r--otherlibs/unix/chdir.c12
-rw-r--r--otherlibs/unix/chmod.c12
-rw-r--r--otherlibs/unix/chown.c12
-rw-r--r--otherlibs/unix/chroot.c12
-rw-r--r--otherlibs/unix/close.c7
-rw-r--r--otherlibs/unix/closedir.c7
-rw-r--r--otherlibs/unix/fchmod.c7
-rw-r--r--otherlibs/unix/fchown.c8
-rw-r--r--otherlibs/unix/ftruncate.c16
-rw-r--r--otherlibs/unix/gethost.c3
-rw-r--r--otherlibs/unix/link.c17
-rw-r--r--otherlibs/unix/mkdir.c14
-rw-r--r--otherlibs/unix/mkfifo.c26
-rw-r--r--otherlibs/unix/open.c3
-rw-r--r--otherlibs/unix/opendir.c13
-rw-r--r--otherlibs/unix/readdir.c3
-rw-r--r--otherlibs/unix/readlink.c12
-rw-r--r--otherlibs/unix/rename.c17
-rw-r--r--otherlibs/unix/rmdir.c14
-rw-r--r--otherlibs/unix/stat.c49
-rw-r--r--otherlibs/unix/symlink.c17
-rw-r--r--otherlibs/unix/truncate.c29
-rw-r--r--otherlibs/unix/unix.mli5
-rw-r--r--otherlibs/unix/unlink.c14
-rw-r--r--otherlibs/unix/utimes.c26
-rw-r--r--otherlibs/win32unix/select.c2
48 files changed, 1012 insertions, 695 deletions
diff --git a/otherlibs/Makefile b/otherlibs/Makefile
index 274b9583ad..6c3e58aa65 100644
--- a/otherlibs/Makefile
+++ b/otherlibs/Makefile
@@ -13,11 +13,9 @@
# Common Makefile for otherlibs on the Unix ports
-CAMLC=$(CAMLC_BIN) -nostdlib -I ../../stdlib
-CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I ../../stdlib
-CAMLC_BIN_CMD=$$($(CAMLC_BIN_CMD_TO_EVAL) -nostdlib -I ../../stdlib)
-CAMLOPT_BIN_CMD=$$($(CAMLOPT_BIN_CMD_TO_EVAL) -nostdlib -I ../../stdlib)
-CFLAGS=-I../../byterun -O $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
+CAMLC=$(ROOTDIR)/ocamlcomp.sh
+CAMLOPT=$(ROOTDIR)/ocamlcompopt.sh
+CFLAGS=-I$(ROOTDIR)/byterun -O $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
include ../Makefile.shared
# Note .. is the current directory (this makefile is included from
diff --git a/otherlibs/Makefile.nt b/otherlibs/Makefile.nt
index f3e7f200da..aafb4217cb 100644
--- a/otherlibs/Makefile.nt
+++ b/otherlibs/Makefile.nt
@@ -13,11 +13,9 @@
# Common Makefile for otherlibs on the Win32/MinGW ports
-CAMLC=$(CAMLC_BIN) -nostdlib -I ../../stdlib -w s
-CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I ../../stdlib -w s
-CAMLC_BIN_CMD=$(shell cygpath -m $(shell $(CAMLC_BIN_CMD_TO_EVAL))) -nostdlib -I ../../stdlib
-CAMLOPT_BIN_CMD=$(shell cygpath -m $(shell $(CAMLOPT_BIN_CMD_TO_EVAL))) -nostdlib -I ../../stdlib
-CFLAGS=-I../../byterun $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
+CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib -w s
+CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib -I $(ROOTDIR)/stdlib -w s
+CFLAGS=-I$(ROOTDIR)/byterun $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
include ../Makefile.shared
# Note .. is the current directory (this makefile is included from
diff --git a/otherlibs/Makefile.shared b/otherlibs/Makefile.shared
index 1163f9e6c2..751a15870d 100644
--- a/otherlibs/Makefile.shared
+++ b/otherlibs/Makefile.shared
@@ -13,12 +13,14 @@
# Common Makefile for otherlibs
-include ../../config/Makefile
+ROOTDIR=../..
+include $(ROOTDIR)/config/Makefile
# Compilation options
CC=$(BYTECC)
-COMPFLAGS=-w +33..39 -warn-error A -g $(EXTRACAMLFLAGS)
-MKLIB=$(CAMLRUN) ../../tools/ocamlmklib
+CAMLRUN=$(ROOTDIR)/boot/ocamlrun
+COMPFLAGS=-w +33..39 -warn-error A -bin-annot -g $(EXTRACAMLFLAGS)
+MKLIB=$(CAMLRUN) $(ROOTDIR)/tools/ocamlmklib
# Variables to be defined by individual libraries:
#LIBNAME=
@@ -41,12 +43,12 @@ all: lib$(CLIBNAME).$(A) $(LIBNAME).cma $(CMIFILES)
allopt: lib$(CLIBNAME).$(A) $(LIBNAME).cmxa $(LIBNAME).$(CMXS) $(CMIFILES)
$(LIBNAME).cma: $(CAMLOBJS)
- $(MKLIB) -o $(LIBNAME) -oc $(CLIBNAME) -ocamlc "$(CAMLC_BIN_CMD)" \
- -linkall $(CAMLOBJS) $(LINKOPTS)
+ $(MKLIB) -o $(LIBNAME) -oc $(CLIBNAME) -ocamlc '$(CAMLC)' -linkall \
+ $(CAMLOBJS) $(LINKOPTS)
$(LIBNAME).cmxa: $(CAMLOBJS_NAT)
- $(MKLIB) -o $(LIBNAME) -oc $(CLIBNAME) -ocamlopt "$(CAMLOPT_BIN_CMD)" \
- -linkall $(CAMLOBJS_NAT) $(LINKOPTS)
+ $(MKLIB) -o $(LIBNAME) -oc $(CLIBNAME) -ocamlopt '$(CAMLOPT)' -linkall \
+ $(CAMLOBJS_NAT) $(LINKOPTS)
$(LIBNAME).cmxs: $(LIBNAME).cmxa lib$(CLIBNAME).$(A)
$(CAMLOPT) -shared -o $(LIBNAME).cmxs -I . $(LIBNAME).cmxa
diff --git a/otherlibs/bigarray/.depend b/otherlibs/bigarray/.depend
index d705f2022e..4df63a3e32 100644
--- a/otherlibs/bigarray/.depend
+++ b/otherlibs/bigarray/.depend
@@ -1,21 +1,21 @@
bigarray_stubs.o: bigarray_stubs.c ../../byterun/alloc.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h bigarray.h \
- ../../byterun/config.h ../../byterun/mlvalues.h ../../byterun/custom.h \
- ../../byterun/fail.h ../../byterun/intext.h ../../byterun/io.h \
- ../../byterun/hash.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/int64_native.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h bigarray.h \
+ ../../byterun/config.h ../../byterun/mlvalues.h ../../byterun/custom.h \
+ ../../byterun/fail.h ../../byterun/intext.h ../../byterun/io.h \
+ ../../byterun/hash.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/int64_native.h
mmap_unix.o: mmap_unix.c bigarray.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
- ../../byterun/custom.h ../../byterun/mlvalues.h ../../byterun/fail.h \
- ../../byterun/io.h ../../byterun/sys.h ../../byterun/signals.h
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
+ ../../byterun/custom.h ../../byterun/mlvalues.h ../../byterun/fail.h \
+ ../../byterun/io.h ../../byterun/sys.h ../../byterun/signals.h
mmap_win32.o: mmap_win32.c bigarray.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
- ../../byterun/alloc.h ../../byterun/mlvalues.h ../../byterun/custom.h \
- ../../byterun/fail.h ../../byterun/sys.h ../unix/unixsupport.h
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
+ ../../byterun/alloc.h ../../byterun/mlvalues.h ../../byterun/custom.h \
+ ../../byterun/fail.h ../../byterun/sys.h ../unix/unixsupport.h
bigarray.cmi :
bigarray.cmo : bigarray.cmi
bigarray.cmx : bigarray.cmi
diff --git a/otherlibs/bigarray/bigarray.h b/otherlibs/bigarray/bigarray.h
index 26fdcc9ed1..c10e20cfb3 100644
--- a/otherlibs/bigarray/bigarray.h
+++ b/otherlibs/bigarray/bigarray.h
@@ -44,15 +44,25 @@ enum caml_ba_kind {
CAML_BA_NATIVE_INT, /* Platform-native long integers (32 or 64 bits) */
CAML_BA_COMPLEX32, /* Single-precision complex */
CAML_BA_COMPLEX64, /* Double-precision complex */
+ CAML_BA_CHAR, /* Characters */
CAML_BA_KIND_MASK = 0xFF /* Mask for kind in flags field */
};
+#define Caml_ba_kind_val(v) Int_val(v)
+
+#define Val_caml_ba_kind(k) Val_int(k)
+
enum caml_ba_layout {
CAML_BA_C_LAYOUT = 0, /* Row major, indices start at 0 */
CAML_BA_FORTRAN_LAYOUT = 0x100, /* Column major, indices start at 1 */
- CAML_BA_LAYOUT_MASK = 0x100 /* Mask for layout in flags field */
+ CAML_BA_LAYOUT_MASK = 0x100, /* Mask for layout in flags field */
+ CAML_BA_LAYOUT_SHIFT = 8 /* Bit offset of layout flag */
};
+#define Caml_ba_layout_val(v) (Int_val(v) << CAML_BA_LAYOUT_SHIFT)
+
+#define Val_caml_ba_layout(l) Val_int(l >> CAML_BA_LAYOUT_SHIFT)
+
enum caml_ba_managed {
CAML_BA_EXTERNAL = 0, /* Data is not allocated by OCaml */
CAML_BA_MANAGED = 0x200, /* Data is allocated by OCaml */
diff --git a/otherlibs/bigarray/bigarray.ml b/otherlibs/bigarray/bigarray.ml
index 0aea1f4cba..960c972416 100644
--- a/otherlibs/bigarray/bigarray.ml
+++ b/otherlibs/bigarray/bigarray.ml
@@ -17,48 +17,63 @@ external init : unit -> unit = "caml_ba_init"
let _ = init()
-type ('a, 'b) kind = int
+type float32_elt = Float32_elt
+type float64_elt = Float64_elt
+type int8_signed_elt = Int8_signed_elt
+type int8_unsigned_elt = Int8_unsigned_elt
+type int16_signed_elt = Int16_signed_elt
+type int16_unsigned_elt = Int16_unsigned_elt
+type int32_elt = Int32_elt
+type int64_elt = Int64_elt
+type int_elt = Int_elt
+type nativeint_elt = Nativeint_elt
+type complex32_elt = Complex32_elt
+type complex64_elt = Complex64_elt
-type int8_signed_elt
-type int8_unsigned_elt
-type int16_signed_elt
-type int16_unsigned_elt
-type int_elt
-type int32_elt
-type int64_elt
-type nativeint_elt
-type float32_elt
-type float64_elt
-type complex32_elt
-type complex64_elt
+type ('a, 'b) kind =
+ Float32 : (float, float32_elt) kind
+ | Float64 : (float, float64_elt) kind
+ | Int8_signed : (int, int8_signed_elt) kind
+ | Int8_unsigned : (int, int8_unsigned_elt) kind
+ | Int16_signed : (int, int16_signed_elt) kind
+ | Int16_unsigned : (int, int16_unsigned_elt) kind
+ | Int32 : (int32, int32_elt) kind
+ | Int64 : (int64, int64_elt) kind
+ | Int : (int, int_elt) kind
+ | Nativeint : (nativeint, nativeint_elt) kind
+ | Complex32 : (Complex.t, complex32_elt) kind
+ | Complex64 : (Complex.t, complex64_elt) kind
+ | Char : (char, int8_unsigned_elt) kind
(* Keep those constants in sync with the caml_ba_kind enumeration
in bigarray.h *)
-let float32 = 0
-let float64 = 1
-let int8_signed = 2
-let int8_unsigned = 3
-let int16_signed = 4
-let int16_unsigned = 5
-let int32 = 6
-let int64 = 7
-let int = 8
-let nativeint = 9
-let char = int8_unsigned
-let complex32 = 10
-let complex64 = 11
+let float32 = Float32
+let float64 = Float64
+let int8_signed = Int8_signed
+let int8_unsigned = Int8_unsigned
+let int16_signed = Int16_signed
+let int16_unsigned = Int16_unsigned
+let int32 = Int32
+let int64 = Int64
+let int = Int
+let nativeint = Nativeint
+let complex32 = Complex32
+let complex64 = Complex64
+let char = Char
-type 'a layout = int
+type c_layout = C_layout_typ
+type fortran_layout = Fortran_layout_typ
-type c_layout
-type fortran_layout
+type 'a layout =
+ C_layout: c_layout layout
+ | Fortran_layout: fortran_layout layout
(* Keep those constants in sync with the caml_ba_layout enumeration
in bigarray.h *)
-let c_layout = 0
-let fortran_layout = 0x100
+let c_layout = C_layout
+let fortran_layout = Fortran_layout
module Genarray = struct
type ('a, 'b, 'c) t
@@ -114,9 +129,13 @@ module Array1 = struct
external sub: ('a, 'b, 'c) t -> int -> int -> ('a, 'b, 'c) t = "caml_ba_sub"
external blit: ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit = "caml_ba_blit"
external fill: ('a, 'b, 'c) t -> 'a -> unit = "caml_ba_fill"
- let of_array kind layout data =
+ let of_array (type t) kind (layout: t layout) data =
let ba = create kind layout (Array.length data) in
- let ofs = if layout = c_layout then 0 else 1 in
+ let ofs =
+ match layout with
+ C_layout -> 0
+ | Fortran_layout -> 1
+ in
for i = 0 to Array.length data - 1 do unsafe_set ba (i + ofs) data.(i) done;
ba
let map_file fd ?pos kind layout shared dim =
@@ -146,11 +165,15 @@ module Array2 = struct
let slice_right a n = Genarray.slice_right a [|n|]
external blit: ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit = "caml_ba_blit"
external fill: ('a, 'b, 'c) t -> 'a -> unit = "caml_ba_fill"
- let of_array kind layout data =
+ let of_array (type t) kind (layout: t layout) data =
let dim1 = Array.length data in
let dim2 = if dim1 = 0 then 0 else Array.length data.(0) in
let ba = create kind layout dim1 dim2 in
- let ofs = if layout = c_layout then 0 else 1 in
+ let ofs =
+ match layout with
+ C_layout -> 0
+ | Fortran_layout -> 1
+ in
for i = 0 to dim1 - 1 do
let row = data.(i) in
if Array.length row <> dim2 then
@@ -191,12 +214,16 @@ module Array3 = struct
let slice_right_2 a n = Genarray.slice_right a [|n|]
external blit: ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit = "caml_ba_blit"
external fill: ('a, 'b, 'c) t -> 'a -> unit = "caml_ba_fill"
- let of_array kind layout data =
+ let of_array (type t) kind (layout: t layout) data =
let dim1 = Array.length data in
let dim2 = if dim1 = 0 then 0 else Array.length data.(0) in
let dim3 = if dim2 = 0 then 0 else Array.length data.(0).(0) in
let ba = create kind layout dim1 dim2 dim3 in
- let ofs = if layout = c_layout then 0 else 1 in
+ let ofs =
+ match layout with
+ C_layout -> 0
+ | Fortran_layout -> 1
+ in
for i = 0 to dim1 - 1 do
let row = data.(i) in
if Array.length row <> dim2 then
diff --git a/otherlibs/bigarray/bigarray.mli b/otherlibs/bigarray/bigarray.mli
index eb9f3c5c3a..058c25904a 100644
--- a/otherlibs/bigarray/bigarray.mli
+++ b/otherlibs/bigarray/bigarray.mli
@@ -52,24 +52,38 @@
- platform-native signed integers (32 bits on 32-bit architectures,
64 bits on 64-bit architectures) ({!Bigarray.nativeint_elt}).
- Each element kind is represented at the type level by one
- of the abstract types defined below.
+ Each element kind is represented at the type level by one of the
+ [*_elt] types defined below (defined with a single constructor instead
+ of abstract types for technical injectivity reasons).
*)
-type float32_elt
-type float64_elt
-type complex32_elt
-type complex64_elt
-type int8_signed_elt
-type int8_unsigned_elt
-type int16_signed_elt
-type int16_unsigned_elt
-type int_elt
-type int32_elt
-type int64_elt
-type nativeint_elt
-
-type ('a, 'b) kind
+type float32_elt = Float32_elt
+type float64_elt = Float64_elt
+type int8_signed_elt = Int8_signed_elt
+type int8_unsigned_elt = Int8_unsigned_elt
+type int16_signed_elt = Int16_signed_elt
+type int16_unsigned_elt = Int16_unsigned_elt
+type int32_elt = Int32_elt
+type int64_elt = Int64_elt
+type int_elt = Int_elt
+type nativeint_elt = Nativeint_elt
+type complex32_elt = Complex32_elt
+type complex64_elt = Complex64_elt
+
+type ('a, 'b) kind =
+ Float32 : (float, float32_elt) kind
+ | Float64 : (float, float64_elt) kind
+ | Int8_signed : (int, int8_signed_elt) kind
+ | Int8_unsigned : (int, int8_unsigned_elt) kind
+ | Int16_signed : (int, int16_signed_elt) kind
+ | Int16_unsigned : (int, int16_unsigned_elt) kind
+ | Int32 : (int32, int32_elt) kind
+ | Int64 : (int64, int64_elt) kind
+ | Int : (int, int_elt) kind
+ | Nativeint : (nativeint, nativeint_elt) kind
+ | Complex32 : (Complex.t, complex32_elt) kind
+ | Complex64 : (Complex.t, complex64_elt) kind
+ | Char : (char, int8_unsigned_elt) kind
(** To each element kind is associated an OCaml type, which is
the type of OCaml values that can be stored in the big array
or read back from it. This type is not necessarily the same
@@ -79,12 +93,28 @@ type ('a, 'b) kind
its elements from OCaml uses the OCaml type [float], which is
64-bit double precision floats.
- The abstract type [('a, 'b) kind] captures this association
+ The GADT type [('a, 'b) kind] captures this association
of an OCaml type ['a] for values read or written in the big array,
and of an element kind ['b] which represents the actual contents
- of the big array. The following predefined values of type
- [kind] list all possible associations of OCaml types with
- element kinds: *)
+ of the big array. Its constructors list all possible associations
+ of OCaml types with element kinds, and are re-exported below for
+ backward-compatibility reasons.
+
+ Using a generalized algebraic datatype (GADT) here allows to write
+ well-typed polymorphic functions whose return type depend on the
+ argument type, such as:
+
+{[
+ let zero : type a b. (a, b) kind -> a = function
+ | Float32 -> 0.0 | Complex32 -> Complex.zero
+ | Float64 -> 0.0 | Complex64 -> Complex.zero
+ | Int8_signed -> 0 | Int8_unsigned -> 0
+ | Int16_signed -> 0 | Int16_unsigned -> 0
+ | Int32 -> 0l | Int64 -> 0L
+ | Int -> 0 | Nativeint -> 0n
+ | Char -> '\000'
+]}
+*)
val float32 : (float, float32_elt) kind
(** See {!Bigarray.char}. *)
@@ -127,7 +157,7 @@ val char : (char, int8_unsigned_elt) kind
big arrays of kind [float32_elt] and [float64_elt] are
accessed using the OCaml type [float]. Big arrays of complex kinds
[complex32_elt], [complex64_elt] are accessed with the OCaml type
- {!Complex.t}. Big arrays of
+ {!Complex.t}. Big arrays of
integer kinds are accessed using the smallest OCaml integer
type large enough to represent the array elements:
[int] for 8- and 16-bit integer bigarrays, as well as OCaml-integer
@@ -140,10 +170,10 @@ val char : (char, int8_unsigned_elt) kind
(** {6 Array layouts} *)
-type c_layout
+type c_layout = C_layout_typ
(** See {!Bigarray.fortran_layout}.*)
-type fortran_layout
+type fortran_layout = Fortran_layout_typ
(** To facilitate interoperability with existing C and Fortran code,
this library supports two different memory layouts for big arrays,
one compatible with the C conventions,
@@ -164,20 +194,20 @@ type fortran_layout
and [(x+1, y)] are adjacent in memory.
Each layout style is identified at the type level by the
- abstract types {!Bigarray.c_layout} and [fortran_layout] respectively. *)
-
-type 'a layout
-(** The type ['a layout] represents one of the two supported
- memory layouts: C-style if ['a] is {!Bigarray.c_layout}, Fortran-style
- if ['a] is {!Bigarray.fortran_layout}. *)
-
+ phantom types {!Bigarray.c_layout} and {!Bigarray.fortran_layout}
+ respectively. *)
(** {7 Supported layouts}
- The abstract values [c_layout] and [fortran_layout] represent
- the two supported layouts at the level of values.
+ The GADT type ['a layout] represents one of the two supported
+ memory layouts: C-style or Fortran-style. Its constructors are
+ re-exported as values below for backward-compatibility reasons.
*)
+type 'a layout =
+ C_layout: c_layout layout
+ | Fortran_layout: fortran_layout layout
+
val c_layout : c_layout layout
val fortran_layout : fortran_layout layout
diff --git a/otherlibs/bigarray/bigarray_stubs.c b/otherlibs/bigarray/bigarray_stubs.c
index f30fa4cc94..b8c768afa6 100644
--- a/otherlibs/bigarray/bigarray_stubs.c
+++ b/otherlibs/bigarray/bigarray_stubs.c
@@ -50,7 +50,8 @@ int caml_ba_element_size[] =
2 /*SINT16*/, 2 /*UINT16*/,
4 /*INT32*/, 8 /*INT64*/,
sizeof(value) /*CAML_INT*/, sizeof(value) /*NATIVE_INT*/,
- 8 /*COMPLEX32*/, 16 /*COMPLEX64*/
+ 8 /*COMPLEX32*/, 16 /*COMPLEX64*/,
+ 1 /*CHAR*/
};
/* Compute the number of bytes for the elements of a big array */
@@ -141,7 +142,7 @@ caml_ba_alloc(int flags, int num_dims, void * data, intnat * dim)
intnat dimcopy[CAML_BA_MAX_NUM_DIMS];
Assert(num_dims >= 1 && num_dims <= CAML_BA_MAX_NUM_DIMS);
- Assert((flags & CAML_BA_KIND_MASK) <= CAML_BA_COMPLEX64);
+ Assert((flags & CAML_BA_KIND_MASK) <= CAML_BA_CHAR);
for (i = 0; i < num_dims; i++) dimcopy[i] = dim[i];
size = 0;
if (data == NULL) {
@@ -203,7 +204,7 @@ CAMLprim value caml_ba_create(value vkind, value vlayout, value vdim)
if (dim[i] < 0)
caml_invalid_argument("Bigarray.create: negative dimension");
}
- flags = Int_val(vkind) | Int_val(vlayout);
+ flags = Caml_ba_kind_val(vkind) | Caml_ba_layout_val(vlayout);
return caml_ba_alloc(flags, num_dims, NULL, dim);
}
@@ -291,6 +292,8 @@ value caml_ba_get_N(value vb, value * vind, int nind)
case CAML_BA_COMPLEX64:
{ double * p = ((double *) b->data) + offset * 2;
return copy_two_doubles(p[0], p[1]); }
+ case CAML_BA_CHAR:
+ return Val_int(((char *) b->data)[offset]);
}
}
@@ -439,6 +442,7 @@ static value caml_ba_set_aux(value vb, value * vind, intnat nind, value newval)
((float *) b->data)[offset] = Double_val(newval); break;
case CAML_BA_FLOAT64:
((double *) b->data)[offset] = Double_val(newval); break;
+ case CAML_BA_CHAR:
case CAML_BA_SINT8:
case CAML_BA_UINT8:
((int8 *) b->data)[offset] = Int_val(newval); break;
@@ -649,14 +653,15 @@ CAMLprim value caml_ba_dim_3(value vb)
CAMLprim value caml_ba_kind(value vb)
{
- return Val_int(Caml_ba_array_val(vb)->flags & CAML_BA_KIND_MASK);
+ return Val_caml_ba_kind(Caml_ba_array_val(vb)->flags & CAML_BA_KIND_MASK);
}
/* Return the layout of a big array */
CAMLprim value caml_ba_layout(value vb)
{
- return Val_int(Caml_ba_array_val(vb)->flags & CAML_BA_LAYOUT_MASK);
+ int layout = Caml_ba_array_val(vb)->flags & CAML_BA_LAYOUT_MASK;
+ return Val_caml_ba_layout(layout);
}
/* Finalization of a big array */
@@ -749,6 +754,8 @@ static int caml_ba_compare(value v1, value v2)
num_elts *= 2; /*fallthrough*/
case CAML_BA_FLOAT64:
DO_FLOAT_COMPARISON(double);
+ case CAML_BA_CHAR:
+ DO_INTEGER_COMPARISON(char);
case CAML_BA_SINT8:
DO_INTEGER_COMPARISON(int8);
case CAML_BA_UINT8:
@@ -799,6 +806,7 @@ static intnat caml_ba_hash(value v)
h = 0;
switch (b->flags & CAML_BA_KIND_MASK) {
+ case CAML_BA_CHAR:
case CAML_BA_SINT8:
case CAML_BA_UINT8: {
uint8 * p = b->data;
@@ -917,6 +925,7 @@ static void caml_ba_serialize(value v,
for (i = 0; i < b->num_dims; i++) num_elts = num_elts * b->dim[i];
/* Serialize elements */
switch (b->flags & CAML_BA_KIND_MASK) {
+ case CAML_BA_CHAR:
case CAML_BA_SINT8:
case CAML_BA_UINT8:
caml_serialize_block_1(b->data, num_elts); break;
@@ -980,7 +989,7 @@ uintnat caml_ba_deserialize(void * dst)
/* Compute total number of elements */
num_elts = caml_ba_num_elts(b);
/* Determine element size in bytes */
- if ((b->flags & CAML_BA_KIND_MASK) > CAML_BA_COMPLEX64)
+ if ((b->flags & CAML_BA_KIND_MASK) > CAML_BA_CHAR)
caml_deserialize_error("input_value: bad bigarray kind");
elt_size = caml_ba_element_size[b->flags & CAML_BA_KIND_MASK];
/* Allocate room for data */
@@ -989,6 +998,7 @@ uintnat caml_ba_deserialize(void * dst)
caml_deserialize_error("input_value: out of memory for bigarray");
/* Read data */
switch (b->flags & CAML_BA_KIND_MASK) {
+ case CAML_BA_CHAR:
case CAML_BA_SINT8:
case CAML_BA_UINT8:
caml_deserialize_block_1(b->data, num_elts); break;
@@ -1173,6 +1183,7 @@ CAMLprim value caml_ba_fill(value vb, value vinit)
for (p = b->data; num_elts > 0; p++, num_elts--) *p = init;
break;
}
+ case CAML_BA_CHAR:
case CAML_BA_SINT8:
case CAML_BA_UINT8: {
int init = Int_val(vinit);
diff --git a/otherlibs/bigarray/mmap_unix.c b/otherlibs/bigarray/mmap_unix.c
index 5ba8cbf6d9..8a93a06b11 100644
--- a/otherlibs/bigarray/mmap_unix.c
+++ b/otherlibs/bigarray/mmap_unix.c
@@ -101,7 +101,7 @@ CAMLprim value caml_ba_map_file(value vfd, value vkind, value vlayout,
void * addr;
fd = Int_val(vfd);
- flags = Int_val(vkind) | Int_val(vlayout);
+ flags = Caml_ba_kind_val(vkind) | Caml_ba_layout_val(vlayout);
startpos = File_offset_val(vstart);
num_dims = Wosize_val(vdim);
major_dim = flags & CAML_BA_FORTRAN_LAYOUT ? num_dims - 1 : 0;
diff --git a/otherlibs/bigarray/mmap_win32.c b/otherlibs/bigarray/mmap_win32.c
index 4eca668aa5..cd9da4af38 100644
--- a/otherlibs/bigarray/mmap_win32.c
+++ b/otherlibs/bigarray/mmap_win32.c
@@ -56,7 +56,7 @@ CAMLprim value caml_ba_map_file(value vfd, value vkind, value vlayout,
SYSTEM_INFO sysinfo;
fd = Handle_val(vfd);
- flags = Int_val(vkind) | Int_val(vlayout);
+ flags = Caml_ba_kind_val(vkind) | Caml_ba_layout_val(vlayout);
startpos = Int64_val(vstart);
num_dims = Wosize_val(vdim);
major_dim = flags & CAML_BA_FORTRAN_LAYOUT ? num_dims - 1 : 0;
diff --git a/otherlibs/dynlink/Makefile b/otherlibs/dynlink/Makefile
index ab03704903..67b160aa49 100644
--- a/otherlibs/dynlink/Makefile
+++ b/otherlibs/dynlink/Makefile
@@ -15,10 +15,10 @@
include ../../config/Makefile
-CAMLC=$(CAMLC_BIN) -nostdlib -I ../../stdlib
-CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I ../../stdlib
+CAMLC=../../boot/ocamlrun ../../ocamlc
+CAMLOPT=../../ocamlcompopt.sh
INCLUDES=-I ../../utils -I ../../typing -I ../../bytecomp -I ../../asmcomp
-COMPFLAGS=-w +33..39 -warn-error A $(INCLUDES)
+COMPFLAGS=-w +33..39 -warn-error A -bin-annot -I ../../stdlib $(INCLUDES)
OBJS=dynlinkaux.cmo dynlink.cmo
diff --git a/otherlibs/graph/.depend b/otherlibs/graph/.depend
index ab9faa619a..b4b531d43a 100644
--- a/otherlibs/graph/.depend
+++ b/otherlibs/graph/.depend
@@ -1,103 +1,63 @@
-color.o: color.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h \
-
-draw.o: draw.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h
-dump_img.o: dump_img.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h image.h \
- ../../byterun/alloc.h ../../byterun/mlvalues.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h
-events.o: events.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/signals.h
-fill.o: fill.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h
-image.o: image.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h image.h \
- ../../byterun/alloc.h ../../byterun/mlvalues.h ../../byterun/custom.h
-make_img.o: make_img.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h image.h \
- ../../byterun/memory.h ../../byterun/gc.h ../../byterun/mlvalues.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h
-open.o: open.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/callback.h ../../byterun/fail.h \
- ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h
-point_col.o: point_col.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h
-sound.o: sound.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h
-subwindow.o: subwindow.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h
-text.o: text.c libgraph.h \
- \
- \
- \
- ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h
+color.o: color.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h
+draw.o: draw.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h
+dump_img.o: dump_img.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h image.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h
+events.o: events.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/signals.h
+fill.o: fill.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h
+image.o: image.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h image.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/custom.h
+make_img.o: make_img.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h image.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h
+open.o: open.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/callback.h ../../byterun/fail.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h
+point_col.o: point_col.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h
+sound.o: sound.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h
+subwindow.o: subwindow.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h
+text.o: text.c libgraph.h ../../byterun/mlvalues.h \
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h
graphics.cmi :
graphicsX11.cmi :
graphics.cmo : graphics.cmi
diff --git a/otherlibs/num/.depend b/otherlibs/num/.depend
index 51b180f5d8..32d691cc80 100644
--- a/otherlibs/num/.depend
+++ b/otherlibs/num/.depend
@@ -1,6 +1,6 @@
bng.o: bng.c bng.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/compatibility.h bng_amd64.c \
- bng_digit.c
+ ../../byterun/../config/s.h ../../byterun/compatibility.h bng_amd64.c \
+ bng_digit.c
bng_amd64.o: bng_amd64.c
bng_arm64.o: bng_arm64.c
bng_digit.o: bng_digit.c
@@ -8,14 +8,14 @@ bng_ia32.o: bng_ia32.c
bng_ppc.o: bng_ppc.c
bng_sparc.o: bng_sparc.c
nat_stubs.o: nat_stubs.c ../../byterun/alloc.h \
- ../../byterun/compatibility.h ../../byterun/misc.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/config.h ../../byterun/custom.h ../../byterun/intext.h \
- ../../byterun/io.h ../../byterun/fail.h ../../byterun/hash.h \
- ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h \
- ../../byterun/mlvalues.h bng.h nat.h
+ ../../byterun/compatibility.h ../../byterun/misc.h \
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/config.h ../../byterun/custom.h ../../byterun/intext.h \
+ ../../byterun/io.h ../../byterun/fail.h ../../byterun/hash.h \
+ ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/mlvalues.h bng.h nat.h
arith_flags.cmi :
arith_status.cmi :
big_int.cmi : nat.cmi
diff --git a/otherlibs/str/.depend b/otherlibs/str/.depend
index 5be8377c2d..b0ff35895b 100644
--- a/otherlibs/str/.depend
+++ b/otherlibs/str/.depend
@@ -1,9 +1,9 @@
strstubs.o: strstubs.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/fail.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/fail.h
str.cmi :
str.cmo : str.cmi
str.cmx : str.cmi
diff --git a/otherlibs/str/str.mli b/otherlibs/str/str.mli
index 1eb92378bb..448cbd5ac3 100644
--- a/otherlibs/str/str.mli
+++ b/otherlibs/str/str.mli
@@ -121,6 +121,7 @@ val matched_string : string -> string
- {!Str.string_partial_match}
- {!Str.global_substitute}
- {!Str.substitute_first}
+
provided that none of the following functions was called inbetween:
- {!Str.global_replace}
- {!Str.replace_first}
diff --git a/otherlibs/systhreads/.depend b/otherlibs/systhreads/.depend
index 85add2e592..93b01d6876 100644
--- a/otherlibs/systhreads/.depend
+++ b/otherlibs/systhreads/.depend
@@ -1,14 +1,14 @@
st_stubs.o: st_stubs.c ../../byterun/alloc.h \
- ../../byterun/compatibility.h ../../byterun/misc.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/backtrace.h ../../byterun/callback.h \
- ../../byterun/custom.h ../../byterun/fail.h ../../byterun/io.h \
- ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/misc.h \
- ../../byterun/mlvalues.h ../../byterun/printexc.h ../../byterun/roots.h \
- ../../byterun/memory.h ../../byterun/signals.h ../../byterun/stacks.h \
- ../../byterun/sys.h threads.h st_posix.h
+ ../../byterun/compatibility.h ../../byterun/misc.h \
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/backtrace.h ../../byterun/callback.h \
+ ../../byterun/custom.h ../../byterun/fail.h ../../byterun/io.h \
+ ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/misc.h \
+ ../../byterun/mlvalues.h ../../byterun/printexc.h ../../byterun/roots.h \
+ ../../byterun/memory.h ../../byterun/signals.h ../../byterun/stacks.h \
+ ../../byterun/sys.h threads.h st_posix.h
condition.cmi : mutex.cmi
event.cmi :
mutex.cmi :
diff --git a/otherlibs/systhreads/Makefile b/otherlibs/systhreads/Makefile
index 138d056946..3da02c2601 100644
--- a/otherlibs/systhreads/Makefile
+++ b/otherlibs/systhreads/Makefile
@@ -13,11 +13,10 @@
include ../../config/Makefile
-CAMLC=$(CAMLC_BIN) -nostdlib -I ../../stdlib -I ../unix
-CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I ../../stdlib -I ../unix
+CAMLC=../../ocamlcomp.sh -I ../unix
+CAMLOPT=../../ocamlcompopt.sh -I ../unix
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
-COMPFLAGS=-w +33..39 -warn-error A -g
-CAMLC_BIN_CMD=$(CAMLC_BIN_CMD_TO_EVAL) -nostdlib -I ../../stdlib
+COMPFLAGS=-w +33..39 -warn-error A -g -bin-annot
BYTECODE_C_OBJS=st_stubs_b.o
NATIVECODE_C_OBJS=st_stubs_n.o
@@ -48,7 +47,7 @@ st_stubs_n.o: st_stubs.c st_posix.h
mv st_stubs.o st_stubs_n.o
threads.cma: $(THREAD_OBJS)
- $(MKLIB) -ocamlc "$$($(CAMLC_BIN_CMD))" -o threads $(THREAD_OBJS) \
+ $(MKLIB) -ocamlc '$(CAMLC)' -o threads $(THREAD_OBJS) \
-cclib -lunix $(PTHREAD_LINK)
# See remark above: force static linking of libthreadsnat.a
diff --git a/otherlibs/systhreads/Makefile.nt b/otherlibs/systhreads/Makefile.nt
index 2d86f84c0f..225146cced 100644
--- a/otherlibs/systhreads/Makefile.nt
+++ b/otherlibs/systhreads/Makefile.nt
@@ -14,10 +14,9 @@
include ../../config/Makefile
# Compilation options
-CAMLC=$(CAMLC_BIN) -nostdlib -I ../../stdlib -I ../win32unix
-CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I ../../stdlib -I ../win32unix
+CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib -I ../win32unix
+CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../win32unix
COMPFLAGS=-w +33 -warn-error A -g
-CAMLC_BIN_CMD=$(CAMLC_BIN_CMD_TO_EVAL) -nostdlib -I ../../stdlib
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
CFLAGS=-I../../byterun $(EXTRACFLAGS)
diff --git a/otherlibs/threads/.depend b/otherlibs/threads/.depend
index c96a6715fe..091feb6394 100644
--- a/otherlibs/threads/.depend
+++ b/otherlibs/threads/.depend
@@ -1,32 +1,35 @@
scheduler.o: scheduler.c ../../byterun/alloc.h \
- ../../byterun/compatibility.h ../../byterun/misc.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/backtrace.h ../../byterun/callback.h \
- ../../byterun/config.h ../../byterun/fail.h ../../byterun/io.h \
- ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/misc.h \
- ../../byterun/mlvalues.h ../../byterun/printexc.h ../../byterun/roots.h \
- ../../byterun/memory.h ../../byterun/signals.h ../../byterun/stacks.h \
- ../../byterun/sys.h
+ ../../byterun/compatibility.h ../../byterun/misc.h \
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/backtrace.h ../../byterun/callback.h \
+ ../../byterun/config.h ../../byterun/fail.h ../../byterun/io.h \
+ ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/misc.h \
+ ../../byterun/mlvalues.h ../../byterun/printexc.h ../../byterun/roots.h \
+ ../../byterun/memory.h ../../byterun/signals.h ../../byterun/stacks.h \
+ ../../byterun/sys.h
condition.cmi : mutex.cmi
event.cmi :
+marshal.cmi :
mutex.cmi :
-thread.cmi : unix.cmo
-threadUnix.cmi : unix.cmo
+pervasives.cmi :
+thread.cmi : unix.cmi
+threadUnix.cmi : unix.cmi
+unix.cmi :
condition.cmo : thread.cmi mutex.cmi condition.cmi
condition.cmx : thread.cmx mutex.cmx condition.cmi
event.cmo : mutex.cmi condition.cmi event.cmi
event.cmx : mutex.cmx condition.cmx event.cmi
-marshal.cmo : pervasives.cmo
-marshal.cmx : pervasives.cmx
+marshal.cmo : pervasives.cmi marshal.cmi
+marshal.cmx : pervasives.cmx marshal.cmi
mutex.cmo : thread.cmi mutex.cmi
mutex.cmx : thread.cmx mutex.cmi
-pervasives.cmo : unix.cmo
-pervasives.cmx : unix.cmx
-thread.cmo : unix.cmo thread.cmi
+pervasives.cmo : unix.cmi pervasives.cmi
+pervasives.cmx : unix.cmx pervasives.cmi
+thread.cmo : unix.cmi thread.cmi
thread.cmx : unix.cmx thread.cmi
-threadUnix.cmo : unix.cmo thread.cmi threadUnix.cmi
+threadUnix.cmo : unix.cmi thread.cmi threadUnix.cmi
threadUnix.cmx : unix.cmx thread.cmx threadUnix.cmi
-unix.cmo :
-unix.cmx :
+unix.cmo : unix.cmi
+unix.cmx : unix.cmi
diff --git a/otherlibs/threads/Makefile b/otherlibs/threads/Makefile
index 359f2d4298..3aa6c2acf8 100644
--- a/otherlibs/threads/Makefile
+++ b/otherlibs/threads/Makefile
@@ -15,10 +15,9 @@ include ../../config/Makefile
CC=$(BYTECC)
CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
-CAMLC=$(CAMLC_BIN) -nostdlib -I ../../stdlib -I ../unix
+CAMLC=../../ocamlcomp.sh -I ../unix
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
-COMPFLAGS=-w +33..39 -warn-error A
-CAMLC_BIN_CMD=$(CAMLC_BIN_CMD_TO_EVAL) -nostdlib -I ../../stdlib
+COMPFLAGS=-w +33..39 -warn-error A -bin-annot
C_OBJS=scheduler.o
@@ -54,13 +53,13 @@ libvmthreads.a: $(C_OBJS)
$(MKLIB) -o threads -oc vmthreads $(C_OBJS)
threads.cma: $(CAML_OBJS)
- $(MKLIB) -ocamlc "$$($(CAMLC_BIN_CMD))" -o threads -oc vmthreads $(CAML_OBJS)
+ $(MKLIB) -ocamlc '$(CAMLC)' -o threads -oc vmthreads $(CAML_OBJS)
stdlib.cma: $(LIB_OBJS)
$(CAMLC) -a -o stdlib.cma $(LIB_OBJS)
unix.cma: $(UNIXLIB_OBJS)
- $(MKLIB) -ocamlc "$$($(CAMLC_BIN_CMD))" -o unix -linkall $(UNIXLIB_OBJS)
+ $(MKLIB) -ocamlc '$(CAMLC)' -o unix -linkall $(UNIXLIB_OBJS)
pervasives.cmo: pervasives.mli pervasives.cmi pervasives.ml
$(CAMLC) ${COMPFLAGS} -nopervasives -c pervasives.ml
@@ -117,7 +116,6 @@ installopt:
$(CAMLC) -c $(COMPFLAGS) $<
.ml.cmx:
- exit 1
$(CAMLOPT) -c $(COMPFLAGS) $<
depend:
diff --git a/otherlibs/unix/.depend b/otherlibs/unix/.depend
index 7cd527b19f..f3f79821d1 100644
--- a/otherlibs/unix/.depend
+++ b/otherlibs/unix/.depend
@@ -1,456 +1,498 @@
accept.o: accept.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
- socketaddr.h ../../byterun/misc.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
+ socketaddr.h ../../byterun/misc.h
access.o: access.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
addrofstr.o: addrofstr.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/fail.h \
- unixsupport.h socketaddr.h ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/fail.h \
+ unixsupport.h socketaddr.h ../../byterun/misc.h
alarm.o: alarm.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
bind.o: bind.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h socketaddr.h \
- ../../byterun/misc.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h socketaddr.h ../../byterun/misc.h
chdir.o: chdir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
chmod.o: chmod.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
chown.o: chown.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
chroot.o: chroot.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
close.o: close.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/signals.h \
+ ../../byterun/mlvalues.h unixsupport.h
closedir.o: closedir.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
connect.o: connect.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h \
- socketaddr.h ../../byterun/misc.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h \
+ socketaddr.h ../../byterun/misc.h
cst2constr.o: cst2constr.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
- cst2constr.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
+ cst2constr.h
cstringv.o: cstringv.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
dup.o: dup.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
dup2.o: dup2.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
envir.o: envir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h
errmsg.o: errmsg.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h
execv.o: execv.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
execve.o: execve.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
execvp.o: execvp.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h
exit.o: exit.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
fchmod.o: fchmod.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h
fchown.o: fchown.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h
fcntl.o: fcntl.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h
fork.o: fork.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h \
- ../../byterun/debugger.h ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h \
+ ../../byterun/debugger.h ../../byterun/mlvalues.h unixsupport.h
ftruncate.o: ftruncate.c ../../byterun/fail.h \
- ../../byterun/compatibility.h ../../byterun/misc.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h ../../byterun/io.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/misc.h \
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h ../../byterun/io.h ../../byterun/signals.h \
+ unixsupport.h
getaddrinfo.o: getaddrinfo.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
- cst2constr.h socketaddr.h ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
+ cst2constr.h socketaddr.h ../../byterun/misc.h
getcwd.o: getcwd.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/fail.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/fail.h unixsupport.h
getegid.o: getegid.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h unixsupport.h
geteuid.o: geteuid.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h unixsupport.h
getgid.o: getgid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
getgr.o: getgr.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/fail.h \
- ../../byterun/mlvalues.h ../../byterun/alloc.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/fail.h \
+ ../../byterun/mlvalues.h ../../byterun/alloc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h unixsupport.h
getgroups.o: getgroups.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h unixsupport.h
gethost.o: gethost.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
- socketaddr.h ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
+ socketaddr.h ../../byterun/misc.h
gethostname.o: gethostname.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h unixsupport.h
getlogin.o: getlogin.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ unixsupport.h
getnameinfo.o: getnameinfo.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
- socketaddr.h ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
+ socketaddr.h ../../byterun/misc.h
getpeername.o: getpeername.c ../../byterun/fail.h \
- ../../byterun/compatibility.h ../../byterun/misc.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h socketaddr.h \
- ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/misc.h \
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h socketaddr.h ../../byterun/misc.h
getpid.o: getpid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
getppid.o: getppid.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h unixsupport.h
getproto.o: getproto.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h unixsupport.h
getpw.o: getpw.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/fail.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/fail.h unixsupport.h
getserv.o: getserv.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h unixsupport.h
getsockname.o: getsockname.c ../../byterun/fail.h \
- ../../byterun/compatibility.h ../../byterun/misc.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h socketaddr.h \
- ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/misc.h \
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h socketaddr.h ../../byterun/misc.h
gettimeofday.o: gettimeofday.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h unixsupport.h
getuid.o: getuid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
gmtime.o: gmtime.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h unixsupport.h
initgroups.o: initgroups.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h unixsupport.h
isatty.o: isatty.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
itimer.o: itimer.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h unixsupport.h
kill.o: kill.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/fail.h \
- ../../byterun/mlvalues.h unixsupport.h ../../byterun/signals.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/fail.h \
+ ../../byterun/mlvalues.h unixsupport.h ../../byterun/signals.h
link.o: link.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
listen.o: listen.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h
lockf.o: lockf.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h ../../byterun/signals.h unixsupport.h
lseek.o: lseek.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/io.h ../../byterun/signals.h \
- unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/io.h ../../byterun/signals.h \
+ unixsupport.h
mkdir.o: mkdir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
mkfifo.o: mkfifo.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
nice.o: nice.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
open.o: open.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
opendir.o: opendir.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
+ ../../byterun/signals.h unixsupport.h
pipe.o: pipe.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h unixsupport.h
putenv.o: putenv.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/mlvalues.h unixsupport.h
read.o: read.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h \
- ../../byterun/signals.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
readdir.o: readdir.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
- ../../byterun/alloc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
+ ../../byterun/alloc.h ../../byterun/signals.h unixsupport.h
readlink.o: readlink.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
+ ../../byterun/fail.h ../../byterun/signals.h unixsupport.h
rename.o: rename.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
rewinddir.o: rewinddir.c ../../byterun/fail.h \
- ../../byterun/compatibility.h ../../byterun/misc.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/misc.h \
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h
rmdir.o: rmdir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
select.o: select.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
sendrecv.o: sendrecv.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
- socketaddr.h ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h \
+ socketaddr.h ../../byterun/misc.h
setgid.o: setgid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
setgroups.o: setgroups.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h unixsupport.h
setsid.o: setsid.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h
setuid.o: setuid.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
shutdown.o: shutdown.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h
signals.o: signals.c ../../byterun/alloc.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/mlvalues.h \
- ../../byterun/signals.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/mlvalues.h \
+ ../../byterun/signals.h unixsupport.h
sleep.o: sleep.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h \
- ../../byterun/signals.h ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/signals.h \
+ ../../byterun/mlvalues.h unixsupport.h
socket.o: socket.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h unixsupport.h
socketaddr.o: socketaddr.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h \
- socketaddr.h ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/memory.h ../../byterun/gc.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h unixsupport.h \
+ socketaddr.h ../../byterun/misc.h
socketpair.o: socketpair.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h unixsupport.h
sockopt.o: sockopt.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
- ../../byterun/fail.h unixsupport.h socketaddr.h ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
+ ../../byterun/fail.h unixsupport.h socketaddr.h ../../byterun/misc.h
stat.o: stat.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
- unixsupport.h cst2constr.h ../../byterun/io.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/alloc.h \
+ ../../byterun/signals.h unixsupport.h cst2constr.h ../../byterun/io.h
strofaddr.o: strofaddr.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h unixsupport.h socketaddr.h ../../byterun/misc.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h unixsupport.h socketaddr.h ../../byterun/misc.h
symlink.o: symlink.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
termios.o: termios.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/fail.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/fail.h unixsupport.h
time.o: time.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h unixsupport.h
times.o: times.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h unixsupport.h
truncate.o: truncate.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/fail.h ../../byterun/mlvalues.h \
- ../../byterun/io.h unixsupport.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h ../../byterun/fail.h \
+ ../../byterun/signals.h ../../byterun/io.h unixsupport.h
umask.o: umask.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
unixsupport.o: unixsupport.c ../../byterun/mlvalues.h \
- ../../byterun/compatibility.h ../../byterun/config.h \
- ../../byterun/../config/m.h ../../byterun/../config/s.h \
- ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
- ../../byterun/callback.h ../../byterun/memory.h ../../byterun/gc.h \
- ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/fail.h unixsupport.h \
- cst2constr.h
+ ../../byterun/compatibility.h ../../byterun/config.h \
+ ../../byterun/../config/m.h ../../byterun/../config/s.h \
+ ../../byterun/misc.h ../../byterun/alloc.h ../../byterun/mlvalues.h \
+ ../../byterun/callback.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/fail.h unixsupport.h cst2constr.h
unlink.o: unlink.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
utimes.o: utimes.c ../../byterun/fail.h ../../byterun/compatibility.h \
- ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/mlvalues.h \
- ../../byterun/mlvalues.h unixsupport.h
+ ../../byterun/misc.h ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/mlvalues.h \
+ ../../byterun/mlvalues.h ../../byterun/memory.h ../../byterun/gc.h \
+ ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
wait.o: wait.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
- ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
- ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
+ ../../byterun/mlvalues.h ../../byterun/fail.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/major_gc.h ../../byterun/freelist.h \
+ ../../byterun/minor_gc.h ../../byterun/signals.h unixsupport.h
write.o: write.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
- ../../byterun/config.h ../../byterun/../config/m.h \
- ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
- ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
- ../../byterun/freelist.h ../../byterun/minor_gc.h \
- ../../byterun/signals.h unixsupport.h
+ ../../byterun/config.h ../../byterun/../config/m.h \
+ ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/memory.h \
+ ../../byterun/gc.h ../../byterun/mlvalues.h ../../byterun/major_gc.h \
+ ../../byterun/freelist.h ../../byterun/minor_gc.h \
+ ../../byterun/signals.h unixsupport.h
unix.cmi :
unixLabels.cmi : unix.cmi
unix.cmo : unix.cmi
diff --git a/otherlibs/unix/access.c b/otherlibs/unix/access.c
index 3a612a3406..9af8a6f959 100644
--- a/otherlibs/unix/access.c
+++ b/otherlibs/unix/access.c
@@ -13,6 +13,8 @@
#include <mlvalues.h>
#include <alloc.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
#ifdef HAS_UNISTD
@@ -40,11 +42,17 @@ static int access_permission_table[] = {
CAMLprim value unix_access(value path, value perms)
{
+ CAMLparam2(path, perms);
+ char * p;
int ret, cv_flags;
cv_flags = convert_flag_list(perms, access_permission_table);
- ret = access(String_val(path), cv_flags);
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = access(p, cv_flags);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1)
uerror("access", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/chdir.c b/otherlibs/unix/chdir.c
index e7ea6f5058..4b93b5fc80 100644
--- a/otherlibs/unix/chdir.c
+++ b/otherlibs/unix/chdir.c
@@ -12,12 +12,20 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_chdir(value path)
{
+ CAMLparam1(path);
+ char * p;
int ret;
- ret = chdir(String_val(path));
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = chdir(p);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1) uerror("chdir", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/chmod.c b/otherlibs/unix/chmod.c
index ed2e88c8d7..a042155211 100644
--- a/otherlibs/unix/chmod.c
+++ b/otherlibs/unix/chmod.c
@@ -14,12 +14,20 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_chmod(value path, value perm)
{
+ CAMLparam2(path, perm);
+ char * p;
int ret;
- ret = chmod(String_val(path), Int_val(perm));
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = chmod(p, Int_val(perm));
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1) uerror("chmod", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/chown.c b/otherlibs/unix/chown.c
index a26f7a8690..0b118fb40a 100644
--- a/otherlibs/unix/chown.c
+++ b/otherlibs/unix/chown.c
@@ -12,12 +12,20 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_chown(value path, value uid, value gid)
{
+ CAMLparam1(path);
+ char * p;
int ret;
- ret = chown(String_val(path), Int_val(uid), Int_val(gid));
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = chown(p, Int_val(uid), Int_val(gid));
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1) uerror("chown", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/chroot.c b/otherlibs/unix/chroot.c
index 02a46aedcf..7c9517c117 100644
--- a/otherlibs/unix/chroot.c
+++ b/otherlibs/unix/chroot.c
@@ -12,12 +12,20 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_chroot(value path)
{
+ CAMLparam1(path);
+ char * p;
int ret;
- ret = chroot(String_val(path));
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = chroot(p);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1) uerror("chroot", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/close.c b/otherlibs/unix/close.c
index 425502aac4..8a56c413b9 100644
--- a/otherlibs/unix/close.c
+++ b/otherlibs/unix/close.c
@@ -12,10 +12,15 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_close(value fd)
{
- if (close(Int_val(fd)) == -1) uerror("close", Nothing);
+ int ret;
+ caml_enter_blocking_section();
+ ret = close(Int_val(fd));
+ caml_leave_blocking_section();
+ if (ret == -1) uerror("close", Nothing);
return Val_unit;
}
diff --git a/otherlibs/unix/closedir.c b/otherlibs/unix/closedir.c
index ba9e743754..4196acd4e1 100644
--- a/otherlibs/unix/closedir.c
+++ b/otherlibs/unix/closedir.c
@@ -12,6 +12,8 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
#include <errno.h>
#include <sys/types.h>
@@ -23,9 +25,12 @@
CAMLprim value unix_closedir(value vd)
{
+ CAMLparam1(vd);
DIR * d = DIR_Val(vd);
if (d == (DIR *) NULL) unix_error(EBADF, "closedir", Nothing);
+ caml_enter_blocking_section();
closedir(d);
+ caml_leave_blocking_section();
DIR_Val(vd) = (DIR *) NULL;
- return Val_unit;
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/fchmod.c b/otherlibs/unix/fchmod.c
index a6e8ee9033..711097eb47 100644
--- a/otherlibs/unix/fchmod.c
+++ b/otherlibs/unix/fchmod.c
@@ -15,13 +15,18 @@
#include <sys/stat.h>
#include <fail.h>
#include <mlvalues.h>
+#include <signals.h>
#include "unixsupport.h"
#ifdef HAS_FCHMOD
CAMLprim value unix_fchmod(value fd, value perm)
{
- if (fchmod(Int_val(fd), Int_val(perm)) == -1) uerror("fchmod", Nothing);
+ int result;
+ caml_enter_blocking_section();
+ result = fchmod(Int_val(fd), Int_val(perm));
+ caml_leave_blocking_section();
+ if (result == -1) uerror("fchmod", Nothing);
return Val_unit;
}
diff --git a/otherlibs/unix/fchown.c b/otherlibs/unix/fchown.c
index 574d3c42b8..2a6746ca64 100644
--- a/otherlibs/unix/fchown.c
+++ b/otherlibs/unix/fchown.c
@@ -13,14 +13,18 @@
#include <fail.h>
#include <mlvalues.h>
+#include <signals.h>
#include "unixsupport.h"
#ifdef HAS_FCHMOD
CAMLprim value unix_fchown(value fd, value uid, value gid)
{
- if (fchown(Int_val(fd), Int_val(uid), Int_val(gid)) == -1)
- uerror("fchown", Nothing);
+ int result;
+ caml_enter_blocking_section();
+ result = fchown(Int_val(fd), Int_val(uid), Int_val(gid));
+ caml_leave_blocking_section();
+ if (result == -1) uerror("fchown", Nothing);
return Val_unit;
}
diff --git a/otherlibs/unix/ftruncate.c b/otherlibs/unix/ftruncate.c
index f539a6450d..ec494ba525 100644
--- a/otherlibs/unix/ftruncate.c
+++ b/otherlibs/unix/ftruncate.c
@@ -15,6 +15,7 @@
#include <fail.h>
#include <mlvalues.h>
#include <io.h>
+#include <signals.h>
#include "unixsupport.h"
#ifdef HAS_UNISTD
#include <unistd.h>
@@ -24,15 +25,22 @@
CAMLprim value unix_ftruncate(value fd, value len)
{
- if (ftruncate(Int_val(fd), Long_val(len)) == -1)
- uerror("ftruncate", Nothing);
+ int result;
+ caml_enter_blocking_section();
+ result = ftruncate(Int_val(fd), Long_val(len));
+ caml_leave_blocking_section();
+ if (result == -1) uerror("ftruncate", Nothing);
return Val_unit;
}
CAMLprim value unix_ftruncate_64(value fd, value len)
{
- if (ftruncate(Int_val(fd), File_offset_val(len)) == -1)
- uerror("ftruncate", Nothing);
+ int result;
+ file_offset ofs = File_offset_val(len);
+ caml_enter_blocking_section();
+ result = ftruncate(Int_val(fd), ofs);
+ caml_leave_blocking_section();
+ if (result == -1) uerror("ftruncate", Nothing);
return Val_unit;
}
diff --git a/otherlibs/unix/gethost.c b/otherlibs/unix/gethost.c
index e155152f8f..607b6c35f8 100644
--- a/otherlibs/unix/gethost.c
+++ b/otherlibs/unix/gethost.c
@@ -127,8 +127,7 @@ CAMLprim value unix_gethostbyname(value name)
char * hostname;
#if HAS_GETHOSTBYNAME_R || GETHOSTBYNAME_IS_REENTRANT
- hostname = caml_stat_alloc(string_length(name) + 1);
- strcpy(hostname, String_val(name));
+ hostname = caml_stat_alloc_string(name);
#else
hostname = String_val(name);
#endif
diff --git a/otherlibs/unix/link.c b/otherlibs/unix/link.c
index b5051cd96e..8110bf5830 100644
--- a/otherlibs/unix/link.c
+++ b/otherlibs/unix/link.c
@@ -12,10 +12,23 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_link(value path1, value path2)
{
- if (link(String_val(path1), String_val(path2)) == -1) uerror("link", path2);
- return Val_unit;
+ CAMLparam2(path1, path2);
+ char * p1;
+ char * p2;
+ int ret;
+ p1 = caml_stat_alloc_string(path1);
+ p2 = caml_stat_alloc_string(path2);
+ caml_enter_blocking_section();
+ ret = link(p1, p2);
+ caml_leave_blocking_section();
+ caml_stat_free(p1);
+ caml_stat_free(p2);
+ if (ret == -1) uerror("link", path2);
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/mkdir.c b/otherlibs/unix/mkdir.c
index 0bb1f4f5fe..6a7bb18c24 100644
--- a/otherlibs/unix/mkdir.c
+++ b/otherlibs/unix/mkdir.c
@@ -14,10 +14,20 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_mkdir(value path, value perm)
{
- if (mkdir(String_val(path), Int_val(perm)) == -1) uerror("mkdir", path);
- return Val_unit;
+ CAMLparam2(path, perm);
+ char * p;
+ int ret;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = mkdir(p, Int_val(perm));
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1) uerror("mkdir", path);
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/mkfifo.c b/otherlibs/unix/mkfifo.c
index ec3bed4bbd..ef440a25bc 100644
--- a/otherlibs/unix/mkfifo.c
+++ b/otherlibs/unix/mkfifo.c
@@ -15,15 +15,25 @@
#include <sys/stat.h>
#include <fail.h>
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
#ifdef HAS_MKFIFO
CAMLprim value unix_mkfifo(value path, value mode)
{
- if (mkfifo(String_val(path), Int_val(mode)) == -1)
+ CAMLparam2(path, mode);
+ char * p;
+ int ret;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = mkfifo(p, Int_val(mode));
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1)
uerror("mkfifo", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
#else
@@ -35,9 +45,17 @@ CAMLprim value unix_mkfifo(value path, value mode)
CAMLprim value unix_mkfifo(value path, value mode)
{
- if (mknod(String_val(path), (Int_val(mode) & 07777) | S_IFIFO, 0) == -1)
+ CAMLparam2(path, mode);
+ char * p;
+ int ret;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = mknod(p, (Int_val(mode) & 07777) | S_IFIFO, 0);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1)
uerror("mkfifo", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
#else
diff --git a/otherlibs/unix/open.c b/otherlibs/unix/open.c
index ecee013898..c98819aab4 100644
--- a/otherlibs/unix/open.c
+++ b/otherlibs/unix/open.c
@@ -62,8 +62,7 @@ CAMLprim value unix_open(value path, value flags, value perm)
char * p;
cv_flags = convert_flag_list(flags, open_flag_table);
- p = caml_stat_alloc(string_length(path) + 1);
- strcpy(p, String_val(path));
+ p = caml_stat_alloc_string(path);
/* open on a named FIFO can block (PR#1533) */
enter_blocking_section();
fd = open(p, cv_flags, Int_val(perm));
diff --git a/otherlibs/unix/opendir.c b/otherlibs/unix/opendir.c
index f70e708bdc..57a3318889 100644
--- a/otherlibs/unix/opendir.c
+++ b/otherlibs/unix/opendir.c
@@ -12,7 +12,9 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
#include <alloc.h>
+#include <signals.h>
#include "unixsupport.h"
#include <sys/types.h>
#ifdef HAS_DIRENT
@@ -23,11 +25,18 @@
CAMLprim value unix_opendir(value path)
{
+ CAMLparam1(path);
DIR * d;
value res;
- d = opendir(String_val(path));
+ char * p;
+
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ d = opendir(p);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (d == (DIR *) NULL) uerror("opendir", path);
res = alloc_small(1, Abstract_tag);
DIR_Val(res) = d;
- return res;
+ CAMLreturn(res);
}
diff --git a/otherlibs/unix/readdir.c b/otherlibs/unix/readdir.c
index 08dad1a06d..e6daf5f61c 100644
--- a/otherlibs/unix/readdir.c
+++ b/otherlibs/unix/readdir.c
@@ -14,6 +14,7 @@
#include <mlvalues.h>
#include <fail.h>
#include <alloc.h>
+#include <signals.h>
#include "unixsupport.h"
#include <errno.h>
#include <sys/types.h>
@@ -31,7 +32,9 @@ CAMLprim value unix_readdir(value vd)
directory_entry * e;
d = DIR_Val(vd);
if (d == (DIR *) NULL) unix_error(EBADF, "readdir", Nothing);
+ caml_enter_blocking_section();
e = readdir((DIR *) d);
+ caml_leave_blocking_section();
if (e == (directory_entry *) NULL) raise_end_of_file();
return copy_string(e->d_name);
}
diff --git a/otherlibs/unix/readlink.c b/otherlibs/unix/readlink.c
index 9534a42bde..d129aebfed 100644
--- a/otherlibs/unix/readlink.c
+++ b/otherlibs/unix/readlink.c
@@ -12,8 +12,10 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
#include <alloc.h>
#include <fail.h>
+#include <signals.h>
#ifdef HAS_SYMLINK
@@ -30,12 +32,18 @@
CAMLprim value unix_readlink(value path)
{
+ CAMLparam1(path);
char buffer[PATH_MAX];
int len;
- len = readlink(String_val(path), buffer, sizeof(buffer) - 1);
+ char * p;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ len = readlink(p, buffer, sizeof(buffer) - 1);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (len == -1) uerror("readlink", path);
buffer[len] = '\0';
- return copy_string(buffer);
+ CAMLreturn(copy_string(buffer));
}
#else
diff --git a/otherlibs/unix/rename.c b/otherlibs/unix/rename.c
index 2d34a8833f..e63a06e364 100644
--- a/otherlibs/unix/rename.c
+++ b/otherlibs/unix/rename.c
@@ -13,11 +13,24 @@
#include <stdio.h>
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_rename(value path1, value path2)
{
- if (rename(String_val(path1), String_val(path2)) == -1)
+ CAMLparam2(path1, path2);
+ char * p1;
+ char * p2;
+ int ret;
+ p1 = caml_stat_alloc_string(path1);
+ p2 = caml_stat_alloc_string(path2);
+ caml_enter_blocking_section();
+ ret = rename(p1, p2);
+ caml_leave_blocking_section();
+ caml_stat_free(p2);
+ caml_stat_free(p1);
+ if (ret == -1)
uerror("rename", path1);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/rmdir.c b/otherlibs/unix/rmdir.c
index 631b47c0e3..28cef33d8f 100644
--- a/otherlibs/unix/rmdir.c
+++ b/otherlibs/unix/rmdir.c
@@ -12,10 +12,20 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_rmdir(value path)
{
- if (rmdir(String_val(path)) == -1) uerror("rmdir", path);
- return Val_unit;
+ CAMLparam1(path);
+ char * p;
+ int ret;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = rmdir(p);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1) uerror("rmdir", path);
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/stat.c b/otherlibs/unix/stat.c
index a0f4c343d9..9825802a0a 100644
--- a/otherlibs/unix/stat.c
+++ b/otherlibs/unix/stat.c
@@ -15,6 +15,7 @@
#include <mlvalues.h>
#include <memory.h>
#include <alloc.h>
+#include <signals.h>
#include "unixsupport.h"
#include "cst2constr.h"
#include <sys/types.h>
@@ -70,35 +71,49 @@ static value stat_aux(int use_64, struct stat *buf)
CAMLprim value unix_stat(value path)
{
+ CAMLparam1(path);
int ret;
struct stat buf;
- ret = stat(String_val(path), &buf);
+ char * p;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = stat(p, &buf);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1) uerror("stat", path);
if (buf.st_size > Max_long && (buf.st_mode & S_IFMT) == S_IFREG)
unix_error(EOVERFLOW, "stat", path);
- return stat_aux(0, &buf);
+ CAMLreturn(stat_aux(0, &buf));
}
CAMLprim value unix_lstat(value path)
{
+ CAMLparam1(path);
int ret;
struct stat buf;
+ char * p;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
#ifdef HAS_SYMLINK
- ret = lstat(String_val(path), &buf);
+ ret = lstat(p, &buf);
#else
- ret = stat(String_val(path), &buf);
+ ret = stat(p, &buf);
#endif
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1) uerror("lstat", path);
if (buf.st_size > Max_long && (buf.st_mode & S_IFMT) == S_IFREG)
unix_error(EOVERFLOW, "lstat", path);
- return stat_aux(0, &buf);
+ CAMLreturn(stat_aux(0, &buf));
}
CAMLprim value unix_fstat(value fd)
{
int ret;
struct stat buf;
+ caml_enter_blocking_section();
ret = fstat(Int_val(fd), &buf);
+ caml_leave_blocking_section();
if (ret == -1) uerror("fstat", Nothing);
if (buf.st_size > Max_long && (buf.st_mode & S_IFMT) == S_IFREG)
unix_error(EOVERFLOW, "fstat", Nothing);
@@ -107,31 +122,45 @@ CAMLprim value unix_fstat(value fd)
CAMLprim value unix_stat_64(value path)
{
+ CAMLparam1(path);
int ret;
struct stat buf;
- ret = stat(String_val(path), &buf);
+ char * p;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = stat(p, &buf);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1) uerror("stat", path);
- return stat_aux(1, &buf);
+ CAMLreturn(stat_aux(1, &buf));
}
CAMLprim value unix_lstat_64(value path)
{
+ CAMLparam1(path);
int ret;
struct stat buf;
+ char * p;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
#ifdef HAS_SYMLINK
- ret = lstat(String_val(path), &buf);
+ ret = lstat(p, &buf);
#else
- ret = stat(String_val(path), &buf);
+ ret = stat(p, &buf);
#endif
+ caml_leave_blocking_section();
+ caml_stat_free(p);
if (ret == -1) uerror("lstat", path);
- return stat_aux(1, &buf);
+ CAMLreturn(stat_aux(1, &buf));
}
CAMLprim value unix_fstat_64(value fd)
{
int ret;
struct stat buf;
+ caml_enter_blocking_section();
ret = fstat(Int_val(fd), &buf);
+ caml_leave_blocking_section();
if (ret == -1) uerror("fstat", Nothing);
return stat_aux(1, &buf);
}
diff --git a/otherlibs/unix/symlink.c b/otherlibs/unix/symlink.c
index 26c9aa43ce..41ba020190 100644
--- a/otherlibs/unix/symlink.c
+++ b/otherlibs/unix/symlink.c
@@ -13,15 +13,28 @@
#include <fail.h>
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
#ifdef HAS_SYMLINK
CAMLprim value unix_symlink(value path1, value path2)
{
- if (symlink(String_val(path1), String_val(path2)) == -1)
+ CAMLparam2(path1, path2);
+ char * p1;
+ char * p2;
+ int ret;
+ p1 = caml_stat_alloc_string(path1);
+ p2 = caml_stat_alloc_string(path2);
+ caml_enter_blocking_section();
+ ret = symlink(p1, p2);
+ caml_leave_blocking_section();
+ caml_stat_free(p1);
+ caml_stat_free(p2);
+ if (ret == -1)
uerror("symlink", path2);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
#else
diff --git a/otherlibs/unix/truncate.c b/otherlibs/unix/truncate.c
index 638ef79947..c5b3a11591 100644
--- a/otherlibs/unix/truncate.c
+++ b/otherlibs/unix/truncate.c
@@ -13,7 +13,9 @@
#include <sys/types.h>
#include <mlvalues.h>
+#include <memory.h>
#include <fail.h>
+#include <signals.h>
#include <io.h>
#include "unixsupport.h"
#ifdef HAS_UNISTD
@@ -24,16 +26,33 @@
CAMLprim value unix_truncate(value path, value len)
{
- if (truncate(String_val(path), Long_val(len)) == -1)
+ CAMLparam2(path, len);
+ char * p;
+ int ret;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = truncate(p, Long_val(len));
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1)
uerror("truncate", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
-CAMLprim value unix_truncate_64(value path, value len)
+CAMLprim value unix_truncate_64(value path, value vlen)
{
- if (truncate(String_val(path), File_offset_val(len)) == -1)
+ CAMLparam2(path, vlen);
+ char * p;
+ int ret;
+ file_offset len = File_offset_val(vlen);
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = truncate(p, len);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1)
uerror("truncate", path);
- return Val_unit;
+ CAMLreturn(Val_unit);
}
#else
diff --git a/otherlibs/unix/unix.mli b/otherlibs/unix/unix.mli
index ef93d4e012..d8a15753eb 100644
--- a/otherlibs/unix/unix.mli
+++ b/otherlibs/unix/unix.mli
@@ -244,7 +244,6 @@ type open_flag =
while still open *)
| O_CLOEXEC (** Set the close-on-exec flag on the
descriptor returned by {!openfile} *)
-
(** The flags to {!Unix.openfile}. *)
@@ -1102,7 +1101,9 @@ val open_connection : sockaddr -> in_channel * out_channel
val shutdown_connection : in_channel -> unit
(** ``Shut down'' a connection established with {!Unix.open_connection};
that is, transmit an end-of-file condition to the server reading
- on the other side of the connection. *)
+ on the other side of the connection. This does not fully close the
+ file descriptor associated with the channel, which you must remember
+ to free via {!Pervasives.close_in}. *)
val establish_server : (in_channel -> out_channel -> unit) -> sockaddr -> unit
(** Establish a server on the given address.
diff --git a/otherlibs/unix/unlink.c b/otherlibs/unix/unlink.c
index 76ec913109..4a4a513e39 100644
--- a/otherlibs/unix/unlink.c
+++ b/otherlibs/unix/unlink.c
@@ -12,10 +12,20 @@
/***********************************************************************/
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
CAMLprim value unix_unlink(value path)
{
- if (unlink(String_val(path)) == -1) uerror("unlink", path);
- return Val_unit;
+ CAMLparam1(path);
+ char * p;
+ int ret;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = unlink(p);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1) uerror("unlink", path);
+ CAMLreturn(Val_unit);
}
diff --git a/otherlibs/unix/utimes.c b/otherlibs/unix/utimes.c
index 825fc4cdfe..bb84c43e50 100644
--- a/otherlibs/unix/utimes.c
+++ b/otherlibs/unix/utimes.c
@@ -13,6 +13,8 @@
#include <fail.h>
#include <mlvalues.h>
+#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
#ifdef HAS_UTIME
@@ -26,15 +28,23 @@
CAMLprim value unix_utimes(value path, value atime, value mtime)
{
+ CAMLparam3(path, atime, mtime);
struct utimbuf times, * t;
+ char * p;
+ int ret;
times.actime = Double_val(atime);
times.modtime = Double_val(mtime);
if (times.actime || times.modtime)
t = &times;
else
t = (struct utimbuf *) NULL;
- if (utime(String_val(path), t) == -1) uerror("utimes", path);
- return Val_unit;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = utime(p, t);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1) uerror("utimes", path);
+ CAMLreturn(Val_unit);
}
#else
@@ -46,7 +56,10 @@ CAMLprim value unix_utimes(value path, value atime, value mtime)
CAMLprim value unix_utimes(value path, value atime, value mtime)
{
+ CAMLparam3(path, atime, mtime);
struct timeval tv[2], * t;
+ char * p;
+ int ret;
double at = Double_val(atime);
double mt = Double_val(mtime);
tv[0].tv_sec = at;
@@ -57,8 +70,13 @@ CAMLprim value unix_utimes(value path, value atime, value mtime)
t = tv;
else
t = (struct timeval *) NULL;
- if (utimes(String_val(path), t) == -1) uerror("utimes", path);
- return Val_unit;
+ p = caml_stat_alloc_string(path);
+ caml_enter_blocking_section();
+ ret = utimes(p, t);
+ caml_leave_blocking_section();
+ caml_stat_free(p);
+ if (ret == -1) uerror("utimes", path);
+ CAMLreturn(Val_unit);
}
#else
diff --git a/otherlibs/win32unix/select.c b/otherlibs/win32unix/select.c
index 9f06024f99..d4afe49866 100644
--- a/otherlibs/win32unix/select.c
+++ b/otherlibs/win32unix/select.c
@@ -602,7 +602,7 @@ LPSELECTDATA socket_poll_add (LPSELECTDATA lpSelectData,
{
LPSELECTDATA res;
LPSELECTDATA candidate;
- DWORD i;
+ long i;
LPSELECTQUERY aQueries;
res = lpSelectData;