Commit 254849fc authored by sof's avatar sof
Browse files

[project @ 2001-11-26 19:43:23 by sof]

win32 only - provide closeFd, which closes a file descriptor, be it of
file or socket ilk.
parent dbef766c
...@@ -269,6 +269,16 @@ foreign import "isatty" unsafe ...@@ -269,6 +269,16 @@ foreign import "isatty" unsafe
foreign import "close" unsafe foreign import "close" unsafe
c_close :: CInt -> IO CInt c_close :: CInt -> IO CInt
#ifdef mingw32_TARGET_OS
closeFd :: Bool -> CInt -> IO CInt
closeFd isStream fd
| isStream = c_closesocket fd
| otherwise = c_close fd
foreign import "closesocket" unsafe
c_closesocket :: CInt -> IO CInt
#endif
foreign import "lseek" unsafe foreign import "lseek" unsafe
c_lseek :: CInt -> COff -> CInt -> IO COff c_lseek :: CInt -> COff -> CInt -> IO COff
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment