diff -Nurd NaN/src/Makefile NaN.patched/src/Makefile --- NaN/src/Makefile 2011-05-27 03:48:54.000000000 -0400 +++ NaN.patched/src/Makefile 2011-09-04 13:38:10.000000000 -0400 @@ -28,10 +28,10 @@ # Instead of building "mex shortpath.c" and "mex uigetpath.c", I used empty m-functions within argout=argin; #################################################### -CC = gcc -CXX = g++ +CC = @FINKPREFIX@/bin/gcc-fsf-4.6 +CXX = @FINKPREFIX@/bin/g++-fsf-4.6 CFLAGS = -fopenmp -Wall -Wconversion -O2 -fPIC -OCTMEX = mkoctfile$(OCTAVE_VERSION) --mex +OCTMEX = mkoctfile-@OCTVERSION@-gcc4.6 --mex RM = rm MEX_OPTION += -lz -lgomp CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS)" CXXFLAGS\#"$(CFLAGS)" diff -Nurd NaN/src/xptopen.cpp NaN.patched/src/xptopen.cpp --- NaN/src/xptopen.cpp 2011-11-14 14:18:38.000000000 -0500 +++ NaN.patched/src/xptopen.cpp 2011-11-16 20:53:54.000000000 -0500 @@ -72,23 +72,9 @@ #define max(a,b) (((a) > (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b)) -#ifdef __linux__ -/* use byteswap macros from the host system, hopefully optimized ones ;-) */ -#include -#endif - -#ifdef _WIN32 -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif - -#if (defined(BSD) && (BSD >= 199103)) -#include -#define __BIG_ENDIAN _BIG_ENDIAN -#define __LITTLE_ENDIAN _LITTLE_ENDIAN -#define __BYTE_ORDER _BYTE_ORDER -#endif +#define __LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN +#define __BIG_ENDIAN __DARWIN_BIG_ENDIAN +#define __BYTE_ORDER __DARWIN_BYTE_ORDER #ifndef _BYTESWAP_H /* define our own version - needed for Max OS X*/