X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsyzygy%2Ftbcore.h;h=cdaf2aca9cda8dda3152525fd1198e40a0a5d068;hp=e47acfc3f07c60fa04012d6fb81d0ffe65600c2b;hb=40548c9153ea89c0b27b198efb443c5bb9b9c490;hpb=afafdf7b73295b54a4027d88748599ff20f61759 diff --git a/src/syzygy/tbcore.h b/src/syzygy/tbcore.h index e47acfc3..cdaf2aca 100644 --- a/src/syzygy/tbcore.h +++ b/src/syzygy/tbcore.h @@ -22,15 +22,17 @@ #define LOCK_INIT(x) pthread_mutex_init(&(x), NULL) #define LOCK(x) pthread_mutex_lock(&(x)) #define UNLOCK(x) pthread_mutex_unlock(&(x)) - -#define BSWAP32(v) __builtin_bswap32(v) -#define BSWAP64(v) __builtin_bswap64(v) #else #define LOCK_T HANDLE #define LOCK_INIT(x) do { x = CreateMutex(NULL, FALSE, NULL); } while (0) #define LOCK(x) WaitForSingleObject(x, INFINITE) #define UNLOCK(x) ReleaseMutex(x) +#endif +#ifndef _MSC_VER +#define BSWAP32(v) __builtin_bswap32(v) +#define BSWAP64(v) __builtin_bswap64(v) +#else #define BSWAP32(v) _byteswap_ulong(v) #define BSWAP64(v) _byteswap_uint64(v) #endif