diff options
author | simonmar <unknown> | 2005-03-09 10:38:17 +0000 |
---|---|---|
committer | simonmar <unknown> | 2005-03-09 10:38:17 +0000 |
commit | d04c4288dfc76c3cc593a37824bf2e996663abfb (patch) | |
tree | de63748eb675f8e64740529cd149093dc606f4bb /ghc/compiler/utils | |
parent | 1c63991cae7907391d9a1a2b18bfe257332e01c9 (diff) | |
download | haskell-d04c4288dfc76c3cc593a37824bf2e996663abfb.tar.gz |
[project @ 2005-03-09 10:38:17 by simonmar]
Use a different magic number (0x1face64) for 64-bit interface files.
This will prevent us trying to read the dictionary out of a 32-bit
interface file on a 64-bit machine.
Diffstat (limited to 'ghc/compiler/utils')
-rw-r--r-- | ghc/compiler/utils/Binary.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ghc/compiler/utils/Binary.hs b/ghc/compiler/utils/Binary.hs index 962531f110..c20e2aa22b 100644 --- a/ghc/compiler/utils/Binary.hs +++ b/ghc/compiler/utils/Binary.hs @@ -615,7 +615,12 @@ lazyGet bh = do -- -------------------------------------------------------------- initBinMemSize = (1024*1024) :: Int + +#if WORD_SIZE_IN_BITS == 32 binaryInterfaceMagic = 0x1face :: Word32 +#elif WORD_SIZE_IN_BITS == 64 +binaryInterfaceMagic = 0x1face64 :: Word32 +#endif getBinFileWithDict :: Binary a => FilePath -> IO a getBinFileWithDict file_path = do |