From 3d4355182f1af4af4622fbba0e4299799b9512f1 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 16 Dec 2016 13:05:11 -1000 Subject: [PATCH] Squelch redefinition warnings --- hecl/include/hecl/hecl.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hecl/include/hecl/hecl.hpp b/hecl/include/hecl/hecl.hpp index 77979f4d6..aa17e87a8 100644 --- a/hecl/include/hecl/hecl.hpp +++ b/hecl/include/hecl/hecl.hpp @@ -1418,8 +1418,10 @@ static inline double SBig(double val) int64_t ival = bswap64(*((int64_t*)(&val))); return *((double*)(&ival)); } +#ifndef SBIG #define SBIG(q) ( ( (q) & 0x000000FF ) << 24 | ( (q) & 0x0000FF00 ) << 8 \ | ( (q) & 0x00FF0000 ) >> 8 | ( (q) & 0xFF000000 ) >> 24 ) +#endif static inline int16_t SLittle(int16_t val) {return val;} static inline uint16_t SLittle(uint16_t val) {return val;} @@ -1429,7 +1431,9 @@ static inline int64_t SLittle(int64_t val) {return val;} static inline uint64_t SLittle(uint64_t val) {return val;} static inline float SLittle(float val) {return val;} static inline double SLittle(double val) {return val;} +#ifndef SLITTLE #define SLITTLE(q) (q) +#endif #else static inline int16_t SLittle(int16_t val) {return bswap16(val);} static inline uint16_t SLittle(uint16_t val) {return bswap16(val);} @@ -1447,8 +1451,10 @@ static inline double SLittle(double val) int64_t ival = bswap64(*((int64_t*)(&val))); return *((double*)(&ival)); } +#ifndef SLITTLE #define SLITTLE(q) ( ( (q) & 0x000000FF ) << 24 | ( (q) & 0x0000FF00 ) << 8 \ | ( (q) & 0x00FF0000 ) >> 8 | ( (q) & 0xFF000000 ) >> 24 ) +#endif static inline int16_t SBig(int16_t val) {return val;} static inline uint16_t SBig(uint16_t val) {return val;} @@ -1458,8 +1464,10 @@ static inline int64_t SBig(int64_t val) {return val;} static inline uint64_t SBig(uint64_t val) {return val;} static inline float SBig(float val) {return val;} static inline double SBig(double val) {return val;} +#ifndef SBIG #define SBIG(q) (q) #endif +#endif }