Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 222301 | Differences between
and this patch

Collapse All | Expand All

(-)unace-2.5.orig/source/base/all/all.h (-2 / +4 lines)
Lines 61-67 Link Here
61
#define put_unaligned(ptr, val) ((void)( *(ptr) = (val) ))
61
#define put_unaligned(ptr, val) ((void)( *(ptr) = (val) ))
62
#endif /* __EMULATE_UNALIGNED__ */
62
#endif /* __EMULATE_UNALIGNED__ */
63
63
64
#ifdef __BIG_ENDIAN__
64
#if __BYTE_ORDER == __BIG_ENDIAN
65
#define ADJUST_ENDIANNESS16(Ptr) {\
65
#define ADJUST_ENDIANNESS16(Ptr) {\
66
  USHORT x = get_unaligned((USHORT*) (Ptr));\
66
  USHORT x = get_unaligned((USHORT*) (Ptr));\
67
  put_unaligned((USHORT*) (Ptr), x >> 8 | x << 8);\
67
  put_unaligned((USHORT*) (Ptr), x >> 8 | x << 8);\
Lines 78-87 Link Here
78
  x2 = x2 >> 16 | x2 << 16;\
78
  x2 = x2 >> 16 | x2 << 16;\
79
  put_unaligned(((ULONG*) (Ptr)), (x2&0xff00ff00) >> 8 | (x2&0x00ff00ff) << 8);\
79
  put_unaligned(((ULONG*) (Ptr)), (x2&0xff00ff00) >> 8 | (x2&0x00ff00ff) << 8);\
80
}
80
}
81
#else
81
#elif __BYTE_ORDER == __LITTLE_ENDIAN
82
#define ADJUST_ENDIANNESS16(Ptr) 
82
#define ADJUST_ENDIANNESS16(Ptr) 
83
#define ADJUST_ENDIANNESS32(Ptr) 
83
#define ADJUST_ENDIANNESS32(Ptr) 
84
#define ADJUST_ENDIANNESS64(Ptr) 
84
#define ADJUST_ENDIANNESS64(Ptr) 
85
#else
86
#error Please define system endianness
85
#endif
87
#endif
86
88
87
#endif
89
#endif

Return to bug 222301