xorg-x11-server/xserver-1.4.99-endian.patch
Peter Hutterer 66e1b5f9d0 * Mon Jan 12 2009 Peter Hutterer <peter.hutterer@redhat.com> 1.5.99.3-5
- rebase to today's server-1.6-enterleave branch, current 1.6 plus enterleave
  patches.
- drop xserver-1.5.99.3-offscreen-pixmaps.patch - merged upstream
- fix up git checkout in make-git-snapshot.sh to allow a remote branch to be
  specified as $1.
2009-01-12 01:26:08 +00:00

85 lines
2.5 KiB
Diff

From 270e016f8d24ef4bd99f26084100581d2ea97a19 Mon Sep 17 00:00:00 2001
From: Adam Tkac <atkac@redhat.com>
Date: Mon, 12 Jan 2009 10:29:10 +1000
Subject: [PATCH] Workaround for RH bug #449944
AC_C_BIGENDIAN macro in autoconf 2.62 is badly broken. See
https://bugzilla.redhat.com/show_bug.cgi?id=449944 for more information.
Forward-ported to 1.6 prerelease.
---
configure.ac | 10 +++++++++-
include/dix-config.h.in | 8 ++++++++
include/xorg-server.h.in | 8 ++++++++
3 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index c222c95..e40a1a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,7 +103,6 @@ AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
-AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"])
AC_CHECK_SIZEOF([unsigned long])
if test "$ac_cv_sizeof_unsigned_long" = 8; then
@@ -1182,6 +1181,15 @@ AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4])
AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]))
XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC"
+AH_VERBATIM([X_BYTE_ORDER],[
+/* Define endian order */
+#ifdef __BIG_ENDIAN__
+#define _X_BYTE_ORDER X_BIG_ENDIAN
+#else
+#define _X_BYTE_ORDER X_LITTLE_ENDIAN
+#endif
+#define X_BYTE_ORDER _X_BYTE_ORDER
+])
dnl ---------------------------------------------------------------------------
dnl DDX section.
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 977bff3..a3ce66c 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -363,6 +363,14 @@
/* Vendor name */
#undef XVENDORNAME
+/* Define endian order */
+#ifdef __BIG_ENDIAN__
+#define _X_BYTE_ORDER X_BIG_ENDIAN
+#else
+#define _X_BYTE_ORDER X_LITTLE_ENDIAN
+#endif
+#define X_BYTE_ORDER _X_BYTE_ORDER
+
/* Enable GNU and other extensions to the C environment for GLIBC */
#undef _GNU_SOURCE
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index 4cf1bbf..f041c7c 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -145,6 +145,14 @@
/* Vendor name */
#undef XVENDORNAME
+/* Define endian order */
+#ifdef __BIG_ENDIAN__
+#define _X_BYTE_ORDER X_BIG_ENDIAN
+#else
+#define _X_BYTE_ORDER X_LITTLE_ENDIAN
+#endif
+#define X_BYTE_ORDER _X_BYTE_ORDER
+
/* BSD-compliant source */
#undef _BSD_SOURCE
--
1.6.0.6