Commit c3d8dadc authored by Stefan Schulze Frielinghaus's avatar Stefan Schulze Frielinghaus Committed by Ben Gamari

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 6c59cc71).

(cherry picked from commit 3c12355e)
(cherry picked from commit 11f8eef5)
parent a9bd5420
......@@ -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.
......
......@@ -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
......
{-# LANGUAGE CPP #-}
-- !!! Bug # 7600.
-- The LLVM backend can be tricky to get right with floating point constants
-- and GHC. See Note [LLVM Float Types] in compiler/llvmGen/Llvm/Types.hs for
......@@ -16,6 +17,9 @@
-- Also worth looking at ticket # 3676 about issues with 'realToFrac'.
module Main (main) where
-- Required for WORDS_BIGENDIAN
#include <ghcautoconf.h>
import T7600_A
-- a fp constant that requires double precision, but we only use a single
......
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