It turns out the 16-bit version was not introduced until gcc-4.8

This commit is contained in:
Erik Hofman
2018-07-05 10:29:03 +02:00
parent f2f465960b
commit 0e9e5f77cc

View File

@@ -21,7 +21,7 @@ using ssize_t = int64_t; // this is a POSIX type, not a C one
inline uint16_t sg_bswap_16(uint16_t x) {
#if defined(__llvm__) || \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(__ICC)
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && !defined(__ICC)
return __builtin_bswap16(x);
#elif defined(_MSC_VER) && !defined(_DEBUG)
return _byteswap_ushort(x);