Mercurial > forge
diff extra/NaN/src/xptopen.cpp @ 12310:000941987167 octave-forge
NaN/xptopen: fix support for CYGWIN
author | schloegl |
---|---|
date | Mon, 13 Jan 2014 08:47:27 +0000 |
parents | bbe18d223f02 |
children | cb741b7e2be2 |
line wrap: on
line diff
--- a/extra/NaN/src/xptopen.cpp Sun Jan 12 19:50:10 2014 +0000 +++ b/extra/NaN/src/xptopen.cpp Mon Jan 13 08:47:27 2014 +0000 @@ -78,7 +78,11 @@ #if 0 -#elif defined(__linux__) +#elif defined(__linux__) +# include <endian.h> +# include <byteswap.h> + +#elif defined(__CYGWIN__) # include <endian.h> # include <byteswap.h> @@ -184,10 +188,6 @@ #error ENDIANITY is not known #endif -#if !defined(bswap_16) || !defined(bswap_32) || !defined(bswap_64) -#error SWAP operation not available -#endif - #if __BYTE_ORDER == __BIG_ENDIAN #define l_endian_u16(x) ((uint16_t)bswap_16((uint16_t)(x)))