1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Description: Fixes code checking for endianness.
Author: Maarten L. Hekkelman <[email protected]>
--- a/ccp4/ccp4_sysdep.h
b/ccp4/ccp4_sysdep.h
@@ -195,6 195,26 @@
#define DFNTF_CONVEXNATIVE 5 /**< Convex native floats */
#define DFNTF_LEIEEE 4 /**< little-endian IEEE format */
/* From time to time new architectures are added here, often because Linux
* packagers want to build it on all platforms supported by their distro.
* Here we try to catch machines not listed explicitely above, under
* assumption that endianness is the same for floating point numbers
* as for integers. Which is safe assumption on modern standard computers
* (not embedded systems), according to
* http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness
*/
#if defined(__BYTE_ORDER)
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define NATIVEIT DFNTI_IBO
# define NATIVEFT DFNTF_LEIEEE
# elif __BYTE_ORDER == __BIG_ENDIAN
# define NATIVEIT DFNTI_MBO
# define NATIVEFT DFNTF_BEIEEE
# endif
#endif
#if !defined(NATIVEIT) && !defined(NATIVEFT)
#if defined (VAX) || defined (vax) /* gcc seems to use vax */
# define NATIVEFT DFNTF_VAX
# define NATIVEIT DFNTI_IBO
@@ -240,22 260,6 @@
# endif
#endif
-/* From time to time new architectures are added here, often because Linux
- * packagers want to build it on all platforms supported by their distro.
- * Here we try to catch machines not listed explicitely above, under
- * assumption that endianness is the same for floating point numbers
- * as for integers. Which is safe assumption on modern standard computers
- * (not embedded systems), according to
- * http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness
- */
-#if !defined(NATIVEIT) && !defined(NATIVEFT) && defined(__BYTE_ORDER)
-# if __BYTE_ORDER == __LITTLE_ENDIAN
-# define NATIVEIT DFNTI_IBO
-# define NATIVEFT DFNTF_LEIEEE
-# elif __BYTE_ORDER == __BIG_ENDIAN
-# define NATIVEIT DFNTI_MBO
-# define NATIVEFT DFNTF_BEIEEE
-# endif
#endif
#ifndef NATIVEFT
|