packages feed

cpu 0.1.0 → 0.1.1

raw patch · 2 files changed

+8/−13 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

System/Endian.hs view
@@ -21,11 +21,9 @@     , toBE64     ) where -import Foreign.Marshal.Alloc-import Foreign.Storable-import Foreign.Ptr+#include "MachDeps.h"+ import Foreign.C.Types-import System.IO.Unsafe (unsafePerformIO) import Data.Word  -- | represent the CPU endianness@@ -40,14 +38,11 @@  -- | return the system endianness getSystemEndianness :: Endianness-getSystemEndianness = unsafePerformIO $ alloca $ \p ->-    poke p cst >> peek (castPtr p) >>= return . check-    where cst :: Word32-          cst = 0x01000000-          check :: Word8 -> Endianness-          check x-              | x == 0x01 = BigEndian -              | otherwise = LittleEndian+#ifdef WORDS_BIGENDIAN+getSystemEndianness = BigEndian+#else+getSystemEndianness = LittleEndian+#endif  -- | Convert from a big endian 64 bit value to the cpu endianness fromBE64 :: Word64 -> Word64
cpu.cabal view
@@ -1,5 +1,5 @@ Name:                cpu-Version:             0.1.0+Version:             0.1.1 Description:              Lowlevel cpu routines to get basic properties of the cpu platform, like endianness and architecture. License:             BSD3