It turns that my cfitsio2.diff was broken on MIPS.
The attached one is a new revision which is compile and runtime tested
on a MIPSEL machine (vaughan).
I'm not going to test this on MIPS B-E or ARM because it's trivial
enough that doesn't warrant the trouble of installing the
build-dependencies on the porter machines. It was time-consuming enough
to test on MIPSEL...
I also found out that checking for __ARMEL__ should be enough to
separate the big-endian from the little-endian ARM.
(Although I'd prefer checking for __BYTE_ORDER ==
__LITTLE_ENDIAN/__BIG_ENDIAN...)

I will NMU these bugs if the maintainer doesn't respond in a week.

Regards,
Faidon
--- fitsio2.h   2006-11-11 00:46:44.000000000 +0200
+++ fitsio2.h   2006-11-11 04:24:00.000000000 +0200
@@ -52,6 +52,12 @@
 
 /* the following block determines the size of longs on SGI IRIX machines */
 #if defined(_MIPS_SZLONG)
+#  define MACHINE NATIVE
+#  if defined(MIPSEL)
+#    define BYTESWAPPED TRUE
+#  elif
+#    define BYTESWAPPED FALSE
+#  endif
 #  if _MIPS_SZLONG == 32
 #    define LONGSIZE 32
 #  elif _MIPS_SZLONG == 64
@@ -59,9 +65,8 @@
 #  else
 #    error "can't handle long size given by _MIPS_SZLONG"
 #  endif
-#endif
 
-#if defined(vax) && defined(VMS)
+#elif defined(vax) && defined(VMS)
  
 #define MACHINE VAXVMS
 #define BYTESWAPPED TRUE
@@ -132,6 +137,12 @@
 #define MACHINE PC64BIT
 #define LONGSIZE 64   
 
+#elif defined(__arm__)
+
+/*  ARM Little-endian */
+#define MACHINE NATIVE
+#define BYTESWAPPED TRUE
+ 
 #else
 
 /*  assume machine uses the same IEEE formats as used in FITS files */

Reply via email to