mirror of
https://github.com/composewell/streamly.git
synced 2024-10-03 22:38:16 +03:00
Support FreeBSD in streamly-core
This commit is contained in:
parent
755c99de1a
commit
e4ce30bd63
@ -91,7 +91,7 @@ import Streamly.Data.Stream (Stream)
|
||||
import Streamly.Internal.Data.Unfold (Step(..))
|
||||
import Streamly.Internal.Data.Unfold.Type (Unfold(..))
|
||||
import System.FilePath ((</>))
|
||||
#if (defined linux_HOST_OS) || (defined darwin_HOST_OS)
|
||||
#if (defined linux_HOST_OS) || (defined darwin_HOST_OS) || (defined freebsd_HOST_OS)
|
||||
import System.Posix (DirStream, openDirStream, readDirStream, closeDirStream)
|
||||
#elif defined(mingw32_HOST_OS)
|
||||
import qualified System.Win32 as Win32
|
||||
@ -239,7 +239,7 @@ toStreamWithBufferOf chunkSize h = AS.concat $ toChunksWithBufferOf chunkSize h
|
||||
|
||||
-- XXX exception handling
|
||||
|
||||
#if (defined linux_HOST_OS) || (defined darwin_HOST_OS)
|
||||
#if (defined linux_HOST_OS) || (defined darwin_HOST_OS) || (defined freebsd_HOST_OS)
|
||||
{-# INLINE streamReader #-}
|
||||
streamReader :: MonadIO m => Unfold m DirStream FilePath
|
||||
streamReader = Unfold step return
|
||||
|
@ -545,7 +545,7 @@ library
|
||||
if !flag(use-unliftio)
|
||||
build-depends: monad-control >= 1.0 && < 1.1
|
||||
|
||||
if os(linux) || os (darwin)
|
||||
if os(linux) || os (darwin) || os(freebsd)
|
||||
build-depends: unix >= 2.7.0 && < 2.9
|
||||
|
||||
if os(windows)
|
||||
|
@ -386,6 +386,8 @@ test-suite FileSystem.Event
|
||||
ghc-options: -main-is Streamly.Test.FileSystem.Event
|
||||
main-is: Streamly/Test/FileSystem/Event.hs
|
||||
other-modules: Streamly.Test.FileSystem.Event.Common
|
||||
if !(os(linux) || os(darwin) || os(windows))
|
||||
buildable: False
|
||||
if flag(use-streamly-core)
|
||||
buildable: False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user