2009-01-12 01:26:08 +00:00
|
|
|
From 270e016f8d24ef4bd99f26084100581d2ea97a19 Mon Sep 17 00:00:00 2001
|
2008-06-19 14:24:12 +00:00
|
|
|
From: Adam Tkac <atkac@redhat.com>
|
2009-01-12 01:26:08 +00:00
|
|
|
Date: Mon, 12 Jan 2009 10:29:10 +1000
|
|
|
|
Subject: [PATCH] Workaround for RH bug #449944
|
2008-06-19 14:24:12 +00:00
|
|
|
|
|
|
|
AC_C_BIGENDIAN macro in autoconf 2.62 is badly broken. See
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=449944 for more information.
|
|
|
|
|
2009-01-12 01:26:08 +00:00
|
|
|
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])
|
2008-06-19 14:24:12 +00:00
|
|
|
|
|
|
|
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
|
2009-01-12 01:26:08 +00:00
|
|
|
@@ -1182,6 +1181,15 @@ AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4])
|
2008-06-19 14:24:12 +00:00
|
|
|
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"
|
2009-01-12 01:26:08 +00:00
|
|
|
+AH_VERBATIM([X_BYTE_ORDER],[
|
2008-06-19 14:24:12 +00:00
|
|
|
+/* Define endian order */
|
2009-01-12 01:26:08 +00:00
|
|
|
+#ifdef __BIG_ENDIAN__
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define _X_BYTE_ORDER X_BIG_ENDIAN
|
2009-01-12 01:26:08 +00:00
|
|
|
+#else
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define _X_BYTE_ORDER X_LITTLE_ENDIAN
|
2009-01-12 01:26:08 +00:00
|
|
|
+#endif
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define X_BYTE_ORDER _X_BYTE_ORDER
|
2009-01-12 01:26:08 +00:00
|
|
|
+])
|
2008-06-19 14:24:12 +00:00
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2009-01-12 01:26:08 +00:00
|
|
|
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 @@
|
2008-06-19 14:24:12 +00:00
|
|
|
/* Vendor name */
|
|
|
|
#undef XVENDORNAME
|
|
|
|
|
|
|
|
+/* Define endian order */
|
2009-01-12 01:26:08 +00:00
|
|
|
+#ifdef __BIG_ENDIAN__
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define _X_BYTE_ORDER X_BIG_ENDIAN
|
2009-01-12 01:26:08 +00:00
|
|
|
+#else
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define _X_BYTE_ORDER X_LITTLE_ENDIAN
|
2009-01-12 01:26:08 +00:00
|
|
|
+#endif
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define X_BYTE_ORDER _X_BYTE_ORDER
|
2009-01-12 01:26:08 +00:00
|
|
|
+
|
2008-06-19 14:24:12 +00:00
|
|
|
/* Enable GNU and other extensions to the C environment for GLIBC */
|
|
|
|
#undef _GNU_SOURCE
|
2009-01-12 01:26:08 +00:00
|
|
|
|
|
|
|
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 @@
|
2008-06-19 14:24:12 +00:00
|
|
|
/* Vendor name */
|
|
|
|
#undef XVENDORNAME
|
|
|
|
|
|
|
|
+/* Define endian order */
|
2009-01-12 01:26:08 +00:00
|
|
|
+#ifdef __BIG_ENDIAN__
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define _X_BYTE_ORDER X_BIG_ENDIAN
|
2009-01-12 01:26:08 +00:00
|
|
|
+#else
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define _X_BYTE_ORDER X_LITTLE_ENDIAN
|
2009-01-12 01:26:08 +00:00
|
|
|
+#endif
|
2008-06-19 14:24:12 +00:00
|
|
|
+#define X_BYTE_ORDER _X_BYTE_ORDER
|
2009-01-12 01:26:08 +00:00
|
|
|
+
|
2008-06-19 14:24:12 +00:00
|
|
|
/* BSD-compliant source */
|
|
|
|
#undef _BSD_SOURCE
|
2009-01-12 01:26:08 +00:00
|
|
|
|
|
|
|
--
|
|
|
|
1.6.0.6
|
|
|
|
|