open-src/lib/libX11/SolarisIA.patch
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 11 Apr 2011 11:04:15 -0700
changeset 1112 4778e9ecf66e
parent 1064 3395ca7a91bf
child 1265 0b5cc5c013e4
permissions -rw-r--r--
7035408 Upgrade libX11 to 1.4.3 for deadlock & static analysis fixes

###############################################################################
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
diff -Nurp -x '*~' -x '*.orig' src/Makefile.am src/Makefile.am
--- src/Makefile.am	2011-04-06 13:52:16.515334675 -0700
+++ src/Makefile.am	2011-04-06 13:52:17.726885350 -0700
@@ -352,6 +352,9 @@ libX11_xcb_la_SOURCES = x11_xcb.c Xxcbin
 libX11_xcb_la_LDFLAGS = -version-number 1:0:0 -no-undefined
 libX11_xcb_la_LIBADD = libX11.la
 
+# SolarisIA extension
+libX11_la_SOURCES += XInteractive.c
+
 #
 # Figure out which sub-libraries to link into Xlib
 #
diff -Nurp -x '*~' -x '*.orig' src/OpenDis.c src/OpenDis.c
--- src/OpenDis.c	2011-04-06 13:52:16.502368856 -0700
+++ src/OpenDis.c	2011-04-06 13:52:17.727406866 -0700
@@ -38,6 +38,12 @@ in this Software without prior written a
 #include "XKBlib.h"
 #endif /* XKB */
 
+/* begin SUNSOFT_INTERACTIVE */
+#include <unistd.h>
+#include <X11/extensions/interactive.h>
+#include <X11/extensions/XInteractive.h>
+/* end SUNSOFT_INTERACTIVE */
+
 #if defined(XTHREADS) && defined(SUNSOFT)
 struct _DisplayPtrLink {
     Display *dpy;
@@ -605,6 +611,21 @@ fallback_success:
 #ifdef XKB
 	XkbUseExtension(dpy,NULL,NULL);
 #endif
+/* begin SUNSOFT_INTERACTIVE */
+	{
+
+	   long  pid    = (long) getpid();
+	   int majorop, first_event, first_error;
+	   int majorv, minorv;
+
+	   if ( (XQueryExtension(dpy, "SolarisIA",
+		&majorop, &first_event, &first_error)==True)) {
+		  XSolarisIASetProcessInfo(dpy, (unsigned char *)&pid,
+					   INTERACTIVE_INFO, 1);
+	   }
+	}
+/* end SUNSOFT_INTERACTIVE */
+
 /*
  * and return successfully
  */