Merge pull request #1074 from rxrbln/dev
fixed legacy/zstd_v* with older gcc version, by guarding builtin_*dev
commit
0ef4d097db
|
@ -189,7 +189,7 @@ MEM_STATIC U32 MEM_swap32(U32 in)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) /* Visual Studio */
|
#if defined(_MSC_VER) /* Visual Studio */
|
||||||
return _byteswap_ulong(in);
|
return _byteswap_ulong(in);
|
||||||
#elif defined (__GNUC__)
|
#elif defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
|
||||||
return __builtin_bswap32(in);
|
return __builtin_bswap32(in);
|
||||||
#else
|
#else
|
||||||
return ((in << 24) & 0xff000000 ) |
|
return ((in << 24) & 0xff000000 ) |
|
||||||
|
@ -203,7 +203,7 @@ MEM_STATIC U64 MEM_swap64(U64 in)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) /* Visual Studio */
|
#if defined(_MSC_VER) /* Visual Studio */
|
||||||
return _byteswap_uint64(in);
|
return _byteswap_uint64(in);
|
||||||
#elif defined (__GNUC__)
|
#elif defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
|
||||||
return __builtin_bswap64(in);
|
return __builtin_bswap64(in);
|
||||||
#else
|
#else
|
||||||
return ((in << 56) & 0xff00000000000000ULL) |
|
return ((in << 56) & 0xff00000000000000ULL) |
|
||||||
|
|
|
@ -348,7 +348,7 @@ MEM_STATIC U32 MEM_swap32(U32 in)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) /* Visual Studio */
|
#if defined(_MSC_VER) /* Visual Studio */
|
||||||
return _byteswap_ulong(in);
|
return _byteswap_ulong(in);
|
||||||
#elif defined (__GNUC__)
|
#elif defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
|
||||||
return __builtin_bswap32(in);
|
return __builtin_bswap32(in);
|
||||||
#else
|
#else
|
||||||
return ((in << 24) & 0xff000000 ) |
|
return ((in << 24) & 0xff000000 ) |
|
||||||
|
@ -362,7 +362,7 @@ MEM_STATIC U64 MEM_swap64(U64 in)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) /* Visual Studio */
|
#if defined(_MSC_VER) /* Visual Studio */
|
||||||
return _byteswap_uint64(in);
|
return _byteswap_uint64(in);
|
||||||
#elif defined (__GNUC__)
|
#elif defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
|
||||||
return __builtin_bswap64(in);
|
return __builtin_bswap64(in);
|
||||||
#else
|
#else
|
||||||
return ((in << 56) & 0xff00000000000000ULL) |
|
return ((in << 56) & 0xff00000000000000ULL) |
|
||||||
|
|
Loading…
Reference in New Issue