blob: 6707a70edd0279d1224f94a9107222d57d7048cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
--- xwayland-21.1.3.orig/include/misc.h 2021-11-08 11:37:14.869922600 +0100
+++ xwayland-21.1.3/include/misc.h 2021-11-14 05:17:02.367154956 +0100
@@ -298,34 +298,12 @@ __builtin_constant_p(int x)
}
#endif
-static inline uint64_t
-bswap_64(uint64_t x)
-{
- return (((x & 0xFF00000000000000ull) >> 56) |
- ((x & 0x00FF000000000000ull) >> 40) |
- ((x & 0x0000FF0000000000ull) >> 24) |
- ((x & 0x000000FF00000000ull) >> 8) |
- ((x & 0x00000000FF000000ull) << 8) |
- ((x & 0x0000000000FF0000ull) << 24) |
- ((x & 0x000000000000FF00ull) << 40) |
- ((x & 0x00000000000000FFull) << 56));
-}
-
#define swapll(x) do { \
if (sizeof(*(x)) != 8) \
wrong_size(); \
*(x) = bswap_64(*(x)); \
} while (0)
-static inline uint32_t
-bswap_32(uint32_t x)
-{
- return (((x & 0xFF000000) >> 24) |
- ((x & 0x00FF0000) >> 8) |
- ((x & 0x0000FF00) << 8) |
- ((x & 0x000000FF) << 24));
-}
-
static inline Bool
checked_int64_add(int64_t *out, int64_t a, int64_t b)
{
@@ -361,13 +339,6 @@ checked_int64_subtract(int64_t *out, int
*(x) = bswap_32(*(x)); \
} while (0)
-static inline uint16_t
-bswap_16(uint16_t x)
-{
- return (((x & 0xFF00) >> 8) |
- ((x & 0x00FF) << 8));
-}
-
#define swaps(x) do { \
if (sizeof(*(x)) != 2) \
wrong_size(); \
|