diff options
author | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2019-12-09 15:41:57 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-24 01:03:44 -0500 |
commit | 3c12355ece0fa14e534c71a9f7327eda9773fad9 (patch) | |
tree | 9e3f9de932d5761e78aedf52b958d9a817fb1efa /libraries/base | |
parent | 70e56b272492b65e41a149ec39a939e794fea66b (diff) | |
download | haskell-3c12355ece0fa14e534c71a9f7327eda9773fad9.tar.gz |
Fix endian handling w.r.t. CPP macro WORDS_BIGENDIAN
Include header file `ghcautoconf.h` where the CPP macro
`WORDS_BIGENDIAN` is defined. This finally fixes #17337 (in conjunction
with commit 6c59cc71dc).
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/ByteOrder.hs | 3 | ||||
-rw-r--r-- | libraries/base/GHC/IO/Encoding/CodePage/API.hs | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libraries/base/GHC/ByteOrder.hs b/libraries/base/GHC/ByteOrder.hs index 8a42e8df71..9b647ceb1f 100644 --- a/libraries/base/GHC/ByteOrder.hs +++ b/libraries/base/GHC/ByteOrder.hs @@ -17,6 +17,9 @@ module GHC.ByteOrder where +-- Required for WORDS_BIGENDIAN +#include "ghcautoconf.h" + -- | Byte ordering. data ByteOrder = BigEndian -- ^ most-significant-byte occurs in lowest address. diff --git a/libraries/base/GHC/IO/Encoding/CodePage/API.hs b/libraries/base/GHC/IO/Encoding/CodePage/API.hs index b31ebe96f5..bf73f07a24 100644 --- a/libraries/base/GHC/IO/Encoding/CodePage/API.hs +++ b/libraries/base/GHC/IO/Encoding/CodePage/API.hs @@ -7,6 +7,9 @@ module GHC.IO.Encoding.CodePage.API ( mkCodePageEncoding ) where +-- Required for WORDS_BIGENDIAN +#include "ghcautoconf.h" + import Foreign.C import Foreign.Ptr import Foreign.Marshal |