xserver: Branch 'master' - 2 commits
Keith Packard
keithp at kemper.freedesktop.org
Tue Nov 12 04:06:34 PST 2013
configure.ac | 3 ++-
hw/xfree86/x86emu/decode.c | 10 ++++++++++
hw/xfree86/x86emu/x86emu/regs.h | 9 +++++++++
hw/xfree86/x86emu/x86emu/x86emui.h | 12 +++++++++++-
include/dix-config.h.in | 8 ++++++++
record/record.c | 4 ++++
6 files changed, 44 insertions(+), 2 deletions(-)
New commits:
commit 5b02d5b7aaabf1ba8dcbdfe4525b7995b4e79f92
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Thu Nov 7 21:08:56 2013 -0800
Enable XTRANS_SEND_FDS on Solaris too.
Requires passing through the __EXTENSIONS__ and _XOPEN_SOURCE defines
in order to expose the msg_control members in struct msghdr.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/configure.ac b/configure.ac
index ff3f4a9..eb90b1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ RELEASE_DATE="2013-10-31"
RELEASE_NAME="Bom Retiro"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AC_USE_SYSTEM_EXTENSIONS
# Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
@@ -1096,7 +1097,7 @@ AC_ARG_ENABLE(xtrans-send-fds, AS_HELP_STRING([--disable-xtrans-send-fds], [Use
case "x$XTRANS_SEND_FDS" in
xauto)
case "$host_os" in
- linux*)
+ linux*|solaris*)
XTRANS_SEND_FDS=yes
;;
*)
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 9bdbe53..d4fbe99 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -449,6 +449,14 @@
#include "dix-config-apple-verbatim.h"
#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+/* Defined if needed to expose struct msghdr.msg_control */
+#undef _XOPEN_SOURCE
+
/* Have support for X shared memory fence library (xshmfence) */
#undef HAVE_XSHMFENCE
commit c4c154d18ef42dc550f2675a9ee88e07b1ca6bed
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Thu Nov 7 21:05:33 2013 -0800
Avoid conflicts with Solaris <sys/regset.h> defines that clash with our names
When building on Solaris with _XOPEN_SOURCE set to a recent XPG release,
<stdlib.h> and other core headers start including <sys/regset.h>, which
has a bunch of unfortunately named macros such as "CS", "ES", etc. for
x86 & x64 registers which clash with existing variable & struct member
names in Xorg - so #undef these so they don't interfere with our use.
(Yes, have filed a bug against the system headers for exposing these,
but this solves the problem for building on existing releases.)
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/x86emu/decode.c b/hw/xfree86/x86emu/decode.c
index 12f8fb8..08a07b1 100644
--- a/hw/xfree86/x86emu/decode.c
+++ b/hw/xfree86/x86emu/decode.c
@@ -38,6 +38,16 @@
****************************************************************************/
#include <stdlib.h>
+
+#if defined(__sun) && defined(CS) /* avoid conflicts with Solaris sys/regset.h */
+# undef CS
+# undef DS
+# undef SS
+# undef ES
+# undef FS
+# undef GS
+#endif
+
#include "x86emu/x86emui.h"
/*----------------------------- Implementation ----------------------------*/
diff --git a/hw/xfree86/x86emu/x86emu/regs.h b/hw/xfree86/x86emu/x86emu/regs.h
index 6bd0611..2ecafa0 100644
--- a/hw/xfree86/x86emu/x86emu/regs.h
+++ b/hw/xfree86/x86emu/x86emu/regs.h
@@ -112,6 +112,15 @@ struct i386_special_regs {
* CS, DS, ES, SS.
*/
+#if defined(__sun) && defined(CS) /* avoid conflicts with Solaris sys/regset.h */
+# undef CS
+# undef DS
+# undef SS
+# undef ES
+# undef FS
+# undef GS
+#endif
+
struct i386_segment_regs {
u16 CS, DS, SS, ES, FS, GS;
};
diff --git a/hw/xfree86/x86emu/x86emu/x86emui.h b/hw/xfree86/x86emu/x86emu/x86emui.h
index f11dc10..5e20d97 100644
--- a/hw/xfree86/x86emu/x86emu/x86emui.h
+++ b/hw/xfree86/x86emu/x86emu/x86emui.h
@@ -73,7 +73,17 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#endif
+/* avoid conflicts with Solaris sys/regset.h */
+# if defined(__sun) && defined(CS)
+# undef CS
+# undef DS
+# undef SS
+# undef ES
+# undef FS
+# undef GS
+# endif
+#endif /* NO_SYS_HEADERS */
+
/*--------------------------- Inline Functions ----------------------------*/
#ifdef __cplusplus
diff --git a/record/record.c b/record/record.c
index f3a26a7..2c70460 100644
--- a/record/record.c
+++ b/record/record.c
@@ -1393,6 +1393,10 @@ typedef struct {
short first, last; /* if for extension, major opcode interval */
} SetInfoRec, *SetInfoPtr;
+#if defined(ERR) && defined(__sun)
+#undef ERR /* Avoid conflict with Solaris <sys/regset.h> */
+#endif
+
/* These constant are used to index into an array of SetInfoRec. */
enum { REQ, /* set info for requests */
REP, /* set info for replies */
More information about the xorg-commit
mailing list