16027382 Update to Xorg 1.13.1 & xf86-video-mach64 6.9.4 s12_12
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Thu, 20 Dec 2012 13:32:15 -0800
changeset 1340 6585ca03b32d
parent 1339 87957f45121d
child 1341 f800823a1808
16027382 Update to Xorg 1.13.1 & xf86-video-mach64 6.9.4
open-src/common/Makefile.init
open-src/driver/xf86-video-mach64/113.patch
open-src/driver/xf86-video-mach64/Makefile
open-src/driver/xf86-video-mach64/exa-crash.patch
open-src/xserver/xorg/6721634.patch
open-src/xserver/xorg/6912996.patch
open-src/xserver/xorg/IA.patch
open-src/xserver/xorg/Makefile
open-src/xserver/xorg/autoconfig.patch
open-src/xserver/xorg/cli-nobanner.patch
open-src/xserver/xorg/cli-nolock.patch
open-src/xserver/xorg/dtlogin-userinfo.patch
open-src/xserver/xorg/fontmod.patch
open-src/xserver/xorg/hotkey.patch
open-src/xserver/xorg/make_xkm_output_dir.patch
open-src/xserver/xorg/nvidia-autoconfig.patch
open-src/xserver/xorg/osaudit.patch
open-src/xserver/xorg/record-regset.patch
open-src/xserver/xorg/signal-handler.patch
open-src/xserver/xorg/sun-manpage.patch
open-src/xserver/xorg/sun-paths.patch
open-src/xserver/xorg/vt.patch
open-src/xserver/xorg/workaround-7154410.patch
open-src/xserver/xorg/xtsol.patch
--- a/open-src/common/Makefile.init	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/common/Makefile.init	Thu Dec 20 13:32:15 2012 -0800
@@ -389,7 +389,7 @@
 # referenced in multiple places, so it's kept here for easy sharing.
 # 
 # Current Xorg server source tarball to use sources from:
-XORGSERVER_VERS=1.13.0
+XORGSERVER_VERS=1.13.1
 # Minimum Xorg server version that we expect to be ABI compatible with.
 # Usually .99 of the previous minor release series, as that's the convention
 # for the development snapshots of the next release series.
--- a/open-src/driver/xf86-video-mach64/113.patch	Thu Dec 06 10:59:30 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-From 5eb7fec958bc6ba8a1a2b0be4916cac818866e1c Mon Sep 17 00:00:00 2001
-From: Dave Airlie <[email protected]>
-Date: Wed, 18 Jul 2012 18:46:49 +1000
-Subject: [PATCH:xf86-video-mach64] mach64: fix build on 32-bit.
-
-tvout code only builds on 32-bit, fix build.
-
-Signed-off-by: Dave Airlie <[email protected]>
----
- src/atiscreen.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/atiscreen.c b/src/atiscreen.c
-index 2957877..b1fbd3c 100644
---- a/src/atiscreen.c
-+++ b/src/atiscreen.c
-@@ -580,7 +580,7 @@ ATIScreenInit(SCREEN_INIT_ARGS_DECL)
- #ifdef TV_OUT
-     /* Fix-up TV out after ImpacTV probe */
-     if (pATI->OptionTvOut && pATI->Chip < ATI_CHIP_264GTPRO)
--        ATISwitchMode(0, pScreenInfo->currentMode, 0);
-+        ATISwitchMode(SWITCH_MODE_ARGS(pScreenInfo, pScreenInfo->currentMode));
- #endif /* TV_OUT */
- 
- #ifdef XF86DRI_DEVEL
-
-
-From 104e3e067a7dcac143cb672fe42d56396ba6087b Mon Sep 17 00:00:00 2001
-From: Adam Jackson <[email protected]>
-Date: Wed, 26 Sep 2012 16:21:25 -0400
-Subject: [PATCH:xf86-video-mach64] Don't gratuitously disable Render when
- ShadowFBing
-
-There's no reason to do this, and I am at a loss to explain why that was
-ever done.  The first instance of this logic comes from xfree86 (over 11
-years ago!):
-
-http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/drivers/ati/atiscreen.c.diff?r1=1.15&r2=1.16
-
-Now, cfb never had Render support, so that might make some sense if
-there was an intermediate uncommitted state where the driver used fb for
-direct but cfb for shadowed.  But that's really the only plausible
-explanation I can think of.
-
-Signed-off-by: Adam Jackson <[email protected]>
----
- src/atiscreen.c |   18 ++++--------------
- 1 file changed, 4 insertions(+), 14 deletions(-)
-
-diff --git a/src/atiscreen.c b/src/atiscreen.c
-index b1fbd3c..62a4dd9 100644
---- a/src/atiscreen.c
-+++ b/src/atiscreen.c
-@@ -476,21 +476,11 @@ ATIScreenInit(SCREEN_INIT_ARGS_DECL)
-         }
-     }
- 
--    /* If applicable, initialise RENDER extension */
-+    /* initialise RENDER extension */
-+    if (!fbPictureInit(pScreen, NULL, 0) && (serverGeneration == 1))
-     {
--        if (pATI->OptionShadowFB)
--        {
--            if (serverGeneration == 1)
--                xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
--                    "RENDER extension not supported with a shadowed"
--                    " framebuffer.\n");
--        }
--        else if (!fbPictureInit(pScreen, NULL, 0) &&
--                 (serverGeneration == 1))
--        {
--            xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
--                "RENDER extension initialisation failed.\n");
--        }
-+	xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
-+	    "RENDER extension initialisation failed.\n");
-     }
- 
-     xf86SetBlackWhitePixels(pScreen);
-
-
-From 42c4e423eec789606eec9703be23a9fd4483a14a Mon Sep 17 00:00:00 2001
-From: Adam Jackson <[email protected]>
-Date: Tue, 2 Oct 2012 10:19:47 -0400
-Subject: [PATCH:xf86-video-mach64] Fix build with neither XAA nor EXA against
- xserver 1.13.0
-
-Pull in picturestr.h to get GLYPH_HAS_GLYPH_PICTURE_ACCESSOR defined
-before compat-api.h is parsed, otherwise you fail with:
-
-In file included from /usr/include/xorg/picturestr.h:28:0,
-                 from /usr/include/xorg/exa.h:38,
-                 from atimach64accel.h:31,
-                 from atiscreen.c:46:
-/usr/include/xorg/glyphstr.h:138:2: error: expected ')' before '*' token
-/usr/include/xorg/glyphstr.h:138:2: error: expected ')' before '(' token
-/usr/include/xorg/glyphstr.h:140:2: error: expected ')' before '*' token
-/usr/include/xorg/glyphstr.h:140:2: error: expected ')' before '(' token
-
-Signed-off-by: Adam Jackson <[email protected]>
----
- src/atistruct.h |    1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/atistruct.h b/src/atistruct.h
-index 702360b..98dc15e 100644
---- a/src/atistruct.h
-+++ b/src/atistruct.h
-@@ -51,6 +51,7 @@
- 
- #endif /* TV_OUT */
- 
-+#include "picturestr.h"
- #ifdef USE_EXA
- #include "exa.h"
- #endif
--- 
-1.7.9.2
-
--- a/open-src/driver/xf86-video-mach64/Makefile	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/driver/xf86-video-mach64/Makefile	Thu Dec 20 13:32:15 2012 -0800
@@ -29,17 +29,15 @@
 MODULE_NAME=xf86-video-mach64
 
 # Version number (used in path names)
-MODULE_VERSION=6.9.3
+MODULE_VERSION=6.9.4
 
 # Checksums for upstream tarball
-TARBALL_MD5   = 94189e4ad9dc431a962228c61dae6f77
-TARBALL_SHA1  = 04a121dfb4e77218219739ef7729ed647004ae27
-TARBALL_SHA256= 5473d0e7dfd7bcff3f759e9e6bd6794ab464958f2f647d9b6d3edf3c66c53218
+TARBALL_MD5   = d645197cbf238ac0427c3904eafdce2f
+TARBALL_SHA1  = 59ef55e9962d6ff2d9f4583d95fdffc37cbcde86
+TARBALL_SHA256= 97f108b8d7c0a8426bef9562683323ab6369956f18b0e220ee0d1a66b740855e
 
 # Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = 6205248.patch,-p1 \
-		 113.patch,-p1 \
-		 exa-crash.patch,-p1
+SOURCE_PATCHES = 6205248.patch,-p1
 
 # Man pages to apply Sun footer to & attributes to list
 #SUNTOUCHED_MANPAGES=man/*.man
@@ -48,8 +46,6 @@
 # Extra flags to pass to configure script
 # - Disable DRI since the kernel module isn't ported
 MODULE_CONFIG_OPTS=--disable-dri
-# - Disable EXA for now since it isn't completely working & crashes a lot
-MODULE_CONFIG_OPTS += --disable-exa
 
 # Paths to find libraries/modules to link with
 MODULE_LD_OPTIONS= \
@@ -57,7 +53,7 @@
 	-L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
 	-R$(X11_SERVERMODS_DIR) \
 	-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-	-lint10 -lpciaccess -lfb -lpixman-1 -lshadowfb -lXfont -lvbe
+	-lexa -lint10 -lpciaccess -lfb -lpixman-1 -lshadowfb -lXfont -lvbe
 
 # Additional install rules beyond what upstream installs
 MODULE_ADD_INSTALL_TARGETS=install_docs
--- a/open-src/driver/xf86-video-mach64/exa-crash.patch	Thu Dec 06 10:59:30 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-From f5fa7780dd152637b422617527abca5b26d51851 Mon Sep 17 00:00:00 2001
-From: Connor Behan <[email protected]>
-Date: Fri, 15 Jun 2012 17:27:40 -0700
-Subject: [PATCH] Fix memory locations in UTS / DFS
-
-Instead of using devPrivate.ptr, we should use EXA functions to
-calculate the offset of a pixmap from the EXA memory base.
-Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=51137
-
-Signed-off-by: Connor Behan <[email protected]>
----
- src/atimach64exa.c |   16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/src/atimach64exa.c b/src/atimach64exa.c
-index e4d5307..ffab9bf 100644
---- a/src/atimach64exa.c
-+++ b/src/atimach64exa.c
-@@ -394,14 +394,18 @@ static Bool
- Mach64UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h,
-     char *src, int src_pitch)
- {
--    char  *dst        = pDst->devPrivate.ptr;
-+    ScreenPtr   pScreen     = pDst->drawable.pScreen;
-+    ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen);
-+    ATIPtr      pATI        = ATIPTR(pScreenInfo);
-+    
-+    char  *dst        = pATI->pExa->memoryBase + exaGetPixmapOffset(pDst);
-     int    dst_pitch  = exaGetPixmapPitch(pDst);
- 
-     int bpp    = pDst->drawable.bitsPerPixel;
-     int cpp    = (bpp + 7) / 8;
-     int wBytes = w * cpp;
- 
--    exaWaitSync(pDst->drawable.pScreen);
-+    exaWaitSync(pScreen);
- 
-     dst += (x * cpp) + (y * dst_pitch);
- 
-@@ -421,14 +425,18 @@ static Bool
- Mach64DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
-     char *dst, int dst_pitch)
- {
--    char  *src        = pSrc->devPrivate.ptr;
-+    ScreenPtr   pScreen     = pSrc->drawable.pScreen;
-+    ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen);
-+    ATIPtr      pATI        = ATIPTR(pScreenInfo);
-+    
-+    char  *src        = pATI->pExa->memoryBase + exaGetPixmapOffset(pSrc);
-     int    src_pitch  = exaGetPixmapPitch(pSrc);
- 
-     int bpp    = pSrc->drawable.bitsPerPixel;
-     int cpp    = (bpp + 7) / 8;
-     int wBytes = w * cpp;
- 
--    exaWaitSync(pSrc->drawable.pScreen);
-+    exaWaitSync(pScreen);
- 
-     src += (x * cpp) + (y * src_pitch);
- 
--- 
-1.7.10.3
-
--- a/open-src/xserver/xorg/6721634.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/6721634.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -19,10 +19,10 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
-index 43c746b..2e86f72 100644
+index 95d58fe..0b5f724 100644
 --- a/hw/xfree86/common/xf86AutoConfig.c
 +++ b/hw/xfree86/common/xf86AutoConfig.c
-@@ -59,6 +59,18 @@
+@@ -60,6 +60,18 @@
  	"\tIdentifier\t" BUILTIN_DEVICE_NAME "\n" \
  	"\tDriver\t\"%s\"\n"
  
@@ -41,7 +41,7 @@
  #define BUILTIN_DEVICE_SECTION_POST \
  	"EndSection\n\n"
  
-@@ -66,6 +78,13 @@
+@@ -67,6 +79,13 @@
  	BUILTIN_DEVICE_SECTION_PRE \
  	BUILTIN_DEVICE_SECTION_POST
  
@@ -55,7 +55,7 @@
  #define BUILTIN_SCREEN_NAME \
  	"\"Builtin Default %s Screen %d\""
  
-@@ -151,6 +170,14 @@ xf86AutoConfig(void)
+@@ -152,6 +171,14 @@ xf86AutoConfig(void)
      listPossibleVideoDrivers(deviceList, 20);
  
      for (p = deviceList; *p; p++) {
--- a/open-src/xserver/xorg/6912996.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/6912996.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -1,8 +1,8 @@
 diff --git a/exa/exa.c b/exa/exa.c
-index 754c830..714b6b7 100644
+index d12344f..ba82382 100644
 --- a/exa/exa.c
 +++ b/exa/exa.c
-@@ -61,7 +61,11 @@ exaGetPixmapOffset(PixmapPtr pPix)
+@@ -59,7 +59,11 @@ exaGetPixmapOffset(PixmapPtr pPix)
      ExaScreenPriv(pPix->drawable.pScreen);
      ExaPixmapPriv(pPix);
  
--- a/open-src/xserver/xorg/IA.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/IA.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -19,7 +19,7 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 diff --git a/Makefile.am b/Makefile.am
-index cea140b..b1408f2 100644
+index 9a62853..7ce17e3 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -37,6 +37,7 @@ SUBDIRS = \
@@ -31,10 +31,10 @@
  	config \
  	hw \
 diff --git a/configure.ac b/configure.ac
-index 1ff432f..a7c8900 100644
+index 28eb2f1..5a8e173 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1191,6 +1191,10 @@ AC_DEFINE(XINPUT, 1, [Support X Input extension])
+@@ -1214,6 +1214,10 @@ AC_DEFINE(XINPUT, 1, [Support X Input extension])
  XI_LIB='$(top_builddir)/Xi/libXi.la'
  XI_INC='-I$(top_srcdir)/Xi'
  
@@ -43,9 +43,9 @@
 +XEXT_LIB="${XEXT_LIB} ${IA_LIB}"
 +
  AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes)
- AM_CONDITIONAL(XAA, test "x$XAA" = xyes)
  AM_CONDITIONAL(VGAHW, test "x$VGAHW" = xyes)
-@@ -2240,3 +2244,6 @@ test/xi2/Makefile
+ AM_CONDITIONAL(VBE, test "x$VBE" = xyes)
+@@ -2312,3 +2316,6 @@ test/xi2/Makefile
  xserver.ent
  xorg-server.pc
  ])
@@ -53,23 +53,23 @@
 +# Add Sun IA extension
 +AC_OUTPUT([IA/Makefile])
 diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
-index 19feac1..b38d265 100644
+index c2cfc90..907a103 100644
 --- a/hw/xfree86/common/xf86Config.c
 +++ b/hw/xfree86/common/xf86Config.c
-@@ -125,6 +125,7 @@ static ModuleDefault ModuleDefaults[] = {
- #ifdef DRI2
-     {.name = "dri2",.toLoad = TRUE,.load_opt = NULL},
+@@ -117,6 +117,7 @@ static ModuleDefault ModuleDefaults[] = {
+     {.name = "fb",.toLoad = TRUE,.load_opt = NULL},
+     {.name = "shadow",.toLoad = TRUE,.load_opt = NULL},
  #endif
 +    {.name = "ia",.toLoad = TRUE,.load_opt = NULL},
      {.name = NULL,.toLoad = FALSE,.load_opt = NULL}
  };
  
 diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
-index a5be3ae..02a6d0d 100644
+index f161db6..fd524c5 100644
 --- a/hw/xfree86/dixmods/Makefile.am
 +++ b/hw/xfree86/dixmods/Makefile.am
-@@ -65,3 +65,11 @@ libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
- libdixmods_la_CFLAGS = -DXFree86LOADER $(AM_CFLAGS)
+@@ -48,3 +48,11 @@ libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+ libdixmods_la_CFLAGS = $(AM_CFLAGS)
  
  libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
 +
@@ -80,9 +80,11 @@
 +libia_la_LDFLAGS = -avoid-version
 +libia_la_LIBADD = $(top_builddir)/IA/libIA.la
 +libia_la_SOURCES = iamodule.c
---- a/mi/miinitext.c	Tue Sep 11 14:41:49 2012
-+++ b/mi/miinitext.c	Tue Sep 11 14:45:20 2012
-@@ -151,6 +151,9 @@
+diff --git a/mi/miinitext.c b/mi/miinitext.c
+index d175440..720dca4 100644
+--- a/mi/miinitext.c
++++ b/mi/miinitext.c
+@@ -151,6 +151,9 @@ static ExtensionToggle ExtensionToggleList[] = {
  #ifdef XCSECURITY
      {"SECURITY", &noSecurityExtension},
  #endif
--- a/open-src/xserver/xorg/Makefile	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/Makefile	Thu Dec 20 13:32:15 2012 -0800
@@ -32,9 +32,9 @@
 MODULE_VERSION=$(XORGSERVER_VERS)
 
 # Checksums for upstream tarball
-TARBALL_MD5   = bde3d178b756597d2ec2a19ef60d2e1f
-TARBALL_SHA1  = b29aef6ab4924e2b034ccb26b289e929d61a2555
-TARBALL_SHA256= 548b91cb01087ad4f892428e7ac4955251cf12393e86c70420436b33848ef28a
+TARBALL_MD5   = a13d8876e3e804189392119638a07a1f
+TARBALL_SHA1  = 634b14f38b0208b2c5714955eb40c59d2a99fd84
+TARBALL_SHA256= c93540e2799df4655c6f1b67dc7d8d6db96df4f08ef1702fffbc5df843a43d00
 
 # Patches to apply to source after unpacking, in order
 # *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
--- a/open-src/xserver/xorg/autoconfig.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/autoconfig.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -21,10 +21,10 @@
 6385111: Xorg auto-configuration Improvement
 
 diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
-index ef65490..93ade52 100644
+index 891623d..ca1b1aa 100644
 --- a/hw/xfree86/common/xf86Config.c
 +++ b/hw/xfree86/common/xf86Config.c
-@@ -1988,7 +1988,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
+@@ -1993,7 +1993,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
      cmodep = conf_monitor->mon_modeline_lst;
      while (cmodep) {
          mode = xnfcalloc(1, sizeof(DisplayModeRec));
--- a/open-src/xserver/xorg/cli-nobanner.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/cli-nobanner.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -20,10 +20,10 @@
 # DEALINGS IN THE SOFTWARE.
 
 diff --git a/os/utils.c b/os/utils.c
-index 6c00185..46af67f 100644
+index fd9feed..78ec675 100644
 --- a/os/utils.c
 +++ b/os/utils.c
-@@ -747,6 +747,11 @@ ProcessCommandLine(int argc, char *argv[])
+@@ -757,6 +757,11 @@ ProcessCommandLine(int argc, char *argv[])
                  nolock = TRUE;
          }
  #endif
--- a/open-src/xserver/xorg/cli-nolock.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/cli-nolock.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -20,10 +20,10 @@
 # DEALINGS IN THE SOFTWARE.
 
 diff --git a/os/utils.c b/os/utils.c
-index 30592d2..6c00185 100644
+index 04bcbc6..fd9feed 100644
 --- a/os/utils.c
 +++ b/os/utils.c
-@@ -502,7 +502,9 @@ UseMsg(void)
+@@ -503,7 +503,9 @@ UseMsg(void)
  #ifdef RLIMIT_STACK
      ErrorF("-ls int                limit stack space to N Kb\n");
  #endif
@@ -33,7 +33,7 @@
      ErrorF("-nolisten string       don't listen on protocol\n");
      ErrorF("-noreset               don't reset after last client exists\n");
      ErrorF("-background [none]     create root window with no background\n");
-@@ -734,6 +736,7 @@ ProcessCommandLine(int argc, char *argv[])
+@@ -744,6 +746,7 @@ ProcessCommandLine(int argc, char *argv[])
                  UseMsg();
          }
  #endif
@@ -41,7 +41,7 @@
          else if (strcmp(argv[i], "-nolock") == 0) {
  #if !defined(WIN32) && !defined(__CYGWIN__)
              if (getuid() != 0)
-@@ -743,6 +746,7 @@ ProcessCommandLine(int argc, char *argv[])
+@@ -753,6 +756,7 @@ ProcessCommandLine(int argc, char *argv[])
  #endif
                  nolock = TRUE;
          }
--- a/open-src/xserver/xorg/dtlogin-userinfo.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/dtlogin-userinfo.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -23,10 +23,10 @@
 with core server code - see sun-src/os/dtlogin.c for the main implementation.
 
 diff --git a/configure.ac b/configure.ac
-index 3047b2a..1ff432f 100644
+index 77ad53d..28eb2f1 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1457,6 +1457,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
+@@ -1492,6 +1492,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
  XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
  XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB"
  XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
@@ -35,10 +35,10 @@
  AC_SUBST([XSERVER_SYS_LIBS])
  
 diff --git a/dix/main.c b/dix/main.c
-index 4563cb3..f9ecfa7 100644
+index e2ec177..0eaa6aa 100644
 --- a/dix/main.c
 +++ b/dix/main.c
-@@ -115,6 +115,11 @@ Equipment Corporation.
+@@ -116,6 +116,11 @@ Equipment Corporation.
  #include "dpmsproc.h"
  #endif
  
@@ -50,7 +50,7 @@
  extern void Dispatch(void);
  
  #ifdef XQUARTZ
-@@ -164,6 +169,13 @@ main(int argc, char *argv[], char *envp[])
+@@ -165,6 +170,13 @@ main(int argc, char *argv[], char *envp[])
          InitBlockAndWakeupHandlers();
          /* Perform any operating system dependent initializations you'd like */
          OsInit();
@@ -64,7 +64,7 @@
          if (serverGeneration == 1) {
              CreateWellKnownSockets();
              for (i = 1; i < MAXCLIENTS; i++)
-@@ -295,6 +307,11 @@ main(int argc, char *argv[], char *envp[])
+@@ -302,6 +314,11 @@ main(int argc, char *argv[], char *envp[])
          pthread_mutex_unlock(&serverRunningMutex);
  #endif
  
@@ -74,8 +74,8 @@
 +#endif
 +
          UndisplayDevices();
+         DisableAllDevices();
  
-         /* Now free up whatever must be freed */
 diff --git a/os/Makefile.am b/os/Makefile.am
 index c4825ad..27d70ca 100644
 --- a/os/Makefile.am
--- a/open-src/xserver/xorg/fontmod.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/fontmod.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -23,10 +23,10 @@
 to ignore in xorg.conf files.
 
 diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
-index 4299257..e86e564 100644
+index af8a89e..ab9a37a 100644
 --- a/hw/xfree86/common/xf86Config.c
 +++ b/hw/xfree86/common/xf86Config.c
-@@ -253,6 +253,7 @@ xf86ModulelistFromConfig(pointer **optlist)
+@@ -245,6 +245,7 @@ xf86ModulelistFromConfig(pointer **optlist)
  
      const char *ignore[] = { "GLcore", "speedo", "bitmap", "drm",
          "freetype", "type1",
--- a/open-src/xserver/xorg/hotkey.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/hotkey.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -1,5 +1,5 @@
 diff --git a/Xi/exevents.c b/Xi/exevents.c
-index f681a8b..9ffb87f 100644
+index 106da3a..dd7e3a2 100644
 --- a/Xi/exevents.c
 +++ b/Xi/exevents.c
 @@ -225,7 +225,16 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
@@ -20,12 +20,12 @@
  
      mk->sourceid = device->id;
 diff --git a/Xi/extinit.c b/Xi/extinit.c
-index 4483076..e40c5d0 100644
+index 7e30755..5c008e4 100644
 --- a/Xi/extinit.c
 +++ b/Xi/extinit.c
-@@ -367,6 +367,10 @@ extern XExtensionVersion XIVersion;
+@@ -371,6 +371,10 @@ Mask PropagateMask[EMASKSIZE];
  
- Mask PropagateMask[MAXDEVICES];
+ DevPrivateKeyRec XIClientPrivateKeyRec;
  
 +#ifdef SUNSOFT
 +DevPrivateKeyRec HotkeyMapDevicePrivateKeyRec;
@@ -33,7 +33,7 @@
 +
  /*****************************************************************
   *
-  * Versioning support
+  * Declarations of local routines.
 @@ -1260,6 +1264,11 @@ XInputExtensionInit(void)
          (&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec)))
          FatalError("Cannot request private for XI.\n");
@@ -47,7 +47,7 @@
          FatalError("Failed to add callback to XI.\n");
  
 diff --git a/config/hal.c b/config/hal.c
-index 2ead556..c3eab4a 100644
+index 2ead556..9de9dfc 100644
 --- a/config/hal.c
 +++ b/config/hal.c
 @@ -123,6 +123,49 @@ get_prop_string_array(LibHalContext * hal_ctx, const char *udi,
@@ -133,7 +133,7 @@
        <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
               string="Linux">
 diff --git a/include/inputstr.h b/include/inputstr.h
-index 841e805..a338ea8 100644
+index 5a38924..263b1b1 100644
 --- a/include/inputstr.h
 +++ b/include/inputstr.h
 @@ -57,6 +57,11 @@ SOFTWARE.
--- a/open-src/xserver/xorg/make_xkm_output_dir.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/make_xkm_output_dir.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -24,11 +24,11 @@
  DDX_SRCS = \
          ddxBeep.c \
 diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
-index cb2dfc3..937fea4 100644
+index d462957..9338a1c 100644
 --- a/xkb/ddxLoad.c
 +++ b/xkb/ddxLoad.c
-@@ -143,14 +143,30 @@ Win32System(const char *cmdline)
- #define System(x) Win32System(x)
+@@ -68,14 +68,30 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #define PATHSEPARATOR "/"
  #endif
  
 +#ifdef MAKE_XKM_OUTPUT_DIR
@@ -59,7 +59,7 @@
      }
      else
  #else
-@@ -188,6 +204,15 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
+@@ -113,6 +129,15 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
      const char *xkmfile = "-";
  #endif
  
@@ -75,7 +75,7 @@
      snprintf(keymap, sizeof(keymap), "server-%s", display);
  
      OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
-@@ -239,6 +264,11 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
+@@ -164,6 +189,11 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
      out = fopen(tmpname, "w");
  #endif
  
--- a/open-src/xserver/xorg/nvidia-autoconfig.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/nvidia-autoconfig.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -19,10 +19,10 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
-index e86e564..ef65490 100644
+index ab9a37a..891623d 100644
 --- a/hw/xfree86/common/xf86Config.c
 +++ b/hw/xfree86/common/xf86Config.c
-@@ -541,6 +541,25 @@ fixup_video_driver_list(char **drivers)
+@@ -533,6 +533,25 @@ fixup_video_driver_list(char **drivers)
              }
          }
      }
--- a/open-src/xserver/xorg/osaudit.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/osaudit.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -24,10 +24,10 @@
 7010804 Xorg should audit connections and disconnections.
 
 diff --git a/configure.ac b/configure.ac
-index a12783c..3047b2a 100644
+index 67b1eb4..77ad53d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -306,6 +306,12 @@ AC_CHECK_HEADER([execinfo.h],[
+@@ -309,6 +309,12 @@ AC_CHECK_HEADER([execinfo.h],[
      ])]
  )
  
@@ -41,10 +41,10 @@
  dnl Bus options and CPU capabilities.  Replaces logic in
  dnl hw/xfree86/os-support/bus/Makefile.am, among others.
 diff --git a/dix/main.c b/dix/main.c
-index 70dcc94..4563cb3 100644
+index fb935c9..e2ec177 100644
 --- a/dix/main.c
 +++ b/dix/main.c
-@@ -200,6 +200,7 @@ main(int argc, char *argv[], char *envp[])
+@@ -201,6 +201,7 @@ main(int argc, char *argv[], char *envp[])
          dixResetRegistry();
          ResetFontPrivateIndex();
          InitCallbackManager();
@@ -53,7 +53,7 @@
  
          if (screenInfo.numScreens < 1)
 diff --git a/include/dix-config.h.in b/include/dix-config.h.in
-index 3fb6413..93f5ce5 100644
+index 578f249..8acca13 100644
 --- a/include/dix-config.h.in
 +++ b/include/dix-config.h.in
 @@ -115,6 +115,9 @@
@@ -67,10 +67,10 @@
  #undef HAVE_LIBM
  
 diff --git a/include/os.h b/include/os.h
-index 4b5b440..9ecdfa9 100644
+index 9e323f3..01cea99 100644
 --- a/include/os.h
 +++ b/include/os.h
-@@ -652,4 +652,8 @@ LogPrintMarkers(void);
+@@ -680,4 +680,8 @@ LogPrintMarkers(void);
  extern _X_EXPORT void
  xorg_backtrace(void);
  
--- a/open-src/xserver/xorg/record-regset.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/record-regset.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -1,8 +1,8 @@
 diff --git a/record/record.c b/record/record.c
-index 8a38118..296fd58 100644
+index f3a26a7..6d79de4 100644
 --- a/record/record.c
 +++ b/record/record.c
-@@ -1394,6 +1394,9 @@ typedef struct {
+@@ -1393,6 +1393,9 @@ typedef struct {
      short first, last;          /* if for extension, major opcode interval */
  } SetInfoRec, *SetInfoPtr;
  
--- a/open-src/xserver/xorg/signal-handler.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/signal-handler.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -1,8 +1,8 @@
 diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
-index 9530eb4..17c91d0 100644
+index 398178e..929dc7c 100644
 --- a/hw/xfree86/dri/dri.c
 +++ b/hw/xfree86/dri/dri.c
-@@ -2499,7 +2499,11 @@ drmInstallSIGIOHandler(int fd, void (*f) (int, void *, void *))
+@@ -2500,7 +2500,11 @@ drmInstallSIGIOHandler(int fd, void (*f) (int, void *, void *))
      entry = drmGetEntry(fd);
      entry->f = f;
  
@@ -14,7 +14,7 @@
  }
  
  int
-@@ -2509,5 +2513,9 @@ drmRemoveSIGIOHandler(int fd)
+@@ -2510,5 +2514,9 @@ drmRemoveSIGIOHandler(int fd)
  
      entry->f = NULL;
  
--- a/open-src/xserver/xorg/sun-manpage.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/sun-manpage.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -1,5 +1,5 @@
 diff --git a/man/Xserver.man b/man/Xserver.man
-index 0cd9b94..4af64aa 100644
+index b103551..82e5370 100644
 --- a/man/Xserver.man
 +++ b/man/Xserver.man
 @@ -1,3 +1,25 @@
@@ -53,7 +53,7 @@
  This utility is run from the system boot files and takes care of keeping
  the server running, prompting for usernames and passwords, and starting up
  the user sessions.
-@@ -188,6 +218,13 @@ with
+@@ -195,6 +225,13 @@ with
  .BR "\-nolisten tcp" .
  This option may be issued multiple times to disable listening to different
  transport types.
@@ -67,7 +67,7 @@
  .TP 8
  .B \-noreset
  prevents a server reset when the last client connection is closed.  This
-@@ -385,7 +422,7 @@ located in the XKB base directory or a subdirectory, and specified as the
+@@ -392,7 +429,7 @@ located in the XKB base directory or a subdirectory, and specified as the
  relative path from the XKB base directory.  The default XKB base directory is
  .IR __projectroot__/lib/X11/xkb .
  .TP 8
@@ -76,7 +76,7 @@
  enables(+) or disables(-) AccessX key sequences.
  .TP 8
  .B \-xkbdir \fIdirectory\fP
-@@ -541,6 +578,110 @@ the following font path:
+@@ -548,6 +585,110 @@ the following font path:
      /usr/share/fonts/default/Type1,
      /usr/share/fonts/default/ghostscript
  .fi
@@ -187,7 +187,7 @@
  
  .SH FILES
  .TP 30
-@@ -556,8 +697,12 @@ Outline font directories
+@@ -563,8 +704,12 @@ Outline font directories
  .I /tmp/.X11-unix/X\fBn\fP
  Unix domain socket for display number \fBn\fP
  .TP 30
@@ -202,7 +202,7 @@
  .TP 30
  .I __projectroot__/lib/X11/xdm/xdm-errors
  Default error log file if the server is run from \fIxdm\fP(1)
-@@ -579,14 +724,22 @@ Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1),
+@@ -586,14 +731,22 @@ Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1),
  \fIxdm\fP(1), \fIxhost\fP(1), \fIxfwp\fP(1),
  .I "Security Extension Specification"
  .PP
--- a/open-src/xserver/xorg/sun-paths.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/sun-paths.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -1,5 +1,5 @@
 diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
-index ec679df..19feac1 100644
+index 486752b..c2cfc90 100644
 --- a/hw/xfree86/common/xf86Config.c
 +++ b/hw/xfree86/common/xf86Config.c
 @@ -74,9 +74,9 @@
@@ -26,10 +26,10 @@
  			"%P/etc/X11/%X.%H," \
  			"%P/etc/X11/%X," \
 diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
-index 0071004..6f6c766 100644
+index 7df7a80..74e503c 100644
 --- a/hw/xfree86/common/xf86Globals.c
 +++ b/hw/xfree86/common/xf86Globals.c
-@@ -135,7 +135,8 @@ xf86InfoRec xf86Info = {
+@@ -141,7 +141,8 @@ xf86InfoRec xf86Info = {
  
  const char *xf86ConfigFile = NULL;
  const char *xf86ConfigDir = NULL;
@@ -39,21 +39,11 @@
  MessageType xf86ModPathFrom = X_DEFAULT;
  const char *xf86LogFile = DEFAULT_LOGPREFIX;
  MessageType xf86LogFileFrom = X_DEFAULT;
-diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
-index 8086f32..37b9315 100644
---- a/include/xorg-server.h.in
-+++ b/include/xorg-server.h.in
-@@ -205,6 +205,7 @@
- /* X Access Control Extension */
- #undef XACE
- 
-+#include <sys/isa_defs.h> /* Ensure _LP64 is defined when needed on Solaris */
- #ifdef _LP64
- #define _XSERVER64 1
- #endif
---- a/hw/xfree86/man/xorg.conf.man	Wed Sep  5 16:06:49 2012
-+++ b/hw/xfree86/man/xorg.conf.man	Wed Sep  5 16:08:06 2012
-@@ -36,9 +36,9 @@
+diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
+index 5d92bbe..2b5a8f6 100644
+--- a/hw/xfree86/man/xorg.conf.man
++++ b/hw/xfree86/man/xorg.conf.man
+@@ -36,9 +36,9 @@ server is started as a normal user:
  .RS 4
  .nf
  .IR /etc/X11/ <cmdline>
@@ -65,7 +55,7 @@
  .I /etc/X11/xorg.conf
  .I /etc/xorg.conf
  .IR __projectroot__/etc/X11/xorg.conf. <hostname>
-@@ -67,10 +67,10 @@
+@@ -67,10 +67,10 @@ search locations are as follows:
  .nf
  <cmdline>
  .IR /etc/X11/ <cmdline>
@@ -78,3 +68,15 @@
  .I /etc/X11/xorg.conf
  .I /etc/xorg.conf
  .IR __projectroot__/etc/X11/xorg.conf. <hostname>
+diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
+index 81935be..9473e34 100644
+--- a/include/xorg-server.h.in
++++ b/include/xorg-server.h.in
+@@ -208,6 +208,7 @@
+ /* Have X server platform bus support */
+ #undef XSERVER_PLATFORM_BUS
+ 
++#include <sys/isa_defs.h> /* Ensure _LP64 is defined when needed on Solaris */
+ #ifdef _LP64
+ #define _XSERVER64 1
+ #endif
--- a/open-src/xserver/xorg/vt.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/vt.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -1,5 +1,5 @@
 diff --git a/dix/main.c b/dix/main.c
-index f9ecfa7..1e9d1dc 100644
+index 0eaa6aa..f466c25 100644
 --- a/dix/main.c
 +++ b/dix/main.c
 @@ -78,6 +78,8 @@ Equipment Corporation.
@@ -11,7 +11,7 @@
  #include <X11/X.h>
  #include <X11/Xos.h>            /* for unistd.h  */
  #include <X11/Xproto.h>
-@@ -122,6 +124,30 @@ extern void DtloginCloseDown(void);
+@@ -123,6 +125,30 @@ extern void DtloginCloseDown(void);
  
  extern void Dispatch(void);
  
@@ -42,7 +42,7 @@
  #ifdef XQUARTZ
  #include <pthread.h>
  
-@@ -140,6 +166,9 @@ main(int argc, char *argv[], char *envp[])
+@@ -141,6 +167,9 @@ main(int argc, char *argv[], char *envp[])
  {
      int i;
      HWEventQueueType alwaysCheckForInput[2];
@@ -52,7 +52,7 @@
  
      display = "0";
  
-@@ -153,6 +182,12 @@ main(int argc, char *argv[], char *envp[])
+@@ -154,6 +183,12 @@ main(int argc, char *argv[], char *envp[])
  
      ProcessCommandLine(argc, argv);
  
--- a/open-src/xserver/xorg/workaround-7154410.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/workaround-7154410.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -1,8 +1,8 @@
 diff --git a/glx/Makefile.am b/glx/Makefile.am
-index ced78b7..443d374 100644
+index 591c4ac..8d16869 100644
 --- a/glx/Makefile.am
 +++ b/glx/Makefile.am
-@@ -101,3 +101,6 @@ libglx_la_SOURCES = \
+@@ -99,3 +99,6 @@ libglx_la_SOURCES = \
          xfont.c
  
  libglx_la_LIBADD = $(DLOPEN_LIBS)
--- a/open-src/xserver/xorg/xtsol.patch	Thu Dec 06 10:59:30 2012 -0800
+++ b/open-src/xserver/xorg/xtsol.patch	Thu Dec 20 13:32:15 2012 -0800
@@ -20,7 +20,7 @@
 # DEALINGS IN THE SOFTWARE.
 
 diff --git a/Makefile.am b/Makefile.am
-index b1408f2..54d64ab 100644
+index 7ce17e3..8d5c65d 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -17,6 +17,10 @@ if RECORD
@@ -43,10 +43,10 @@
  	config \
  	hw \
 diff --git a/Xext/security.c b/Xext/security.c
-index 3699510..843a33a 100644
+index 6cc9aa0..3fed0b3 100644
 --- a/Xext/security.c
 +++ b/Xext/security.c
-@@ -1082,3 +1082,27 @@ SecurityExtensionInit(INITARGS)
+@@ -1084,3 +1084,27 @@ SecurityExtensionInit(void)
      /* Label objects that were created before we could register ourself */
      SecurityLabelInitial();
  }
@@ -88,10 +88,10 @@
 +
  #endif                          /* _SECURITY_SRV_H */
 diff --git a/configure.ac b/configure.ac
-index a7c8900..4ad4011 100644
+index 5a8e173..017fcd7 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -221,6 +221,14 @@ dnl Find the math libary, then check for cbrt function in it.
+@@ -223,6 +223,14 @@ dnl Find the math libary, then check for cbrt function in it.
  AC_CHECK_LIB(m, sqrt)
  AC_CHECK_FUNCS([cbrt])
  
@@ -106,7 +106,7 @@
  AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
  
  dnl AGPGART headers
-@@ -1500,6 +1508,8 @@ AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
+@@ -1569,6 +1577,8 @@ AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
  if test "x$XVFB" = xyes; then
  	XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
  	XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
@@ -115,7 +115,7 @@
  	AC_SUBST([XVFB_LIBS])
  	AC_SUBST([XVFB_SYS_LIBS])
  fi
-@@ -1521,6 +1531,8 @@ if test "x$XNEST" = xyes; then
+@@ -1590,6 +1600,8 @@ if test "x$XNEST" = xyes; then
  	fi
  	XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
  	XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
@@ -124,7 +124,7 @@
  	AC_SUBST([XNEST_LIBS])
  	AC_SUBST([XNEST_SYS_LIBS])
  fi
-@@ -2057,6 +2069,7 @@ if test "$KDRIVE" = yes; then
+@@ -2132,6 +2144,7 @@ if test "$KDRIVE" = yes; then
      KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
  
      KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
@@ -132,7 +132,7 @@
      KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
      case $host_os in
  	*linux*)
-@@ -2247,3 +2260,6 @@ xorg-server.pc
+@@ -2319,3 +2332,6 @@ xorg-server.pc
  
  # Add Sun IA extension
  AC_OUTPUT([IA/Makefile])
@@ -140,7 +140,7 @@
 +# Add Sun Trusted Extensions extension
 +AC_OUTPUT([tsol/Makefile])
 diff --git a/dix/dispatch.c b/dix/dispatch.c
-index 104dcc9..5a80c13 100644
+index 0ce10c2..dd70ee7 100644
 --- a/dix/dispatch.c
 +++ b/dix/dispatch.c
 @@ -73,8 +73,8 @@ Equipment Corporation.
@@ -165,7 +165,7 @@
  static int nextFreeClientID;    /* always MIN free client ID */
  
  static int nClients;            /* number of authorized clients */
-@@ -884,7 +888,12 @@ ProcCirculateWindow(ClientPtr client)
+@@ -885,7 +889,12 @@ ProcCirculateWindow(ClientPtr client)
      return Success;
  }
  
@@ -179,7 +179,7 @@
  GetGeometry(ClientPtr client, xGetGeometryReply * rep)
  {
      DrawablePtr pDraw;
-@@ -1964,7 +1973,12 @@ ProcPutImage(ClientPtr client)
+@@ -1966,7 +1975,12 @@ ProcPutImage(ClientPtr client)
      return Success;
  }
  
@@ -194,10 +194,10 @@
             int x, int y, int width, int height,
             Mask planemask, xGetImageReply ** im_return)
 diff --git a/dix/events.c b/dix/events.c
-index 0e4ba86..66e9104 100644
+index ddb5b34..14c2833 100644
 --- a/dix/events.c
 +++ b/dix/events.c
-@@ -2723,6 +2723,9 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
+@@ -2771,6 +2771,9 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
   *
   * @returns the window at the given coordinates.
   */
@@ -208,7 +208,7 @@
  XYToWindow(SpritePtr pSprite, int x, int y)
  {
 diff --git a/dix/window.c b/dix/window.c
-index a31e78f..4cf5fdf 100644
+index 49ef4a0..3f2a99e 100644
 --- a/dix/window.c
 +++ b/dix/window.c
 @@ -96,6 +96,34 @@ Equipment Corporation.
@@ -258,7 +258,7 @@
  #ifdef COMPOSITE
  static const char *overlay_win_name = "<composite overlay>";
  #endif
-@@ -1833,7 +1866,12 @@ IsSiblingAboveMe(WindowPtr pMe, WindowPtr pSib)
+@@ -1831,7 +1864,12 @@ IsSiblingAboveMe(WindowPtr pMe, WindowPtr pSib)
      return Below;
  }
  
@@ -272,7 +272,7 @@
  WindowExtents(WindowPtr pWin, BoxPtr pBox)
  {
      pBox->x1 = pWin->drawable.x - wBorderWidth(pWin);
-@@ -1860,7 +1898,12 @@ MakeBoundingRegion(WindowPtr pWin, BoxPtr pBox)
+@@ -1858,7 +1896,12 @@ MakeBoundingRegion(WindowPtr pWin, BoxPtr pBox)
      return pRgn;
  }
  
@@ -286,7 +286,7 @@
  ShapeOverlap(WindowPtr pWin, BoxPtr pWinBox, WindowPtr pSib, BoxPtr pSibBox)
  {
      RegionPtr pWinRgn, pSibRgn;
-@@ -2036,7 +2079,12 @@ WhereDoIGoInTheStack(WindowPtr pWin,
+@@ -2034,7 +2077,12 @@ WhereDoIGoInTheStack(WindowPtr pWin,
      }
  }
  
@@ -301,11 +301,11 @@
  {
  /* Note that pSib might be NULL */
 diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
-index b38d265..4299257 100644
+index 907a103..af8a89e 100644
 --- a/hw/xfree86/common/xf86Config.c
 +++ b/hw/xfree86/common/xf86Config.c
-@@ -126,6 +126,7 @@ static ModuleDefault ModuleDefaults[] = {
-     {.name = "dri2",.toLoad = TRUE,.load_opt = NULL},
+@@ -118,6 +118,7 @@ static ModuleDefault ModuleDefaults[] = {
+     {.name = "shadow",.toLoad = TRUE,.load_opt = NULL},
  #endif
      {.name = "ia",.toLoad = TRUE,.load_opt = NULL},
 +    {.name = "xtsol",.toLoad = TRUE,.load_opt = NULL},
@@ -313,10 +313,10 @@
  };
  
 diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
-index 02a6d0d..00f8021 100644
+index fd524c5..c02677a 100644
 --- a/hw/xfree86/dixmods/Makefile.am
 +++ b/hw/xfree86/dixmods/Makefile.am
-@@ -73,3 +73,11 @@ libia_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/IA
+@@ -56,3 +56,11 @@ libia_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/IA
  libia_la_LDFLAGS = -avoid-version
  libia_la_LIBADD = $(top_builddir)/IA/libIA.la
  libia_la_SOURCES = iamodule.c
@@ -328,8 +328,27 @@
 +libxtsol_la_LIBADD = $(top_builddir)/tsol/libxtsol.la $(PIXMAN_LIBS)
 +libxtsol_la_SOURCES = tsolmodule.c
 +endif
+diff --git a/include/dix.h b/include/dix.h
+index 74123b5..6e53887 100644
+--- a/include/dix.h
++++ b/include/dix.h
+@@ -166,6 +166,14 @@ extern _X_EXPORT void MarkClientException(ClientPtr /*client */ );
+ 
+ extern _X_HIDDEN Bool CreateConnectionBlock(void);
+ 
++#ifdef TSOL
++extern _X_EXPORT int DoGetImage(ClientPtr client, int format, Drawable drawable,
++                      int x, int y, int width, int height,
++                      Mask planemask, xGetImageReply **im_return);
++
++extern _X_EXPORT int GetGeometry(ClientPtr client, xGetGeometryReply *rep);
++#endif
++
+ /* dixutils.c */
+ 
+ extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ ,
 diff --git a/include/extnsionst.h b/include/extnsionst.h
-index e825236..5417c57 100644
+index e825236..d3e70d1 100644
 --- a/include/extnsionst.h
 +++ b/include/extnsionst.h
 @@ -44,6 +44,34 @@ SOFTWARE.
@@ -400,7 +419,7 @@
 +
  #endif                          /* EXTENSIONSTRUCT_H */
 diff --git a/include/input.h b/include/input.h
-index d891fe5..63a7e79 100644
+index f8459b8..efb77f7 100644
 --- a/include/input.h
 +++ b/include/input.h
 @@ -397,7 +397,7 @@ extern void NoteLedState(DeviceIntPtr /*keybd */ ,
@@ -412,8 +431,46 @@
                            ClientPtr /*client */ );
  
  extern void ProcessPointerEvent(InternalEvent * /* ev */ ,
+diff --git a/include/window.h b/include/window.h
+index f8fc2a5..f25a27a 100644
+--- a/include/window.h
++++ b/include/window.h
+@@ -227,5 +227,11 @@ extern _X_EXPORT void EnableMapUnmapEvents(WindowPtr /* pWin */ );
+ extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
+ extern _X_EXPORT void PrintWindowTree(void);
+ 
++#ifdef TSOL
++#include "validate.h" /* needed for VTKind enum definition */
++extern _X_EXPORT void ReflectStackChange(WindowPtr pWin, WindowPtr pSib,
++                                         VTKind  kind);
++#endif
++
+ extern _X_EXPORT VisualPtr WindowGetVisual(WindowPtr /*pWin*/);
+ #endif                          /* WINDOW_H */
+diff --git a/mi/miinitext.c b/mi/miinitext.c
+index 720dca4..26e7f5c 100644
+--- a/mi/miinitext.c
++++ b/mi/miinitext.c
+@@ -90,6 +90,7 @@ SOFTWARE.
+ #undef DAMAGE
+ #undef COMPOSITE
+ #undef MITSHM
++#undef TSOL
+ #endif
+ 
+ #ifdef HAVE_XNEST_CONFIG_H
+@@ -154,6 +155,9 @@ static ExtensionToggle ExtensionToggleList[] = {
+ #ifdef SolarisIAExtension
+     { IANAME /* "SolarisIA" */, &noIAExtension },
+ #endif
++#ifdef TSOL
++    { TSOLNAME /* "SUN_TSOL" */, &noXTSolExtension },
++#endif
+ #ifdef RES
+     {"X-Resource", &noResExtension},
+ #endif
 diff --git a/os/connection.c b/os/connection.c
-index 1099752..f9ba2d7 100644
+index 721ad65..62a227c 100644
 --- a/os/connection.c
 +++ b/os/connection.c
 @@ -43,6 +43,33 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
@@ -450,7 +507,7 @@
  /*****************************************************************
   *  Stuff to create connections --- OS dependent
   *
-@@ -254,6 +281,11 @@ static int ListenTransCount;
+@@ -255,6 +282,11 @@ static int ListenTransCount;
  
  static void ErrorConnMax(XtransConnInfo /* trans_conn */ );
  
@@ -462,7 +519,7 @@
  static XtransConnInfo
  lookup_trans_conn(int fd)
  {
-@@ -638,6 +670,12 @@ ClientAuthorized(ClientPtr client,
+@@ -667,6 +699,12 @@ ClientAuthorized(ClientPtr client,
      priv = (OsCommPtr) client->osPrivate;
      trans_conn = priv->trans_conn;
  
@@ -475,54 +532,3 @@
      /* Allow any client to connect without authorization on a launchd socket,
         because it is securely created -- this prevents a race condition on launch */
      if (trans_conn->flags & TRANS_NOXAUTH) {
---- a/include/dix.h	Wed Sep 12 09:31:22 2012
-+++ b/include/dix.h	Wed Sep 12 09:32:04 2012
-@@ -166,6 +166,14 @@
- 
- extern _X_HIDDEN Bool CreateConnectionBlock(void);
- 
-+#ifdef TSOL
-+extern _X_EXPORT int DoGetImage(ClientPtr client, int format, Drawable drawable,
-+                      int x, int y, int width, int height,
-+                      Mask planemask, xGetImageReply **im_return);
-+
-+extern _X_EXPORT int GetGeometry(ClientPtr client, xGetGeometryReply *rep);
-+#endif
-+
- /* dixutils.c */
- 
- extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ ,
---- a/include/window.h	Wed Sep 12 09:32:37 2012
-+++ b/include/window.h	Wed Sep 12 09:33:11 2012
-@@ -227,5 +227,11 @@
- extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
- extern _X_EXPORT void PrintWindowTree(void);
- 
-+#ifdef TSOL
-+#include "validate.h" /* needed for VTKind enum definition */
-+extern _X_EXPORT void ReflectStackChange(WindowPtr pWin, WindowPtr pSib,
-+                                         VTKind  kind);
-+#endif
-+
- extern _X_EXPORT VisualPtr WindowGetVisual(WindowPtr /*pWin*/);
- #endif                          /* WINDOW_H */
---- a/mi/miinitext.c	Wed Sep 12 09:34:15 2012
-+++ b/mi/miinitext.c	Wed Sep 12 09:37:36 2012
-@@ -90,6 +90,7 @@
- #undef DAMAGE
- #undef COMPOSITE
- #undef MITSHM
-+#undef TSOL
- #endif
- 
- #ifdef HAVE_XNEST_CONFIG_H
-@@ -154,6 +155,9 @@
- #ifdef SolarisIAExtension
-     { IANAME /* "SolarisIA" */, &noIAExtension },
- #endif
-+#ifdef TSOL
-+    { TSOLNAME /* "SUN_TSOL" */, &noXTSolExtension },
-+#endif
- #ifdef RES
-     {"X-Resource", &noResExtension},
- #endif