summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/unixsupport.h
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/unixsupport.h
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/unixsupport.h')
-rw-r--r--otherlibs/win32unix/unixsupport.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/otherlibs/win32unix/unixsupport.h b/otherlibs/win32unix/unixsupport.h
index fc0ace1bd..2b1ff71ea 100644
--- a/otherlibs/win32unix/unixsupport.h
+++ b/otherlibs/win32unix/unixsupport.h
@@ -31,16 +31,19 @@ struct filedescr {
SOCKET socket;
} fd;
enum { KIND_HANDLE, KIND_SOCKET } kind;
+ int crt_fd;
};
#define Handle_val(v) (((struct filedescr *) Data_custom_val(v))->fd.handle)
#define Socket_val(v) (((struct filedescr *) Data_custom_val(v))->fd.socket)
#define Descr_kind_val(v) (((struct filedescr *) Data_custom_val(v))->kind)
+#define CRT_fd_val(v) (((struct filedescr *) Data_custom_val(v))->crt_fd)
extern value win_alloc_handle_or_socket(HANDLE);
extern value win_alloc_handle(HANDLE);
extern value win_alloc_socket(SOCKET);
+#define NO_CRT_FD (-1)
#define Nothing ((value) 0)
extern void win32_maperr(unsigned long errcode);