[Xcb-commit] 2 commits - src
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Sat Jan 28 12:49:54 PST 2012
src/xcb_auth.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 87b7bf875e0105924ae306e90ca79512d6c0cf47
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Wed Jan 18 14:11:07 2012 +0000
Fix build of xcb_auth.c with XDMCP on WIN32
Fix a redefinition problem which shows up when building for _WIN32 and
libXdmcp is installed, so HASXDMAUTH is enabled
It seems this is a special place in xcb as it uses other X11 library headers here
If HASXDMAUTH is defined, include the wrapped windows.h before any header which
includes it unwrapped, to avoid conflicts with types defined in X headers
We need to include config.h and check HASXDMAUTH to avoid an unconditional dependency
on x11proto headers
In file included from install/include/X11/Xdmcp.h:19:0,
from git/xcb/libxcb/src/xcb_auth.c:52:
install/include/X11/Xmd.h:120:14: error: conflicting types for 'INT32'
/usr/i686-pc-mingw32/sys-root/mingw/include/basetsd.h:54:13: note: previous declaration of 'INT32' was here
install/include/X11/Xmd.h:143:15: error: conflicting types for 'BOOL'
/usr/i686-pc-mingw32/sys-root/mingw/include/windef.h:234:17: note: previous declaration of 'BOOL' was here
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/src/xcb_auth.c b/src/xcb_auth.c
index 21c26b8..a5b730c 100644
--- a/src/xcb_auth.c
+++ b/src/xcb_auth.c
@@ -25,6 +25,10 @@
/* Authorization systems for the X protocol. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <X11/Xauth.h>
#include <sys/param.h>
@@ -37,6 +41,11 @@
#endif
#ifdef _WIN32
+#ifdef HASXDMAUTH
+/* We must include the wrapped windows.h before any system header which includes
+ it unwrapped, to avoid conflicts with types defined in X headers */
+#include <X11/Xwindows.h>
+#endif
#include "xcb_windefs.h"
#else
#include <arpa/inet.h>
commit 6db1a2686f0f073438d36f5fa0f97b787842b0f2
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Jan 17 23:55:23 2012 -0800
Revert "Fix include order with Xdmcp on WIN32"
This reverts commit 0e9246def562be97cc816f824f702233a826ec56.
This change caused build failures because <X11/Xdmcp.h> was never
included under any circumstance. This is because the check for
HASXDMAUTH was moved before the inclusion of config.h (via xcbint.h)
which defined it.
Found-by: Tinderbox
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/src/xcb_auth.c b/src/xcb_auth.c
index ea4ad8f..21c26b8 100644
--- a/src/xcb_auth.c
+++ b/src/xcb_auth.c
@@ -36,10 +36,6 @@
#include <rpc/types.h>
#endif
-#ifdef HASXDMAUTH
-#include <X11/Xdmcp.h>
-#endif
-
#ifdef _WIN32
#include "xcb_windefs.h"
#else
@@ -52,6 +48,9 @@
#include "xcb.h"
#include "xcbint.h"
+#ifdef HASXDMAUTH
+#include <X11/Xdmcp.h>
+#endif
enum auth_protos {
#ifdef HASXDMAUTH
More information about the xcb-commit
mailing list