changeset 11616:bbe18d223f02 octave-forge

add patch as suggested by Dirk http://savannah.gnu.org/bugs/?38670
author schloegl
date Tue, 09 Apr 2013 11:12:04 +0000
parents 5d94c1d737da
children d2123233e3c9
files extra/NaN/src/xptopen.cpp
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/extra/NaN/src/xptopen.cpp	Tue Apr 09 09:48:43 2013 +0000
+++ b/extra/NaN/src/xptopen.cpp	Tue Apr 09 11:12:04 2013 +0000
@@ -101,6 +101,15 @@
 #  define bswap_32(x) bswap32(x)
 #  define bswap_64(x) bswap64(x)
 
+#elif defined(_APPLE_) && defined(_MACH_)
+#  include <machine/endian.h>
+#  define _BYTE_ORDER __DARWIN_BYTE_ORDER
+#  define _LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
+#  define _BIG_ENDIAN __DARWIN_BIG_ENDIAN
+#  define bswap_16(x) __bswap16(x)
+#  define bswap_32(x) __bswap32(x)
+#  define bswap_64(x) __bswap64(x)
+
 #elif defined(__APPLE__)
 #  include <CoreFoundation/CFByteOrder.h>
 #  define __BIG_ENDIAN       4321