diff options
author | Ian Lynagh <igloo@earth.li> | 2012-02-26 16:07:03 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-02-26 16:07:03 +0000 |
commit | e4165964c0b86e236e0b7bcbf3b5d3de2a8b03d0 (patch) | |
tree | 98b3834e33b3f474d7d2dd20b7ea88952c6942c4 /libraries/base/System/Posix | |
parent | 7ca5621212461277453502630ef2bcf8592f93f7 (diff) | |
download | haskell-e4165964c0b86e236e0b7bcbf3b5d3de2a8b03d0.tar.gz |
Use CAPI for lseek
Diffstat (limited to 'libraries/base/System/Posix')
-rw-r--r-- | libraries/base/System/Posix/Internals.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index de02e726b0..d2bd0e62a7 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/System/Posix/Internals.hs @@ -416,10 +416,13 @@ foreign import ccall unsafe "HsBase.h isatty" c_isatty :: CInt -> IO CInt #if defined(mingw32_HOST_OS) || defined(__MINGW32__) -foreign import ccall unsafe "HsBase.h __hscore_lseek" +foreign import ccall unsafe "io.h _lseeki64" c_lseek :: CInt -> Int64 -> CInt -> IO Int64 #else -foreign import ccall unsafe "HsBase.h __hscore_lseek" +-- We use CAPI as on some OSs (eg. Linux) this is wrapped by a macro +-- which redirects to the 64-bit-off_t versions when large file +-- support is enabled. +foreign import capi unsafe "unistd.h lseek" c_lseek :: CInt -> COff -> CInt -> IO COff #endif |