rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / libX11 / patches / 09.SolarisIA.patch
blob70c16cc9df15ae598c4d4954bb89b3f94b799c84
1 ###############################################################################
2 # Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
4 # Permission is hereby granted, free of charge, to any person obtaining a
5 # copy of this software and associated documentation files (the "Software"),
6 # to deal in the Software without restriction, including without limitation
7 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 # and/or sell copies of the Software, and to permit persons to whom the
9 # Software is furnished to do so, subject to the following conditions:
11 # The above copyright notice and this permission notice (including the next
12 # paragraph) shall be included in all copies or substantial portions of the
13 # Software.
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 # DEALINGS IN THE SOFTWARE.
24 diff --git a/src/Makefile.am b/src/Makefile.am
25 index ddad93c..677b0ee 100644
26 --- a/src/Makefile.am
27 +++ b/src/Makefile.am
28 @@ -348,6 +348,9 @@ libX11_xcb_la_SOURCES = x11_xcb.c Xxcbint.h
29 libX11_xcb_la_LDFLAGS = -version-number 1:0:0 -no-undefined
30 libX11_xcb_la_LIBADD = libX11.la
32 +# SolarisIA extension
33 +libX11_la_SOURCES += XInteractive.c
36 # Figure out which sub-libraries to link into Xlib
38 diff --git a/src/OpenDis.c b/src/OpenDis.c
39 index a14d13b..ead8703 100644
40 --- a/src/OpenDis.c
41 +++ b/src/OpenDis.c
42 @@ -38,6 +38,12 @@ in this Software without prior written authorization from The Open Group.
43 #include "XKBlib.h"
44 #endif /* XKB */
46 +/* begin SUNSOFT_INTERACTIVE */
47 +#include <unistd.h>
48 +#include <X11/extensions/interactive.h>
49 +#include <X11/extensions/XInteractive.h>
50 +/* end SUNSOFT_INTERACTIVE */
52 #if defined(XTHREADS) && defined(SUNSOFT)
53 struct _DisplayPtrLink {
54 Display *dpy;
55 @@ -581,6 +587,21 @@ XOpenDisplay (
56 #ifdef XKB
57 XkbUseExtension(dpy,NULL,NULL);
58 #endif
59 +/* begin SUNSOFT_INTERACTIVE */
60 + {
62 + long pid = (long) getpid();
63 + int majorop, first_event, first_error;
64 + int majorv, minorv;
66 + if ( (XQueryExtension(dpy, "SolarisIA",
67 + &majorop, &first_event, &first_error)==True)) {
68 + XSolarisIASetProcessInfo(dpy, (unsigned char *)&pid,
69 + INTERACTIVE_INFO, 1);
70 + }
71 + }
72 +/* end SUNSOFT_INTERACTIVE */
75 * and return successfully