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