Skip to content

Commit

Permalink
Disable unboxed arrays on big-endian
Browse files Browse the repository at this point in the history
Unboxed arrays are broken on big-endian architectures, see
https://gitlab.haskell.org/ghc/ghc/-/issues/16998 for details.
This patch makes the use of unboxed arrays conditional on
little-endian architecture.

Fixes #673
  • Loading branch information
trommler authored and treeowl committed Dec 31, 2021
1 parent c3a4e78 commit f5a511f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions containers/include/containers.h
Expand Up @@ -35,7 +35,13 @@

#ifdef __GLASGOW_HASKELL__
# define USE_ST_MONAD 1
#ifndef WORDS_BIGENDIAN
/*
* Unboxed arrays are broken on big-endian architectures.
* See https://gitlab.haskell.org/ghc/ghc/-/issues/16998
*/
# define USE_UNBOXED_ARRAYS 1
#endif
#endif

#endif

0 comments on commit f5a511f

Please sign in to comment.