Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 89de11f7df05edb619564fda5e18b7d6 > files > 1

x11-proto-devel-7.3-6mdv2009.0.src.rpm

From 6f8379d5a51c8467ddafc1f4c1aea3320afdecbc Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Mon, 10 Mar 2008 09:08:21 -0400
Subject: [PATCH] C sucks: define XEventClass in terms of unsigned int, not CARD32.

Apparently pulling in Xmd.h here breaks qt, since they both define an
INT32 type (and incompatible ones even, since Xmd's is unsigned long on
ILP32 because whoever wrote Xmd.h is a C novice).
---
 XI.h |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/XI.h b/XI.h
index fe4981a..ec9bee2 100644
--- a/XI.h
+++ b/XI.h
@@ -1,5 +1,3 @@
-/* $Xorg: XI.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
-
 /************************************************************
 
 Copyright 1989, 1998  The Open Group
@@ -45,17 +43,12 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 SOFTWARE.
 
 ********************************************************/
-/* $XFree86: xc/include/extensions/XI.h,v 1.4 2001/01/17 17:53:16 dawes Exp $ */
 
 /* Definitions used by the server, library and client */
 
 #ifndef _XI_H_
 #define _XI_H_
 
-#include <X11/Xmd.h> /* CARD32 */
-
-#define sz_xGetExtensionVersionReq		8
-#define sz_xGetExtensionVersionReply		32
 #define sz_xListInputDevicesReq			4
 #define sz_xListInputDevicesReply		32
 #define sz_xOpenDeviceReq			8
@@ -263,12 +256,16 @@ SOFTWARE.
 #define XI_DeviceBusy	3
 #define XI_BadClass	4
 
-/* Make XEventClass be a CARD32 for 64 bit servers.  Don't affect client
+/*
+ * Make XEventClass be a CARD32 for 64 bit servers.  Don't affect client
  * definition of XEventClass since that would be a library interface change.
  * See the top of X.h for more _XSERVER64 magic.
+ *
+ * But, don't actually use the CARD32 type.  We can't get it defined here
+ * without polluting the namespace.
  */
 #ifdef _XSERVER64
-typedef	CARD32		XEventClass;
+typedef unsigned int	XEventClass;
 #else
 typedef	unsigned long	XEventClass;
 #endif
-- 
1.5.4.3