Package: ocaml-batteries / 2.6.0-1

0003-Changes-of-OCaml-4.05-that-can-be-fixed-with-conditi.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
From: Stephane Glondu <steph@glondu.net>
Date: Thu, 20 Jul 2017 10:35:20 +0200
Subject: Changes of OCaml 4.05 that can be fixed with conditionals

---
 src/batUnix.mliv | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/batUnix.mliv b/src/batUnix.mliv
index d035f47..1870fb9 100644
--- a/src/batUnix.mliv
+++ b/src/batUnix.mliv
@@ -272,6 +272,7 @@ type open_flag = Unix.open_flag =
 ##V>=4.1##                                    descriptor returned by {!openfile}
 ##V>=4.1##
 ##V>=4.1##                                    Since OCaml 4.1 *)
+##V>=4.5##  | O_KEEPEXEC
 (** The flags to {!Unix.openfile}. *)
 
 
@@ -546,11 +547,15 @@ val access : string -> access_permission list -> unit
 (** {6 Operations on file descriptors} *)
 
 
-val dup : file_descr -> file_descr
+val dup :
+##V>=4.5##  ?cloexec:bool ->
+  file_descr -> file_descr
 (** Return a new file descriptor referencing the same file as
     the given descriptor. *)
 
-val dup2 : file_descr -> file_descr -> unit
+val dup2 :
+##V>=4.5##  ?cloexec:bool ->
+  file_descr -> file_descr -> unit
 (** [dup2 fd1 fd2] duplicates [fd1] to [fd2], closing [fd2] if already
     opened. *)
 
@@ -615,7 +620,9 @@ val closedir : dir_handle -> unit
 
 (** {6 Pipes and redirections} *)
 
-val pipe : unit -> file_descr * file_descr
+val pipe :
+##V>=4.5##  ?cloexec:bool ->
+  unit -> file_descr * file_descr
 (** Create a pipe. The first component of the result is opened
     for reading, that's the exit to the pipe. The second component is
     opened for writing, that's the entrance to the pipe. *)
@@ -1151,7 +1158,9 @@ type sockaddr = Unix.sockaddr =
       domain; [addr] is the Internet address of the machine, and
       [port] is the port number. *)
 
-val socket : socket_domain -> socket_type -> int -> file_descr
+val socket :
+##V>=4.5##  ?cloexec:bool ->
+  socket_domain -> socket_type -> int -> file_descr
 (** Create a new socket in the given domain, and with the
     given kind. The third argument is the protocol type; 0 selects
     the default protocol for that kind of sockets. *)
@@ -1160,10 +1169,13 @@ val domain_of_sockaddr: sockaddr -> socket_domain
 (** Return the socket domain adequate for the given socket address. *)
 
 val socketpair :
+##V>=4.5##  ?cloexec:bool ->
   socket_domain -> socket_type -> int -> file_descr * file_descr
 (** Create a pair of unnamed sockets, connected together. *)
 
-val accept : file_descr -> file_descr * sockaddr
+val accept :
+##V>=4.5##  ?cloexec:bool ->
+  file_descr -> file_descr * sockaddr
 (** Accept connections on the given socket. The returned descriptor
     is a socket connected to the client; the returned address is
     the address of the connecting client. *)