aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-third_party__WebKit__Source__wtf__ByteSwap.h
blob: 3351611a1f0a05b62f1d75c5d16de57adaa43939 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- ./third_party/WebKit/Source/wtf/ByteSwap.h.orig	2014-08-20 21:08:05.000000000 +0200
+++ ./third_party/WebKit/Source/wtf/ByteSwap.h	2014-08-22 15:06:26.000000000 +0200
@@ -52,14 +52,20 @@
 
 #else
 
+#ifndef bswap64
 ALWAYS_INLINE uint64_t bswap64(uint64_t x) { return __builtin_bswap64(x); }
+#endif
+#ifndef bswap32
 ALWAYS_INLINE uint32_t bswap32(uint32_t x) { return __builtin_bswap32(x); }
+#endif
 // GCC 4.6 lacks __builtin_bswap16. Newer versions have it but we support 4.6.
+#ifndef bswap16
 #if COMPILER(CLANG)
 ALWAYS_INLINE uint16_t bswap16(uint16_t x) { return __builtin_bswap16(x); }
 #else
 inline uint16_t bswap16(uint16_t x) { return ((x & 0xff00) >> 8) | ((x & 0x00ff) << 8); }
 #endif
+#endif
 
 #endif