patch-include_misc_h 1.4 KB

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