You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cfitsio/cfitsio-ppc64le_support.patch

32 lines
940 B

Subject: cfitsio ppc64le support
From: Michel Normand <normand@linux.vnet.ibm.com>
for ppc64le archi should define BYTESWAPPED but not MACHINE
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
---
fitsio2.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Index: cfitsio/fitsio2.h
===================================================================
--- cfitsio.orig/fitsio2.h
+++ cfitsio/fitsio2.h
@@ -109,9 +109,13 @@ extern int Fitsio_Pthread_Status;
#elif defined(__powerpc64__) || defined(__64BIT__) || defined(__AARCH64EB__) /* IBM 64-bit AIX powerpc*/
/* could also test for __ppc64__ or __PPC64 */
-#define BYTESWAPPED FALSE
-#define MACHINE NATIVE
-#define LONGSIZE 64
+# if defined(__LITTLE_ENDIAN__)
+# define BYTESWAPPED TRUE
+# else
+# define BYTESWAPPED FALSE
+# define MACHINE NATIVE
+# endif
+# define LONGSIZE 64
#elif defined(_MIPS_SZLONG)