summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/unix.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2003-01-06 14:52:57 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2003-01-06 14:52:57 +0000
commit5ba5d54bd13b2aaa6a25c2b417eec029ae97c60d (patch)
tree12508a09005982191c864954c04d2d88d1fc8718 /otherlibs/win32unix/unix.ml
parent22649ba49d07a90212117bb4779dd3c60be0845c (diff)
Lorsqu'un file_descr provient d'un fd du CRT, s'en souvenir et en tenir compte quand on fait Unix.dup2 (PR#1509). Remplacement de stdhandle par filedescr_of_fd.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/unix.ml')
-rw-r--r--otherlibs/win32unix/unix.ml11
1 files changed, 4 insertions, 7 deletions
diff --git a/otherlibs/win32unix/unix.ml b/otherlibs/win32unix/unix.ml
index 5bec474e2..ed9c809cb 100644
--- a/otherlibs/win32unix/unix.ml
+++ b/otherlibs/win32unix/unix.ml
@@ -151,13 +151,11 @@ let nice prio = invalid_arg "Unix.nice not implemented"
(* Basic file input/output *)
-type standard_handle = STD_INPUT | STD_OUTPUT | STD_ERROR
-
-external stdhandle : standard_handle -> file_descr = "win_stdhandle"
+external filedescr_of_fd : int -> file_descr = "win_handle_fd"
-let stdin = stdhandle STD_INPUT
-let stdout = stdhandle STD_OUTPUT
-let stderr = stdhandle STD_ERROR
+let stdin = filedescr_of_fd 0
+let stdout = filedescr_of_fd 1
+let stderr = filedescr_of_fd 2
type open_flag =
O_RDONLY
@@ -200,7 +198,6 @@ external fd_of_in_channel : in_channel -> int = "channel_descriptor"
external fd_of_out_channel : out_channel -> int = "channel_descriptor"
external open_handle : file_descr -> int = "win_fd_handle"
-external filedescr_of_fd : int -> file_descr = "win_handle_fd"
let in_channel_of_descr handle =
open_read_descriptor(open_handle handle)