open-src/lib/libXext/server-compat.patch
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Sat, 05 Dec 2009 22:13:03 -0800
changeset 851 d428083dbbdd
permissions -rw-r--r--
6905171 X11R7.5 / Xorg 1.7.3 integration 6907686 Move X files from /usr/X11 to /usr [PSARC 2009/482] 6907695 Mesa & OpenGL switcher for SPARC [LSARC 2009/569] 6742737 deliver xf86-input-synaptics

From 9f94bf9de7607c11ab82667a73a4160d705e355c Mon Sep 17 00:00:00 2001
From: Keith Packard <[email protected]>
Date: Tue, 3 Nov 2009 14:42:35 -0800
Subject: [PATCH] Make library headers compatible with old server builds

Old servers (1.6 and before) included the extension library headers
instead of using separate server header files. This patch makes the
library headers compatibile with the server by hiding the library
definitions from the server build.

Signed-off-by: Keith Packard <[email protected]>
Reviewed-by: Peter Hutterer <[email protected]>
---
 include/X11/extensions/XShm.h |    2 ++
 include/X11/extensions/dpms.h |    2 ++
 include/X11/extensions/sync.h |    6 ++++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/X11/extensions/XShm.h b/include/X11/extensions/XShm.h
index b58ca63..44eaf0b 100644
--- a/include/X11/extensions/XShm.h
+++ b/include/X11/extensions/XShm.h
@@ -35,6 +35,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/Xfuncproto.h>
 #include <X11/extensions/shm.h>
 
+#ifndef _XSHM_SERVER_
 typedef unsigned long ShmSeg;
 
 typedef struct {
@@ -132,5 +133,6 @@ Pixmap XShmCreatePixmap(
 );
 
 _XFUNCPROTOEND
+#endif /* _XSHM_SERVER_ */
 
 #endif
diff --git a/include/X11/extensions/dpms.h b/include/X11/extensions/dpms.h
index db06d47..9091fdc 100644
--- a/include/X11/extensions/dpms.h
+++ b/include/X11/extensions/dpms.h
@@ -35,6 +35,7 @@ Equipment Corporation.
 #include <X11/Xmd.h>
 #include <X11/extensions/dpmsconst.h>
 
+#ifndef DPMS_SERVER
 _XFUNCPROTOBEGIN
 
 extern Bool DPMSQueryExtension(Display *, int *, int *);
@@ -48,6 +49,7 @@ extern Status DPMSForceLevel(Display *, CARD16);
 extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
 
 _XFUNCPROTOEND
+#endif
 
 #endif /* !_X11_EXTENSIONS_DPMS_H */
 
diff --git a/include/X11/extensions/sync.h b/include/X11/extensions/sync.h
index 2de222a..b327f69 100644
--- a/include/X11/extensions/sync.h
+++ b/include/X11/extensions/sync.h
@@ -56,6 +56,10 @@ PERFORMANCE OF THIS SOFTWARE.
 #include <X11/Xfuncproto.h>
 #include <X11/extensions/syncconst.h>
 
+#ifdef _SYNC_SERVER
+#include <X11/extensions/syncproto.h>
+#else
+
 _XFUNCPROTOBEGIN
 /* get rid of macros so we can define corresponding functions */
 #undef XSyncIntToValue
@@ -335,4 +339,6 @@ extern Status XSyncGetPriority(
 
 _XFUNCPROTOEND
 
+#endif /* _SYNC_SERVER */
+
 #endif /* _SYNC_H_ */
-- 
1.5.6.5