| Attached Files | unified_fd_of_val.patch [^] (1,096 bytes) 2011-04-07 02:02 [Show Content] [Hide Content]diff -urN ocaml-3.12.0.orig/otherlibs/unix/unixsupport.h ocaml-3.12.0/otherlibs/unix/unixsupport.h
--- ocaml-3.12.0.orig/otherlibs/unix/unixsupport.h 2011-04-06 18:44:37.000000000 -0500
+++ ocaml-3.12.0/otherlibs/unix/unixsupport.h 2011-04-06 18:56:48.000000000 -0500
@@ -23,6 +23,8 @@
extern void unix_error (int errcode, char * cmdname, value arg) Noreturn;
extern void uerror (char * cmdname, value arg) Noreturn;
+#define Fd_of_val(handle) Int_val(handle)
+
#define UNIX_BUFFER_SIZE 16384
#define DIR_Val(v) *((DIR **) &Field(v, 0))
diff -urN ocaml-3.12.0.orig/otherlibs/win32unix/unixsupport.h ocaml-3.12.0/otherlibs/win32unix/unixsupport.h
--- ocaml-3.12.0.orig/otherlibs/win32unix/unixsupport.h 2011-04-06 18:44:37.000000000 -0500
+++ ocaml-3.12.0/otherlibs/win32unix/unixsupport.h 2011-04-06 18:55:13.000000000 -0500
@@ -42,6 +42,7 @@
extern value win_alloc_handle(HANDLE);
extern value win_alloc_socket(SOCKET);
extern int win_CRT_fd_of_filedescr(value handle);
+#define Fd_of_val(handle) win_CRT_fd_of_filedescr(handle)
#define NO_CRT_FD (-1)
#define Nothing ((value) 0)
|