tag 579239 patch thanks On Mon, Apr 26, 2010 at 11:50:52PM +0900, Charles Plessy wrote: > Le Mon, Apr 26, 2010 at 02:42:17PM +0200, Bastian Blank a écrit : > > Endianess is always defined in <endian.h>.
Patch. diff -Nru staden-io-lib-1.12.2/debian/changelog staden-io-lib-1.12.2/debian/changelog --- staden-io-lib-1.12.2/debian/changelog 2010-04-27 16:54:18.000000000 +0000 +++ staden-io-lib-1.12.2/debian/changelog 2010-04-27 16:54:18.000000000 +0000 @@ -1,3 +1,10 @@ +staden-io-lib (1.12.2-1.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Fix endianess detection. (closes: #579239) + + -- Bastian Blank <[email protected]> Tue, 27 Apr 2010 09:12:09 +0000 + staden-io-lib (1.12.2-1) unstable; urgency=low * New upstream release: extra options in srf2fastq and API changes in diff -Nru staden-io-lib-1.12.2/io_lib/os.h staden-io-lib-1.12.2/io_lib/os.h --- staden-io-lib-1.12.2/io_lib/os.h 2009-09-15 13:29:23.000000000 +0000 +++ staden-io-lib-1.12.2/io_lib/os.h 2010-04-27 16:54:18.000000000 +0000 @@ -189,91 +189,19 @@ /* *----------------------------------------------------------------------------- * Machine endianness. - * These are overridden at the end when using autoconf, but are here for - * when being built as part of the Staden Package. *----------------------------------------------------------------------------- */ -/* - * First guess via autoconf. This is here as endianness can only be computed - * by autoconf for the machine we're building on. Hence cross-compilations - * or MacOSX "fat binaries" cannot work via autoconf in this manner. - * - * These provide a default for when the machine specific ifdefs below do you - * catch your system type. - */ -#ifdef HAVE_CONFIG_H -# if defined(WORDS_BIGENDIAN) -# ifdef SP_LITTLE_ENDIAN -# undef SP_LITTLE_ENDIAN -# endif -# define SP_BIG_ENDIAN -# else -# ifdef SP_BIG_ENDIAN -# undef SP_BIG_ENDIAN -# endif -# define SP_LITTLE_ENDIAN -# endif -#endif - -/* - * x86 equivalents - */ -#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) -# if defined(SP_BIG_ENDIAN) -# undef SP_BIG_ENDIAN -# endif -# define SP_LITTLE_ENDIAN -#endif - -/* - * DEC Alpha - */ -#if defined(__alpha__) || defined(__alpha) -# if defined(SP_LITTLE_ENDIAN) -# undef SP_LITTLE_ENDIAN -# endif -# define SP_BIG_ENDIAN -#endif - -/* - * SUN Sparc - */ -#if defined(__sparc__) || defined(__sparc) -# if defined(SP_LITTLE_ENDIAN) -# undef SP_LITTLE_ENDIAN -# endif -# define SP_BIG_ENDIAN -#endif +#include <endian.h> -/* - * PowerPC - */ -#if defined(__ppc__) || defined(__ppc) -# if defined(SP_LITTLE_ENDIAN) -# undef SP_LITTLE_ENDIAN -# endif -# define SP_BIG_ENDIAN -#endif - -/* Some catch-alls */ -#if defined(__LITTLE_ENDIAN__) || defined(__LITTLEENDIAN__) +#if __BYTE_ORDER == __LITTLE_ENDIAN # define SP_LITTLE_ENDIAN -#endif - -#if defined(__BIG_ENDIAN__) || defined(__BIGENDIAN__) +#elif __BYTE_ORDER == __BIG_ENDIAN # define SP_BIG_ENDIAN +#else +# error Unknown endianess #endif -#if defined(SP_BIG_ENDIAN) && defined(SP_LITTLE_ENDIAN) -# error Both BIG and LITTLE endian defined. Fix os.h and/or Makefile -#endif - -#if !defined(SP_BIG_ENDIAN) && !defined(SP_LITTLE_ENDIAN) -# error Neither BIG nor LITTLE endian defined. Fix os.h and/or Makefile -#endif - - /* *----------------------------------------------------------------------------- * Typedefs for data sizes. Note there's umpteen versions of typedefs here -- Phasers locked on target, Captain. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

