patch-include_misc_h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --- xorg-server-21.1.0.orig/include/misc.h 2021-10-27 12:47:08.000000000 +0200
  2. +++ xorg-server-21.1.0/include/misc.h 2021-11-12 22:48:04.777225906 +0100
  3. @@ -298,33 +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. static inline Bool
  33. checked_int64_add(int64_t *out, int64_t a, int64_t b)
  34. @@ -361,13 +340,6 @@ checked_int64_subtract(int64_t *out, int
  35. *(x) = bswap_32(*(x)); \
  36. } while (0)
  37. -static inline uint16_t
  38. -bswap_16(uint16_t x)
  39. -{
  40. - return (((x & 0xFF00) >> 8) |
  41. - ((x & 0x00FF) << 8));
  42. -}
  43. -
  44. #define swaps(x) do { \
  45. if (sizeof(*(x)) != 2) \
  46. wrong_size(); \