diff options
Diffstat (limited to 'otherlibs/win32unix/close.c')
-rw-r--r-- | otherlibs/win32unix/close.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/otherlibs/win32unix/close.c b/otherlibs/win32unix/close.c new file mode 100644 index 000000000..dfc5a1f52 --- /dev/null +++ b/otherlibs/win32unix/close.c @@ -0,0 +1,24 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1996 Institut National de Recherche en Informatique et */ +/* Automatique. Distributed only by permission. */ +/* */ +/***********************************************************************/ + +/* $Id$ */ + +#include <mlvalues.h> +#include "unixsupport.h" + +value unix_close(value fd) /* ML */ +{ + if (! CloseHandle(Handle_val(fd))) { + _dosmaperr(GetLastError()); + uerror("close", Nothing); + } + return Val_unit; +} |