]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/monotone/files/cryptopp-endianness.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / monotone / files / cryptopp-endianness.patch
1 --- monotone-0.20/.pc/cryptopp-endianness.patch/cryptopp/config.h       2005-07-05 22:56:31.000000000 -0700
2 +++ monotone-0.20/cryptopp/config.h     2005-07-12 12:01:02.626693397 -0700
3 @@ -5,15 +5,28 @@
4  
5  // ***************** Important Settings ********************
6  
7 -// define this if running on a big-endian CPU
8 -#if !defined(IS_LITTLE_ENDIAN) && (defined(__BIG_ENDIAN__) || defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__mips__) || (defined(__MWERKS__) && !defined(__INTEL__)))
9 -#      define IS_BIG_ENDIAN
10 -#endif
11 -
12 -// define this if running on a little-endian CPU
13 -// big endian will be assumed if IS_LITTLE_ENDIAN is not defined
14 -#ifndef IS_BIG_ENDIAN
15 -#      define IS_LITTLE_ENDIAN
16 +// this is GCC specific, but it is safe - the original version
17 +// of this file defaulted to little endian without warning...
18 +// The code will error out if an attempt is made to define
19 +// IS_LITTLE_ENDIAN or IS_BIG_ENDIAN elsewhere
20 +#ifndef __BYTE_ORDER
21 +#  include <endian.h>
22 +#  ifndef __BYTE_ORDER
23 +#    error cryptopp needs the correct byte order from the compiler
24 +#  endif
25 +#endif
26 +#if defined(IS_LITTLE_ENDIAN) || defined(IS_BIG_ENDIAN)
27 +   // It doesn't work to define this on the command line, at least
28 +   // with the original version
29 +#  error cryptopp - unexpected endianness definition
30 +#endif
31 +
32 +#if defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN
33 +#  define IS_LITTLE_ENDIAN
34 +#elif defined(__BIG_ENDIAN) && __BYTE_ORDER == __BIG_ENDIAN
35 +#  define IS_BIG_ENDIAN
36 +#else
37 +#  error cryptopp - unknown endianness
38  #endif
39  
40  // define this if you want to disable all OS-dependent features,