summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-11-02 22:07:10 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-11-02 22:23:21 -0800
commit1f16bc85e198013a4673c4f1fe21599b332abcc6 (patch)
treede890b109ef95df616190c1b05293fb9d1ecd3d0
parent4ec6d7bda0ad09c160ebe1621a5bbdc35010fbfd (diff)
Fix compatibility with libXext 1.1 / xextproto 7.1 headers
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--di/unsquish.c8
-rw-r--r--di/wire.c6
-rw-r--r--include/lbxproxy.h12
-rw-r--r--include/misc.h10
-rw-r--r--include/os.h1
-rw-r--r--include/proxyopts.h1
-rw-r--r--include/util.h2
-rw-r--r--os/io.c6
-rw-r--r--os/osdep.h1
9 files changed, 41 insertions, 6 deletions
diff --git a/di/unsquish.c b/di/unsquish.c
index 976178f..47e71dd 100644
--- a/di/unsquish.c
+++ b/di/unsquish.c
@@ -54,8 +54,12 @@ in this Software without prior written authorization from The Open Group.
#define NEED_EVENTS
#include <X11/Xproto.h>
#include "misc.h"
-#define _XLBX_SERVER_
-#include <X11/extensions/lbxstr.h>
+#ifdef HAVE_X11_EXTENSIONS_LBXPROTO_H
+# include <X11/extensions/lbxproto.h>
+#else
+# define _XLBX_SERVER_
+# include <X11/extensions/lbxstr.h>
+#endif
#include "proxyopts.h"
#include "lbxproxy.h"
diff --git a/di/wire.c b/di/wire.c
index b463a0a..fdc6989 100644
--- a/di/wire.c
+++ b/di/wire.c
@@ -74,7 +74,11 @@ in this Software without prior written authorization from The Open Group.
#include <X11/ICE/ICElib.h>
#ifdef BIGREQS
-#include <X11/extensions/bigreqstr.h>
+# ifdef HAVE_X11_EXTENSIONS_BIGREQSPROTO_H
+# include <X11/extensions/bigreqsproto.h>
+# else
+# include <X11/extensions/bigreqstr.h>
+# endif
#endif
/*
diff --git a/include/lbxproxy.h b/include/lbxproxy.h
index 4defa9f..b2c49d2 100644
--- a/include/lbxproxy.h
+++ b/include/lbxproxy.h
@@ -52,7 +52,17 @@ in this Software without prior written authorization from The Open Group.
#include "misc.h"
#include "os.h"
#include "util.h"
-#include <X11/extensions/lbxstr.h>
+#ifdef HAVE_X11_EXTENSIONS_LBXPROTO_H
+# include <X11/extensions/lbxproto.h>
+# ifdef DEBUG /* Debug macros formerly defined in lbxstr.h */
+extern int lbxDebug;
+# define DBG(n,m) if (lbxDebug & (n)) { fprintf m; } else
+# else
+# define DBG(n,m)
+# endif /* DEBUG */
+#else
+# include <X11/extensions/lbxstr.h>
+#endif /* HAVE_X11_EXTENSIONS_LBXPROTO_H */
/* we keep the ifdefs in the code as a guide to what's going on */
/* but we want the proxy to work with all possible servers */
diff --git a/include/misc.h b/include/misc.h
index 3b7ee48..7cede24 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -33,6 +33,10 @@ from The Open Group.
#ifndef MISC_H
#define MISC_H 1
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#define NEED_EVENTS
#define NEED_REPLIES
#include <X11/X.h>
@@ -44,7 +48,11 @@ from The Open Group.
#include <X11/Xalloca.h>
#include <X11/Xfuncs.h>
#include <X11/Xfuncproto.h>
-#include <X11/extensions/lbxstr.h>
+#ifdef HAVE_X11_EXTENSIONS_LBXPROTO_H
+# include <X11/extensions/lbxproto.h>
+#else
+# include <X11/extensions/lbxstr.h>
+#endif
#ifndef TRUE
#define FALSE 0
diff --git a/include/os.h b/include/os.h
index ec20525..be96aaf 100644
--- a/include/os.h
+++ b/include/os.h
@@ -32,6 +32,7 @@ from The Open Group.
#ifndef OS_H
#define OS_H
+#include <X11/Xdefs.h>
#include <X11/Xtrans/Xtrans.h>
extern fd_set AllSockets;
diff --git a/include/proxyopts.h b/include/proxyopts.h
index 3036efb..6a1e7ec 100644
--- a/include/proxyopts.h
+++ b/include/proxyopts.h
@@ -51,6 +51,7 @@ in this Software without prior written authorization from The Open Group.
#ifndef _LBX_PROXYOPTS_H_
#define _LBX_PROXYOPTS_H_
+#include <X11/Xdefs.h>
#include <X11/extensions/lbximage.h>
#include <X11/extensions/lbxopts.h>
diff --git a/include/util.h b/include/util.h
index bff9856..98a25b5 100644
--- a/include/util.h
+++ b/include/util.h
@@ -55,6 +55,8 @@ in this Software without prior written authorization from The Open Group.
# include "config.h"
#endif
+#include <X11/Xdefs.h>
+
#ifdef RETSIGTYPE /* autoconf AC_TYPE_SIGNAL */
# define SIGVAL RETSIGTYPE
#else /* Imake */
diff --git a/os/io.c b/os/io.c
index 659ab3a..0aca9b3 100644
--- a/os/io.c
+++ b/os/io.c
@@ -68,7 +68,11 @@ SOFTWARE.
#include "lbxproxy.h"
#ifdef BIGREQS
-#include <X11/extensions/bigreqstr.h>
+# ifdef HAVE_X11_EXTENSIONS_BIGREQSPROTO_H
+# include <X11/extensions/bigreqsproto.h>
+# else
+# include <X11/extensions/bigreqstr.h>
+# endif
#endif
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
diff --git a/os/osdep.h b/os/osdep.h
index 617f19d..610ebe4 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -53,6 +53,7 @@ SOFTWARE.
#define MAXBUFSIZE (1 << 22)
#include <X11/Xmd.h>
+#include <X11/Xdefs.h>
#ifndef sgi /* SGI defines OPEN_MAX in a useless way */
#ifndef X_NOT_POSIX