> X-Original-To: xorg-devel@lists.x.org > From: Egbert Eich <e...@freedesktop.org> > Date: Mon, 24 Feb 2014 10:57:23 +0100 > > From: Dinar Valeev <dval...@suse.com> > > So far PPC was big endian for sure. For ppc64le this is no longer > true.
Isn't it safer to revert the logic? I'm not sure all compilers/platforms define __BIG_ENDIAN__ when appropriate, and in that case existing working PowerPC platforms will get the wrong byte orders. So something like: #if defined(__LITTLE_ENDIAN__) #define IMAGE_BYTE_ORDER LSBFirst #define BITMAP_BIT_ORDER LSBFirst #else #define IMAGE_BYTE_ORDER MSBFirst #define BITMAP_BIT_ORDER MSBFirst #endif Also, the way you changed the "indentation" makes it inconsistent with what's already in the file. Cheers, Mark > Signed-off-by: Egbert Eich <e...@freedesktop.org> > --- > include/servermd.h | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/include/servermd.h b/include/servermd.h > index 11f6c10..360b701 100644 > --- a/include/servermd.h > +++ b/include/servermd.h > @@ -114,8 +114,13 @@ SOFTWARE. > > #if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) > > -#define IMAGE_BYTE_ORDER MSBFirst > -#define BITMAP_BIT_ORDER MSBFirst > +# if defined(__BIG_ENDIAN__) > +# define IMAGE_BYTE_ORDER MSBFirst > +# define BITMAP_BIT_ORDER MSBFirst > +# else > +# define IMAGE_BYTE_ORDER LSBFirst > +# define BITMAP_BIT_ORDER LSBFirst > +# endif > #define GLYPHPADBYTES 4 > > #endif /* PowerPC */ > -- > 1.8.4.5 > > _______________________________________________ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel