diff options
author | Alain Frisch <alain@frisch.fr> | 2011-12-13 16:18:13 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2011-12-13 16:18:13 +0000 |
commit | 84dd8601e0f37301b82aa035ceac32b0264b4748 (patch) | |
tree | 3ca62ca6c41424dad3b69db4f49fbb410716c6cc /otherlibs/unix | |
parent | d187828b8cab7db61101e9cea09fb035df96cf74 (diff) |
#5420: adding a O_SHARE_DELETE flag to Unix.openfile, for enabling FILE_SHARE_DELETE mode under Windows (ignored under Unix).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix')
-rw-r--r-- | otherlibs/unix/open.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/unix.ml | 1 | ||||
-rw-r--r-- | otherlibs/unix/unix.mli | 1 | ||||
-rw-r--r-- | otherlibs/unix/unixLabels.mli | 1 |
4 files changed, 4 insertions, 1 deletions
diff --git a/otherlibs/unix/open.c b/otherlibs/unix/open.c index 39c7328f9..214a550d3 100644 --- a/otherlibs/unix/open.c +++ b/otherlibs/unix/open.c @@ -36,7 +36,7 @@ static int open_flag_table[] = { O_RDONLY, O_WRONLY, O_RDWR, O_NONBLOCK, O_APPEND, O_CREAT, O_TRUNC, O_EXCL, - O_NOCTTY, O_DSYNC, O_SYNC, O_RSYNC + O_NOCTTY, O_DSYNC, O_SYNC, O_RSYNC, 0 }; CAMLprim value unix_open(value path, value flags, value perm) diff --git a/otherlibs/unix/unix.ml b/otherlibs/unix/unix.ml index eda85de0f..bfade0389 100644 --- a/otherlibs/unix/unix.ml +++ b/otherlibs/unix/unix.ml @@ -151,6 +151,7 @@ type open_flag = | O_DSYNC | O_SYNC | O_RSYNC + | O_SHARE_DELETE type file_perm = int diff --git a/otherlibs/unix/unix.mli b/otherlibs/unix/unix.mli index 38d1b9659..0cf4fdf20 100644 --- a/otherlibs/unix/unix.mli +++ b/otherlibs/unix/unix.mli @@ -238,6 +238,7 @@ type open_flag = | O_DSYNC (** Writes complete as `Synchronised I/O data integrity completion' *) | O_SYNC (** Writes complete as `Synchronised I/O file integrity completion' *) | O_RSYNC (** Reads complete as writes (depending on O_SYNC/O_DSYNC) *) + | O_SHARE_DELETE (** Windows only: open the file in FILE_SHARE_DELETE mode *) (** The flags to {!Unix.openfile}. *) diff --git a/otherlibs/unix/unixLabels.mli b/otherlibs/unix/unixLabels.mli index 702a656a4..db3fadf8d 100644 --- a/otherlibs/unix/unixLabels.mli +++ b/otherlibs/unix/unixLabels.mli @@ -240,6 +240,7 @@ type open_flag = Unix.open_flag = | O_DSYNC (** Writes complete as `Synchronised I/O data integrity completion' *) | O_SYNC (** Writes complete as `Synchronised I/O file integrity completion' *) | O_RSYNC (** Reads complete as writes (depending on O_SYNC/O_DSYNC) *) + | O_SHARE_DELETE (** Windows only: open the file in FILE_SHARE_DELETE mode *) (** The flags to {!UnixLabels.openfile}. *) |