on master help sign in
Merge pull request #962 from hasufell/hasufell/PR/fix-armv7-build

Use WORD_SIZE_IN_BITS for Word32 guard

commitc3e5f2810b74c21cb202042a25c5a176517aad2b authorPranay Sashank <pranaysashank@composewell.com> dateTue 2 Mar 2021, 21:23 (6 years ago) parent34770c4f8380ce
2 files changed+8−3
src/Streamly/Internal/Data/Time/TimeSpec.hsc+3−1 src/Streamly/Internal/FileSystem/IOVec.hsc+5−2
src/Streamly/Internal/Data/Time/TimeSpec.hsc+3−1
@@ -9,6 +9,8 @@
99
1010#include "Streamly/Internal/Data/Time/Clock/config-clock.h"
1111
12+#include "MachDeps.h"
13+
1214-- |
1315-- Module : Streamly.Internal.Data.Time.TimeSpec
1416-- Copyright : (c) 2019 Composewell Technologies
@@ -24,7 +26,7 @@ module Streamly.Internal.Data.Time.TimeSpec
2426where
2527
2628import Data.Int (Int64)
27−#if i386_HOST_ARCH
29+#if (WORD_SIZE_IN_BITS == 32)
2830import Data.Int (Int32)
2931#endif
3032import Foreign.Storable (Storable(..), peek)
src/Streamly/Internal/FileSystem/IOVec.hsc+5−2
@@ -1,3 +1,5 @@
1+#include "MachDeps.h"
2+
13-- |
24-- Module : Streamly.Internal.FileSystem.IOVec
35-- Copyright : (c) 2019 Composewell Technologies
@@ -17,8 +19,9 @@ module Streamly.Internal.FileSystem.IOVec
1719 )
1820where
1921
22+
2023import Data.Word (Word8)
21−#if defined(i386_HOST_ARCH)
24+#if (WORD_SIZE_IN_BITS == 32)
2225import Data.Word (Word32)
2326#else
2427import Data.Word (Word64)
@@ -36,7 +39,7 @@ import Foreign.Storable (Storable(..))
3639
3740data IOVec = IOVec
3841 { iovBase :: {-# UNPACK #-} !(Ptr Word8)
39−#if defined(i386_HOST_ARCH)
42+#if (WORD_SIZE_IN_BITS == 32)
4043 , iovLen :: {-# UNPACK #-} !Word32
4144#else
4245 , iovLen :: {-# UNPACK #-} !Word64