changeset 12310:000941987167 octave-forge

NaN/xptopen: fix support for CYGWIN
author schloegl
date Mon, 13 Jan 2014 08:47:27 +0000
parents 3fa7cfe44c4c
children cc6253c2b66b
files extra/NaN/src/xptopen.cpp
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
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)))