forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[folly] Fix build error C3861 (microsoft#12419)
* [folly] Fix build error C3861 * Update CONTROL
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h | ||
index 971cb88..7894333 100644 | ||
--- a/folly/portability/Builtins.h | ||
+++ b/folly/portability/Builtins.h | ||
@@ -41,7 +41,7 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { | ||
} | ||
} | ||
|
||
-#if !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
+// #if !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { | ||
unsigned long index; | ||
return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); | ||
@@ -93,7 +93,7 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { | ||
return int(_BitScanForward64(&index, x) ? index : 64); | ||
} | ||
#endif | ||
-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
+// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
|
||
FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { | ||
unsigned long index; | ||
@@ -119,15 +119,15 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { | ||
return int(__popcnt(x)); | ||
} | ||
|
||
-#if !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
+// #if !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { | ||
static_assert(sizeof(x) == 4, ""); | ||
return int(__popcnt(x)); | ||
} | ||
-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
+// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
#endif | ||
|
||
-#if !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
+// #if !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
#if defined(_M_IX86) | ||
FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { | ||
return int(__popcnt((unsigned int)(x >> 32))) + | ||
@@ -138,7 +138,7 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { | ||
return int(__popcnt64(x)); | ||
} | ||
#endif | ||
-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
+// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) | ||
|
||
FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { | ||
// I really hope frame is zero... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters