GCC 4.7 does not have __builtin_bswap16 on all platforms

GCC 4.7 does not have __builtin_bswap16 on all platforms so don't try to use it unless we are on gcc 4.8 or greater
This commit is contained in:
Jools Wills 2015-06-14 20:16:48 +01:00
parent bfe4067b83
commit 417d26ed02

View File

@ -27,7 +27,7 @@
#include <stdint.h>
#include <stdlib.h>
#if defined(__llvm__) || (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 403)
#if defined(__llvm__) || (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408)
#define SWAP16 __builtin_bswap16
#define SWAP32 __builtin_bswap32
#elif defined(_MSC_VER)