diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2023-03-31 12:32:26 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-04-03 08:17:16 -0400 |
commit | a8e36892689bd6b8fb472844f79aeeddeda92e0a (patch) | |
tree | fdeaed283bbf804c3d32488cc1229c958c3b1c11 /libraries/base/System/Posix | |
parent | 53e4d513a55df3c13424e7b649ce85b8113fa4c2 (diff) | |
download | haskell-a8e36892689bd6b8fb472844f79aeeddeda92e0a.tar.gz |
JS: fix issues with FD api support
- Add missing implementations for fcntl_read/write/lock
- Fix fdGetMode
These were found while implementing TH in !9779. These functions must be
used somehow by the external interpreter code.
Diffstat (limited to 'libraries/base/System/Posix')
-rw-r--r-- | libraries/base/System/Posix/Internals.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index 89fa80672f..244e46f496 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/System/Posix/Internals.hs @@ -139,10 +139,10 @@ ioe_unknownfiletype = IOError Nothing UnsupportedOperation "fdType" Nothing fdGetMode :: FD -> IO IOMode -#if defined(mingw32_HOST_OS) +#if defined(mingw32_HOST_OS) || defined(javascript_HOST_ARCH) fdGetMode _ = do -- We don't have a way of finding out which flags are set on FDs - -- on Windows, so make a handle that thinks that anything goes. + -- on Windows/JS, so make a handle that thinks that anything goes. let flags = o_RDWR #else fdGetMode fd = do |