patch-lib_pure_endians_nim 619 B

12345678910111213141516
  1. $OpenBSD: patch-lib_pure_endians_nim,v 1.1 2017/01/09 10:32:33 juanfra Exp $
  2. GCC 4.2 doesn't support __builtin_bswap32. Enable it only for egcc.
  3. --- lib/pure/endians.nim.orig Mon Jan 9 03:16:08 2017
  4. +++ lib/pure/endians.nim Mon Jan 9 03:16:28 2017
  5. @@ -10,7 +10,7 @@
  6. ## This module contains helpers that deal with different byte orders
  7. ## (`endian`:idx:).
  8. -when defined(gcc) or defined(llvm_gcc) or defined(clang):
  9. +when defined(egcc) or defined(llvm_gcc) or defined(clang):
  10. const useBuiltinSwap = true
  11. proc builtin_bswap16(a: uint16): uint16 {.
  12. importc: "__builtin_bswap16", nodecl, nosideeffect.}