Skip to content

Commit

Permalink
Fix for issue:
Browse files Browse the repository at this point in the history
  • Loading branch information
zarianw committed Nov 18, 2014
1 parent af2952c commit d77750c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions headers/ewahutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
static inline uint32_t ctz64(uint64_t n) {
#if defined(__GNUC__) && UINT_MAX >= UINT32_MAX
return static_cast<uint32_t>(__builtin_ctzl(n));
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#elif defined(_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1400
uint32_t i;
_BitScanForward64((unsigned long *) &i, n);
return i;
Expand Down Expand Up @@ -192,7 +192,7 @@ inline uint32_t countOnes(uint32_t v) {
inline uint32_t countOnes(uint64_t x) {
return static_cast<uint32_t>(__builtin_popcountl(x));
}
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#elif defined(_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1400
inline uint32_t countOnes(uint64_t x) {
return static_cast<uint32_t>(__popcnt64(static_cast<__int64>(x)));
}
Expand Down

0 comments on commit d77750c

Please sign in to comment.