[libbluray-devel] Fix windows build
hpi1
git at videolan.org
Wed Apr 29 12:18:59 CEST 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Apr 29 13:17:29 2015 +0300| [f8da820f17b05c71f3e8ff1948443bf311feef69] | committer: hpi1
Fix windows build
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=f8da820f17b05c71f3e8ff1948443bf311feef69
---
src/libbluray/disc/disc.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/libbluray/disc/disc.c b/src/libbluray/disc/disc.c
index 4c33f6f..b2c7e5c 100644
--- a/src/libbluray/disc/disc.c
+++ b/src/libbluray/disc/disc.c
@@ -516,10 +516,7 @@ void disc_event(BD_DISC *disc, uint32_t event, uint32_t param)
* This is used when AACS disc ID is not available
*/
-static uint64_t _rotl64(uint64_t k, int n)
-{
- return (k << n) | (k >> (64 - n));
-}
+#define ROTL64(k, n) (((k) << (n)) | ((k) >> (64 - (n))))
static uint64_t _fmix64(uint64_t k)
{
@@ -548,13 +545,13 @@ static void _murmurhash3_128(const uint8_t *in, size_t len, void *out)
memcpy(&k1, in + i, sizeof(uint64_t));
memcpy(&k2, in + i + 8, sizeof(uint64_t));
- k1 *= c1; k1 = _rotl64(k1, 31); k1 *= c2; h[0] ^= k1;
+ k1 *= c1; k1 = ROTL64(k1, 31); k1 *= c2; h[0] ^= k1;
- h[0] = _rotl64(h[0], 27); h[0] += h[1]; h[0] = h[0] * 5 + 0x52dce729;
+ h[0] = ROTL64(h[0], 27); h[0] += h[1]; h[0] = h[0] * 5 + 0x52dce729;
- k2 *= c2; k2 = _rotl64(k2, 33); k2 *= c1; h[1] ^= k2;
+ k2 *= c2; k2 = ROTL64(k2, 33); k2 *= c1; h[1] ^= k2;
- h[1] = _rotl64(h[1], 31); h[1] += h[0]; h[1] = h[1] * 5 + 0x38495ab5;
+ h[1] = ROTL64(h[1], 31); h[1] += h[0]; h[1] = h[1] * 5 + 0x38495ab5;
}
h[0] ^= len;
More information about the libbluray-devel
mailing list