common_platform.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. diff --git a/c/common/platform.h b/c/common/platform.h
  2. index f5ca4435..7e5807da 100644
  3. --- a/c/common/platform.h
  4. +++ b/c/common/platform.h
  5. @@ -40,7 +40,7 @@
  6. #define BROTLI_X_BIG_ENDIAN BIG_ENDIAN
  7. #endif
  8. -#if BROTLI_MSVC_VERSION_CHECK(12, 0, 0)
  9. +#if BROTLI_MSVC_VERSION_CHECK(18, 0, 0)
  10. #include <intrin.h>
  11. #endif
  12. @@ -529,7 +529,7 @@ BROTLI_MIN_MAX(size_t) BROTLI_MIN_MAX(uint32_t) BROTLI_MIN_MAX(uint8_t)
  13. #if BROTLI_GNUC_HAS_BUILTIN(__builtin_ctzll, 3, 4, 0) || \
  14. BROTLI_INTEL_VERSION_CHECK(16, 0, 0)
  15. #define BROTLI_TZCNT64 __builtin_ctzll
  16. -#elif BROTLI_MSVC_VERSION_CHECK(12, 0, 0)
  17. +#elif BROTLI_MSVC_VERSION_CHECK(18, 0, 0)
  18. #if defined(BROTLI_TARGET_X64)
  19. #define BROTLI_TZCNT64 _tzcnt_u64
  20. #else /* BROTLI_TARGET_X64 */
  21. @@ -546,7 +546,7 @@ static BROTLI_INLINE uint32_t BrotliBsf64Msvc(uint64_t x) {
  22. #if BROTLI_GNUC_HAS_BUILTIN(__builtin_clz, 3, 4, 0) || \
  23. BROTLI_INTEL_VERSION_CHECK(16, 0, 0)
  24. #define BROTLI_BSR32(x) (31u ^ (uint32_t)__builtin_clz(x))
  25. -#elif BROTLI_MSVC_VERSION_CHECK(12, 0, 0)
  26. +#elif BROTLI_MSVC_VERSION_CHECK(18, 0, 0)
  27. static BROTLI_INLINE uint32_t BrotliBsr32Msvc(uint32_t x) {
  28. unsigned long msb;
  29. _BitScanReverse(&msb, x);