[PATCH v2] arch: Fix image and bitmap byte order for ppc64le
walter harms
wharms at bfs.de
Mon Feb 24 04:52:39 PST 2014
Am 24.02.2014 11:36, schrieb Egbert Eich:
> From: Dinar Valeev <dvaleev at suse.com>
>
> So far PPC was big endian for sure. For ppc64le this is no longer
> true.
>
> Signed-off-by: Egbert Eich <eich at 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..256d84b 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(__LITTLE_ENDIAN__)
> +#define IMAGE_BYTE_ORDER LSBFirst
> +#define BITMAP_BIT_ORDER LSBFirst
> +#else
> +#define IMAGE_BYTE_ORDER MSBFirst
> +#define BITMAP_BIT_ORDER MSBFirst
> +#endif
> #define GLYPHPADBYTES 4
>
> #endif /* PowerPC */
Assuming that __LITTLE_ENDIAN__ is of general interest,
i would avoid defined(__ppc__) and friends otherwise we will need to define
this for every achitecture.
re,
wh
More information about the xorg-devel
mailing list