17472475 Mass minor bugfix update to X.Org upstream release [Sep. 2013 edition]
15804808 SUNBT7185228 xfs service will go to maintenance status after running fsinfo
15802823 SUNBT7182943 Update xinit man page to not reference /usr/ucb/rsh
15702480 SUNBT7027122 imake should use /usr/lib/cpp instead of /usr/ccs/lib/cpp
14963848 SUNBT4146469 imake config file uses incorrect "install" program on SunOS 5
--- a/exception_lists/packaging Wed Sep 25 10:37:28 2013 -0700
+++ b/exception_lists/packaging Mon Sep 30 13:26:39 2013 -0700
@@ -61,10 +61,6 @@
# ON delivers the packaged version of this link
usr/lib/64
-# Only need the 32-bit versions of these files
-usr/lib/amd64/X11 i386
-usr/lib/sparcv9/X11 sparc
-
# Skip delivering the header file for an intel internal validation tool
usr/include/libdrm/intel_aub.h i386
--- a/open-src/app/appres/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/appres/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -34,17 +34,18 @@
MODULE_DESC = the appres Xt application resource list utility
# Version number (used in path names)
-MODULE_VERSION=1.0.3
+MODULE_VERSION=1.0.4
# Checksums for upstream tarball
-TARBALL_MD5 = 48d56924f76738872ef6c90f99030e34
-TARBALL_SHA1 = 7303f12fae8cce92da2dbd88c9d31d816dc5da06
+TARBALL_MD5 = ed598f0599d726963c1bdfdc691960d9
+TARBALL_SHA1 = f89d6fff84d838c0b8b4adeca46185b6d4812a27
+TARBALL_SHA256= 9f614e9427cd9641a4a801ed5055700afa410674c0b7aa186b86078f11b83e8d
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
# Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=*.man
+SUNTOUCHED_MANPAGES = man/appres.man
MODULE_STABILITY=Committed
# Compatibility links from /usr/X11/bin to /usr/bin
--- a/open-src/app/bitmap/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/bitmap/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -38,18 +38,18 @@
MODULE_PKGCLASS_SET=yes
# Version number (used in path names)
-MODULE_VERSION=1.0.6
+MODULE_VERSION=1.0.7
# Checksums for upstream tarball
-TARBALL_MD5 = cea3a96b32d23c9019daeb9881d33dc3
-TARBALL_SHA1 = 5527034785dec2b93a8d0931edc58602032d1f91
-TARBALL_SHA256= f70100002faf7c54b1b851261a14606c147abcc9e43f9b4e980ffc82f56eb5eb
+TARBALL_MD5 = 9c18cc1048146e29d68bfa9d0348b11d
+TARBALL_SHA1 = 18c4762b8c94b519ee2ca6c3171cc2f85e6b2421
+TARBALL_SHA256= 7ea2823a930ddfe3bfc0c7fbb16a5b463222edf05284c5cdc40a6d3c5c3988af
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
# Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=man/bitmap.man
+SUNTOUCHED_MANPAGES = man/bitmap.man man/atobm.man man/bmtoa.man
MODULE_STABILITY=Committed
# Compatibility links from /usr/X11/bin to /usr/bin
--- a/open-src/app/iceauth/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-Copyright 1989, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice 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
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright (C) 1994 X Consortium
-
-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 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
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not
-be used in advertising or otherwise to promote the sale, use or other deal-
-ings in this Software without prior written authorization from the X Consor-
-tium.
--- a/open-src/app/iceauth/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/iceauth/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -33,11 +33,12 @@
MODULE_PKGNAME_SET=yes
# Version number (used in path names)
-MODULE_VERSION=1.0.5
+MODULE_VERSION=1.0.6
# Checksums for upstream tarball
-TARBALL_MD5 = 08e3f6b523da8b0af179f22f339508b2
-TARBALL_SHA1 = d996c6ecaa93dcaccee4a11991eeacd40bddc13e
+TARBALL_MD5 = 2527344acc60741a709f4858564c5ae6
+TARBALL_SHA1 = ee56608a52eec81682b8ca204a1afa4ec15bf01f
+TARBALL_SHA256= bd990837353b439e6f45d478a87b8dbfa3f67d72d903e7a9ed4eb8de52f2e2f4
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/intel-gpu-tools/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/intel-gpu-tools/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -34,6 +34,7 @@
# Earliest & latest of the copyrights in the Oracle files in this pkg
ORACLE_COPYRIGHT_YEARS = 2013
ORACLE_TPNO = 13224
+ORACLE_TPNO_SET = yes
# pkg(5) name we deliver the files in (override default)
MODULE_PKGNAME=x11/diagnostic/$(MODULE_NAME)
--- a/open-src/app/lbxproxy/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-Copyright 1987, 1994, 1996, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice 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
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1993, 1994 Network Computing Devices, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software and
-its documentation for any purpose is hereby granted without fee, provided
-that the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name Network Computing Devices, Inc. not be
-used in advertising or publicity pertaining to distribution of this
-software without specific, written prior permission.
-
-THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
-DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
-LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
-COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA,
-OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF
-WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-Copyright 1990, 1991 Network Computing Devices;
-Portions Copyright 1987 by Digital Equipment Corporation
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the names of Network Computing Devices,
-or Digital not be used in advertising or
-publicity pertaining to distribution of the software without specific,
-written prior permission. Network Computing Devices, or Digital
-make no representations about the
-suitability of this software for any purpose. It is provided "as is"
-without express or implied warranty.
-
-NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR DIGITAL BE
-LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-Copyright 1992 Network Computing Devices
-Copyright 1996 X Consortium, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of NCD. not be used in advertising or
-publicity pertaining to distribution of the software without specific,
-written prior permission. NCD. makes no representations about the
-suitability of this software for any purpose. It is provided "as is"
-without express or implied warranty.
-
-NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
-BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
--- a/open-src/app/mkfontscale/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/mkfontscale/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -36,12 +36,12 @@
MODULE_DESC = the mkfontscale legacy X11 scalable font metadata creation tool
# Version number (used in path names)
-MODULE_VERSION=1.1.0
+MODULE_VERSION=1.1.1
# Checksums for upstream tarball
-TARBALL_MD5 = 414fcb053418fb1418e3a39f4a37e0f7
-TARBALL_SHA1 = ba021369ae3b364ba083b9eb5e570e54b21fd583
-TARBALL_SHA256= ce55f862679b8ec127d7f7315ac04a8d64a0d90a0309a70dc56c1ba3f9806994
+TARBALL_MD5 = 03de3f15db678e277f5ef9c013aca1ad
+TARBALL_SHA1 = ad1887ca253b9234ab6a6989de53d3127e302c6c
+TARBALL_SHA256= 244017992477ced2397a44fd0ddcfb0f1d9899128613f5c4db81471163b0b731
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/transset/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/transset/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# transset utility for setting window transparency properties
#
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, 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"),
@@ -29,12 +29,12 @@
MODULE_NAME=transset
# Version number (used in path names)
-MODULE_VERSION=1.0.0
+MODULE_VERSION=1.0.1
# Checksums for upstream tarball
-TARBALL_MD5 = 1aac8670c17803e30885eb5911f68d3d
-TARBALL_SHA1 = 583fc57eecbb4558127805093af8cc46ec677cdd
-TARBALL_SHA256= 19ee2525c4044743c49a95e43716bc3bd1dddf527e47585ee118e650b83a7e8f
+TARBALL_MD5 = 4afa9e30637171ae9e557a986e423720
+TARBALL_SHA1 = 8d5219f138fafc7146e4b45b94bc7e568efbcd43
+TARBALL_SHA256= 70c3d033874fe48286bc4971d5de9027f2e8ccd0f21b7506fe1bb4472218036d
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES = man/transset.man
--- a/open-src/app/twm/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/twm/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -34,18 +34,18 @@
MODULE_DESC = the Tab Window Manager (twm)
# Version number (used in path names)
-MODULE_VERSION=1.0.7
+MODULE_VERSION=1.0.8
# Checksums for upstream tarball
-TARBALL_MD5 = c1c124ff16255d6525a53a0d5cec8bf9
-TARBALL_SHA1 = ff535ef8e676f9ca876a6166858798c7fe70d446
-TARBALL_SHA256 = 0f5d53dec62540fa97c96b4e983695cc32114836d256b64885253ab58b5bcd44
+TARBALL_MD5 = 4b28317d4a9f7ca61bef8462e132bd4c
+TARBALL_SHA1 = b568e6242c5a2b9a05d0a198b96f3d43cf792931
+TARBALL_SHA256= 7660352353d632127ff50390991706aa660b28a4ada816c2582ac02720722e44
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
# Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=man/*.man
+SUNTOUCHED_MANPAGES = man/twm.man
MODULE_STABILITY=Committed
# Compatibility links from /usr/X11/bin to /usr/bin
--- a/open-src/app/xclipboard/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xclipboard/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -34,12 +34,12 @@
MODULE_DESC = the xclipboard & xcutsel utilities
# Version number (used in path names)
-MODULE_VERSION=1.1.2
+MODULE_VERSION=1.1.3
# Checksums for upstream tarball
-TARBALL_MD5 = f53f9276c0d009b539d7f64c6db9f0ff
-TARBALL_SHA1 = 8dc77e1234c1c2853805124536676a4d5f7c7a3b
-TARBALL_SHA256= 5f3b12da1eae4ed24883d8a5633b6150a0291deede818aeb5c9e827599b6429e
+TARBALL_MD5 = 3facff108f65b0733b04becf20274e45
+TARBALL_SHA1 = 971ac3900b4eb5ad54f3c3d9527e96ccdcb9e504
+TARBALL_SHA256= 9c0e0a1f4f1d49f73c6cf3ccd27b5ca0e18afc63679f1a1ee466b1d82446ebb5
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/xclock/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xclock/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# xclock - analog or digital clock display application
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -33,12 +33,12 @@
MODULE_PKGCLASS_SET=yes
# Version number (used in path names)
-MODULE_VERSION=1.0.6
+MODULE_VERSION=1.0.7
# Checksums for upstream tarball
-TARBALL_MD5 = 773782f20d5fb3232384889deca00754
-TARBALL_SHA1 = 993817c9e3cc2baaaebe52b29fa2ad26e58b124d
-TARBALL_SHA256= 21bb6f57b0a158c05a47558302321c4764a8d2e1b8e5d4ad23e3809b4cee3fd0
+TARBALL_MD5 = 6f150d063b20d08030b98c45b9bee7af
+TARBALL_SHA1 = 1b54b96e057469f90a00a9f1ca79ed056cbde271
+TARBALL_SHA256= 23ceeca94e3e20a6c26a703ac7f789066d4517f8d2cb717ae7cb28a617d97dd0
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/xconsole/7134751.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-From 7f9415e399b306b648235bde11c68cd00a5b17cc Mon Sep 17 00:00:00 2001
-From: Arvind Umrao <[email protected]>
-Date: Mon, 20 Feb 2012 02:12:32 -0800
-Subject: [PATCH] Open file in non blocking mode
-Sometime special files like fifo need to open in nonblocking mode
-otherwise whole xconsole GUI freezes.
-
----
- xconsole.c | 5 ++++-
- 1 files changed, 4 insertions(+), 1 deletions(-)
-
-diff --git a/xconsole.c b/xconsole.c
-index d8656e8..b74cc3b 100644
---- a/xconsole.c
-+++ b/xconsole.c
-@@ -334,7 +334,10 @@ OpenConsole(void)
- regularFile = FALSE;
- if (access(app_resources.file, R_OK) == 0)
- {
-- input = fopen (app_resources.file, "r");
-+ int fd = open (app_resources.file, O_RDONLY | O_NONBLOCK | O_NOCTTY);
-+ if (fd != -1)
-+ input = fdopen (fd, "r");
-+
- if (input)
- if (!stat(app_resources.file, &sbuf) &&
- S_ISREG( sbuf.st_mode ) )
---
-1.7.3.2
-
--- a/open-src/app/xconsole/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xconsole/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -1,6 +1,6 @@
###############################################################################
#
-# xconsole 1.x Makefile
+# xconsole - X window to display /dev/console messages
#
# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
@@ -29,11 +29,12 @@
MODULE_NAME=xconsole
# Version number (used in path names)
-MODULE_VERSION=1.0.5
+MODULE_VERSION=1.0.6
# Checksums for upstream tarball
-TARBALL_MD5 = ba55aab63d056520fda1b7098c3929a1
-TARBALL_SHA1 = 0049a65edde5e9dd4774abec69adb78689270c90
+TARBALL_MD5 = 5f2f9d97bd078715dffea2fd05b53544
+TARBALL_SHA1 = 1b3b3a2342bb94fecc70d7401da10ef7bbcc98a0
+TARBALL_SHA256= e561959b6ee8b735a32c1050015cfd8c551ed162cabb6cb72e36ce72966855d1
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/xdpyinfo/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xdpyinfo/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# xdpyinfo - utility to print information about X11 display, server, extensions
#
-# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2013, 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"),
@@ -33,12 +33,12 @@
MODULE_PKGNAME_SET=yes
# Version number (used in path names)
-MODULE_VERSION=1.3.0
+MODULE_VERSION=1.3.1
# Checksums for upstream tarball
-TARBALL_MD5 = 1ef08f4c8d0e669c2edd49e4a1bf650d
-TARBALL_SHA1 = 39936ff600434614d3ee53038d814246a03f4acf
-TARBALL_SHA256= 23ee4944a32b5701b4379cb420729eb7a4dde54de2b5b006d4747855efd6d73f
+TARBALL_MD5 = cacc0733f16e4f2a97a5c430fcc4420e
+TARBALL_SHA1 = 8b208d16754bb1ad8daa958e6e57ead363fb82ea
+TARBALL_SHA256= aef9285069a517ed870e5d8a02d13f7d8a953d7f7220146da563e04c7f128b94
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/xfd/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xfd/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# xfd - simple X11/Xft font display application
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -29,12 +29,12 @@
MODULE_NAME=xfd
# Version number (used in path names)
-MODULE_VERSION=1.1.1
+MODULE_VERSION=1.1.2
# Checksums for upstream tarball
-TARBALL_MD5 = b3893e03a5288927781acd5d3c65ba19
-TARBALL_SHA1 = b8662c6c6821f1f82995bcb98bb986b56716b787
-TARBALL_SHA256= 3fbef0d5ed6dc088017df156e748d187b2d1aaedc3de7ea96e505ea6d1af7b73
+TARBALL_MD5 = f19de745d181f5547ed59d6d9ed7a588
+TARBALL_SHA1 = cac5ca0f5fb6044840b15cf6fb9c541bd4fbce4a
+TARBALL_SHA256= c1a32222fbb891e46f9a82ebab005bc5e54ce006a2586195ec9ea7ab308e2759
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/xfindproxy/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xfindproxy/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -40,11 +40,12 @@
MODULE_DESC = the xfindproxy X11 proxy service locator utility
# Version number (used in path names)
-MODULE_VERSION=1.0.2
+MODULE_VERSION=1.0.3
# Checksums for upstream tarball
-TARBALL_MD5 = 2fa74c68511ae845f52c2f33e641d0fd
-TARBALL_SHA1 = 26da3f96eeeae0deeb10797dc0b8479c1fe16924
+TARBALL_MD5 = 88bf1e959865a3c5f31ea8efc9fe9e37
+TARBALL_SHA1 = ac068e0fcca5775685052d0c1915eedbf0c01c78
+TARBALL_SHA256= a6ecfbbb869c4bee84401914954e431444ee9469866ec58c0c17bbbed456c112
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
@@ -56,8 +57,4 @@
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = xfindproxy
-# ignore some unneeded dependencies that upstream includes:
-# unreferenced object=libX11.so.4; unused dependency of /usr/bin/xfindproxy
-MODULE_LDFLAGS = -z ignore
-
include ../Makefile.inc
--- a/open-src/app/xfontsel/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xfontsel/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# xfontsel - simple X11 font selection/display application
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -29,12 +29,12 @@
MODULE_NAME=xfontsel
# Version number (used in path names)
-MODULE_VERSION=1.0.4
+MODULE_VERSION=1.0.5
# Checksums for upstream tarball
-TARBALL_MD5 = 3f7e8ba9e34589a07d190575ae6c86cf
-TARBALL_SHA1 = 8e3da9d050ad71531bfeb98d5f1071c7b392b3bd
-TARBALL_SHA256= 25491e9b7762607299f8a7099c97452d9b83e92266f8b0579b380ca01e5a5f7e
+TARBALL_MD5 = a40302b88c599b63e3d3d412e02871e6
+TARBALL_SHA1 = fbd8fa8a1c87d8da2e71def964e97bca1d4c4adf
+TARBALL_SHA256= 170d8550b96fb47b04db6181b947e6f6b8b97f4df5d691c351a278480cc931bf
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = xfontsel.patch,-p1
@@ -52,6 +52,7 @@
include ../Makefile.inc
-install_po:
+install_po: $(SOURCE_TARGETS)
mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR)
- cp -f xfontsel.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+ (cd $(SOURCE_DIR) ; xgettext -n -d xfontsel *.c)
+ cp -f $(SOURCE_DIR)/xfontsel.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
--- a/open-src/app/xfontsel/xfontsel.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xfontsel/xfontsel.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
diff --git a/xfontsel.c b/xfontsel.c
-index cf334e4..0b4bfdb 100644
+index 9ab33d1..861a6ce 100644
--- a/xfontsel.c
+++ b/xfontsel.c
@@ -52,6 +52,9 @@ Modified: Mark Leisher <[email protected]> to deal with UCS sample text.
@@ -12,51 +12,24 @@
#define MIN_APP_DEFAULTS_VERSION 1
#define FIELD_COUNT 14
#define DELIM '-'
-@@ -150,24 +153,25 @@ static XrmOptionDescRec options[] = {
-
- static void Syntax(char *call)
+@@ -151,6 +154,7 @@ static XrmOptionDescRec options[] = {
+ static void Syntax(const char *call)
{
-- fprintf (stderr, "usage: %s [-options ...] -fn font\n\n", call);
-- fprintf (stderr, "where options include:\n");
-- fprintf (stderr,
-- " -display dpy X server to contact\n");
-- fprintf (stderr,
-- " -geometry geom size and location of window\n");
-- fprintf (stderr,
-- " -pattern fontspec font name pattern to match against\n");
-- fprintf (stderr,
-- " -print print selected font name on exit\n");
-- fprintf (stderr,
-- " -sample string sample text to use for 1-byte fonts\n");
-- fprintf (stderr,
-- " -sample16 string sample text to use for 2-byte fonts\n");
-- fprintf (stderr,
-- " -sampleUCS string sample text to use for ISO10646 fonts\n");
-- fprintf (stderr,
+ fprintf (stderr, "usage: %s [-options ...] -fn font\n\n%s\n", call,
++ gettext(
+ "where options include:\n"
+ " -display dpy X server to contact\n"
+ " -geometry geom size and location of window\n"
+@@ -159,7 +163,7 @@ static void Syntax(const char *call)
+ " -sample string sample text to use for 1-byte fonts\n"
+ " -sample16 string sample text to use for 2-byte fonts\n"
+ " -sampleUCS string sample text to use for ISO10646 fonts\n"
- " -scaled use scaled instances of fonts\n");
-+ /* Internationalize these strings for Bug: 4363521 Jhobson 6/9/00 */
-+ fprintf (stderr, gettext("usage: %s [-options ...] -fn font\n\n"), call);
-+ fprintf (stderr, gettext("where options include:\n"));
-+ fprintf (stderr, " -display ");
-+ fprintf (stderr, gettext("display X server to contact\n"));
-+ fprintf (stderr, " -geometry ");
-+ fprintf (stderr, gettext("geometry size and location of window\n"));
-+ fprintf (stderr, " -pattern ");
-+ fprintf (stderr, gettext("fontspec font name pattern to match against\n"));
-+ fprintf (stderr, " -print ");
-+ fprintf (stderr, gettext("print selected font name on exit\n"));
-+ fprintf (stderr, " -sample ");
-+ fprintf (stderr, gettext("string sample text to use for 1-byte fonts\n"));
-+ fprintf (stderr, " -sample16 ");
-+ fprintf (stderr, gettext("string sample text to use for 2-byte fonts\n"));
-+ fprintf (stderr, " -sampleUCS ");
-+ fprintf (stderr, gettext("string sample text to use for ISO10646 fonts\n"));
-+ fprintf (stderr, " -scaled ");
-+ fprintf (stderr, gettext("do use scaled instances of fonts\n"));
- fprintf (stderr, "\n");
++ " -scaled use scaled instances of fonts\n"));
exit (1);
}
-@@ -261,10 +265,28 @@ main(int argc, char **argv)
+
+@@ -252,10 +256,28 @@ main(int argc, char **argv)
{
Widget topLevel, pane;
@@ -85,7 +58,7 @@
if (argc != 1) Syntax(argv[0]);
-@@ -275,12 +297,15 @@ main(int argc, char **argv)
+@@ -266,12 +288,15 @@ main(int argc, char **argv)
XtGetApplicationResources( topLevel, (XtPointer)&AppRes,
resources, XtNumber(resources), NZ );
if (AppRes.app_defaults_version < MIN_APP_DEFAULTS_VERSION) {
@@ -106,7 +79,7 @@
}
ScheduleWork(GetFontNames, (XtPointer)XtDisplay(topLevel), 0);
-@@ -514,7 +539,7 @@ void GetFontNames(XtPointer closure)
+@@ -507,7 +532,7 @@ void GetFontNames(XtPointer closure)
}
else
XtAppWarning( appCtx,
@@ -115,7 +88,7 @@
}
else {
SetNoFonts();
-@@ -1012,11 +1037,11 @@ static void SetCurrentFontCount(void)
+@@ -1005,11 +1030,11 @@ static void SetCurrentFontCount(void)
char label[80];
Arg args[1];
if (matchingFontCount == 1)
@@ -130,7 +103,7 @@
XtSetArg( args[0], XtNlabel, label );
XtSetValues( countLabel, args, ONE );
}
-@@ -1027,9 +1052,9 @@ static void SetParsingFontCount(int count)
+@@ -1020,9 +1045,9 @@ static void SetParsingFontCount(int count)
char label[80];
Arg args[1];
if (count == 1)
@@ -142,7 +115,7 @@
XtSetArg( args[0], XtNlabel, label );
XtSetValues( countLabel, args, ONE );
FlushXqueue(XtDisplay(countLabel));
-@@ -1234,9 +1259,9 @@ void SelectField(Widget w, XtPointer closure, XtPointer callData)
+@@ -1228,9 +1253,9 @@ void SelectField(Widget w, XtPointer closure, XtPointer callData)
int field = (long)closure;
FieldValue *values = fieldValues[field]->value;
int count = fieldValues[field]->count;
--- a/open-src/app/xfontsel/xfontsel.po Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-domain "xfontsel"
-msgid "usage: %s [-options ...] %s font\n\n"
-msgstr
-msgid "where options include:\n"
-msgstr
-msgid "display X server to contact\n"
-msgstr
-msgid "geometry size and location of window\n"
-msgstr
-msgid "fontspec font name pattern to match against\n"
-msgstr
-msgid "print selected font name on exit\n"
-msgstr
-msgid "do not use scaled instances of fonts\n"
-msgstr
-msgid "string sample text to use for 1-byte fonts\n"
-msgstr
-msgid "string sample text to use for 2-byte fonts\n"
-msgstr
-# File:xfontsel.c, line:258, textdomain("xfontsel");
-msgid "app-defaults file not properly installed."
-msgstr
-msgid "%s %s;\\nsee '%s' manual page."
-msgstr
-msgid "internal error; pattern didn't match first font"
-msgstr
-msgid "1 name matches"
-msgstr
-msgid "%d names match"
-msgstr
-msgid "no names match"
-msgstr
-msgid "1 name to parse"
-msgstr
-msgid "%d names to parse"
-msgstr
-msgid "field %d:\n"
-msgstr
-msgid " %s: %d fonts\n"
-msgstr
--- a/open-src/app/xfs/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xfs/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,20 +29,16 @@
MODULE_NAME=xfs
# Version number (used in path names)
-MODULE_VERSION=1.1.2
+MODULE_VERSION=1.1.3
# Checksums for upstream tarball
-TARBALL_MD5 = 39e507a7a1b656885c4828a915e5805b
-TARBALL_SHA1 = d4a64e12f8a773bd0120977191586ca12baf1ace
-TARBALL_SHA256= 0dea61cce3897b4d9d844bbd2c7850cd4e80e12c12b38158b4f92574b027e39d
+TARBALL_MD5 = 38a5cb2d9103b91b4497310393a88d6d
+TARBALL_SHA1 = 68b9c6032f4ac91334a9ad07b0c58a89841e83b1
+TARBALL_SHA256= 7bf44a32ad04dbbcf3b5eef2cbfe879459378b312cb795e0d2d25e665f7196b7
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = \
- smf-manpage.patch \
- config-warning.patch
-
-# Need to rebuild config/Makefile.in after applying solaris-make.patch
-AUTORECONF=yes
+SOURCE_PATCHES += smf-manpage.patch
+SOURCE_PATCHES += config-warning.patch
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=man/xfs.man
--- a/open-src/app/xhost/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xhost/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -36,12 +36,12 @@
MODULE_DESC = the xhost utility for mananging X server access control lists
# Version number (used in path names)
-MODULE_VERSION=1.0.5
+MODULE_VERSION=1.0.6
# Checksums for upstream tarball
-TARBALL_MD5 = a0fcd2cb6ddd9f378944cc6f4f83cd7c
-TARBALL_SHA1 = c9ad0447c709fc7a9a2afbbca712cf47fbb29757
-TARBALL_SHA256= 2870d19f3f4867ead5ba4e35bb73d1fa302be29d812c13e4195066c78d1f8850
+TARBALL_MD5 = f1669af1fe0554e876f03319c678e79d
+TARBALL_SHA1 = 6224c8bcd909bf205c7e92dbdc349356890c4428
+TARBALL_SHA256= a6f5b922df0a7be5d3ba43f525fa8e69c539c738418f013a0b7adaa423a89dc2
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES += xhost.patch,-p1
--- a/open-src/app/xhost/xhost.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xhost/xhost.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,8 +1,8 @@
diff --git a/xhost.c b/xhost.c
-index 08f7c79..4a58a7a 100644
+index a67d136..f43b267 100644
--- a/xhost.c
+++ b/xhost.c
-@@ -142,6 +142,11 @@ extern int getdomainname(char *name, size_t len);
+@@ -119,6 +119,11 @@ extern int getdomainname(char *name, size_t len);
#endif
#endif
@@ -14,9 +14,9 @@
static int change_host(Display *dpy, char *name, Bool add);
static const char *get_hostname(XHostAddress *ha);
static int local_xerror(Display *dpy, XErrorEvent *rep);
-@@ -211,15 +216,30 @@ main(int argc, char *argv[])
- char *cp;
- #endif
+@@ -171,15 +176,30 @@ main(int argc, char *argv[])
+ Bool enabled = False;
+ Display *dpy;
+ /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
+ char *domaindir;
@@ -47,7 +47,7 @@
ProgramName, XDisplayName (NULL));
exit(1);
}
-@@ -234,9 +254,11 @@ main(int argc, char *argv[])
+@@ -191,9 +211,11 @@ main(int argc, char *argv[])
sethostent(1); /* don't close the data base each time */
list = XListHosts(dpy, &nhosts, &enabled);
if (enabled)
@@ -61,7 +61,7 @@
if (nhosts != 0) {
for (i = 0; i < nhosts; i++ ) {
-@@ -265,16 +287,18 @@ main(int argc, char *argv[])
+@@ -222,16 +244,18 @@ main(int argc, char *argv[])
printf("SI:");
break;
default:
@@ -83,7 +83,7 @@
NAMESERVER_TIMEOUT);
nameserver_timedout = 0;
} else
-@@ -291,26 +315,30 @@ main(int argc, char *argv[])
+@@ -248,26 +272,30 @@ main(int argc, char *argv[])
if (*arg == '-') {
if (!argv[i][1] && ((i+1) == argc)) {
@@ -118,10 +118,10 @@
ProgramName, arg);
nfailed++;
}
-@@ -355,12 +383,14 @@ change_host(Display *dpy, char *name, Bool add)
- struct nodeent *np;
- static struct dn_naddr dnaddr;
- #endif /* DNETCONN */
+@@ -308,12 +336,14 @@ change_host(Display *dpy, char *name, Bool add)
+ #endif
+ #endif
+ char *cp;
- static const char *add_msg = "being added to access control list";
- static const char *remove_msg = "being removed from access control list";
+ const char *add_msg = gettext("being added to access control list");
@@ -136,7 +136,7 @@
exit (1);
}
for (i = 0; i < namelen; i++) {
-@@ -372,8 +402,8 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -325,8 +355,8 @@ change_host(Display *dpy, char *name, Bool add)
family = FamilyInternet;
name += 5;
#else
@@ -147,7 +147,7 @@
return 0;
#endif
}
-@@ -383,8 +413,8 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -335,8 +365,8 @@ change_host(Display *dpy, char *name, Bool add)
family = FamilyInternet6;
name += 6;
#else
@@ -158,7 +158,7 @@
return 0;
#endif
}
-@@ -396,8 +426,8 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -347,15 +377,15 @@ change_host(Display *dpy, char *name, Bool add)
family = FamilyInternet6;
name += 7;
#else
@@ -169,18 +169,16 @@
return 0;
#endif
}
-@@ -407,8 +437,8 @@ change_host(Display *dpy, char *name, Bool add)
- family = FamilyDECnet;
- name += 5;
- #else
+ #endif /* ACCEPT_INETV6 */
+ else if (!strncmp("dnet:", lname, 5)) {
- fprintf (stderr, "%s: not compiled for DECnet\n", ProgramName);
- free(lname);
+ /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
+ fprintf (stderr, gettext("%s: not compiled for DECnet\n"), ProgramName);
return 0;
- #endif
}
-@@ -417,8 +447,8 @@ change_host(Display *dpy, char *name, Bool add)
+ else if (!strncmp("nis:", lname, 4)) {
+@@ -363,8 +393,8 @@ change_host(Display *dpy, char *name, Bool add)
family = FamilyNetname;
name += 4;
#else
@@ -191,7 +189,7 @@
return 0;
#endif
}
-@@ -427,8 +457,8 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -373,8 +403,8 @@ change_host(Display *dpy, char *name, Bool add)
family = FamilyKrb5Principal;
name +=4;
#else
@@ -202,7 +200,7 @@
return 0;
#endif
}
-@@ -440,11 +470,21 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -386,11 +416,21 @@ change_host(Display *dpy, char *name, Bool add)
name += 3;
}
if (family == FamilyWild && (cp = strchr(lname, ':'))) {
@@ -229,7 +227,7 @@
}
free(lname);
-@@ -454,8 +494,8 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -400,8 +440,8 @@ change_host(Display *dpy, char *name, Bool add)
cp = strchr(name, ':');
if (cp == NULL || cp == name) {
@@ -240,17 +238,7 @@
ProgramName, name);
return 0;
}
-@@ -485,7 +525,8 @@ change_host(Display *dpy, char *name, Bool add)
- dnaddr = *dnaddrp;
- } else {
- if ((np = getnodebyname (name)) == NULL) {
-- fprintf (stderr, "%s: unable to get node name for \"%s::\"\n",
-+ /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
-+ fprintf (stderr, gettext("%s: unable to get node name for \"%s::\"\n"),
- ProgramName, name);
- return 0;
- }
-@@ -511,7 +552,8 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -429,7 +469,8 @@ change_host(Display *dpy, char *name, Bool add)
retval = krb5_parse_name(name, &princ);
if (retval) {
krb5_init_ets(); /* init krb errs for error_message() */
@@ -260,7 +248,7 @@
ProgramName, error_message(retval));
return 0;
}
-@@ -537,7 +579,7 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -456,7 +497,7 @@ change_host(Display *dpy, char *name, Bool add)
XAddHost(dpy, &ha);
else
XRemoveHost(dpy, &ha);
@@ -269,7 +257,7 @@
return 1;
}
/*
-@@ -556,12 +598,14 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -475,12 +516,14 @@ change_host(Display *dpy, char *name, Bool add)
*cp = '\0';
pwd = getpwnam(name);
if (!pwd) {
@@ -286,7 +274,7 @@
return 0;
}
netname = username;
-@@ -668,8 +712,11 @@ change_host(Display *dpy, char *name, Bool add)
+@@ -587,8 +630,11 @@ change_host(Display *dpy, char *name, Bool add)
familyMsg = "inet ";
}
@@ -300,7 +288,7 @@
}
freeaddrinfo(addresses);
return 1;
-@@ -947,14 +994,16 @@ static int
+@@ -824,14 +870,16 @@ static int
local_xerror(Display *dpy, XErrorEvent *rep)
{
if ((rep->error_code == BadAccess) && (rep->request_code == X_ChangeHosts)) {
--- a/open-src/app/xhost/xhost.po Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xhost/xhost.po Mon Sep 30 13:26:39 2013 -0700
@@ -55,11 +55,6 @@
msgid "%s: must be on local machine to enable or disable access control.\n"
msgstr ""
-#: xhost.c:393
-#, c-format
-msgid "%s: unable to get node name for \"%s::\"\n"
-msgstr ""
-
#: xhost.c:179
#, c-format
msgid "%s: unable to open display \"%s\"\n"
--- a/open-src/app/xinit/6714067.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 3867bea..8288450 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -49,6 +49,7 @@ PROGCPPDEFS = \
- -DXINIT=@XINIT@
-
- CPP_FILES_FLAGS = \
-+ -Dsun \
- -DXINITDIR=$(XINITDIR) $(PROGCPPDEFS) -DLIBDIR=$(libdir) \
- -DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS) \
- -D__libexecdir__="$(libexecdir)" \
-diff --git a/Makefile.in b/Makefile.in
-index e6d2356..e53e951 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -356,6 +356,7 @@ PROGCPPDEFS = \
- -DXINIT=@XINIT@
-
- CPP_FILES_FLAGS = \
-+ -Dsun \
- -DXINITDIR=$(XINITDIR) $(PROGCPPDEFS) -DLIBDIR=$(libdir) \
- -DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS) \
- -D__libexecdir__="$(libexecdir)" \
-diff --git a/xinit.c b/xinit.c
-index 42ff008..e8b7559 100644
---- a/xinit.c
-+++ b/xinit.c
-@@ -629,6 +629,26 @@ shutdown(void)
-
- if (processTimeout(3, "server to die"))
- Fatalx("X server refuses to die");
-+#ifdef sun
-+ else {
-+ /* Restore keyboard mode. */
-+ serverpid = fork();
-+ switch (serverpid) {
-+ case 0:
-+ execlp ("kbd_mode", "kbd_mode", "-a");
-+ Fatal("Unable to run program \"%s\"", "kbd_mode");
-+ break;
-+
-+ case 1:
-+ Error("fork failed");
-+ break;
-+
-+ default:
-+ fprintf (stderr, "\r\nRestoring keyboard mode\r\n");
-+ processTimeout(1, "kbd_mode");
-+ }
-+ }
-+#endif
- }
-
- static void
--- a/open-src/app/xinit/7023672.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xinit/7023672.patch Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
index 049a8e4..e60ff12 100644
--- a/xinitrc.cpp
+++ b/xinitrc.cpp
-@@ -39,6 +39,19 @@ if [ -f "$usermodmap" ]; then
+@@ -39,6 +39,13 @@ if [ -f "$usermodmap" ]; then
XMODMAP "$usermodmap"
fi
@@ -12,12 +12,6 @@
+if [ -x /etc/gdm/Xsession ] && [ -x /usr/bin/dtstart ] ; then
+ exec /etc/gdm/Xsession /usr/bin/dtstart jds
+fi
-+if [ -x /etc/X11/gdm/Xsession ] && [ -x /usr/bin/dtstart ] ; then
-+ exec /etc/X11/gdm/Xsession /usr/bin/dtstart jds
-+fi
-+if [ -x /usr/dt/config/Xsession.jds ]; then
-+ exec /usr/dt/config/Xsession.jds
-+fi
+
XCOMM start some nice programs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/xinit/7182943.patch Mon Sep 30 13:26:39 2013 -0700
@@ -0,0 +1,13 @@
+diff --git a/man/xinit.man b/man/xinit.man
+index f8005ce..9033b7e 100644
+--- a/man/xinit.man
++++ b/man/xinit.man
+@@ -120,7 +120,7 @@ arguments to the default \fIxterm\fP command. It will ignore \fI\.xinitrc\fP.
+ This will use the command \fI\.\/Xorg \-l \-c\fP to start the server and will
+ append the arguments \fI\-e widgets\fP to the default \fIxterm\fP command.
+ .TP 8
+-.B "xinit /usr/ucb/rsh fasthost cpupig \-display ws:1 \-\^\- :1 \-a 2 \-t 5"
++.B "xinit /usr/bin/rsh fasthost cpupig \-display ws:1 \-\^\- :1 \-a 2 \-t 5"
+ This will start a server named \fIX\fP on display 1 with the arguments
+ \fI\-a 2 \-t 5\fP. It will then start a remote shell on the machine
+ \fBfasthost\fP in which it will run the command \fIcpupig\fP, telling it
--- a/open-src/app/xinit/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xinit/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,16 @@
MODULE_NAME=xinit
# Version number (used in path names)
-MODULE_VERSION=1.3.2
+MODULE_VERSION=1.3.3
# Checksums for upstream tarball
-TARBALL_MD5 = 9c0943cbd83e489ad1b05221b97efd44
-TARBALL_SHA1 = 1c287ac016d277f973652fa3707eef6db8353d5a
-TARBALL_SHA256= a1867fdaa83f68750b12ba4305c3c62f5992d0f52cfeb98e96c27a8e690e0235
+TARBALL_MD5 = 3b8da0e6237aee9828cc809c647510a7
+TARBALL_SHA1 = c3c01c8c6012317f995669894d9e7b2838b61e58
+TARBALL_SHA256= 74b2878de6e3d5b5948f1562a77e7f53b4e10621e505ddb278050c7f3cae00af
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = 6714067.patch,-p1 7023672.patch,-p1
+SOURCE_PATCHES += 7023672.patch,-p1
+SOURCE_PATCHES += 7182943.patch,-p1
# pkg(5) name we deliver the files in (override default)
MODULE_PKGNAME=x11/session/$(MODULE_NAME)
--- a/open-src/app/xinput/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xinput/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,12 +29,12 @@
MODULE_NAME=xinput
# Version number (used in path names)
-MODULE_VERSION=1.6.0
+MODULE_VERSION=1.6.1
# Checksums for upstream tarball
-TARBALL_MD5 = d2459d35b4e0b41ded26a1d1159b7ac6
-TARBALL_SHA1 = 958b77a2acf52197b9a1e3e3d11e9bc57fbb1e6c
-TARBALL_SHA256= 4ab007d952c76665603bcb82ceb15fd3929d10faf0580fc4873ac16f5f63847e
+TARBALL_MD5 = 305980ac78a6954e306a14d80a54c441
+TARBALL_SHA1 = 859d98b428c4b343f40fd93dd6c63bec1f546ae4
+TARBALL_SHA256= b7632d0f228a8a6be93b09857ea413940fcf44091e60f4a0fe9f5fd82efd871f
# pkg(5) name we deliver the files in (override default)
MODULE_PKGNAME=x11/x11-server-utilities
@@ -48,7 +48,7 @@
MODULE_ARC_CASES = LSARC/2009/506
# Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=man/*.man
+SUNTOUCHED_MANPAGES=man/xinput.man
MODULE_STABILITY=Volatile
# Compatibility links from /usr/X11/bin to /usr/bin
--- a/open-src/app/xkill/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xkill/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# xkill 1.x Makefile
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -29,17 +29,18 @@
MODULE_NAME=xkill
# Version number (used in path names)
-MODULE_VERSION=1.0.3
+MODULE_VERSION=1.0.4
# Checksums for upstream tarball
-TARBALL_MD5 = e7f0d57b6ba49c384e9cf8c9ff3243c1
-TARBALL_SHA1 = bab7b9c7f3bc053d743eb339cf5fa496bace57e5
+TARBALL_MD5 = 0ae6bc2a8d3af68e9c76b1a6ca5f7a78
+TARBALL_SHA1 = 3a9c253ed698ae2e6c176a6f4a5a7d43497818f6
+TARBALL_SHA256= 88ef2a304f32f24b255e879f03c1dcd3a2be3e71d5562205414f267d919f812e
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
# Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=*.man
+SUNTOUCHED_MANPAGES = man/xkill.man
MODULE_STABILITY=Committed
# Compatibility links from /usr/X11/bin to /usr/bin
--- a/open-src/app/xload/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xload/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# xload 1.x Makefile
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -37,12 +37,12 @@
MODULE_PKGCLASS_SET=yes
# Version number (used in path names)
-MODULE_VERSION=1.1.1
+MODULE_VERSION=1.1.2
# Checksums for upstream tarball
-TARBALL_MD5 = ccc788704d66fcbe4e3e8755a600264c
-TARBALL_SHA1 = 50f6ee958e6fb609af92cf9403e7bd68720575cb
-TARBALL_SHA256= de12f0991ef124c291e0416ca8417073fe47328e9221d4be8e4076fcee151450
+TARBALL_MD5 = b9e9808db18acecf4cdec134d86b157c
+TARBALL_SHA1 = 4a34135ff51c3bc4029d6644e60e03f17ccf8c81
+TARBALL_SHA256= 83f8e6260435f1df2e2e5036bb3325688b79f0b33069ef445eff5058d127e078
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
@@ -51,9 +51,6 @@
SUNTOUCHED_MANPAGES = man/xload.man
MODULE_STABILITY=Committed
-# Specify which cpp to use instead of depending on builder's $PATH
-MODULE_CONFIG_OPTS = --with-cpp=/usr/lib/cpp
-
MODULE_ADD_INSTALL_TARGETS=install_po
# Compatibility links from /usr/X11/bin to /usr/bin
@@ -61,7 +58,7 @@
include ../Makefile.inc
-install_po:
+install_po: $(BUILD_TARGETS)
mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR)
- cp -f xload.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+ cp -f $(SOURCE_DIR)/xload.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
--- a/open-src/app/xload/xload.po Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-domain "xload"
-msgid "cannot get name list from"
-msgstr
-msgid "cannot open"
-msgstr
-msgid "cannot seek"
-msgstr
-msgid "cannot read"
-msgstr
-msgid "cannot allocate space for"
-msgstr
-msgid "Load Widget"
-msgstr
-msgid "cannot get access to kernel address space"
-msgstr
-msgid "cannot get name list"
-msgstr
-msgid "Cannot find address for avenrun in the kernel\n"
-msgstr
-msgid "Kernel read error"
-msgstr
-msgid "kstat_open failed"
-msgstr
-msgid "kstat_lookup failed"
-msgstr
-msgid "kstat_read failed"
-msgstr
-msgid "kstat_data_lookup failed"
-msgstr
-# msgid "cannot open"
-# msgstr
-# msgid "cannot get name list from"
-# msgstr
-# msgid "cannot get name list from"
-# msgstr
-# msgid "cannot open"
-# msgstr
-msgid "%s nlist()"
-msgstr
-# msgid "cannot get name list from"
-# msgstr
-msgid "%s open()"
-msgstr
-# msgid "cannot open"
-# msgstr
-msgid "%s read() SYSINFONL"
-msgstr
-msgid "read failed from"
-msgstr
-msgid "usage: %s [-options ...]\n\n"
-msgstr
-msgid "where options include:\n"
-msgstr
-msgid "display X server on which to display\n"
-msgstr
-msgid "geometry size and location of window\n"
-msgstr
-msgid "font font to use in label\n"
-msgstr
-msgid "number minimum number of scale lines\n"
-msgstr
-msgid "seconds interval between updates\n"
-msgstr
-msgid "string annotation text\n"
-msgstr
-msgid "color background color\n"
-msgstr
-msgid "color graph color\n"
-msgstr
-msgid "color scale and text color\n"
-msgstr
-msgid "removes the label from above the chart.\n"
-msgstr
-msgid "value number of pixels to scroll on overflow\n"
-msgstr
-msgid "use keyboard leds to display current load\n"
-msgstr
-# File:xload.c, line:145, textdomain("xload");
--- a/open-src/app/xlsclients/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xlsclients/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -37,17 +37,18 @@
MODULE_DESC = the xlsclients utility to list clients connected to a given X server
# Version number (used in path names)
-MODULE_VERSION=1.1.2
+MODULE_VERSION=1.1.3
# Checksums for upstream tarball
-TARBALL_MD5 = 760099f0af112401735801e3b9aa8595
-TARBALL_SHA1 = c4051429c190444ae9ba327f0ad776a74eb7b27b
+TARBALL_MD5 = 9fbf6b174a5138a61738a42e707ad8f5
+TARBALL_SHA1 = a980aa006c0ca180e4c79be2bd6514205dd218a3
+TARBALL_SHA256= 5d9666fcc6c3de210fc70d5a841a404955af709a616fde530fe4e8f7723e3d3d
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
# Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=man/*.man
+SUNTOUCHED_MANPAGES = man/xlsclients.man
MODULE_STABILITY=Committed
# Compatibility links from /usr/X11/bin to /usr/bin
--- a/open-src/app/xmag_multivis/6726838.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xmag_multivis/6726838.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,18 +1,17 @@
-diff -urp -x '*~' -x '*.orig' Makefile.am Makefile.am
---- Makefile.am 2010-10-30 17:17:29.000000000 -0700
-+++ Makefile.am 2011-01-28 20:22:00.477766877 -0800
-@@ -19,24 +19,18 @@
- # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+diff --git a/Makefile.am b/Makefile.am
+index 6c1a81c..9ca5088 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -20,21 +20,16 @@
# PERFORMANCE OF THIS SOFTWARE.
+ SUBDIRS = man
-bin_PROGRAMS = xmag
+bin_PROGRAMS = xmag_multivis
--AM_CFLAGS = $(XMAG_CFLAGS) $(CWARNFLAGS)
--xmag_LDADD = $(XMAG_LIBS) -lm
-+AM_CFLAGS = $(XMAG_CFLAGS) $(CWARNFLAGS) -DSHAPE -DALLPLANES
-+xmag_multivis_LDADD = -lXext -lX11
-
+ AM_CFLAGS = $(XMAG_CFLAGS) $(CWARNFLAGS)
+-xmag_LDADD = $(XMAG_LIBS)
+-
-xmag_SOURCES = \
- CutPaste.c \
- CutPaste.h \
@@ -23,14 +22,25 @@
- Scale.h \
- ScaleP.h \
- xmag.c
++AM_CFLAGS += -DSHAPE -DALLPLANES
++xmag_multivis_LDADD = -lXext -lX11
++
+xmag_multivis_SOURCES = \
+ xmag_multivis.c \
+ multivis.c \
+ multivis.h
- appman_PRE = \
-- xmag.man
-+ xmag_multivis.man
-
# App default files (*.ad)
+diff --git a/man/Makefile.am b/man/Makefile.am
+index 2b87098..cc1c8f2 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -1,6 +1,6 @@
+
+ appmandir = $(APP_MAN_DIR)
+-appman_PRE = xmag.man
++appman_PRE = xmag_multivis.man
+ appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+
+ EXTRA_DIST = $(appman_PRE)
--- a/open-src/app/xmag_multivis/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xmag_multivis/COPYING Mon Sep 30 13:26:39 2013 -0700
@@ -1,26 +1,3 @@
-Copyright 1990, 1997, 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.
-
- ------------------------------------------------------------
-
Copyright 1988 Massachusetts Institute of Technology
Permission to use, copy, modify, and distribute this software and its
--- a/open-src/app/xmag_multivis/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xmag_multivis/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -32,32 +32,32 @@
# Package metadata
MODULE_DESC = the multiple visual version of xmag screen magnification utility
-
-# Version number (used in path names)
-MODULE_VERSION=1.0.4
-
-# Checksums for upstream tarball
-TARBALL_MD5 = 2a76128511214bde973258baef537be3
-TARBALL_SHA1 = 95695d4d4a731e5deb4196a0cc6d04ecaba023fe
+ORACLE_TPNO = $(ORACLE_TPNO_xorg)
-# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = 6726838.patch
-
-AUTORECONF=yes
+# Dates to show in Oracle copyright notice in pkg license file
+# Earliest & latest of the copyrights in the Oracle files in this pkg
+ORACLE_COPYRIGHT_YEARS = 1990, 2011
-# Directory created by unpacking source
-SOURCE_DIRNAME=xmag-$(MODULE_VERSION)
-SOURCE_DIRNAME_SET=yes
-
-# Merge in additional sources from sun-src directory
+# No upstream sources, only local sources
+MODULE_VERSION=src
+SOURCE_TARBALL_NAME=NONE
+SOURCE_TARBALL_NAME_SET=yes
ADDITIONAL_SOURCE_DIR=sun-src
# Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=*.man
+SUNTOUCHED_MANPAGES=xmag_multivis.man
MODULE_STABILITY=Committed
+# No configure script to run
+CONFIGURE_TARGETS=
+CONFIGURE_TARGETS_SET=yes
+
+# Since we don't have a configure script, pass configure flags to make
+MODULE_CONFIG_ENV = PREFIX=$(MODULE_PREFIX) $(CONSTANT_TIME)
+MODULE_BUILD_MAKEFLAGS = $(CONFIG_ENV)
+MODULE_INSTALL_MAKEFLAGS= $(CONFIG_ENV)
+
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = xmag_multivis
include ../Makefile.inc
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/xmag_multivis/sun-src/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -0,0 +1,41 @@
+# Copyright (c) 2013, 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.
+#
+
+SRCS = xmag_multivis.c multivis.c
+OBJS = $(SRCS:.c=.o)
+
+MULTIVIS_CPPFLAGS = -DSHAPE -DALLPLANES
+LIBS = -lXext -lX11
+
+all:: xmag_multivis
+
+xmag_multivis: $(OBJS)
+ $(LD) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
+
+.c.o:
+ $(CC) $(CFLAGS) $(MULTIVIS_CPPFLAGS) $(CPPFLAGS) -c $(OUTPUT_OPTION) $<
+
+install: xmag_multivis
+ mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1
+ $(INSTALL) -m 0555 xmag_multivis $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m 0444 xmag_multivis.man $(DESTDIR)$(PREFIX)/share/man/man1/xmag_multivis.1
+
--- a/open-src/app/xman/6708109.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xman/6708109.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2013, 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"),
@@ -27,196 +27,195 @@
4365478 Internationalize xman
diff --git a/buttons.c b/buttons.c
-index 9233346..cd57352 100644
+index 4e5ed3c..e42c431 100644
--- a/buttons.c
+++ b/buttons.c
@@ -36,6 +36,8 @@ from the X Consortium.
- * Created: October 27, 1987
- */
+ #include "globals.h"
+ #include "vendor.h"
+#include <libintl.h>
+#include <X11/Xlocale.h>
- #include "globals.h"
- #include "vendor.h"
-@@ -47,6 +49,7 @@ from the X Consortium.
+ /* The files with the icon bits in them. */
+
+@@ -45,6 +47,7 @@ from the X Consortium.
static void CreateOptionMenu(ManpageGlobals * man_globals, Widget parent);
static void CreateSectionMenu(ManpageGlobals * man_globals, Widget parent);
+static void CreateMoreMenu(ManpageGlobals * man_globals, Widget parent);
- static void StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page);
- static Widget * ConvertNamesToWidgets(Widget parent, char ** names);
-
-@@ -57,6 +60,7 @@ static Widget * ConvertNamesToWidgets(Widget parent, char ** names);
+ static void StartManpage(ManpageGlobals * man_globals, Boolean help,
+ Boolean page);
+ static Widget *ConvertNamesToWidgets(Widget parent, const char **names);
+@@ -56,6 +59,7 @@ static Widget *ConvertNamesToWidgets(Widget parent, const char **names);
*/
#define TOPARGS 5
+#define MAX_MENU 30
- Widget top; /* needed in PopupWarning, misc.c */
+ Widget top; /* needed in PopupWarning, misc.c */
-@@ -213,7 +217,7 @@ Boolean full_instance)
+@@ -216,7 +220,7 @@ CreateManpageWidget(ManpageGlobals * man_globals,
{
- Arg arglist[MANPAGEARGS]; /* An argument list for widget creation */
- Cardinal num_args; /* The number of arguments in the list. */
-- Widget mytop, pane, hpane, mysections; /* Widgets */
-+ Widget mytop, pane, hpane, mysections, sect1; /* Widgets */
- ManPageWidgets * mpw = &(man_globals->manpagewidgets);
+ Arg arglist[MANPAGEARGS]; /* An argument list for widget creation */
+ Cardinal num_args; /* The number of arguments in the list. */
+- Widget mytop, pane, hpane, mysections; /* Widgets */
++ Widget mytop, pane, hpane, mysections, sect1; /* Widgets */
+ ManPageWidgets *mpw = &(man_globals->manpagewidgets);
- num_args = (Cardinal) 0;
-@@ -240,8 +244,13 @@ Boolean full_instance)
- num_args++;
- XtSetValues(mytop, arglist, num_args);
+ num_args = (Cardinal) 0;
+@@ -243,8 +247,13 @@ CreateManpageWidget(ManpageGlobals * man_globals,
+ num_args++;
+ XtSetValues(mytop, arglist, num_args);
+#ifdef SUNSOFT
-+ pane = XtCreateManagedWidget("Manpage_Vpane", panedWidgetClass, mytop, NULL,
-+ (Cardinal) 0);
++ pane = XtCreateManagedWidget("Manpage_Vpane", panedWidgetClass, mytop, NULL,
++ (Cardinal) 0);
+#else
- pane = XtCreateManagedWidget("vertPane", panedWidgetClass, mytop, NULL,
- (Cardinal) 0);
+ pane = XtCreateManagedWidget("vertPane", panedWidgetClass, mytop, NULL,
+ (Cardinal) 0);
+#endif
/* Create menu bar. */
-@@ -259,15 +268,24 @@ Boolean full_instance)
- mysections = XtCreateManagedWidget("sections", menuButtonWidgetClass,
- hpane, arglist, num_args);
+@@ -264,16 +273,25 @@ CreateManpageWidget(ManpageGlobals * man_globals,
+ mysections = XtCreateManagedWidget("sections", menuButtonWidgetClass,
+ hpane, arglist, num_args);
-+ if(sections > MAX_MENU){
-+ num_args = 0;
-+ XtSetArg(arglist[num_args], XtNmenuName, MORE_MENU); num_args++;
-+ sect1 = XtCreateManagedWidget("More...", menuButtonWidgetClass,
-+ hpane, arglist, num_args);
-+ }
++ if (sections > MAX_MENU) {
++ num_args = 0;
++ XtSetArg(arglist[num_args], XtNmenuName, MORE_MENU); num_args++;
++ sect1 = XtCreateManagedWidget("More...", menuButtonWidgetClass,
++ hpane, arglist, num_args);
++ }
+
- XtSetArg(arglist[0], XtNlabel, SHOW_BOTH);
- XtSetValues(man_globals->both_screens_entry, arglist, (Cardinal) 1);
+ XtSetArg(arglist[0], XtNlabel, SHOW_BOTH);
+ XtSetValues(man_globals->both_screens_entry, arglist, (Cardinal) 1);
- if (full_instance) {
- MakeSearchWidget(man_globals, mytop);
- CreateSectionMenu(man_globals, mytop);
-+ if(sections > MAX_MENU) CreateMoreMenu(man_globals, mytop);
- MakeSaveWidgets(man_globals, mytop);
- } else {
- XtSetSensitive(mysections, FALSE);
-+ if(sections > MAX_MENU) XtSetSensitive(sect1, FALSE);
- XtSetArg(arglist[0], XtNsensitive, FALSE);
- XtSetValues(man_globals->dir_entry, arglist, ONE);
- XtSetValues(man_globals->manpage_entry, arglist, ONE);
-@@ -281,8 +299,13 @@ Boolean full_instance)
- XtSetValues(man_globals->print_entry, arglist, ONE);
- #endif /* INCLUDE_XPRINT_SUPPORT */
+ if (full_instance) {
+ MakeSearchWidget(man_globals, mytop);
+ CreateSectionMenu(man_globals, mytop);
++ if (sections > MAX_MENU) CreateMoreMenu(man_globals, mytop);
+ MakeSaveWidgets(man_globals, mytop);
+ }
+ else {
+ XtSetSensitive(mysections, FALSE);
++ if (sections > MAX_MENU) XtSetSensitive(sect1, FALSE);
+ XtSetArg(arglist[0], XtNsensitive, FALSE);
+ XtSetValues(man_globals->dir_entry, arglist, ONE);
+ XtSetValues(man_globals->manpage_entry, arglist, ONE);
+@@ -287,8 +305,13 @@ CreateManpageWidget(ManpageGlobals * man_globals,
+ XtSetValues(man_globals->print_entry, arglist, ONE);
+ #endif /* INCLUDE_XPRINT_SUPPORT */
+#ifdef SUNSOFT
-+ man_globals->label = XtCreateManagedWidget(MANNAME, labelWidgetClass,
-+ hpane, NULL, (Cardinal) 0);
++ man_globals->label = XtCreateManagedWidget(MANNAME, labelWidgetClass,
++ hpane, NULL, (Cardinal) 0);
+#else
- man_globals->label = XtCreateManagedWidget("manualTitle", labelWidgetClass,
- hpane, NULL, (Cardinal) 0);
+ man_globals->label = XtCreateManagedWidget("manualTitle", labelWidgetClass,
+ hpane, NULL, (Cardinal) 0);
+#endif
/* Create Directory */
-@@ -330,7 +353,7 @@ StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page)
+@@ -336,7 +359,7 @@ StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page)
- if (page || help) {
- if (help)
-- strcpy(man_globals->manpage_title, "Xman Help");
-+ strcpy(man_globals->manpage_title, gettext("Xman Help"));
+ if (page || help) {
+ if (help)
+- strcpy(man_globals->manpage_title, "Xman Help");
++ strcpy(man_globals->manpage_title, gettext("Xman Help"));
- if (man_globals->both_shown) {
- XtManageChild(dir);
-@@ -519,7 +542,7 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
- menu = XtCreatePopupShell(SECTION_MENU, simpleMenuWidgetClass, parent,
- NULL, (Cardinal) 0);
+ if (man_globals->both_shown) {
+ XtManageChild(dir);
+@@ -528,7 +551,7 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
+ menu = XtCreatePopupShell(SECTION_MENU, simpleMenuWidgetClass, parent,
+ NULL, (Cardinal) 0);
-- for (i = 0 ; i < sections ; i ++) {
-+ for (i = 0 ; i < ((sections <= MAX_MENU) ? sections:sections/2) ; i ++) {
- num_args = 0;
- XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
- snprintf(entry_name, sizeof(entry_name), "section%d", i);
-@@ -535,6 +558,37 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
- }
+- for (i = 0; i < sections; i++) {
++ for (i = 0; i < ((sections <= MAX_MENU) ? sections:sections/2) ; i++) {
+ num_args = 0;
+ XtSetArg(args[num_args], XtNlabel, manual[i].blabel);
+ num_args++;
+@@ -547,6 +570,35 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
+ }
}
+static void
-+CreateMoreMenu(man_globals, parent)
-+ManpageGlobals * man_globals;
-+Widget parent;
++CreateMoreMenu(ManpageGlobals * man_globals, Widget parent)
+{
-+ Widget menu, entry;
-+ int i;
-+ MenuStruct * menu_struct;
-+ Arg args[1];
-+ Cardinal num_args;
-+ char entry_name[BUFSIZ];
++ Widget menu, entry;
++ int i;
++ MenuStruct * menu_struct;
++ Arg args[1];
++ Cardinal num_args;
++ char entry_name[BUFSIZ];
+
-+ menu = XtCreatePopupShell(MORE_MENU, simpleMenuWidgetClass, parent,
-+ NULL, (Cardinal) 0);
++ menu = XtCreatePopupShell(MORE_MENU, simpleMenuWidgetClass, parent,
++ NULL, (Cardinal) 0);
+
-+ for (i = sections/2-1 ; i < sections ; i ++) {
-+ num_args = 0;
-+ XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
-+ snprintf(entry_name, sizeof(entry_name), "section%d", i);
++ for (i = sections/2-1 ; i < sections ; i ++) {
++ num_args = 0;
++ XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
++ snprintf(entry_name, sizeof(entry_name), "section%d", i);
+
-+ entry = XtCreateManagedWidget(entry_name, smeBSBObjectClass,
-+ menu, args, num_args);
-+ menu_struct = (MenuStruct *) XtMalloc(sizeof(MenuStruct));
-+ menu_struct->data = (caddr_t) man_globals;
-+ menu_struct->number = i;
-+ XtAddCallback(entry, XtNcallback, DirPopupCallback, (caddr_t) menu_struct);
-+ XtAddCallback(entry, XtNdestroyCallback,MenuDestroy, (caddr_t)menu_struct);
++ entry = XtCreateManagedWidget(entry_name, smeBSBObjectClass,
++ menu, args, num_args);
++ menu_struct = (MenuStruct *) XtMalloc(sizeof(MenuStruct));
++ menu_struct->data = (caddr_t) man_globals;
++ menu_struct->number = i;
++ XtAddCallback(entry, XtNcallback, DirPopupCallback, (caddr_t) menu_struct);
++ XtAddCallback(entry, XtNdestroyCallback,MenuDestroy, (caddr_t)menu_struct);
+
-+ }
++ }
+}
+
/* Function Name: CreateList
* Description: this function prints a label in the directory list
* Arguments: section - the manual section.
-@@ -579,7 +633,7 @@ MakeDirectoryBox(ManpageGlobals *man_globals, Widget parent, Widget *dir_disp, i
- return;
+@@ -592,7 +644,7 @@ MakeDirectoryBox(ManpageGlobals * man_globals, Widget parent, Widget * dir_disp,
+ return;
- name = manual[section].blabel; /* Set the section name */
-- snprintf(label_name, sizeof(label_name), "Directory of: %s", name);
-+ snprintf(label_name, sizeof(label_name), gettext("Directory of: %s"),name);
- man_globals->section_name[section] = StrAlloc(label_name);
+ name = manual[section].blabel; /* Set the section name */
+- snprintf(label_name, sizeof(label_name), "Directory of: %s", name);
++ snprintf(label_name, sizeof(label_name), gettext("Directory of: %s"),name);
+ man_globals->section_name[section] = XtNewString(label_name);
- num_args = 0;
-@@ -677,7 +731,7 @@ FormUpWidgets(Widget parent, char ** full_size, char ** half_size)
+ num_args = 0;
+@@ -691,7 +743,7 @@ FormUpWidgets(Widget parent, const char **full_size, const char **half_size)
- if (long_widget == (Widget) NULL) { /* Make sure we found one. */
- PopupWarning(GetGlobals(parent),
-- "Could not find longest widget, aborting...");
-+ gettext("Could not find longest widget, aborting..."));
- XtFree((char *)full_widgets);
- XtFree((char *)half_widgets);
- return;
-@@ -746,7 +800,7 @@ ConvertNamesToWidgets(Widget parent, char ** names)
- char error_buf[BUFSIZ];
-
- snprintf(error_buf, sizeof(error_buf),
-- "Could not find widget named '%s'", *names);
-+ gettext("Could not find widget named '%s'"), *names);
- PrintError(error_buf);
- XtFree((char *)ids);
- return(NULL);
+ if (long_widget == (Widget) NULL) { /* Make sure we found one. */
+ PopupWarning(GetGlobals(parent),
+- "Could not find longest widget, aborting...");
++ gettext("Could not find longest widget, aborting..."));
+ XtFree((char *) full_widgets);
+ XtFree((char *) half_widgets);
+ return;
+@@ -759,7 +811,7 @@ ConvertNamesToWidgets(Widget parent, const char **names)
+ char error_buf[BUFSIZ];
+
+ snprintf(error_buf, sizeof(error_buf),
+- "Could not find widget named '%s'", *names);
++ gettext("Could not find widget named '%s'"), *names);
+ PrintError(error_buf);
+ XtFree((char *) ids);
+ return (NULL);
diff --git a/defs.h b/defs.h
-index ec4d068..9326268 100644
+index fe09b6b..22da1c7 100644
--- a/defs.h
+++ b/defs.h
-@@ -51,6 +51,7 @@ from the X Consortium.
+@@ -53,6 +53,7 @@ from the X Consortium.
- #define OPTION_MENU "optionMenu" /* Name of the Option Menu. */
- #define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */
-+#define MORE_MENU "moreMenu" /* Name of the More... Menu. */
+ #define OPTION_MENU "optionMenu" /* Name of the Option Menu. */
+ #define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */
++#define MORE_MENU "moreMenu" /* Name of the More... Menu. */
- #define HELP_BUTTON "helpButton" /* Name of top help button */
- #define QUIT_BUTTON "quitButton" /* Name of top quit button */
+ #define HELP_BUTTON "helpButton" /* Name of top help button */
+ #define QUIT_BUTTON "quitButton" /* Name of top quit button */
diff --git a/handler.c b/handler.c
-index 4fe291f..32a3e7d 100644
+index e61687e..351f60f 100644
--- a/handler.c
+++ b/handler.c
-@@ -43,6 +43,8 @@ from the X Consortium.
+@@ -41,6 +41,8 @@ from the X Consortium.
#include <sys/stat.h>
#include "globals.h"
#include "vendor.h"
@@ -225,736 +224,698 @@
#ifdef INCLUDE_XPRINT_SUPPORT
#include "printdialog.h"
#include "print.h"
-@@ -309,8 +311,10 @@ SaveFormattedPage(Widget w, XEvent * event, String * params, Cardinal * num_para
- char cmdbuf[BUFSIZ], error_buf[BUFSIZ];
-
- if (*num_params != 1) {
-- XtAppWarning(XtWidgetToApplicationContext(w),
-- "Xman - SaveFormattedPage: This action routine requires one argument.");
-+ snprintf(error_buf, sizeof(error_buf),
-+ gettext("%s This action routine requires one argument."),
-+ "Xman - SaveFormattedPage:");
-+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
- return;
- }
+@@ -309,8 +311,10 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
+ char cmdbuf[BUFSIZ], error_buf[BUFSIZ];
-@@ -347,13 +351,13 @@ SaveFormattedPage(Widget w, XEvent * event, String * params, Cardinal * num_para
- /* make sure the formatted man page is fully accessible by the world */
- if (chmod(man_globals->save_file, CHMOD_MODE) != 0) {
- snprintf(error_buf, sizeof(error_buf),
-- "Couldn't set permissions on formatted man page '%s'.\n",
-+ gettext("Couldn't set permissions on formatted man page '%s'.\n"),
- man_globals->save_file);
- PopupWarning( man_globals, error_buf);
- }
- } else {
- snprintf(error_buf, sizeof(error_buf),
-- "Error while executing the command '%s'.\n", cmdbuf);
-+ gettext("Error while executing the command '%s'.\n"), cmdbuf);
- PopupWarning( man_globals, error_buf);
+ if (*num_params != 1) {
+- XtAppWarning(XtWidgetToApplicationContext(w),
+- "Xman - SaveFormattedPage: This action routine requires one argument.");
++ snprintf(error_buf, sizeof(error_buf),
++ gettext("%s This action routine requires one argument."),
++ "Xman - SaveFormattedPage:");
++ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
+ return;
}
- break;
-@@ -361,8 +365,9 @@ SaveFormattedPage(Widget w, XEvent * event, String * params, Cardinal * num_para
- case 'c':
- break;
- default:
-- PopupWarning(man_globals, "Xman - SaveFormattedPage: "
-- "Unknown argument must be either 'Save' or 'Cancel'.");
-+ snprintf(error_buf, sizeof(error_buf), "%s %s", "Xman - SaveFormattedPage:",
-+ gettext("Unknown argument must be either 'Save' or 'Cancel'."));
-+ PopupWarning(man_globals, error_buf);
- return;
- }
-
-@@ -393,10 +398,13 @@ GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
- ManpageGlobals * man_globals;
- Arg arglist[1];
- Boolean sensitive;
-+ char error_buf[BUFSIZ];
- if (*num_params != 1) {
-- XtAppWarning(XtWidgetToApplicationContext(w),
-- "Xman - GotoPage: This action routine requires one argument.");
-+ snprintf(error_buf, sizeof(error_buf),
-+ gettext("%s This action routine requires one argument."),
-+ gettext("Xman - GotoPage:"));
-+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
- return;
- }
+@@ -347,14 +351,14 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
+ /* make sure the formatted man page is fully accessible by the world */
+ if (chmod(man_globals->save_file, CHMOD_MODE) != 0) {
+ snprintf(error_buf, sizeof(error_buf),
+- "Couldn't set permissions on formatted man page '%s'.\n",
++ gettext("Couldn't set permissions on formatted man page '%s'.\n"),
+ man_globals->save_file);
+ PopupWarning(man_globals, error_buf);
+ }
+ }
+ else {
+ snprintf(error_buf, sizeof(error_buf),
+- "Error while executing the command '%s'.\n", cmdbuf);
++ gettext("Error while executing the command '%s'.\n"), cmdbuf);
+ PopupWarning(man_globals, error_buf);
+ }
+ break;
+@@ -362,8 +366,9 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
+ case 'c':
+ break;
+ default:
+- PopupWarning(man_globals, "Xman - SaveFormattedPage: "
+- "Unknown argument must be either 'Save' or 'Cancel'.");
++ snprintf(error_buf, sizeof(error_buf), "%s %s", "Xman - SaveFormattedPage:",
++ gettext("Unknown argument must be either 'Save' or 'Cancel'."));
++ PopupWarning(man_globals, error_buf);
+ return;
+ }
+
+@@ -394,10 +399,13 @@ GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
+ ManpageGlobals *man_globals;
+ Arg arglist[1];
+ Boolean sensitive;
++ char error_buf[BUFSIZ];
-@@ -430,8 +438,8 @@ GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
- break;
- default:
- XtAppWarning(XtWidgetToApplicationContext(w),
-- "Xman - GotoPage: Unknown argument must be "
-- "either Manpage or Directory.");
-+ gettext("Xman - GotoPage: Unknown argument must be "
-+ "either Manpage or Directory."));
- return;
- }
+ if (*num_params != 1) {
+- XtAppWarning(XtWidgetToApplicationContext(w),
+- "Xman - GotoPage: This action routine requires one argument.");
++ snprintf(error_buf, sizeof(error_buf),
++ gettext("%s This action routine requires one argument."),
++ gettext("Xman - GotoPage:"));
++ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
+ return;
+ }
+
+@@ -431,8 +439,8 @@ GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
+ break;
+ default:
+ XtAppWarning(XtWidgetToApplicationContext(w),
+- "Xman - GotoPage: Unknown argument must be "
+- "either Manpage or Directory.");
++ gettext("Xman - GotoPage: Unknown argument must be "
++ "either Manpage or Directory."));
+ return;
+ }
}
-@@ -548,13 +556,16 @@ void
- Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
+@@ -553,12 +561,15 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
{
- ManpageGlobals * man_globals = GetGlobals(w);
-+ char error_buf[BUFSIZ];
- FILE * file = NULL;
+ ManpageGlobals *man_globals = GetGlobals(w);
+ FILE *file = NULL;
++ char error_buf[BUFSIZ];
- XtPopdown( XtParent(XtParent(w)) ); /* popdown the search widget */
+ XtPopdown(XtParent(XtParent(w))); /* popdown the search widget */
- if ( (*num_params < 1) || (*num_params > 2) ) {
-- XtAppWarning(XtWidgetToApplicationContext(w),
-- "Xman - Search: This action routine requires one or two arguments.");
-+ snprintf(error_buf, sizeof(error_buf),
-+ gettext("%s This action routine requires one or two arguments."),
-+ gettext("Xman - Search:"));
-+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
- return;
- }
+ if ((*num_params < 1) || (*num_params > 2)) {
+- XtAppWarning(XtWidgetToApplicationContext(w),
+- "Xman - Search: This action routine requires one or two arguments.");
++ snprintf(error_buf, sizeof(error_buf),
++ gettext("%s This action routine requires one or two arguments."),
++ gettext("Xman - Search:"));
++ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
+ return;
+ }
-@@ -572,8 +583,10 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
- file = NULL;
- break;
- default:
-- XtAppWarning(XtWidgetToApplicationContext(w),
-- "Xman - Search: First parameter unknown.");
-+ snprintf(error_buf, sizeof(error_buf),
-+ gettext("%s First parameter unknown."),
-+ gettext("Xman - Search:"));
-+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
- file = NULL;
- break;
- }
-@@ -598,8 +611,9 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
- }
- break;
+@@ -576,8 +587,10 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
+ file = NULL;
+ break;
default:
-- XtAppWarning(XtWidgetToApplicationContext(w),
-- "Xman - Search: Second parameter unknown.");
-+ snprintf(error_buf, sizeof(error_buf),
-+ gettext("%s Second parameter unknown."), "Xman - Search:");
-+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
- break;
+- XtAppWarning(XtWidgetToApplicationContext(w),
+- "Xman - Search: First parameter unknown.");
++ snprintf(error_buf, sizeof(error_buf),
++ gettext("%s First parameter unknown."),
++ gettext("Xman - Search:"));
++ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
+ file = NULL;
+ break;
}
- else {
+@@ -604,8 +617,9 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
+ }
+ break;
+ default:
+- XtAppWarning(XtWidgetToApplicationContext(w),
+- "Xman - Search: Second parameter unknown.");
++ snprintf(error_buf, sizeof(error_buf),
++ gettext("%s Second parameter unknown."), "Xman - Search:");
++ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
+ break;
+ }
+ else {
diff --git a/help.c b/help.c
-index c9d9aa9..8b30d25 100644
+index 2167d49..eb1a778 100644
--- a/help.c
+++ b/help.c
-@@ -36,6 +36,8 @@ from the X Consortium.
- * Created: January 19, 1988
+@@ -35,6 +35,8 @@ from the X Consortium.
*/
+ #include "globals.h"
+#include <libintl.h>
+#include <X11/Xlocale.h>
- #include "globals.h"
/* Function Name: MakeHelpWidget.
+ * Description: This function creates the help widget so that it will be
@@ -66,7 +68,7 @@ MakeHelpWidget(void)
- return(FALSE);
- }
+ return (FALSE);
+ }
-- ChangeLabel(man_globals->label, "Xman Help");
-+ ChangeLabel(man_globals->label, gettext("Xman Help"));
+- ChangeLabel(man_globals->label, "Xman Help");
++ ChangeLabel(man_globals->label, gettext("Xman Help"));
- XtManageChild( man_globals->manpagewidgets.manpage );
- XtRealizeWidget( help_widget );
+ XtManageChild(man_globals->manpagewidgets.manpage);
+ XtRealizeWidget(help_widget);
@@ -99,7 +101,7 @@ OpenHelpfile(ManpageGlobals * man_globals)
- if( (help_file_ptr = fopen(resources.help_file, "r")) == NULL ) {
- PopupWarning(man_globals,
-- "Could not open help file, NO HELP WILL BE AVALIABLE.");
-+ gettext("Could not open help file, NO HELP WILL BE AVALIABLE."));
- return(FALSE);
- }
-
+ if ((help_file_ptr = fopen(resources.help_file, "r")) == NULL) {
+ PopupWarning(man_globals,
+- "Could not open help file, NO HELP WILL BE AVAILABLE.");
++ gettext("Could not open help file, NO HELP WILL BE AVAILABLE."));
+ return (FALSE);
+ }
+
diff --git a/main.c b/main.c
-index 1b6f8e9..73f4fcc 100644
+index 4565a14..f75796d 100644
--- a/main.c
+++ b/main.c
-@@ -37,6 +37,8 @@ from the X Consortium.
- * Created: October 22, 1987
+@@ -35,6 +35,8 @@ from the X Consortium.
*/
+ #include "globals.h"
+#include <libintl.h>
+#include <X11/Xlocale.h>
- #include "globals.h"
#ifndef ZERO
#include <X11/Xaw/Cardinals.h>
-@@ -146,6 +148,7 @@ int main(int argc, char ** argv)
+ #endif /* ZERO */
+@@ -145,6 +147,7 @@ main(int argc, char **argv)
{
- XtAppContext app_con;
+ XtAppContext app_con;
-+ char *domaindir;
- saved_argc = argc;
- saved_argv = (char **)XtMalloc(argc * sizeof(char *));
- bcopy(argv, saved_argv, argc * sizeof(char *));
-@@ -158,6 +161,13 @@ int main(int argc, char ** argv)
- wm_delete_window = XInternAtom(XtDisplay(initial_widget), "WM_DELETE_WINDOW",
- False);
++ char *domaindir;
+ saved_argc = argc;
+ saved_argv = (char **) XtMalloc(argc * sizeof(char *));
+ bcopy(argv, saved_argv, argc * sizeof(char *));
+@@ -157,6 +160,13 @@ main(int argc, char **argv)
+ wm_delete_window =
+ XInternAtom(XtDisplay(initial_widget), "WM_DELETE_WINDOW", False);
-+ textdomain("xman");
++ textdomain("xman");
+
-+ if((domaindir = getenv("TEXTDOMAINDIR")) == NULL) {
-+ domaindir = "/usr/X11/share/locale";
-+ }
-+ bindtextdomain("xman", domaindir);
++ if ((domaindir = getenv("TEXTDOMAINDIR")) == NULL) {
++ domaindir = "/usr/X11/share/locale";
++ }
++ bindtextdomain("xman", domaindir);
+
- manglobals_context = XStringToContext(MANNAME);
+ manglobals_context = XStringToContext(MANNAME);
- AdjustDefResources();
-@@ -174,10 +184,10 @@ int main(int argc, char ** argv)
- XtAppAddActions(app_con, xman_actions, XtNumber(xman_actions));
+ AdjustDefResources();
+@@ -173,10 +183,10 @@ main(int argc, char **argv)
+ XtAppAddActions(app_con, xman_actions, XtNumber(xman_actions));
- if (!resources.fonts.directory)
-- PrintError("Failed to get the directory font.");
-+ PrintError(gettext("Failed to get the directory font."));
+ if (!resources.fonts.directory)
+- PrintError("Failed to get the directory font.");
++ PrintError(gettext("Failed to get the directory font."));
#ifdef DEBUG
-- printf("debugging mode\n");
-+ printf(gettext("debugging mode\n"));
+- printf("debugging mode\n");
++ printf(gettext("debugging mode\n"));
#endif
/*
-@@ -195,7 +205,7 @@ int main(int argc, char ** argv)
- default_height /= 4;
-
- if ( (sections = Man()) == 0 )
-- PrintError("There are no manual sections to display, check your MANPATH.");
-+ PrintError(gettext("There are no manual sections to display, check your MANPATH."));
+@@ -195,7 +205,7 @@ main(int argc, char **argv)
- if (resources.top_box_active)
- MakeTopBox();
-@@ -219,7 +229,7 @@ int main(int argc, char ** argv)
- }
+ if ((sections = Man()) == 0)
+ PrintError
+- ("There are no manual sections to display, check your MANPATH.");
++ (gettext("There are no manual sections to display, check your MANPATH."));
- /* Function Name: ArgError
-- * Description: Prints error message about unknow arguments.
-+ * Description: Prints error message about unknown arguments.
- * Arguments: argc, argv - args not understood.
- * Returns: none.
- */
-@@ -229,42 +239,53 @@ ArgError(int argc, char ** argv)
+ if (resources.top_box_active)
+ MakeTopBox();
+@@ -229,42 +239,53 @@ ArgError(int argc, char **argv)
{
- int i;
+ int i;
-- static char **syntax, *syntax_def[] = {
-- "-help", "Print this message",
-- "-helpfile <filename>", "Specifies the helpfile to use.",
-- "-bothshown", "Show both the directory and manpage at once.",
-- "-notopbox", "Starts with manpage rather than topbox.",
-- "-geometry <geom>", "Specifies the geometry of the top box.",
-- "=<geom>", "Specifies the geometry of the top box.",
-- "-pagesize <geom>", "Specifies the geometry of the manual page.",
-- "-bw <pixels>", "Width of all window borders.",
-- "-borderwidth <pixels>", "Width of all window borders.",
-- "-bd <color>", "Color of all window borders.",
-- "-bordercolor <color>", "Color of all window borders.",
-- "-fg <color>", "Foreground color for the application.",
-- "-foreground <color>", "Foreground color for the application.",
-- "-bg <color>", "Background color for the application.",
-- "-background <color>", "Background color for the application.",
-- "-display <display name>", "Specify a display that is not the default",
-- "-fn <font>", "Font to be used for button and label text.",
-- "-font <font>", "Font to be used for button and label text.",
-- "-name <name>", "Change the name used for retrieving resources.",
-- "-title <name>", "Change the name without affecting resources.",
-- "-xrm <resource>", "Specifies a resource on the command line.",
-- NULL, NULL,
-- };
--
-- syntax = syntax_def;
+- static const char **syntax, *syntax_def[] = {
+- "-help", "Print this message",
+- "-helpfile <filename>", "Specifies the helpfile to use.",
+- "-bothshown", "Show both the directory and manpage at once.",
+- "-notopbox", "Starts with manpage rather than topbox.",
+- "-geometry <geom>", "Specifies the geometry of the top box.",
+- "=<geom>", "Specifies the geometry of the top box.",
+- "-pagesize <geom>", "Specifies the geometry of the manual page.",
+- "-bw <pixels>", "Width of all window borders.",
+- "-borderwidth <pixels>", "Width of all window borders.",
+- "-bd <color>", "Color of all window borders.",
+- "-bordercolor <color>", "Color of all window borders.",
+- "-fg <color>", "Foreground color for the application.",
+- "-foreground <color>", "Foreground color for the application.",
+- "-bg <color>", "Background color for the application.",
+- "-background <color>", "Background color for the application.",
+- "-display <display name>", "Specify a display that is not the default",
+- "-fn <font>", "Font to be used for button and label text.",
+- "-font <font>", "Font to be used for button and label text.",
+- "-name <name>", "Change the name used for retrieving resources.",
+- "-title <name>", "Change the name without affecting resources.",
+- "-xrm <resource>", "Specifies a resource on the command line.",
+- NULL, NULL,
+- };
+-
+- syntax = syntax_def;
+-
+ for (i = 1; i < argc; i++)
+- (void) printf("This argument is unknown to Xman: %s\n", argv[i]);
+-
+- (void) printf("\nKnown arguments are:\n");
-
- for (i = 1; i < argc ; i++)
-- (void) printf("This argument is unknown to Xman: %s\n", argv[i]);
-+ (void) printf(gettext("This argument is unknown to Xman: %s\n"), argv[i]);
-
-- (void) printf("\nKnown arguments are:\n");
--
-- while ( *syntax != NULL ) {
-- printf("%-30s - %s\n", syntax[0], syntax[1]);
-- syntax += 2;
-- }
-+ (void) printf(gettext("\nKnown arguments are:\n"));
+- while (*syntax != NULL) {
+- printf("%-30s - %s\n", syntax[0], syntax[1]);
+- syntax += 2;
+- }
++ (void) printf(gettext("This argument is unknown to Xman: %s\n"), argv[i]);
++
++ (void) printf(gettext("\nKnown arguments are:\n"));
+
-+ printf("-help - %s\n",
-+ gettext("Print this message"));
-+ printf("-helpfile %s - %s\n", gettext("<filename> "),
-+ gettext("Specifies the helpfile to use."));
-+ printf("-bothshown - %s\n",
-+ gettext("Show both the directory and manpage at once."));
-+ printf("-notopbox - %s\n",
-+ gettext("Starts with manpage rather than topbox."));
-+ printf("-geometry %s - %s\n", gettext("<geom> "),
-+ gettext("Specifies the geometry of the top box."));
-+ printf("=%s - %s\n", gettext("<geom> "),
-+ gettext("Specifies the geometry of the top box."));
-+ printf("-pagesize %s - %s\n", gettext("<geom> "),
-+ gettext("Specifies the geometry of the manual page."));
-+ printf("-bw %s - %s\n", gettext("<pixels> "),
-+ gettext("Width of all window borders."));
-+ printf("-borderwidth %s - %s\n", gettext("<pixels> "),
-+ gettext("Width of all window borders."));
-+ printf("-bd %s - %s\n", gettext("<color> "),
-+ gettext("Color of all window borders."));
-+ printf("-bordercolor %s - %s\n", gettext("<color> "),
-+ gettext("Color of all window borders."));
-+ printf("-fg %s - %s\n", gettext("<color> "),
-+ gettext("Foreground color for the application."));
-+ printf("-foreground %s - %s\n", gettext("<color> "),
-+ gettext("Foreground color for the application."));
-+ printf("-bg %s - %s\n", gettext("<color> "),
-+ gettext("Background color for the application."));
-+ printf("-background %s - %s\n", gettext("<color> "),
-+ gettext("Background color for the application."));
-+ printf("-display %s - %s\n", gettext("<display name> "),
-+ gettext("Specify a display that is not the default"));
-+ printf("-fn %s - %s\n", gettext("<font> "),
-+ gettext("Font to be used for button and label text."));
-+ printf("-font %s - %s\n", gettext("<font> "),
-+ gettext("Font to be used for button and label text."));
-+ printf("-name %s - %s\n", gettext("<name> "),
-+ gettext("Change the name used for retrieving resources."));
-+ printf("-title %s - %s\n", gettext("<name> "),
-+ gettext("Change the name without affecting resources."));
-+ printf("-xrm %s - %s\n", gettext("<resource> "),
-+ gettext("Specifies a resource on the command line."));
++ printf("-help - %s\n",
++ gettext("Print this message"));
++ printf("-helpfile %s - %s\n", gettext("<filename> "),
++ gettext("Specifies the helpfile to use."));
++ printf("-bothshown - %s\n",
++ gettext("Show both the directory and manpage at once."));
++ printf("-notopbox - %s\n",
++ gettext("Starts with manpage rather than topbox."));
++ printf("-geometry %s - %s\n", gettext("<geom> "),
++ gettext("Specifies the geometry of the top box."));
++ printf("=%s - %s\n", gettext("<geom> "),
++ gettext("Specifies the geometry of the top box."));
++ printf("-pagesize %s - %s\n", gettext("<geom> "),
++ gettext("Specifies the geometry of the manual page."));
++ printf("-bw %s - %s\n", gettext("<pixels> "),
++ gettext("Width of all window borders."));
++ printf("-borderwidth %s - %s\n", gettext("<pixels> "),
++ gettext("Width of all window borders."));
++ printf("-bd %s - %s\n", gettext("<color> "),
++ gettext("Color of all window borders."));
++ printf("-bordercolor %s - %s\n", gettext("<color> "),
++ gettext("Color of all window borders."));
++ printf("-fg %s - %s\n", gettext("<color> "),
++ gettext("Foreground color for the application."));
++ printf("-foreground %s - %s\n", gettext("<color> "),
++ gettext("Foreground color for the application."));
++ printf("-bg %s - %s\n", gettext("<color> "),
++ gettext("Background color for the application."));
++ printf("-background %s - %s\n", gettext("<color> "),
++ gettext("Background color for the application."));
++ printf("-display %s - %s\n", gettext("<display name> "),
++ gettext("Specify a display that is not the default"));
++ printf("-fn %s - %s\n", gettext("<font> "),
++ gettext("Font to be used for button and label text."));
++ printf("-font %s - %s\n", gettext("<font> "),
++ gettext("Font to be used for button and label text."));
++ printf("-name %s - %s\n", gettext("<name> "),
++ gettext("Change the name used for retrieving resources."));
++ printf("-title %s - %s\n", gettext("<name> "),
++ gettext("Change the name without affecting resources."));
++ printf("-xrm %s - %s\n", gettext("<resource> "),
++ gettext("Specifies a resource on the command line."));
}
/* Function Name: AdjustDefResources
diff --git a/man.c b/man.c
-index ad2b3f0..f3f1d99 100644
+index e8432f0..5963a86 100644
--- a/man.c
+++ b/man.c
-@@ -31,7 +31,8 @@ from the X Consortium.
- */
- /* $XFree86: xc/programs/xman/man.c,v 1.8 2003/04/09 20:31:31 herrb Exp $ */
+@@ -31,6 +31,8 @@ from the X Consortium.
--
+ #include "globals.h"
+ #include "vendor.h" /* vendor-specific defines and data */
+#include <libintl.h>
+#include <X11/Xlocale.h>
- #include "globals.h"
- #include "vendor.h" /* vendor-specific defines and data */
+
+ #include <dirent.h>
-@@ -171,7 +172,7 @@ Man(void)
- manual = (Manual *) XtRealloc ( (char *) manual,
- (sizeof(Manual) * num_alloced));
- if (manual == NULL)
-- PrintError("Could not allocate memory for manual sections.");
-+ PrintError(gettext("Could not allocate memory for manual sections."));
- }
- InitManual( manual + sect, list->label );
- manual[sect].flags = list->flags;
-@@ -198,10 +199,10 @@ Man(void)
+@@ -157,7 +159,7 @@ Man(void)
+ (sizeof(Manual) * num_alloced));
+ if (manual == NULL)
+ PrintError
+- ("Could not allocate memory for manual sections.");
++ (gettext("Could not allocate memory for manual sections."));
+ }
+ InitManual(manual + sect, list->label);
+ manual[sect].flags = list->flags;
+@@ -184,10 +186,10 @@ Man(void)
*/
- if (sect == 0)
-- PrintError("No manual pages found.");
-+ PrintError(gettext("No manual pages found."));
- manual = (Manual *) XtRealloc( (char *) manual, (sizeof(Manual) * sect));
- if (manual == NULL)
-- PrintError("Could not allocate memory for manual sections.");
-+ PrintError(gettext("Could not allocate memory for manual sections."));
+ if (sect == 0)
+- PrintError("No manual pages found.");
++ PrintError(gettext("No manual pages found."));
+ manual = (Manual *) XtRealloc((char *) manual, (sizeof(Manual) * sect));
+ if (manual == NULL)
+- PrintError("Could not allocate memory for manual sections.");
++ PrintError(gettext("Could not allocate memory for manual sections."));
- return(sect); /* return the number of man sections. */
- }
-@@ -223,7 +224,7 @@ SortList(SectionList ** list)
- SectionList *head, *last, *inner, *old;
-
- if (*list == NULL)
-- PrintError("No manual sections to read, exiting.");
-+ PrintError(gettext("No manual sections to read, exiting."));
+ return (sect); /* return the number of man sections. */
+ }
+@@ -209,7 +211,7 @@ SortList(SectionList ** list)
+ SectionList *head, *last, *inner, *old;
- /*
- * First step
-@@ -426,7 +427,7 @@ ReadCurrentSection(Manual * local_manual, char * path)
+ if (*list == NULL)
+- PrintError("No manual sections to read, exiting.");
++ PrintError(gettext("No manual sections to read, exiting."));
+
+ /*
+ * First step
+@@ -421,7 +423,7 @@ ReadCurrentSection(Manual * local_manual, char *path)
- if((dir = opendir(path)) == NULL) {
+ if ((dir = opendir(path)) == NULL) {
#ifdef DEBUG
-- snprintf(error_buf, sizeof(error_buf), "Can't open directory %s", path);
-+ snprintf(error_buf, sizeof(error_buf), gettext("Can't open directory %s"), path);
- PopupWarning(NULL, error_buf);
+- snprintf(error_buf, sizeof(error_buf), "Can't open directory %s", path);
++ snprintf(error_buf, sizeof(error_buf), gettext("Can't open directory %s"), path);
+ PopupWarning(NULL, error_buf);
#endif /* DEBUG */
- return;
-@@ -512,7 +513,7 @@ ReadCurrentSection(Manual * local_manual, char * path)
- local_manual->entries_less_paths[nentries] =
- rindex(local_manual->entries[nentries], '/');
- if ( local_manual->entries_less_paths[nentries] == NULL )
-- PrintError("Internal error while cataloging manual pages.");
-+ PrintError(gettext("Internal error while cataloging manual pages."));
- ++ nentries;
- }
-
-@@ -540,7 +541,7 @@ SortAndRemove(Manual *man, int number)
- register int i2 = 0;
-
+ return;
+@@ -507,7 +509,7 @@ ReadCurrentSection(Manual * local_manual, char *path)
+ local_manual->entries_less_paths[nentries] =
+ strrchr(local_manual->entries[nentries], '/');
+ if (local_manual->entries_less_paths[nentries] == NULL)
+- PrintError("Internal error while cataloging manual pages.");
++ PrintError(gettext("Internal error while cataloging manual pages."));
+ ++nentries;
+ }
+
+@@ -535,7 +537,7 @@ SortAndRemove(Manual * man, int number)
+ register int i2 = 0;
+
#ifdef DEBUG
-- printf("sorting section %d - %s\n", i, man->blabel);
-+ printf(gettext("sorting section %d - %s\n"), i, man->blabel);
+- printf("sorting section %d - %s\n", i, man->blabel);
++ printf(gettext("sorting section %d - %s\n"), i, man->blabel);
#endif /* DEBUG */
- s1 = (char **)malloc(man->nentries * sizeof(char *));
-@@ -571,14 +572,14 @@ SortAndRemove(Manual *man, int number)
- j = 0;
- l2 = man->entries_less_paths[j++];
- if ( l2 == NULL )
-- PrintError("Internal error while removing duplicate manual pages.");
-+ PrintError(gettext("Internal error while removing duplicate manual pages."));
- while ( j < nentm1 )
- {
- l1 = l2;
- l2 = man->entries_less_paths[j++];
- if ( l2 == NULL )
-- PrintError("Internal error while removing duplicate manual pages."
-- );
-+ PrintError(gettext("Internal error while removing duplicate manual pages."
-+ ));
- if ( streq(l1,l2) )
- {
- j2 = j-1;
-@@ -980,7 +981,7 @@ DumpManual(int number)
- register int i,j;
-
- for ( i = 0; i < number; i++) {
-- printf("label: %s\n", manual[i].blabel);
-+ printf("gettext(label: %s\n"), manual[i].blabel);
- for (j = 0; j < manual[i].nentries; j++)
- printf("%s\n", manual[i].entries[j]);
- }
+ s1 = (char **) malloc(man->nentries * sizeof(char *));
+@@ -570,13 +572,13 @@ SortAndRemove(Manual * man, int number)
+ l2 = man->entries_less_paths[j++];
+ if (l2 == NULL)
+ PrintError
+- ("Internal error while removing duplicate manual pages.");
++ (gettext("Internal error while removing duplicate manual pages."));
+ while (j < nentm1) {
+ l1 = l2;
+ l2 = man->entries_less_paths[j++];
+ if (l2 == NULL)
+ PrintError
+- ("Internal error while removing duplicate manual pages.");
++ (gettext("Internal error while removing duplicate manual pages."));
+ if (streq(l1, l2)) {
+ j2 = j - 1;
+ k = j2;
+@@ -931,7 +933,7 @@ DumpManual(int number)
+ register int i, j;
+
+ for (i = 0; i < number; i++) {
+- printf("label: %s\n", manual[i].blabel);
++ printf("gettext(label: %s\n"), manual[i].blabel);
+ for (j = 0; j < manual[i].nentries; j++)
+ printf("%s\n", manual[i].entries[j]);
+ }
diff --git a/misc.c b/misc.c
-index 8818aa8..fe476ec 100644
+index 33c69c7..ded2b85 100644
--- a/misc.c
+++ b/misc.c
-@@ -41,6 +41,8 @@ from the X Consortium.
- # include "config.h"
- #endif
+@@ -40,6 +40,8 @@ from the X Consortium.
-+#include <libintl.h>
-+#include <X11/Xlocale.h>
#include "globals.h"
#include "vendor.h"
- #include <X11/Xos.h> /* sys/types.h and unistd.h included in here */
-@@ -98,7 +100,7 @@ PopupWarning(ManpageGlobals * man_globals, const char * string)
- char buffer[BUFSIZ];
- Boolean hasPosition;
++#include <libintl.h>
++#include <X11/Xlocale.h>
+ #include <X11/Xos.h> /* sys/types.h and unistd.h included in here */
+ #include <sys/stat.h>
+ #include <errno.h>
+@@ -93,7 +95,7 @@ PopupWarning(ManpageGlobals * man_globals, const char *string)
+ char buffer[BUFSIZ];
+ Boolean hasPosition;
-- snprintf( buffer, sizeof(buffer), "Xman Warning: %s", string);
-+ snprintf( buffer, sizeof(buffer), gettext("Xman Warning: %s"), string);
- hasPosition = FALSE;
- if (top)
- {
-@@ -140,7 +142,7 @@ PopupWarning(ManpageGlobals * man_globals, const char * string)
+- snprintf(buffer, sizeof(buffer), "Xman Warning: %s", string);
++ snprintf(buffer, sizeof(buffer), gettext("Xman Warning: %s"), string);
+ hasPosition = FALSE;
+ if (top) {
+ n = 0;
+@@ -138,7 +140,7 @@ PopupWarning(ManpageGlobals * man_globals, const char *string)
void
- PrintError(char * string)
+ PrintError(const char *string)
{
-- fprintf(stderr,"Xman Error: %s\n",string);
-+ fprintf(stderr,gettext("Xman Error: %s\n"),string);
- exit(EXIT_FAILURE);
+- fprintf(stderr, "Xman Error: %s\n", string);
++ fprintf(stderr, gettext("Xman Error: %s\n"), string);
+ exit(EXIT_FAILURE);
}
@@ -202,7 +204,7 @@ FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num)
- temp = CreateManpageName(entry, 0, 0);
- snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
-- "The current manual page is: %s.", temp);
-+ gettext("The current manual page is: %s."), temp);
- XtFree(temp);
+ temp = CreateManpageName(entry, 0, 0);
+ snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
+- "The current manual page is: %s.", temp);
++ gettext("The current manual page is: %s."), temp);
+ XtFree(temp);
- ParseEntry(entry, path, section, page);
-@@ -328,13 +330,13 @@ Uncompress(ManpageGlobals * man_globals, char * filename)
- return(NULL);
+ ParseEntry(entry, path, section, page);
+@@ -349,8 +351,8 @@ Uncompress(ManpageGlobals * man_globals, const char *filename)
+ FILE *file;
+
+ if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
+- PopupWarning(man_globals, "Something went wrong in retrieving the "
+- "uncompressed manual page try cleaning up /tmp.");
++ PopupWarning(man_globals, gettext("Something went wrong in retrieving "
++ "the uncompressed manual page. Try cleaning up /tmp."));
+ return (NULL);
+ }
- else if ((file = fopen(tmp_file, "r")) == NULL) {
-- PopupWarning(man_globals, "Something went wrong in retrieving the "
-- "uncompressed manual page try cleaning up /tmp.");
-+ PopupWarning(man_globals, gettext("Something went wrong in retrieving "
-+ "the uncompressed manual page. Try cleaning up /tmp."));
- }
- #else
- if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
-- PopupWarning(man_globals, "Something went wrong in retrieving the "
-- "uncompressed manual page try cleaning up /tmp.");
-+ PopupWarning(man_globals, gettext("Something went wrong in retrieving "
-+ "the uncompressed manual page. Try cleaning up /tmp."));
- return(NULL);
- }
- #endif
-@@ -371,7 +373,7 @@ UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output,
- if (stat(filename, &junk) != 0) { /* Check for existance of the file. */
- if (errno != ENOENT) {
- snprintf(error_buf, sizeof(error_buf),
-- "Error while stating file %s, errno = %d", filename, errno);
-+ gettext("Error while stating file %s, errno = %d"), filename, errno);
- PopupWarning(man_globals, error_buf);
+@@ -379,8 +381,8 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
+ if (stat(filename, &junk) != 0) { /* Check for existence of the file. */
+ if (errno != ENOENT) {
+ snprintf(error_buf, sizeof(error_buf),
+- "Error while stating file %s, errno = %d", filename,
+- errno);
++ gettext("Error while stating file %s, errno = %d"),
++ filename, errno);
+ PopupWarning(man_globals, error_buf);
+ }
+ return (FALSE);
+@@ -394,7 +396,7 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
+ strcpy(tmp, MANTEMP); /* get a temp file. */
+ fd = mkstemp(tmp);
+ if (fd < 0) {
+- PopupWarning(man_globals, "Error creating a temp file");
++ PopupWarning(man_globals, gettext("Error creating a temp file"));
+ return FALSE;
}
- return(FALSE);
-@@ -388,7 +390,7 @@ UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output,
- #else
- fd = mkstemp(tmp);
- if (fd < 0) {
-- PopupWarning(man_globals, "Error creating a temp file");
-+ PopupWarning(man_globals, gettext("Error creating a temp file"));
- return FALSE;
- }
- *output_fd = fdopen(fd, "r");
-@@ -418,7 +420,7 @@ UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output,
- return(TRUE);
+ *output_file = fdopen(fd, "r");
+@@ -429,7 +431,7 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
+ return (TRUE);
- snprintf(error_buf, sizeof(error_buf),
-- "Error while uncompressing, command was: %s", cmdbuf);
-+ gettext("Error while uncompressing, command was: %s"), cmdbuf);
- PopupWarning(man_globals, error_buf);
- return(FALSE);
+ snprintf(error_buf, sizeof(error_buf),
+- "Error while uncompressing, command was: %s", cmdbuf);
++ gettext("Error while uncompressing, command was: %s"), cmdbuf);
+ PopupWarning(man_globals, error_buf);
+ return (FALSE);
}
-@@ -514,7 +516,7 @@ Format(ManpageGlobals * man_globals, char * entry)
- #endif
- /* We Really could not find it, this should never happen, yea right. */
- snprintf(error_buf, sizeof(error_buf),
-- "Could not open manual page, %s", entry);
-+ gettext("Could not open manual page, %s"), entry);
- PopupWarning(man_globals, error_buf);
- XtPopdown( XtParent(man_globals->standby) );
- return(NULL);
-@@ -571,6 +573,19 @@ Format(ManpageGlobals * man_globals, char * entry)
- ParseEntry(entry, path, sect, NULL);
+@@ -515,7 +517,7 @@ Format(ManpageGlobals * man_globals, const char *entry)
+ if (!UncompressUnformatted(man_globals, entry, filename, &file)) {
+ /* We Really could not find it, this should never happen, yea right. */
+ snprintf(error_buf, sizeof(error_buf),
+- "Could not open manual page, %s", entry);
++ gettext("Could not open manual page, %s"), entry);
+ PopupWarning(man_globals, error_buf);
+ XtPopdown(XtParent(man_globals->standby));
+ return (NULL);
+@@ -577,12 +579,22 @@ Format(ManpageGlobals * man_globals, const char *entry)
+ ParseEntry(entry, path, sect, NULL);
#ifndef HANDLE_ROFFSEQ
-+#ifdef SFORMAT /* Handle Solaris SGML pages */
++#ifdef SFORMAT /* Handle Solaris SGML pages */
+ if (sect[0] == 's') {
-+#ifndef HAS_MKSTEMP
-+ snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s | %s %s > %s %s",
-+ path, SFORMAT, filename, TBL, FORMAT, man_globals->tempfile,
-+ "2> /dev/null");
-+#else
-+ snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s | %s %s >> %s %s",
-+ path, SFORMAT, filename, TBL, FORMAT, man_globals->tempfile,
-+ "2> /dev/null");
-+#endif
++ snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s | %s %s >> %s %s",
++ path, SFORMAT, filename, TBL, FORMAT, man_globals->tempfile,
++ "2> /dev/null");
+ } else {
+#endif /* SFORMAT */
- #ifndef HAS_MKSTEMP
- snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s > %s %s", path, TBL,
- filename, FORMAT, man_globals->tempfile, "2> /dev/null");
-@@ -578,10 +593,13 @@ Format(ManpageGlobals * man_globals, char * entry)
- snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s >> %s %s", path, TBL,
- filename, FORMAT, man_globals->tempfile, "2> /dev/null");
- #endif
+ snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s >> %s %s", path, TBL,
+ filename, FORMAT, man_globals->tempfile, "2> /dev/null");
+#ifdef SFORMAT
+ }
+#endif
#else
- /* Handle more flexible way of specifying the formatting pipeline */
- if (! ConstructCommand(cmdbuf, path, filename, man_globals->tempfile)) {
-- PopupWarning(man_globals, "Constructed command was too long!");
-+ PopupWarning(man_globals, gettext("Constructed command was too long!"));
- file = NULL;
- }
- else
-@@ -589,15 +607,15 @@ Format(ManpageGlobals * man_globals, char * entry)
+ /* Handle more flexible way of specifying the formatting pipeline */
+ if (!ConstructCommand(cmdbuf, path, filename, man_globals->tempfile)) {
+- PopupWarning(man_globals, "Constructed command was too long!");
++ PopupWarning(man_globals, gettext("Constructed command was too long!"));
+ fclose(file);
+ file = NULL;
+ }
+@@ -591,7 +603,7 @@ Format(ManpageGlobals * man_globals, const char *entry)
- if(system(cmdbuf) != 0) { /* execute search. */
- snprintf(error_buf, sizeof(error_buf),
-- "Something went wrong trying to run the command: %s", cmdbuf);
-+ gettext("Something went wrong trying to run the command: %s"), cmdbuf);
- PopupWarning(man_globals, error_buf);
- file = NULL;
- }
- else {
- #ifndef HAS_MKSTEMP
- if ((file = fopen(man_globals->tempfile,"r")) == NULL) {
-- PopupWarning(man_globals, "Something went wrong in retrieving the "
-- "temp file, try cleaning up /tmp");
-+ PopupWarning(man_globals, gettext("Something went wrong in retrieving "
-+ "the temp file, try cleaning up /tmp"));
+ if (system(cmdbuf) != 0) { /* execute search. */
+ snprintf(error_buf, sizeof(error_buf),
+- "Something went wrong trying to run the command: %s", cmdbuf);
++ gettext("Something went wrong trying to run the command: %s"), cmdbuf);
+ PopupWarning(man_globals, error_buf);
+ fclose(file);
+ file = NULL;
+@@ -1000,7 +1012,7 @@ AddCursor(Widget w, Cursor cursor)
+ Colormap c_map;
+
+ if (!XtIsRealized(w)) {
+- PopupWarning(NULL, "Widget is not realized, no cursor added.\n");
++ PopupWarning(NULL, gettext("Widget is not realized, no cursor added.\n"));
+ return;
}
- else {
- #endif
-@@ -1066,7 +1084,7 @@ AddCursor(Widget w, Cursor cursor)
- Colormap c_map;
- if (!XtIsRealized(w)) {
-- PopupWarning(NULL, "Widget is not realized, no cursor added.\n");
-+ PopupWarning(NULL, gettext("Widget is not realized, no cursor added.\n"));
- return;
- }
-
-@@ -1177,14 +1195,14 @@ ParseEntry(char *entry, char *path, char *sect, char *page)
+@@ -1114,14 +1126,14 @@ ParseEntry(const char *entry, char *path, char *sect, char *page)
- c = rindex(temp, '/');
- if (c == NULL)
-- PrintError("index failure in ParseEntry.");
-+ PrintError(gettext("index failure in ParseEntry."));
- *c++ = '\0';
- if (page != NULL)
- strcpy(page, c);
+ c = strrchr(temp, '/');
+ if (c == NULL)
+- PrintError("Failed to find / in ParseEntry.");
++ PrintError(gettext("Failed to find / in ParseEntry."));
+ *c++ = '\0';
+ if (page != NULL)
+ strcpy(page, c);
- c = rindex(temp, '/');
- if (c == NULL)
-- PrintError("index failure in ParseEntry.");
-+ PrintError(gettext("index failure in ParseEntry."));
- *c++ = '\0';
+ c = strrchr(temp, '/');
+ if (c == NULL)
+- PrintError("Failed to find / in ParseEntry.");
++ PrintError(gettext("Failed to find / in ParseEntry."));
+ *c++ = '\0';
#if defined(SFORMAT) && defined(SMAN)
- /* sgmltoroff sometimes puts an extra ./ in the path to .so entries */
-@@ -1231,12 +1249,12 @@ GetGlobals(Widget w)
+ /* sgmltoroff sometimes puts an extra ./ in the path to .so entries */
+@@ -1168,12 +1180,12 @@ GetGlobals(Widget w)
- if (temp == NULL)
- XtAppError(XtWidgetToApplicationContext(w),
-- "Xman: Could not locate widget in tree, exiting");
-+ gettext("Xman: Could not locate widget in tree, exiting"));
+ if (temp == NULL)
+ XtAppError(XtWidgetToApplicationContext(w),
+- "Xman: Could not locate widget in tree, exiting");
++ gettext("Xman: Could not locate widget in tree, exiting"));
- if (XFindContext(XtDisplay(w), XtWindow(w),
- manglobals_context, &data) != XCSUCCESS)
- XtAppError(XtWidgetToApplicationContext(w),
-- "Xman: Could not find global data, exiting");
-+ gettext("Xman: Could not find global data, exiting"));
+ if (XFindContext(XtDisplay(w), XtWindow(w),
+ manglobals_context, &data) != XCSUCCESS)
+ XtAppError(XtWidgetToApplicationContext(w),
+- "Xman: Could not find global data, exiting");
++ gettext("Xman: Could not find global data, exiting"));
- return( (ManpageGlobals *) data);
+ return ((ManpageGlobals *) data);
}
-@@ -1258,7 +1276,7 @@ SaveGlobals(Widget w, ManpageGlobals * globals)
- if (XSaveContext(XtDisplay(w), XtWindow(w), manglobals_context,
- (caddr_t) globals) != XCSUCCESS)
- XtAppError(XtWidgetToApplicationContext(w),
-- "Xman: Could not save global data, are you out of memory?");
-+ gettext("Xman: Could not save global data, are you out of memory?"));
+@@ -1195,7 +1207,7 @@ SaveGlobals(Widget w, ManpageGlobals * globals)
+ if (XSaveContext(XtDisplay(w), XtWindow(w), manglobals_context,
+ (caddr_t) globals) != XCSUCCESS)
+ XtAppError(XtWidgetToApplicationContext(w),
+- "Xman: Could not save global data, are you out of memory?");
++ gettext("Xman: Could not save global data, are you out of memory?"));
}
/* Function Name: RemoveGlobals
-@@ -1276,5 +1294,5 @@ RemoveGlobals(Widget w)
- if (XDeleteContext(XtDisplay(w), XtWindow(w),
- manglobals_context) != XCSUCCESS)
- XtAppError(XtWidgetToApplicationContext(w),
-- "Xman: Could not remove global data?");
-+ gettext("Xman: Could not remove global data?"));
+@@ -1213,5 +1225,5 @@ RemoveGlobals(Widget w)
+ if (XDeleteContext(XtDisplay(w), XtWindow(w),
+ manglobals_context) != XCSUCCESS)
+ XtAppError(XtWidgetToApplicationContext(w),
+- "Xman: Could not remove global data?");
++ gettext("Xman: Could not remove global data?"));
}
diff --git a/search.c b/search.c
-index 48c4efe..21d413d 100644
+index c28b997..749fe61 100644
--- a/search.c
+++ b/search.c
-@@ -30,7 +30,8 @@ from the X Consortium.
- */
- /* $XFree86: xc/programs/xman/search.c,v 1.5 2001/01/27 17:24:27 herrb Exp $ */
+@@ -31,6 +31,8 @@ from the X Consortium.
--
-+#include <libintl.h>
-+#include <X11/Xlocale.h>
#include "globals.h"
#include "vendor.h"
++#include <libintl.h>
++#include <X11/Xlocale.h>
-@@ -70,7 +71,7 @@ MakeSearchWidget(ManpageGlobals * man_globals, Widget parent)
- arglist, num_args);
+ /* Map <CR> and control-M to goto beginning of file. */
- if ( (text = XtNameToWidget(dialog, "value")) == (Widget) NULL)
-- PopupWarning(NULL, "Could not find text widget in MakeSearchWidget.");
-+ PopupWarning(NULL, gettext("Could not find text widget in MakeSearchWidget."));
- else
- XtSetKeyboardFocus(dialog, text);
+@@ -68,7 +70,7 @@ MakeSearchWidget(ManpageGlobals * man_globals, Widget parent)
+ arglist, num_args);
+
+ if ((text = XtNameToWidget(dialog, "value")) == (Widget) NULL)
+- PopupWarning(NULL, "Could not find text widget in MakeSearchWidget.");
++ PopupWarning(NULL, gettext("Could not find text widget in MakeSearchWidget."));
+ else
+ XtSetKeyboardFocus(dialog, text);
-@@ -86,7 +87,7 @@ MakeSearchWidget(ManpageGlobals * man_globals, Widget parent)
- if ( ((command = XtNameToWidget(dialog, MANUALSEARCH)) == (Widget) NULL) ||
- ((cancel = XtNameToWidget(dialog, CANCEL)) == (Widget) NULL) )
- PopupWarning(NULL,
-- "Could not find manual search widget in MakeSearchWidget.");
-+ gettext("Could not find manual search widget in MakeSearchWidget."));
- else {
- static char * half_size[] = {
- MANUALSEARCH, APROPOSSEARCH, NULL
-@@ -121,7 +122,7 @@ ManpageGlobals * man_globals)
- return(XawDialogGetValueString(dialog));
+@@ -84,7 +86,7 @@ MakeSearchWidget(ManpageGlobals * man_globals, Widget parent)
+ if (((command = XtNameToWidget(dialog, MANUALSEARCH)) == (Widget) NULL) ||
+ ((cancel = XtNameToWidget(dialog, CANCEL)) == (Widget) NULL))
+ PopupWarning(NULL,
+- "Could not find manual search widget in MakeSearchWidget.");
++ gettext("Could not find manual search widget in MakeSearchWidget."));
+ else {
+ static const char *half_size[] = {
+ MANUALSEARCH, APROPOSSEARCH, NULL
+@@ -120,7 +122,7 @@ SearchString(ManpageGlobals * man_globals)
+ return (XawDialogGetValueString(dialog));
- PopupWarning(man_globals,
-- "Could not get the search string, no search will be preformed.");
-+ gettext("Could not get the search string, no search will be preformed."));
- return(NULL);
+ PopupWarning(man_globals,
+- "Could not get the search string, no search will be preformed.");
++ gettext("Could not get the search string, no search will be performed."));
+ return (NULL);
}
-@@ -165,16 +166,16 @@ DoSearch(ManpageGlobals * man_globals, int type)
- /* If the string is empty or starts with a space then do not search */
-
- if ( streq(search_string,"") ) {
-- PopupWarning(man_globals, "Search string is empty.");
-+ PopupWarning(man_globals, gettext("Search string is empty."));
- return(NULL);
- }
+@@ -163,16 +165,16 @@ DoSearch(ManpageGlobals * man_globals, int type)
+ /* If the string is empty or starts with a space then do not search */
- if (strlen(search_string) >= BUFSIZ) {
-- PopupWarning(man_globals, "Search string too long.");
-+ PopupWarning(man_globals, gettext("Search string too long."));
- return(NULL);
- }
- if (search_string[0] == ' ') {
-- PopupWarning(man_globals, "First character cannot be a space.");
-+ PopupWarning(man_globals, gettext("First character cannot be a space."));
- return(NULL);
- }
-
-@@ -210,7 +211,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
+ if (streq(search_string, "")) {
+- PopupWarning(man_globals, "Search string is empty.");
++ PopupWarning(man_globals, gettext("Search string is empty."));
+ return (NULL);
}
- snprintf(label, sizeof(label),
-- "Results of apropos search on: %s", search_string);
-+ gettext("Results of apropos search on: %s"), search_string);
-
- #ifdef NO_MANPATH_SUPPORT /* not quite correct, but the best I can do. */
- snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, search_string, mantmp);
-@@ -219,7 +220,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
- #endif
-
- if(system(cmdbuf) != 0) { /* execute search. */
-- snprintf(error_buf, sizeof(error_buf), "Something went wrong trying to run %s\n",cmdbuf);
-+ snprintf(error_buf, sizeof(error_buf), gettext("Something went wrong trying to run %s\n"),cmdbuf);
- PopupWarning(man_globals, error_buf);
+ if (strlen(search_string) >= BUFSIZ) {
+- PopupWarning(man_globals, "Search string too long.");
++ PopupWarning(man_globals, gettext("Search string too long."));
+ return (NULL);
+ }
+ if (search_string[0] == ' ') {
+- PopupWarning(man_globals, "First character cannot be a space.");
++ PopupWarning(man_globals, gettext("First character cannot be a space."));
+ return (NULL);
}
-@@ -228,7 +229,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
- #else
- if((file = fopen(mantmp,"r")) == NULL)
- #endif
-- PrintError("lost temp file? out of temp space?");
-+ PrintError(gettext("lost temp file? out of temp space?"));
+@@ -205,7 +207,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
+ }
+
+ snprintf(label, sizeof(label),
+- "Results of apropos search on: %s", search_string);
++ gettext("Results of apropos search on: %s"), search_string);
+
+ #ifdef NO_MANPATH_SUPPORT /* not quite correct, but the best I can do. */
+ snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, search_string, mantmp);
+@@ -216,12 +218,12 @@ DoSearch(ManpageGlobals * man_globals, int type)
- /*
- * Since we keep the FD open we can unlink the file safely, this
-@@ -237,7 +238,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
+ if (system(cmdbuf) != 0) { /* execute search. */
+ snprintf(error_buf, sizeof(error_buf),
+- "Something went wrong trying to run %s\n", cmdbuf);
++ gettext("Something went wrong trying to run %s\n"), cmdbuf);
+ PopupWarning(man_globals, error_buf);
+ }
+
+ if ((file = fdopen(fd, "r")) == NULL)
+- PrintError("lost temp file? out of temp space?");
++ PrintError(gettext("lost temp file? out of temp space?"));
- unlink(mantmp);
+ /*
+ * Since we keep the FD open we can remove the file safely, this
+@@ -230,8 +232,8 @@ DoSearch(ManpageGlobals * man_globals, int type)
-- snprintf(string_buf, sizeof(string_buf), "%s: nothing appropriate", search_string);
-+ snprintf(string_buf, sizeof(string_buf), gettext("%s: nothing appropriate"), search_string);
+ remove(mantmp);
+
+- snprintf(string_buf, sizeof(string_buf), "%s: nothing appropriate",
+- search_string);
++ snprintf(string_buf, sizeof(string_buf),
++ gettext("%s: nothing appropriate"), search_string);
- /*
- * Check first LOOKLINES lines for "nothing appropriate".
-@@ -276,7 +277,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
- else { /* MANUAL SEACH */
- file = DoManualSearch(man_globals, search_string);
- if (file == NULL) {
-- snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.", search_string);
-+ snprintf(string_buf, sizeof(string_buf), gettext("No manual entry for %s."), search_string);
- ChangeLabel(man_globals->label, string_buf);
- if (man_globals->label == NULL)
- PopupWarning(man_globals, string_buf);
-@@ -290,7 +291,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
+ /*
+ * Check first LOOKLINES lines for "nothing appropriate".
+@@ -270,8 +272,8 @@ DoSearch(ManpageGlobals * man_globals, int type)
+ else { /* MANUAL SEARCH */
+ file = DoManualSearch(man_globals, search_string);
+ if (file == NULL) {
+- snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.",
+- search_string);
++ snprintf(string_buf, sizeof(string_buf),
++ gettext("No manual entry for %s."), search_string);
+ ChangeLabel(man_globals->label, string_buf);
+ if (man_globals->label == NULL)
+ PopupWarning(man_globals, string_buf);
+@@ -286,6 +288,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
+ dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
+ if (dialog == NULL)
+ PopupWarning(man_globals, "Could not clear the search string.");
++ PopupWarning(man_globals, gettext("Could not clear the search string."));
- dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
- if (dialog == NULL)
-- PopupWarning(man_globals, "Could not clear the search string.");
-+ PopupWarning(man_globals, gettext("Could not clear the search string."));
-
- XtSetArg(arglist[0], XtNvalue, "");
- XtSetValues(dialog, arglist, (Cardinal) 1);
-@@ -377,7 +378,7 @@ int number)
+ XtSetArg(arglist[0], XtNvalue, "");
+ XtSetValues(dialog, arglist, (Cardinal) 1);
+@@ -372,7 +375,7 @@ BEntrySearch(char *string, char **first, int number)
- head = rindex(first[ global_number + check ], '/');
- if (head == NULL)
-- PrintError("index failure in BEntrySearch");
-+ PrintError(gettext("index failure in BEntrySearch"));
- head++;
+ head = strrchr(first[global_number + check], '/');
+ if (head == NULL)
+- PrintError("index failure in BEntrySearch");
++ PrintError(gettext("index failure in BEntrySearch"));
+ head++;
- tail = rindex(head, '.');
+ tail = strrchr(head, '.');
diff --git a/vendor.c b/vendor.c
-index 79cc8bb..b3772dd 100644
+index 903fc8c..0940f24 100644
--- a/vendor.c
+++ b/vendor.c
-@@ -34,6 +34,8 @@ from the X Consortium.
+@@ -32,6 +32,8 @@ from the X Consortium.
#include "globals.h"
#include "vendor.h"
@@ -962,115 +923,18 @@
+#include <X11/Xlocale.h>
typedef struct sectionName {
- char * name;
-@@ -100,21 +102,74 @@ static SectionNameRec SectionNames[] = {
- {"(1m) Maintenance Commands", "1m"},
- {"(1s) SunOS Specific Commands", "1s"},
- {"(2) System Calls", "2"},
-- {"(3) C Library Functions", "3"},
-+ {"(3) Introduction to Library Functions", "3"},
-+ {"(3adm) General Administrative Library Functions", "3adm"},
-+ {"(3aio) Asynchronous I/O Library Functions", "3aio"},
- {"(3b) SunOS/BSD Compatibility Functions", "3b"},
-+ {"(3bsm) Security and Auditing Library Functions", "3bsm"},
- {"(3c) C Library Functions", "3c"},
-- {"(3e) ELF Library Functions", "3e"},
-+ {"(3cfgadm) Configuration Administration Library Functions", "3cfgadm"},
-+ {"(3crypt) Encryption and Decryption Library", "3crypt"},
-+ {"(3curses) Curses Library Functions", "3curses"},
-+ {"(3devid) Device ID Library Functions", "3devid"},
-+ {"(3devinfo) Device Information Library Functions", "3devinfo"},
-+ {"(3dl) Dynamic Linking Library Functions", "3dl"},
-+ {"(3dmi) DMI Library Functions", "3dmi"},
-+ {"(3door) Door Library Functions", "3door"},
-+ {"(3e) C Library Functions", "3e"},
-+ {"(3elf) ELF Library Functions", "3elf"},
-+ {"(3ext) Extended Library Functions", "3ext"},
- {"(3g) C Library Functions", "3g"},
-- {"(3i) Wid Character Functions", "3i"},
-+ {"(3gen) String Pattern-Matching Library Functions", "3gen"},
-+ {"(3head) Headers", "3head"},
-+ {"(3i) Wide Character Functions", "3i"},
- {"(3k) Kernel VM Library Functions", "3k"},
-- {"(3m) Mathematical Library", "3m"},
-+ {"(3krb) Kerberos Library Functions", "3krb"},
-+ {"(3kstat) Kernel Statistics Library Functions", "3kstat"},
-+ {"(3kvm) Kernel VM Library Functions", "3kvm"},
-+ {"(3layout) Layout Services Library Functions", "3layout"},
-+ {"(3ldap) LDAP Library Functions", "3ldap"},
-+ {"(3lib) Interface Libraries", "3lib"},
-+ {"(3libucb) SunOS/BSD Compatibility Interface Libraries", "3libucb"},
-+ {"(3m) Mathematical Library Functions", "3m"},
-+ {"(3mail) User Mailbox Library Functions", "3mail"},
-+ {"(3malloc) Memory Allocation Library Functions", "3malloc"},
-+ {"(3mp) Integer Mathematical Library Functions", "3mp"},
- {"(3n) Network Functions", "3n"},
-- {"(3r) RPC Services Library", "3r"},
-+ {"(3nsl) Networking Services Library Functions", "3nsl"},
-+ {"(3pam) PAM Library Functions", "3pam"},
-+ {"(3plot) Graphics Interface Library Functions", "3plot"},
-+ {"(3proc) Process Control Library Functions", "3proc"},
-+ {"(3r) Realtime Library", "3r"},
-+ {"(3rac) Remote Asynchronous Calls Library Functions", "3rac"},
-+ {"(3resolv) Resolver Library Functions", "3resolv"},
-+ {"(3rpc) RPC Library Functions", "3rpc"},
-+ {"(3rt) Realtime Library Functions", "3rt"},
- {"(3s) Standard I/O Functions", "3s"},
-+ {"(3sched) LWP Scheduling Library Functions", "3sched"},
-+ {"(3sec) File Access Control Library Functions", "3sec"},
-+ {"(3secdb) Security Attributes Database Library Functions", "3secdb"},
-+ {"(3snmp) SNMP Library Functions", "3snmp"},
-+ {"(3socket) Sockets Library Functions", "3socket"},
- #if OSMINORVERSION == 5
-- {"(3t) Threads Library", "3t"},
-+ {"(3t) Threads Library Functions", "3t"},
+ const char *name;
+@@ -229,11 +231,11 @@ AddStandardSections(SectionList ** list, const char *path)
+
+ for (i = 0; i < numSections; i++) {
+ snprintf(file, sizeof(file), "%s%s", SEARCHDIR, SectionNames[i].suffix);
+- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
++ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
+ #ifdef SEARCHOTHER
+ snprintf(file, sizeof(file), "%s%s", SEARCHOTHER,
+ SectionNames[i].suffix);
+- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
++ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
#endif
-+ {"(3thr) Threads Library Functions", "3thr"},
-+ {"(3tnf) TNF Library Functions", "3tnf"},
-+ {"(3ucb) SunOS/BSD Compatibility Library Functions", "3ucb"},
-+ {"(3volmgt) Volume Management Library Functions", "3volmgt"},
- {"(3x) Miscellaneous Library Functions", "3x"},
-+ {"(3xc) X/Open Curses Library Functions", "3xc"},
-+ {"(3xcurses) X/Open Curses Library Functions", "3xcurses"},
-+ {"(3xfn) XFN Interface Library Functions", "3xfn"},
-+ {"(3xn) X/Open Networking Services Library Functions", "3xn"},
-+ {"(3xnet) X/Open Networking Services Library Functions", "3xnet"},
-+ {"(3X11) X Window System: Xlib Functions", "3X11"},
-+ {"(3Xext) X Window System: Protocol Extension Functions", "3Xext"},
-+ {"(3Xi) X Window System: Input Extension Functions", "3Xi"},
-+ {"(3Xmu) X Window System: Miscellaneous Utility Functions", "3Xmu"},
-+ {"(3Xp) X Window System: Print Extension Functions", "3Xp"},
-+ {"(3Xt) X Window System: Toolkit Intrinsics Functions", "3Xt"},
- {"(4) File Formats", "4"},
- {"(4b) Misc. Reference Manual Pages", "4b"},
- {"(5) Environments, Tables, and TROFF Macros", "5"},
-@@ -133,6 +188,7 @@ static SectionNameRec SectionNames[] = {
- {"(9s) DDI and DKI Data Structures", "9s"},
- {"(l) Local", "l"},
- {"(n) New", "n"},
-+ {"(o) Old", "o"}
- };
-
- #else
-@@ -188,10 +244,10 @@ char * path)
-
- for (i=0; i < numSections; i++) {
- snprintf(file, sizeof(file), "%s%s", SEARCHDIR, SectionNames[i].suffix);
-- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
-+ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
- #ifdef SEARCHOTHER
- snprintf(file, sizeof(file), "%s%s", SEARCHOTHER, SectionNames[i].suffix);
-- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
-+ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
- #endif
- }
- #endif
-@@ -252,7 +308,7 @@ char *path)
- int flags = (int) *p++;
- while (*p != NULL) {
- snprintf(file, sizeof(file), "%s%s", SEARCHDIR, *p++);
-- AddNewSection(list, path, file, message, flags);
-+ AddNewSection(list, path, file, gettext(message), flags);
}
- p++;
- }
+ }
--- a/open-src/app/xman/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xman/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -1,8 +1,8 @@
###############################################################################
#
-# xman 1.x Makefile
+# xman - manual page browser
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -29,11 +29,12 @@
MODULE_NAME=xman
# Version number (used in path names)
-MODULE_VERSION=1.1.2
+MODULE_VERSION=1.1.3
# Checksums for upstream tarball
-TARBALL_MD5 = 17d89b043083cba9e335379fc61981c0
-TARBALL_SHA1 = ba10cf0b2d0c2b40ded93e892c69e7bd4586ad1e
+TARBALL_MD5 = 77d6489d46ed4a0729f3bdc9a0bfc50f
+TARBALL_SHA1 = 9d83b14869ffadfda3407a2ab3b5fee13f667366
+TARBALL_SHA256= 405211b606a7fa420029897f099dc107791bb4c29bc88481c6efac9c4590bb1a
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = 6708109.patch,-p1
--- a/open-src/app/xmodmap/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xmodmap/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -36,12 +36,12 @@
MODULE_DESC = the xmodmap X11 keyboard/mouse mapping configuration utility
# Version number (used in path names)
-MODULE_VERSION=1.0.7
+MODULE_VERSION=1.0.8
# Checksums for upstream tarball
-TARBALL_MD5 = d9b65f6881afe0d6d9863b30e1081bde
-TARBALL_SHA1 = 9f9c6b7bd058c09a8e15b1c4f4eccb972e51ffef
-TARBALL_SHA256= ef22ede9c4a3c720da539292c6911515a8408e618e0dec6aa2196ee2153de4b5
+TARBALL_MD5 = 5511da3361eea4eaa21427652c559e1c
+TARBALL_SHA1 = 44ebb0a1047fc9391422108007c30c64cc0782bc
+TARBALL_SHA256= efe2e3c89858a2db3bdcf969f55f55d0af4f5007789198344de0595249a99fc3
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/xpr/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-
-Copyright (c) 1985, 1988 X Consortium
-
-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 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 X CONSORTIUM 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.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-Copyright 1986 by Marvin Solomon and the University of Wisconsin
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the names of Marvin Solomon and
-the University of Wisconsin not be used in
-advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-Neither Marvin Solomon nor the University of Wisconsin
-makes any representations about the suitability of
-this software for any purpose. It is provided "as is"
-without express or implied warranty.
-
-Copyright (c) 1988 by Hewlett-Packard Company
-
-Permission to use, copy, modify, and distribute this software
-and its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that copyright notice and this permission
-notice appear in supporting documentation, and that
-Hewlett-Packard not be used in advertising or publicity
-pertaining to distribution of the software without specific, written
-prior permission.
--- a/open-src/app/xprop/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xprop/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -32,11 +32,12 @@
MODULE_DESC = the xprop utility to display X11 window and font properties
# Version number (used in path names)
-MODULE_VERSION=1.2.1
+MODULE_VERSION=1.2.2
# Checksums for upstream tarball
-TARBALL_MD5 = d5529dc8d811efabd136ca2d8e857deb
-TARBALL_SHA1 = d531be0f5f2b7758216ea4d7890f88c42c5fa3fd
+TARBALL_MD5 = fae3d2fda07684027a643ca783d595cc
+TARBALL_SHA1 = f62e85e333132ea746fee7d99ca20a9e5b24e77b
+TARBALL_SHA256= 9bee88b1025865ad121f72d32576dd3027af1446774aa8300cce3c261d869bc6
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/xrandr/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xrandr/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,11 +29,12 @@
MODULE_NAME=xrandr
# Version number (used in path names)
-MODULE_VERSION=1.4.0
+MODULE_VERSION=1.4.1
# Checksums for upstream tarball
-TARBALL_MD5 = 4d68317238bb14a33c0e419233d57d87
-TARBALL_SHA1 = 01bdbe3905e19fad93fe9fcb6185f16d22ad33b2
+TARBALL_MD5 = 52c3de0297bf45be6a189dc2e0515638
+TARBALL_SHA1 = 48d59ff6403c116daaf2c73185a57141ed4089fc
+TARBALL_SHA256= 67b554ab975652778bef587f86dab7fec8cb95dfd21c11d98a203dac5c241e50
# pkg(5) name we deliver the files in (override default)
MODULE_PKGNAME=x11/x11-server-utilities
@@ -49,6 +50,8 @@
MODULE_ARC_CASES += PSARC/2007/430
# PSARC/2009/269 X Resize, Rotate and Reflect (RandR) 1.3
MODULE_ARC_CASES += PSARC/2009/269
+# PSARC/2013/089 X11 application updates
+MODULE_ARC_CASES += PSARC/2013/089
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=man/xrandr.man
--- a/open-src/app/xrdb/7051970.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-From 60577129058e018f13748b99e51ab1a17088db8e Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Thu, 16 Jun 2011 15:38:17 -0700
-Subject: [PATCH:xrdb] Tokenize #define names in the PATHETICCPP case too
-
-Fixes generation of the EXT_<extension-name> #defines, since cpp treats
-a #define EXT_MIT-SHM as a token "EXT_MIT" with a value of "-SHM".
-
-Without this fix, an xrdb built with PATHETICCPP prints warnings of:
-macro EXT_XC redefines previous macro at "", line 27
-macro EXT_XVideo redefines previous macro at "", line 33
-macro EXT_MIT redefines previous macro at "", line 35
-macro EXT_MIT redefines previous macro at "", line 37
-
-due to extension #defines such as EXT_MIT-SCREEN-SAVER & EXT_MIT-SHM
-conflicting with each other.
-
-Now matches the non-PATHETICCPP handling of #define names.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- xrdb.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/xrdb.c b/xrdb.c
-index ea698b9..cf2758a 100644
---- a/xrdb.c
-+++ b/xrdb.c
-@@ -420,7 +420,7 @@ AddDef(String *buff, char *title, char *value)
- #ifdef PATHETICCPP
- if (need_real_defines) {
- addstring(buff, "\n#define ");
-- addstring(buff, title);
-+ addtokstring(buff, title);
- if (value && (value[0] != '\0')) {
- addstring(buff, " ");
- addstring(buff, value);
---
-1.7.3.2
-
--- a/open-src/app/xrdb/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xrdb/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -36,14 +36,15 @@
MODULE_DESC = the xrdb X server resource database utility
# Version number (used in path names)
-MODULE_VERSION=1.0.9
+MODULE_VERSION=1.1.0
# Checksums for upstream tarball
-TARBALL_MD5 = ed2e48cf33584455d74615ad4bbe4246
-TARBALL_SHA1 = efa5f2420411988d6a6e142934393fd272507857
+TARBALL_MD5 = b54c7e3e53b4f332d41ed435433fbda0
+TARBALL_SHA1 = b95ae53b767ee7b56baa55fc78eb9c0b9e5ccd29
+TARBALL_SHA256= 73827b6bbfc9d27ca287d95a1224c306d7053cd7b8156641698d7dc541ca565b
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = 7051970.patch,-p1
+SOURCE_PATCHES =
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=man/xrdb.man
--- a/open-src/app/xrefresh/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xrefresh/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -36,17 +36,18 @@
MODULE_DESC = the xrefresh X screen update utility
# Version number (used in path names)
-MODULE_VERSION=1.0.4
+MODULE_VERSION=1.0.5
# Checksums for upstream tarball
-TARBALL_MD5 = 2f63f88ad0dcecd33c8cf000f38e9250
-TARBALL_SHA1 = 5e85ee14ea9a357c1d4372bbc068a8d452a134aa
+TARBALL_MD5 = a896382bc53ef3e149eaf9b13bc81d42
+TARBALL_SHA1 = f0372afb62f75ad29343abc96dbf80be12050b72
+TARBALL_SHA256= 3213671b0a8a9d1e8d1d5d9e3fd86842c894dd9acc1be2560eda50bc1fb791d6
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
# Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=*.man
+SUNTOUCHED_MANPAGES=man/xrefresh.man
MODULE_STABILITY=Committed
# Compatibility links from /usr/X11/bin to /usr/bin
--- a/open-src/app/xset/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xset/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -27,12 +27,12 @@
MODULE_NAME=xset
# Version number (used in path names)
-MODULE_VERSION=1.2.2
+MODULE_VERSION=1.2.3
# Checksums for upstream tarball
-TARBALL_MD5 = d44e0057d6722b25d5a314e82e0b7e7c
-TARBALL_SHA1 = e48d628259dbe1ff413ec8408b4fee9561c8815c
-TARBALL_SHA256 = 61371c140030b8b05075a1378b34a4d7c438ed9159496a95f10782c6f4aec1e8
+TARBALL_MD5 = dcd227388b57487d543cab2fd7a602d7
+TARBALL_SHA1 = 62a5e7ec91e6900b798a88ca3b30d25bd5ef3047
+TARBALL_SHA256= 4382f4fb29b88647e13f3b4bc29263134270747fc159cfc5f7e3af23588c8063
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = xsetfbpm.patch,-p1
--- a/open-src/app/xset/xsetfbpm.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xset/xsetfbpm.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2013, 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"),
@@ -22,7 +22,7 @@
Adds support for Solaris's Frame Buffer Power Management (fbpm) extension
diff --git a/man/xset.man b/man/xset.man
-index ff46e9f..624dee9 100644
+index e9f1c5e..2c81c5e 100644
--- a/man/xset.man
+++ b/man/xset.man
@@ -1,4 +1,5 @@
@@ -42,18 +42,7 @@
[fp=\fIpathlist\fP]
[-fp=\fIpathlist\fP]
[+fp=\fIpathlist\fP]
-@@ -121,7 +126,9 @@ the volume to the nearest value that the hardware can support.
- The \fB\-dpms\fP option disables DPMS (Energy Star) features.
- .TP 8
- .B +dpms
--The \fB+dpms\fP option enables DPMS (Energy Star) features.
-+Enable Energy Star mode. Default times are standby = 1440, suspend = 1620, and
-+off = 1800 seconds.
-+.PP
- .TP 8
- .B dpms \fIflags...\fP
- The \fBdpms\fP option allows the DPMS (Energy Star) parameters to be
-@@ -136,6 +143,32 @@ The first value given is for the `standby' mode, the second is for the
+@@ -138,6 +143,32 @@ The first value given is for the `standby' mode, the second is for the
`suspend' mode, and the third is for the `off' mode. Setting these
values implicitly enables the DPMS features. A value of zero disables
a particular mode.
@@ -87,7 +76,7 @@
.B fp= \fIpath,...\fP
The \fBfp=\fP sets the font path to the entries given in the path argument.
diff --git a/xset.c b/xset.c
-index 40fc7e1..f696941 100644
+index f461d4b..1629a72 100644
--- a/xset.c
+++ b/xset.c
@@ -65,6 +65,10 @@ in this Software without prior written authorization from The Open Group.
@@ -98,10 +87,10 @@
+# ifdef FBPM
+# include <X11/extensions/fbpm.h>
+# endif
- # ifdef WIN32
- # define BOOL wBOOL
- # ifdef Status
-@@ -623,6 +627,62 @@ main(int argc, char *argv[])
+ #endif /* DPMSExtension */
+
+ #ifdef XF86MISC
+@@ -593,6 +597,62 @@ main(int argc, char *argv[])
}
}
#endif /* DPMSExtension */
@@ -164,7 +153,7 @@
else if (strcmp(arg, "s") == 0) {
if (i >= argc) {
set_saver(dpy, ALL, 0); /* Set everything to default */
-@@ -1506,6 +1566,46 @@ query(Display *dpy)
+@@ -1483,6 +1543,46 @@ query(Display *dpy)
}
}
#endif
@@ -211,20 +200,20 @@
#ifdef FONTCACHE
{
int dummy;
-@@ -1636,6 +1736,16 @@ usage(char *fmt, ...)
- fprintf(stderr, "\t (also implicitly enables DPMS features) \n");
- fprintf(stderr, "\t a timeout value of zero disables the mode \n");
+@@ -1613,6 +1713,16 @@ usage(const char *fmt, ...)
+ "\t (also implicitly enables DPMS features) \n"
+ "\t a timeout value of zero disables the mode \n"
#endif
+#ifdef FBPM
-+ fprintf(stderr, " To control Frame Buffer Power Management (FBPM) features:\n");
-+ fprintf(stderr, "\t-fbpm Frame Buffer Power Management features off\n");
-+ fprintf(stderr, "\t+fbpm Frame Buffer Power Management features on\n");
-+ fprintf(stderr, "\t fbpm force on \n");
-+ fprintf(stderr, "\t force standby \n");
-+ fprintf(stderr, "\t force suspend \n");
-+ fprintf(stderr, "\t force off \n");
-+ fprintf(stderr, "\t (also implicitly enables FBPM features) \n");
++ " To control Frame Buffer Power Management (FBPM) features:\n"
++ "\t-fbpm Frame Buffer Power Management features off\n"
++ "\t+fbpm Frame Buffer Power Management features on\n"
++ "\t fbpm force on \n"
++ "\t force standby \n"
++ "\t force suspend \n"
++ "\t force off \n"
++ "\t (also implicitly enables FBPM features) \n"
+#endif
#ifdef FONTCACHE
- fprintf(stderr, " To control font cache:\n");
- fprintf(stderr, "\t fc [hi-mark [low-mark [balance]]]\n");
+ " To control font cache:\n"
+ "\t fc [hi-mark [low-mark [balance]]]\n"
--- a/open-src/app/xwd/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xwd/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,12 +29,12 @@
MODULE_NAME=xwd
# Version number (used in path names)
-MODULE_VERSION=1.0.5
+MODULE_VERSION=1.0.6
# Checksums for upstream tarball
-TARBALL_MD5 = 2113126f9ac9c02bb8547c112c5d037e
-TARBALL_SHA1 = 3b0e4f3f9d28a07444e72952342e21544d4785b6
-TARBALL_SHA256= 02752ba737299cf4a1b75d777166c5b5e5ba8d3cabdf2c54cbe77de175356f3a
+TARBALL_MD5 = 6b5d48464c5f366e91efd08b62b12d94
+TARBALL_SHA1 = d1573340d67ce4a2dae31477a8e5459e36dda967
+TARBALL_SHA256= 3bb396a2268d78de4b1c3e5237a85f7849d3434e87b3cd1f4d57eef614227d79
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/app/xwininfo/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/app/xwininfo/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -36,11 +36,12 @@
MODULE_DESC = the xwininfo X11 window information utility
# Version number (used in path names)
-MODULE_VERSION=1.1.2
+MODULE_VERSION=1.1.3
# Checksums for upstream tarball
-TARBALL_MD5 = 9e8b58c8aa6172e87ab4f9cf3612fedd
-TARBALL_SHA1 = c90b3c289f95474aa8eb6cf1bf4caf3b9dbf82d3
+TARBALL_MD5 = b777bafb674555e48fd8437618270931
+TARBALL_SHA1 = 179253e6b8266bc3e3b6496964077c9cdcb2dcba
+TARBALL_SHA256= 218eb0ea95bd8de7903dfaa26423820c523ad1598be0751d2d8b6a2c23b23ff8
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/common/Makefile.inc Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/common/Makefile.inc Mon Sep 30 13:26:39 2013 -0700
@@ -926,7 +926,7 @@
$(LICENSE_OVERRIDE) LICENSE_INSERT = $(ORACLE_LICENSE_INSERT)
# Name to use in TPNO metadata & license file headers
-MODULE_TPNO_NAME_DEFAULT = $(MODULE_COMPILER_SET:yes=$(POUND_SIGN))
+MODULE_TPNO_NAME_DEFAULT = $(MODULE_TPNO_NAME_SET:yes=$(POUND_SIGN))
$(MODULE_TPNO_NAME_DEFAULT) MODULE_TPNO_NAME = $(MODULE_NAME)
install_license: $(LICENSE_FILE_DEST)
--- a/open-src/data/xcursor-themes/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/data/xcursor-themes/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -31,11 +31,12 @@
MODULE_DESC = cursor themes from X.Org
# Version number (used in path names)
-MODULE_VERSION=1.0.3
+MODULE_VERSION=1.0.4
# Checksums for upstream tarball
-TARBALL_MD5 = ba21aad0b353f1881f5069e423a44587
-TARBALL_SHA1 = d65dd5cb931bf4a9722e64b5a265eb14dcc6ec09
+TARBALL_MD5 = fdfb0ad9cfceed60e3bfe9f18765aa0d
+TARBALL_SHA1 = fb22702607810607ab1b9cde1c9a033430c5f037
+TARBALL_SHA256= e3fd2c05b9df0d88a3d1192c02143295744685f4f9a03db116e206698331bb86
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES=
--- a/open-src/driver/xf86-input-synaptics/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/driver/xf86-input-synaptics/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -1,6 +1,6 @@
###############################################################################
#
-# xf86-input-synaptics Makefile
+# xf86-input-synaptics driver for Synaptics & compatible touchpads
#
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
#
@@ -29,12 +29,12 @@
MODULE_NAME=xf86-input-synaptics
# Version number (used in path names)
-MODULE_VERSION=1.6.3
+MODULE_VERSION=1.7.1
# Checksums for upstream tarball
-TARBALL_MD5 = 3568930b0bda522e00272b64c0ca2ca2
-TARBALL_SHA1 = 2aaeca3abef245ade1435bcf87bbad6116e8e319
-TARBALL_SHA256= b40c9dbd5f743ff1eb2ac81a23b9676df72e76ed3fa6408de3f8a3a260248604
+TARBALL_MD5 = 6505de717972b6a24b8eb13e69eb996c
+TARBALL_SHA1 = 85018b51dfa0c2dcf5c257cf283298836273700d
+TARBALL_SHA256= db5825660e1fb23190697f609bf75d4450fe707344a14298e1c9b47039bbb58e
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES= libraries.patch,-p1
--- a/open-src/driver/xf86-input-synaptics/libraries.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/driver/xf86-input-synaptics/libraries.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,4 +1,4 @@
-From 2982141ced665bf93a5f0fce098341890888513d Mon Sep 17 00:00:00 2001
+From 36e34cd7e3b1c4939a35fb9fd97fc1b4b964d310 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <[email protected]>
Date: Fri, 25 May 2012 14:51:55 -0700
Subject: [PATCH:xf86-input-synaptics] Link with modules needed to build with
@@ -10,23 +10,23 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
-index 101bd46..33b72a3 100644
+index 5443094..c6ed55d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,6 +26,7 @@
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
- @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
- @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
-+@DRIVER_NAME@_drv_la_LIBADD = $(XORG_LIBS)
- @DRIVER_NAME@_drv_ladir = @inputdir@
+ synaptics_drv_la_LTLIBRARIES = synaptics_drv.la
+ synaptics_drv_la_LDFLAGS = -module -avoid-version
++synaptics_drv_la_LIBADD = $(XORG_LIBS)
+ synaptics_drv_ladir = @inputdir@
AM_CPPFLAGS = -I$(top_srcdir)/include
@@ -47,7 +48,7 @@ endif
if BUILD_EVENTCOMM
- @DRIVER_NAME@_drv_la_SOURCES += \
+ synaptics_drv_la_SOURCES += \
eventcomm.c eventcomm.h
--@DRIVER_NAME@_drv_la_LIBADD = \
-+@DRIVER_NAME@_drv_la_LIBADD += \
+-synaptics_drv_la_LIBADD = \
++synaptics_drv_la_LIBADD += \
$(MTDEV_LIBS)
endif
--- a/open-src/driver/xf86-video-mga/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-Copyright (C) 1994-2003 The XFree86 Project, Inc. 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 fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice 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, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the XFree86 Project shall not
-be used in advertising or otherwise to promote the sale, use or other deal-
-ings in this Software without prior written authorization from the XFree86
-Project.
-
-***********************************************************
-
-Copyright 1989, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice 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
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-***********************************************************
-
-Copyright 1994 by Robin Cutshaw <[email protected]>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of Robin Cutshaw not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission. Robin Cutshaw makes no representations
-about the suitability of this software for any purpose. It is provided
-"as is" without express or implied warranty.
-
-ROBIN CUTSHAW DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL ROBIN CUTSHAW BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-***********************************************************
-
-Copyright 2000 VA Linux Systems Inc., Fremont, California.
-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
-VA LINUX SYSTEMS AND/OR ITS SUPPLIERS 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.
-
-***********************************************************
-
-Copyright 2006 Red Hat, Inc.
-
-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
-on the rights to use, copy, modify, merge, publish, distribute, sub
-license, and/or sell copies of the Software, and to permit persons to whom
-them 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 MERCHANTIBILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS 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.
-
-***********************************************************
-
-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 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
-STEPHEN CROWLEY, OR ANY OTHER CONTRIBUTORS 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.
-
-***********************************************************
-
-Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
-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
-PRECISION INSIGHT AND/OR ITS SUPPLIERS 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.
-
-***********************************************************
-
-(c) 1999 Matrox Graphics Inc.
-
-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 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
-MATROX GRAPHICS INC., OR ANY OTHER CONTRIBUTORS 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.
-
-***********************************************************
-
-Copyright © 1997, Matrox Graphics Inc.
-All Rights Reserved.
-
-***********************************************************
-
-Copyright 2000 Gareth Hughes
-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
-GARETH HUGHES 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.
-
-Authors:
- Gareth Hughes <[email protected]>
-
-***********************************************************
-
-(C) Copyright IBM Corporation 2005
-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
-on the rights to use, copy, modify, merge, publish, distribute, sub
-license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
-IBM AND/OR THEIR SUPPLIERS 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.
-
--- a/open-src/driver/xf86-video-vmware/6370961.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-# Copyright (c) 2006, 2007, 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.
-6370961 - needs sane vert, horiz ranges
-
-diff -Nurp -x '*~' -x '*.orig' src/vmware.c src/vmware.c
---- src/vmware.c 2010-10-29 00:25:37.000000000 -0700
-+++ src/vmware.c 2010-11-09 07:46:56.703211613 -0800
-@@ -955,6 +955,20 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int fla
- */
- vmwareGetSupportedModelines(&pScrn->monitor->Modes);
-
-+ /* Set reasonable default Hsync range, if needed. */
-+ if (pScrn->monitor->nHsync == 0) {
-+ pScrn->monitor->hsync[0].lo = 31.5f;
-+ pScrn->monitor->hsync[0].hi = 64.0f;
-+ pScrn->monitor->nHsync = 1;
-+ }
-+
-+ /* Set reasonable default Vsync range, if needed. */
-+ if (pScrn->monitor->nVrefresh == 0) {
-+ pScrn->monitor->vrefresh[0].lo = 50.0f;
-+ pScrn->monitor->vrefresh[0].hi = 70.0f;
-+ pScrn->monitor->nVrefresh = 1;
-+ }
-+
- i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, pScrn->display->modes,
- clockRanges, NULL, 256, pVMWARE->maxWidth, 32 * 32,
- 128, pVMWARE->maxHeight,
--- a/open-src/driver/xf86-video-vmware/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/driver/xf86-video-vmware/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -1,6 +1,6 @@
###############################################################################
#
-# xf86-video-vmware Makefile
+# xf86-video-vmware driver for guests inside VMWare hypervisors
#
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
#
@@ -29,15 +29,15 @@
MODULE_NAME=xf86-video-vmware
# Version number (used in path names)
-MODULE_VERSION=13.0.0
+MODULE_VERSION=13.0.1
# Checksums for upstream tarball
-TARBALL_MD5 = b72be57517cbc7a56362f2ee0f092269
-TARBALL_SHA1 = d9b8d37eb408636856c52fce5b5e3e816599b49a
-TARBALL_SHA256= 44919ecd88654f2ab40a1732b5ea6a1dbd1c696b4b0748e68e8b5f1a3486bca6
+TARBALL_MD5 = b08e0195ebf3f88a82129322cb93da08
+TARBALL_SHA1 = c7109eb9f683156b12d3c55a74d51345ab70abfe
+TARBALL_SHA256= 802dda415c22412edad6c3df44fe18a06e91d0f8456d9a58bac0d340fdf8fe3d
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = bstore.patch
+SOURCE_PATCHES =
# Merge in additional sources from sun-src directory
ADDITIONAL_SOURCE_DIR=sun-src
--- a/open-src/driver/xf86-video-vmware/bstore.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
---- src/vmware.c Mon Feb 25 12:30:42 2013
-+++ src/vmware.c Mon Feb 25 12:30:55 2013
-@@ -23,7 +23,6 @@
- #include "xf86Pci.h" /* pci */
-
- #include "mipointer.h" /* sw cursor */
--#include "mibstore.h" /* backing store */
- #include "micmap.h" /* mi color map */
- #include "vgaHW.h" /* VGA hardware */
- #include "fb.h"
-@@ -1483,7 +1482,6 @@
- * If backing store is to be supported (as is usually the case),
- * initialise it.
- */
-- miInitializeBackingStore(pScreen);
- xf86SetBackingStore(pScreen);
- xf86SetSilkenMouse(pScreen);
-
--- a/open-src/lib/libFS/CVE-2013-1996.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-From 26dc23446c2e7818fdebfb46e101bac4883df07e Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sun, 14 Apr 2013 09:07:32 -0700
-Subject: [PATCH:libFS] Sign extension issue and integer overflow in
- FSOpenServer() [CVE-2013-1996]
-
-> altlen = (int) *ad++; <-- if char is 0xff, will sign extend to int (0xffffffff == -1)
-> alts[i].name = (char *) FSmalloc(altlen + 1); <-- -1 + 1 == 0
-> ...
-> memmove(alts[i].name, ad, altlen); <-- memory corruption
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/FSOpenServ.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/FSOpenServ.c b/src/FSOpenServ.c
-index 32f7d25..58c611b 100644
---- a/src/FSOpenServ.c
-+++ b/src/FSOpenServ.c
-@@ -111,10 +111,10 @@ FSOpenServer(const char *server)
- char *setup = NULL;
- fsConnSetupAccept conn;
- char *auth_data = NULL;
-- char *alt_data = NULL,
-+ unsigned char *alt_data = NULL,
- *ad;
- AlternateServer *alts = NULL;
-- int altlen;
-+ unsigned int altlen;
- char *vendor_string;
- unsigned long setuplength;
-
-@@ -158,8 +158,8 @@ FSOpenServer(const char *server)
-
- setuplength = prefix.alternate_len << 2;
- if (setuplength > (SIZE_MAX>>2)
-- || (alt_data = (char *)
-- (setup = FSmalloc((unsigned) setuplength))) == NULL) {
-+ || (alt_data = (unsigned char *)
-+ (setup = FSmalloc(setuplength))) == NULL) {
- goto fail;
- }
- _FSRead(svr, (char *) alt_data, setuplength);
-@@ -178,8 +178,8 @@ FSOpenServer(const char *server)
- }
- for (i = 0; i < prefix.num_alternates; i++) {
- alts[i].subset = (Bool) *ad++;
-- altlen = (int) *ad++;
-- alts[i].name = (char *) FSmalloc(altlen + 1);
-+ altlen = (unsigned int) *ad++;
-+ alts[i].name = FSmalloc(altlen + 1);
- if (!alts[i].name) {
- while (--i) {
- FSfree((char *) alts[i].name);
--- a/open-src/lib/libFS/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libFS/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,17 +29,16 @@
MODULE_NAME=libFS
# Version number (used in path names)
-MODULE_VERSION=1.0.4
+MODULE_VERSION=1.0.5
# Checksums for upstream tarball
-TARBALL_MD5 = 645f83160cf7b562734e2038045106d1
-TARBALL_SHA1 = f114f32f60eb84d3e1d0e6f0dfe7679b07e91295
-TARBALL_SHA256= 7073761e7594d43180a922605fb64cce60e5ccb8c06f8efa24f2d4621f5e8315
+TARBALL_MD5 = e3c77ca27942ebc5eb2ca99f29363515
+TARBALL_SHA1 = 3a94bc42775f4aa2eac14a51e0043299d7cd31b6
+TARBALL_SHA256= 22eb3005dd8053aef7ff82758da5dd59ca9738410bcf847e675780e3a1f96107
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES += solaris-abi.patch,-p1
SOURCE_PATCHES += lint.patch,-p1
-SOURCE_PATCHES += CVE-2013-1996.patch,-p1
# Regenerate Makefile.in's from Makefile.am's after patching them
AUTORECONF=yes
--- a/open-src/lib/libFS/solaris-abi.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libFS/solaris-abi.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -20,15 +20,16 @@
# DEALINGS IN THE SOFTWARE.
Change .so version to match existing Solaris libraries, since there's
-no incompatible change since libFS.so.5
+no incompatible change since libFS.so.5, and use our versioning mapfile
+instead of just using the regex to control the exported symbols.
diff --git a/src/Makefile.am b/src/Makefile.am
-index 06e958f..c668d15 100644
+index 56fd0db..ccc2a83 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -40,7 +40,7 @@ libFS_la_LIBADD = $(FS_LIBS)
+@@ -40,7 +40,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include/X11/fonts
- INCLUDES = -I$(top_srcdir)/include/X11/fonts
+ libFS_la_LIBADD = $(FS_LIBS)
-libFS_la_LDFLAGS = -export-symbols-regex '^FS.*' -version-number 6:0:0 -no-undefined
+libFS_la_LDFLAGS = -M $(top_srcdir)/../../mapfile-vers -version-number 5 -no-undefined
--- a/open-src/lib/libSM/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libSM/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# Session Management protocol library
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -29,12 +29,12 @@
MODULE_NAME=libSM
# Version number (used in path names)
-MODULE_VERSION=1.2.1
+MODULE_VERSION=1.2.2
# Checksums for upstream tarball
-TARBALL_MD5 = 766de9d1e1ecf8bf74cebe2111d8e2bd
-TARBALL_SHA1 = 8d354a165e330022ffd3606aba562b8c8154213d
-TARBALL_SHA256= 93c11d569c64f40723b93b44af1efb474a0cfe92573b0c8c330343cabb897f1d
+TARBALL_MD5 = 499a7773c65aba513609fe651853c5f3
+TARBALL_SHA1 = e6d5dab6828dfd296e564518d2ed0a349a25a714
+TARBALL_SHA256= 0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/lib/libX11/1234757.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/1234757.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -35,10 +35,10 @@
other Xlib calls.
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index 80edeec..fbade18 100644
+index 4431559..bc32bdf 100644
--- a/include/X11/Xlibint.h
+++ b/include/X11/Xlibint.h
-@@ -199,6 +199,10 @@ struct _XDisplay
+@@ -207,6 +207,10 @@ struct _XDisplay
void *cookiejar; /* cookie events returned but not claimed */
};
@@ -48,9 +48,9 @@
+
#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
- /*
+ #ifndef _XEVENT_
diff --git a/src/OpenDis.c b/src/OpenDis.c
-index 9379fec..6d6111e 100644
+index 3793814..a14d13b 100644
--- a/src/OpenDis.c
+++ b/src/OpenDis.c
@@ -38,6 +38,21 @@ in this Software without prior written authorization from The Open Group.
@@ -89,7 +89,7 @@
if (!_XPollfdCacheInit(dpy)) {
OutOfMemory (dpy);
return(NULL);
-@@ -581,6 +603,10 @@ XOpenDisplay (
+@@ -576,6 +598,10 @@ XOpenDisplay (
void _XFreeDisplayStructure(Display *dpy)
{
@@ -100,8 +100,8 @@
/* move all cookies in the EQ to the jar, then free them. */
if (dpy->qfree) {
_XQEvent *qelt = dpy->qfree;
-@@ -709,6 +735,105 @@ void _XFreeDisplayStructure(Display *dpy)
- Xfree ((char *)dpy);
+@@ -704,6 +730,103 @@ void _XFreeDisplayStructure(Display *dpy)
+ Xfree (dpy);
}
+#if defined(XTHREADS) && defined(SUNSOFT)
@@ -115,10 +115,9 @@
+ * Attempt to allocate a display array. Return NULL if allocation fails.
+ */
+ if ( !HeadDisplay ) {
-+ if ((HeadDisplay = (DisplayPtrLink *) Xcalloc
-+ (1, sizeof(struct _DisplayPtrLink))) == NULL ) {
++ HeadDisplay = Xcalloc (1, sizeof(struct _DisplayPtrLink));
++ if (HeadDisplay == NULL)
+ return 0;
-+ }
+
+ HeadDisplay->dpy = dpy;
+ HeadDisplay->next = NULL;
@@ -126,10 +125,9 @@
+ return 1;
+ }
+
-+ if ((LastDisplay->next = (DisplayPtrLink *) Xcalloc
-+ (1, sizeof(struct _DisplayPtrLink))) == NULL ) {
++ LastDisplay->next = Xcalloc (1, sizeof(struct _DisplayPtrLink));
++ if (LastDisplay->next == NULL )
+ return 0;
-+ }
+
+ LastDisplay = LastDisplay->next;
+ LastDisplay->dpy = dpy;
@@ -207,7 +205,7 @@
after this returns. */
diff --git a/src/locking.c b/src/locking.c
-index b3dfb3b..9f340c9 100644
+index 9f4fe06..e4e0444 100644
--- a/src/locking.c
+++ b/src/locking.c
@@ -614,6 +614,11 @@ Status XInitThreads(void)
--- a/open-src/lib/libX11/4010755.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/4010755.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -42,9 +42,10 @@
Xrm.c. A similar fix was added to them as well.
-diff -urp -x '*~' -x '*.orig' src/Context.c src/Context.c
---- src/Context.c 2010-09-03 22:52:39.000000000 -0700
-+++ src/Context.c 2010-11-21 18:47:52.531197588 -0800
+diff --git a/src/Context.c b/src/Context.c
+index 8a07871..dd4df6b 100644
+--- a/src/Context.c
++++ b/src/Context.c
@@ -190,6 +190,9 @@ int XSaveContext(
return XCNOMEM;
}
@@ -55,12 +56,13 @@
_XCreateMutex(&db->linfo);
#ifdef MOTIFBC
if (!display) *pdb = db; else
-diff -urp -x '*~' -x '*.orig' src/Xrm.c src/Xrm.c
---- src/Xrm.c 2010-09-03 22:52:39.000000000 -0700
-+++ src/Xrm.c 2010-11-21 18:47:52.531960970 -0800
-@@ -496,6 +496,9 @@ static XrmDatabase NewDatabase(void)
+diff --git a/src/Xrm.c b/src/Xrm.c
+index 36b71d6..b3283e6 100644
+--- a/src/Xrm.c
++++ b/src/Xrm.c
+@@ -497,6 +497,9 @@ static XrmDatabase NewDatabase(void)
- db = (XrmDatabase) Xmalloc(sizeof(XrmHashBucketRec));
+ db = Xmalloc(sizeof(XrmHashBucketRec));
if (db) {
+#ifdef SUNSOFT
+ db->linfo.lock = (xmutex_t) NULL;
@@ -68,9 +70,10 @@
_XCreateMutex(&db->linfo);
db->table = (NTable)NULL;
db->mbstate = (XPointer)NULL;
-diff -urp -x '*~' -x '*.orig' src/locking.c src/locking.c
---- src/locking.c 2010-11-21 18:47:51.772597162 -0800
-+++ src/locking.c 2010-11-21 18:47:52.532327934 -0800
+diff --git a/src/locking.c b/src/locking.c
+index e4e0444..eb875e3 100644
+--- a/src/locking.c
++++ b/src/locking.c
@@ -104,6 +104,16 @@ static void _XLockMutex(
XTHREADS_FILE_LINE_ARGS
)
--- a/open-src/lib/libX11/4614834.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/4614834.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -34,9 +34,10 @@
sure only one thread can access the data at one time fixed the
problem.
-diff -urp -x '*~' -x '*.orig' src/GetColor.c src/GetColor.c
---- src/GetColor.c 2010-09-21 18:25:24.000000000 -0700
-+++ src/GetColor.c 2010-11-21 18:47:53.290042212 -0800
+diff --git a/src/GetColor.c b/src/GetColor.c
+index cd0eb9f..62b3bce 100644
+--- a/src/GetColor.c
++++ b/src/GetColor.c
@@ -55,12 +55,14 @@ XColor *exact_def) /* RETURN */
if ((ccc = XcmsCCCOfColormap(dpy, cmap)) != (XcmsCCC)NULL) {
const char *tmpName = colorname;
@@ -60,9 +61,10 @@
}
#endif
-diff -urp -x '*~' -x '*.orig' src/LookupCol.c src/LookupCol.c
---- src/LookupCol.c 2010-09-21 18:25:24.000000000 -0700
-+++ src/LookupCol.c 2010-11-21 18:47:53.290371408 -0800
+diff --git a/src/LookupCol.c b/src/LookupCol.c
+index f7f969f..718e043 100644
+--- a/src/LookupCol.c
++++ b/src/LookupCol.c
@@ -53,6 +53,7 @@ XLookupColor (
if ((ccc = XcmsCCCOfColormap(dpy, cmap)) != (XcmsCCC)NULL) {
const char *tmpName = spec;
--- a/open-src/lib/libX11/5039226.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/5039226.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -34,9 +34,10 @@
requests come in. Without this XSync, a dead lock may formed just like
this case.
-diff -urp -x '*~' -x '*.orig' src/UngrabSvr.c src/UngrabSvr.c
---- src/UngrabSvr.c 2010-09-03 22:52:39.000000000 -0700
-+++ src/UngrabSvr.c 2010-11-21 18:47:54.042619136 -0800
+diff --git a/src/UngrabSvr.c b/src/UngrabSvr.c
+index ea00848..cea7f99 100644
+--- a/src/UngrabSvr.c
++++ b/src/UngrabSvr.c
@@ -39,6 +39,9 @@ XUngrabServer (
GetEmptyReq(UngrabServer, req);
UnlockDisplay(dpy);
--- a/open-src/lib/libX11/6714036.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-diff --git a/modules/lc/gen/lcGenConv.c b/modules/lc/gen/lcGenConv.c
-index 42d63c5..c8708fa 100644
---- a/modules/lc/gen/lcGenConv.c
-+++ b/modules/lc/gen/lcGenConv.c
-@@ -1666,9 +1666,6 @@ mbstostr(
- return( 0 );
- }
-
-- if (*from_left > *to_left)
-- *from_left = *to_left;
--
- while (*from_left && *to_left) {
-
- ch = *inbufptr++;
--- a/open-src/lib/libX11/6789219.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/6789219.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,22 +1,20 @@
diff --git a/modules/om/generic/omGeneric.c b/modules/om/generic/omGeneric.c
-index 7f02c85..c5d9416 100644
+index 7122bb7..64ef7b7 100644
--- a/modules/om/generic/omGeneric.c
+++ b/modules/om/generic/omGeneric.c
-@@ -832,7 +832,7 @@ parse_omit_name(
+@@ -833,6 +833,7 @@ parse_omit_name(
return True;
/* This may mot be needed anymore as XListFonts() takes care of this */
-- while (num_fields < 12) {
-+/* while (num_fields < 12) {
++#ifndef SUNSOFT
+ while (num_fields < 12) {
if ((last - buf) > (XLFD_MAX_LEN - 2))
return -1;
- *last = '*';
-@@ -843,7 +843,7 @@ parse_omit_name(
+@@ -844,6 +845,7 @@ parse_omit_name(
if ((font_data->xlfd_name = get_font_name(oc, buf)) != NULL)
return True;
}
--
-+ */
++#endif /* SUNSOFT */
+
return False;
- }
--- a/open-src/lib/libX11/CVE-2013-1981.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1442 +0,0 @@
-From 4ccc31a3b1decfdec554db5204cd138d32566ed3 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 13:03:55 -0800
-Subject: [PATCH:libX11 01/38] Move repeated #ifdef magic to find PATH_MAX
- into a common header
-
-Lets stop duplicating the mess all over
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/GetDflt.c | 25 +--------------
- src/Makefile.am | 1 +
- src/pathmax.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++++
- src/xlibi18n/lcFile.c | 24 +--------------
- 4 files changed, 85 insertions(+), 47 deletions(-)
- create mode 100644 src/pathmax.h
-
-diff --git a/src/GetDflt.c b/src/GetDflt.c
-index 6f62cd8..4962530 100644
---- a/src/GetDflt.c
-+++ b/src/GetDflt.c
-@@ -52,30 +52,7 @@ SOFTWARE.
- #include "Xlibint.h"
- #include <X11/Xos.h>
- #include <X11/Xresource.h>
--
--#ifndef X_NOT_POSIX
--#ifdef _POSIX_SOURCE
--#include <limits.h>
--#else
--#define _POSIX_SOURCE
--#include <limits.h>
--#undef _POSIX_SOURCE
--#endif
--#endif
--#ifndef PATH_MAX
--#ifdef WIN32
--#define PATH_MAX 512
--#else
--#include <sys/param.h>
--#endif
--#ifndef PATH_MAX
--#ifdef MAXPATHLEN
--#define PATH_MAX MAXPATHLEN
--#else
--#define PATH_MAX 1024
--#endif
--#endif
--#endif
-+#include "pathmax.h"
-
- #ifdef XTHREADS
- #include <X11/Xthreads.h>
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 71e02e7..27b74b0 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -210,6 +210,7 @@ libX11_la_SOURCES = \
- ParseCmd.c \
- ParseCol.c \
- ParseGeom.c \
-+ pathmax.h \
- PeekEvent.c \
- PeekIfEv.c \
- Pending.c \
-diff --git a/src/pathmax.h b/src/pathmax.h
-new file mode 100644
-index 0000000..a8aaaa5
---- /dev/null
-+++ b/src/pathmax.h
-@@ -0,0 +1,82 @@
-+
-+/***********************************************************
-+
-+Copyright 1987, 1988, 1998 The Open Group
-+
-+Permission to use, copy, modify, distribute, and sell this software and its
-+documentation for any purpose is hereby granted without fee, provided that
-+the above copyright notice appear in all copies and that both that
-+copyright notice and this permission notice appear in supporting
-+documentation.
-+
-+The above copyright notice and this permission notice 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
-+OPEN GROUP 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.
-+
-+Except as contained in this notice, the name of The Open Group shall not be
-+used in advertising or otherwise to promote the sale, use or other dealings
-+in this Software without prior written authorization from The Open Group.
-+
-+
-+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
-+
-+ All Rights Reserved
-+
-+Permission to use, copy, modify, and distribute this software and its
-+documentation for any purpose and without fee is hereby granted,
-+provided that the above copyright notice appear in all copies and that
-+both that copyright notice and this permission notice appear in
-+supporting documentation, and that the name of Digital not be
-+used in advertising or publicity pertaining to distribution of the
-+software without specific, written prior permission.
-+
-+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+SOFTWARE.
-+
-+******************************************************************/
-+
-+/*
-+ * Provides a single definition of PATH_MAX instead of replicating this mess
-+ * in multiple files
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+#include <X11/Xos.h>
-+
-+#ifndef X_NOT_POSIX
-+#ifdef _POSIX_SOURCE
-+#include <limits.h>
-+#else
-+#define _POSIX_SOURCE
-+#include <limits.h>
-+#undef _POSIX_SOURCE
-+#endif
-+#endif
-+#ifndef PATH_MAX
-+#ifdef WIN32
-+#define PATH_MAX 512
-+#else
-+#include <sys/param.h>
-+#endif
-+#ifndef PATH_MAX
-+#ifdef MAXPATHLEN
-+#define PATH_MAX MAXPATHLEN
-+#else
-+#define PATH_MAX 1024
-+#endif
-+#endif
-+#endif
-+
-diff --git a/src/xlibi18n/lcFile.c b/src/xlibi18n/lcFile.c
-index 2c06fa2..61a14e7 100644
---- a/src/xlibi18n/lcFile.c
-+++ b/src/xlibi18n/lcFile.c
-@@ -54,29 +54,7 @@
-
- #define XLC_BUFSIZE 256
-
--#ifndef X_NOT_POSIX
--#ifdef _POSIX_SOURCE
--#include <limits.h>
--#else
--#define _POSIX_SOURCE
--#include <limits.h>
--#undef _POSIX_SOURCE
--#endif
--#endif
--#ifndef PATH_MAX
--#ifdef WIN32
--#define PATH_MAX 512
--#else
--#include <sys/param.h>
--#endif
--#ifndef PATH_MAX
--#ifdef MAXPATHLEN
--#define PATH_MAX MAXPATHLEN
--#else
--#define PATH_MAX 1024
--#endif
--#endif
--#endif
-+#include "pathmax.h"
-
- #define NUM_LOCALEDIR 64
-
---
-1.7.9.2
-
-From bee46fae41c84f42cb025811ec767c9c8cfcb32c Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 21:05:27 -0800
-Subject: [PATCH:libX11 03/38] integer overflow in _XQueryFont() on 32-bit
- platforms [CVE-2013-1981 1/13]
-
-If the CARD32 reply.nCharInfos * sizeof(XCharStruct) overflows an
-unsigned long, then too small of a buffer will be allocated for the
-data copied in from the reply.
-
-v2: Fix reply_left calculations, check calculated sizes fit in reply_left
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Font.c | 35 +++++++++++++++++++++++------------
- 1 file changed, 23 insertions(+), 12 deletions(-)
-
-diff --git a/src/Font.c b/src/Font.c
-index 25e1790..9ee127c 100644
---- a/src/Font.c
-+++ b/src/Font.c
-@@ -31,6 +31,7 @@ authorization from the X Consortium and the XFree86 Project.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- #if defined(XF86BIGFONT)
- #define USE_XF86BIGFONT
-@@ -183,7 +184,8 @@ _XQueryFont (
- unsigned long seq)
- {
- register XFontStruct *fs;
-- register long nbytes;
-+ unsigned long nbytes;
-+ unsigned long reply_left; /* unused data words left in reply buffer */
- xQueryFontReply reply;
- register xResourceReq *req;
- register _XExtension *ext;
-@@ -211,9 +213,10 @@ _XQueryFont (
- }
- if (seq)
- DeqAsyncHandler(dpy, &async);
-+ reply_left = reply.length -
-+ ((SIZEOF(xQueryFontReply) - SIZEOF(xReply)) >> 2);
- if (! (fs = (XFontStruct *) Xmalloc (sizeof (XFontStruct)))) {
-- _XEatData(dpy, (unsigned long)(reply.nFontProps * SIZEOF(xFontProp) +
-- reply.nCharInfos * SIZEOF(xCharInfo)));
-+ _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
- fs->ext_data = NULL;
-@@ -239,16 +242,19 @@ _XQueryFont (
- */
- fs->properties = NULL;
- if (fs->n_properties > 0) {
-- nbytes = reply.nFontProps * sizeof(XFontProp);
-- fs->properties = (XFontProp *) Xmalloc ((unsigned) nbytes);
-+ /* nFontProps is a CARD16 */
- nbytes = reply.nFontProps * SIZEOF(xFontProp);
-+ if ((nbytes >> 2) <= reply_left) {
-+ size_t pbytes = reply.nFontProps * sizeof(XFontProp);
-+ fs->properties = Xmalloc (pbytes);
-+ }
- if (! fs->properties) {
- Xfree((char *) fs);
-- _XEatData(dpy, (unsigned long)
-- (nbytes + reply.nCharInfos * SIZEOF(xCharInfo)));
-+ _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
- _XRead32 (dpy, (long *)fs->properties, nbytes);
-+ reply_left -= (nbytes >> 2);
- }
- /*
- * If no characters in font, then it is a bad font, but
-@@ -256,16 +262,21 @@ _XQueryFont (
- */
- fs->per_char = NULL;
- if (reply.nCharInfos > 0){
-- nbytes = reply.nCharInfos * sizeof(XCharStruct);
-- if (! (fs->per_char = (XCharStruct *) Xmalloc ((unsigned) nbytes))) {
-+ /* nCharInfos is a CARD32 */
-+ if (reply.nCharInfos < (INT_MAX / sizeof(XCharStruct))) {
-+ nbytes = reply.nCharInfos * SIZEOF(xCharInfo);
-+ if ((nbytes >> 2) <= reply_left) {
-+ size_t cibytes = reply.nCharInfos * sizeof(XCharStruct);
-+ fs->per_char = Xmalloc (cibytes);
-+ }
-+ }
-+ if (! fs->per_char) {
- if (fs->properties) Xfree((char *) fs->properties);
- Xfree((char *) fs);
-- _XEatData(dpy, (unsigned long)
-- (reply.nCharInfos * SIZEOF(xCharInfo)));
-+ _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
-
-- nbytes = reply.nCharInfos * SIZEOF(xCharInfo);
- _XRead16 (dpy, (char *)fs->per_char, nbytes);
- }
-
---
-1.7.9.2
-
-From ed74729326d04eb736dd2cdffa394c9638a28ab2 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 21:05:27 -0800
-Subject: [PATCH:libX11 04/38] integer overflow in _XF86BigfontQueryFont()
- [CVE-2013-1981 2/13]
-
-Similar to _XQueryFont, but with more ways to go wrong and overflow.
-Only compiled if libX11 is built with XF86BigFont support.
-
-v2: Fix reply_left calculations, check calculated sizes fit in reply_left
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Font.c | 42 +++++++++++++++++++++++++-----------------
- 1 file changed, 25 insertions(+), 17 deletions(-)
-
-diff --git a/src/Font.c b/src/Font.c
-index 9ee127c..5dbdb29 100644
---- a/src/Font.c
-+++ b/src/Font.c
-@@ -403,7 +403,8 @@ _XF86BigfontQueryFont (
- unsigned long seq)
- {
- register XFontStruct *fs;
-- register long nbytes;
-+ unsigned long nbytes;
-+ unsigned long reply_left; /* unused data left in reply buffer */
- xXF86BigfontQueryFontReply reply;
- register xXF86BigfontQueryFontReq *req;
- register _XExtension *ext;
-@@ -456,13 +457,10 @@ _XF86BigfontQueryFont (
- DeqAsyncHandler(dpy, &async2);
- if (seq)
- DeqAsyncHandler(dpy, &async1);
-+ reply_left = reply.length -
-+ ((SIZEOF(xXF86BigfontQueryFontReply) - SIZEOF(xReply)) >> 2);
- if (! (fs = (XFontStruct *) Xmalloc (sizeof (XFontStruct)))) {
-- _XEatData(dpy,
-- reply.nFontProps * SIZEOF(xFontProp)
-- + (reply.nCharInfos > 0 && reply.shmid == (CARD32)(-1)
-- ? reply.nUniqCharInfos * SIZEOF(xCharInfo)
-- + (reply.nCharInfos+1)/2 * 2 * sizeof(CARD16)
-- : 0));
-+ _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
- fs->ext_data = NULL;
-@@ -488,23 +486,32 @@ _XF86BigfontQueryFont (
- */
- fs->properties = NULL;
- if (fs->n_properties > 0) {
-- nbytes = reply.nFontProps * sizeof(XFontProp);
-- fs->properties = (XFontProp *) Xmalloc ((unsigned) nbytes);
-+ /* nFontProps is a CARD16 */
- nbytes = reply.nFontProps * SIZEOF(xFontProp);
-+ if ((nbytes >> 2) <= reply_left) {
-+ size_t pbytes = reply.nFontProps * sizeof(XFontProp);
-+ fs->properties = Xmalloc (pbytes);
-+ }
- if (! fs->properties) {
- Xfree((char *) fs);
-- _XEatData(dpy,
-- nbytes
-- + (reply.nCharInfos > 0 && reply.shmid == (CARD32)(-1)
-- ? reply.nUniqCharInfos * SIZEOF(xCharInfo)
-- + (reply.nCharInfos+1)/2 * 2 * sizeof(CARD16)
-- : 0));
-+ _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
- _XRead32 (dpy, (long *)fs->properties, nbytes);
-+ reply_left -= (nbytes >> 2);
- }
-
- fs->per_char = NULL;
-+#ifndef LONG64
-+ /* compares each part to half the maximum, which should be far more than
-+ any real font needs, so the combined total doesn't overflow either */
-+ if (reply.nUniqCharInfos > ((ULONG_MAX / 2) / SIZEOF(xCharInfo)) ||
-+ reply.nCharInfos > ((ULONG_MAX / 2) / sizeof(CARD16))) {
-+ Xfree((char *) fs);
-+ _XEatDataWords(dpy, reply_left);
-+ return (XFontStruct *)NULL;
-+ }
-+#endif
- if (reply.nCharInfos > 0) {
- /* fprintf(stderr, "received font metrics, nCharInfos = %d, nUniqCharInfos = %d, shmid = %d\n", reply.nCharInfos, reply.nUniqCharInfos, reply.shmid); */
- if (reply.shmid == (CARD32)(-1)) {
-@@ -518,14 +525,14 @@ _XF86BigfontQueryFont (
- if (!pUniqCI) {
- if (fs->properties) Xfree((char *) fs->properties);
- Xfree((char *) fs);
-- _XEatData(dpy, nbytes);
-+ _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
- if (! (fs->per_char = (XCharStruct *) Xmalloc (reply.nCharInfos * sizeof(XCharStruct)))) {
- Xfree((char *) pUniqCI);
- if (fs->properties) Xfree((char *) fs->properties);
- Xfree((char *) fs);
-- _XEatData(dpy, nbytes);
-+ _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
- _XRead16 (dpy, (char *) pUniqCI, nbytes);
-@@ -580,6 +587,7 @@ _XF86BigfontQueryFont (
- if (!(extcodes->serverCapabilities & CAP_VerifiedLocal)) {
- struct shmid_ds buf;
- if (!(shmctl(reply.shmid, IPC_STAT, &buf) >= 0
-+ && reply.nCharInfos < (LONG_MAX / sizeof(XCharStruct))
- && buf.shm_segsz >= reply.shmsegoffset + reply.nCharInfos * sizeof(XCharStruct) + sizeof(CARD32)
- && *(CARD32 *)(addr + reply.shmsegoffset + reply.nCharInfos * sizeof(XCharStruct)) == extcodes->serverSignature)) {
- shmdt(addr);
---
-1.7.9.2
-
-From ce805b2d94edf8109ed8b7f53d440b012b350326 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 22:49:01 -0800
-Subject: [PATCH:libX11 05/38] integer overflow in XListFontsWithInfo()
- [CVE-2013-1981 3/13]
-
-If the reported number of remaining fonts is too large, the calculations
-to allocate memory for them may overflow, leaving us writing beyond the
-bounds of the allocation.
-
-v2: Fix reply_left calculations, check calculated sizes fit in reply_left
-v3: On error cases, also set values to be returned in pointer args to 0/NULL
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/FontInfo.c | 105 ++++++++++++++++++++++++++------------------------------
- 1 file changed, 49 insertions(+), 56 deletions(-)
-
-diff --git a/src/FontInfo.c b/src/FontInfo.c
-index fb296b8..4b295a5 100644
---- a/src/FontInfo.c
-+++ b/src/FontInfo.c
-@@ -28,6 +28,7 @@ in this Software without prior written authorization from The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- #if defined(XF86BIGFONT)
- #define USE_XF86BIGFONT
-@@ -45,10 +46,11 @@ int maxNames,
- int *actualCount, /* RETURN */
- XFontStruct **info) /* RETURN */
- {
-- register long nbytes;
-+ unsigned long nbytes;
-+ unsigned long reply_left; /* unused data left in reply buffer */
- register int i;
- register XFontStruct *fs;
-- register int size = 0;
-+ unsigned int size = 0;
- XFontStruct *finfo = NULL;
- char **flist = NULL;
- xListFontsWithInfoReply reply;
-@@ -67,52 +69,44 @@ XFontStruct **info) /* RETURN */
- if (!_XReply (dpy, (xReply *) &reply,
- ((SIZEOF(xListFontsWithInfoReply) -
- SIZEOF(xGenericReply)) >> 2), xFalse)) {
-- for (j=(i-1); (j >= 0); j--) {
-- Xfree(flist[j]);
-- if (finfo[j].properties) Xfree((char *) finfo[j].properties);
-- }
-- if (flist) Xfree((char *) flist);
-- if (finfo) Xfree((char *) finfo);
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return ((char **) NULL);
-+ reply.nameLength = 0; /* avoid trying to read more replies */
-+ reply_left = 0;
-+ goto badmem;
- }
-- if (reply.nameLength == 0)
-+ reply_left = reply.length -
-+ ((SIZEOF(xListFontsWithInfoReply) - SIZEOF(xGenericReply)) >> 2);
-+ if (reply.nameLength == 0) {
-+ _XEatDataWords(dpy, reply_left);
- break;
-+ }
-+ if (reply.nReplies >= (INT_MAX - i)) /* avoid overflowing size */
-+ goto badmem;
- if ((i + reply.nReplies) >= size) {
- size = i + reply.nReplies + 1;
-
-+ if (size >= (INT_MAX / sizeof(XFontStruct)))
-+ goto badmem;
-+
- if (finfo) {
-- XFontStruct * tmp_finfo = (XFontStruct *)
-- Xrealloc ((char *) finfo,
-- (unsigned) (sizeof(XFontStruct) * size));
-- char ** tmp_flist = (char **)
-- Xrealloc ((char *) flist,
-- (unsigned) (sizeof(char *) * (size+1)));
-+ XFontStruct * tmp_finfo;
-+ char ** tmp_flist;
-
-+ tmp_finfo = Xrealloc (finfo, sizeof(XFontStruct) * size);
- if (tmp_finfo)
- finfo = tmp_finfo;
-+ else
-+ goto badmem;
-+
-+ tmp_flist = Xrealloc (flist, sizeof(char *) * (size+1));
- if (tmp_flist)
- flist = tmp_flist;
--
-- if ((! tmp_finfo) || (! tmp_flist)) {
-- /* free all the memory that we allocated */
-- for (j=(i-1); (j >= 0); j--) {
-- Xfree(flist[j]);
-- if (finfo[j].properties)
-- Xfree((char *) finfo[j].properties);
-- }
-- Xfree((char *) flist);
-- Xfree((char *) finfo);
-- goto clearwire;
-- }
-+ else
-+ goto badmem;
- }
- else {
-- if (! (finfo = (XFontStruct *)
-- Xmalloc((unsigned) (sizeof(XFontStruct) * size))))
-+ if (! (finfo = Xmalloc(sizeof(XFontStruct) * size)))
- goto clearwire;
-- if (! (flist = (char **)
-- Xmalloc((unsigned) (sizeof(char *) * (size+1))))) {
-+ if (! (flist = Xmalloc(sizeof(char *) * (size+1)))) {
- Xfree((char *) finfo);
- goto clearwire;
- }
-@@ -138,24 +132,27 @@ XFontStruct **info) /* RETURN */
- fs->max_bounds = * (XCharStruct *) &reply.maxBounds;
-
- fs->n_properties = reply.nFontProps;
-+ fs->properties = NULL;
- if (fs->n_properties > 0) {
-- nbytes = reply.nFontProps * sizeof(XFontProp);
-- if (! (fs->properties = (XFontProp *) Xmalloc((unsigned) nbytes)))
-- goto badmem;
-+ /* nFontProps is a CARD16 */
- nbytes = reply.nFontProps * SIZEOF(xFontProp);
-+ if ((nbytes >> 2) <= reply_left) {
-+ size_t pbytes = reply.nFontProps * sizeof(XFontProp);
-+ fs->properties = Xmalloc (pbytes);
-+ }
-+ if (! fs->properties)
-+ goto badmem;
- _XRead32 (dpy, (long *)fs->properties, nbytes);
-+ reply_left -= (nbytes >> 2);
-+ }
-
-- } else
-- fs->properties = NULL;
--
-- j = reply.nameLength + 1;
-+ /* nameLength is a CARD8 */
-+ nbytes = reply.nameLength + 1;
- if (!i)
-- j++; /* make first string 1 byte longer, to match XListFonts */
-- flist[i] = (char *) Xmalloc ((unsigned int) j);
-+ nbytes++; /* make first string 1 byte longer, to match XListFonts */
-+ flist[i] = Xmalloc (nbytes);
- if (! flist[i]) {
- if (finfo[i].properties) Xfree((char *) finfo[i].properties);
-- nbytes = (reply.nameLength + 3) & ~3;
-- _XEatData(dpy, (unsigned long) nbytes);
- goto badmem;
- }
- if (!i) {
-@@ -185,19 +182,15 @@ XFontStruct **info) /* RETURN */
-
- clearwire:
- /* Clear the wire. */
-- do {
-- if (reply.nFontProps)
-- _XEatData(dpy, (unsigned long)
-- (reply.nFontProps * SIZEOF(xFontProp)));
-- nbytes = (reply.nameLength + 3) & ~3;
-- _XEatData(dpy, (unsigned long) nbytes);
-- }
-- while (_XReply(dpy,(xReply *) &reply, ((SIZEOF(xListFontsWithInfoReply) -
-- SIZEOF(xGenericReply)) >> 2),
-- xFalse) && (reply.nameLength != 0));
--
-+ _XEatDataWords(dpy, reply_left);
-+ while ((reply.nameLength != 0) &&
-+ _XReply(dpy, (xReply *) &reply,
-+ ((SIZEOF(xListFontsWithInfoReply) - SIZEOF(xGenericReply))
-+ >> 2), xTrue));
- UnlockDisplay(dpy);
- SyncHandle();
-+ *info = NULL;
-+ *actualCount = 0;
- return (char **) NULL;
- }
-
---
-1.7.9.2
-
-From 3eaf200b6d60de2284c6d7e0180ddf9cabf25a64 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 22:49:01 -0800
-Subject: [PATCH:libX11 06/38] integer overflow in XGetMotionEvents()
- [CVE-2013-1981 4/13]
-
-If the reported number of motion events is too large, the calculations
-to allocate memory for them may overflow, leaving us writing beyond the
-bounds of the allocation.
-
-v2: Ensure nEvents is set to 0 when returning NULL events pointer
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/GetMoEv.c | 26 +++++++++++---------------
- 1 file changed, 11 insertions(+), 15 deletions(-)
-
-diff --git a/src/GetMoEv.c b/src/GetMoEv.c
-index 3db176f..ad9c772 100644
---- a/src/GetMoEv.c
-+++ b/src/GetMoEv.c
-@@ -28,6 +28,7 @@ in this Software without prior written authorization from The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- XTimeCoord *XGetMotionEvents(
- register Display *dpy,
-@@ -39,7 +40,6 @@ XTimeCoord *XGetMotionEvents(
- xGetMotionEventsReply rep;
- register xGetMotionEventsReq *req;
- XTimeCoord *tc = NULL;
-- long nbytes;
- LockDisplay(dpy);
- GetReq(GetMotionEvents, req);
- req->window = w;
-@@ -52,26 +52,22 @@ XTimeCoord *XGetMotionEvents(
- return (NULL);
- }
-
-- if (rep.nEvents) {
-- if (! (tc = (XTimeCoord *)
-- Xmalloc( (unsigned)
-- (nbytes = (long) rep.nEvents * sizeof(XTimeCoord))))) {
-- _XEatData (dpy, (unsigned long) nbytes);
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return (NULL);
-- }
-+ if (rep.nEvents && (rep.nEvents < (INT_MAX / sizeof(XTimeCoord))))
-+ tc = Xmalloc(rep.nEvents * sizeof(XTimeCoord));
-+ if (tc == NULL) {
-+ /* server returned either no events or a bad event count */
-+ *nEvents = 0;
-+ _XEatDataWords (dpy, rep.length);
- }
--
-- *nEvents = rep.nEvents;
-- nbytes = SIZEOF (xTimecoord);
-+ else
- {
- register XTimeCoord *tcptr;
-- register int i;
-+ unsigned int i;
- xTimecoord xtc;
-
-+ *nEvents = (int) rep.nEvents;
- for (i = rep.nEvents, tcptr = tc; i > 0; i--, tcptr++) {
-- _XRead (dpy, (char *) &xtc, nbytes);
-+ _XRead (dpy, (char *) &xtc, SIZEOF (xTimecoord));
- tcptr->time = xtc.time;
- tcptr->x = cvtINT16toShort (xtc.x);
- tcptr->y = cvtINT16toShort (xtc.y);
---
-1.7.9.2
-
-From b0528a42d6728c119af2fcb28407efa7b0b9fe54 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 22:49:01 -0800
-Subject: [PATCH:libX11 07/38] integer overflow in XListHosts() [CVE-2013-1981
- 5/13]
-
-If the reported number of host entries is too large, the calculations
-to allocate memory for them may overflow, leaving us writing beyond the
-bounds of the allocation.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/LiHosts.c | 22 +++++++++++++++-------
- 1 file changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/src/LiHosts.c b/src/LiHosts.c
-index 0f5e837..83cf3c7 100644
---- a/src/LiHosts.c
-+++ b/src/LiHosts.c
-@@ -62,6 +62,8 @@ X Window System is a trademark of The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-+
- /*
- * can be freed using XFree.
- */
-@@ -73,7 +75,6 @@ XHostAddress *XListHosts (
- {
- register XHostAddress *outbuf = NULL, *op;
- xListHostsReply reply;
-- long nbytes;
- unsigned char *buf, *bp;
- register unsigned i;
- register xListHostsReq *req;
-@@ -90,19 +91,26 @@ XHostAddress *XListHosts (
- }
-
- if (reply.nHosts) {
-- nbytes = reply.length << 2; /* compute number of bytes in reply */
-+ unsigned long nbytes = reply.length << 2; /* number of bytes in reply */
-+ const unsigned long max_hosts = INT_MAX /
-+ (sizeof(XHostAddress) + sizeof(XServerInterpretedAddress));
-+
-+ if (reply.nHosts < max_hosts) {
-+ unsigned long hostbytes = reply.nHosts *
-+ (sizeof(XHostAddress) + sizeof(XServerInterpretedAddress));
-
-- op = outbuf = (XHostAddress *)
-- Xmalloc((unsigned) (nbytes +
-- (reply.nHosts * sizeof(XHostAddress)) +
-- (reply.nHosts * sizeof(XServerInterpretedAddress))));
-+ if (reply.length < (INT_MAX >> 2) &&
-+ (hostbytes >> 2) < ((INT_MAX >> 2) - reply.length))
-+ outbuf = Xmalloc(nbytes + hostbytes);
-+ }
-
- if (! outbuf) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, reply.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (XHostAddress *) NULL;
- }
-+ op = outbuf;
- sip = (XServerInterpretedAddress *)
- (((unsigned char *) outbuf) + (reply.nHosts * sizeof(XHostAddress)));
- bp = buf = ((unsigned char *) sip)
---
-1.7.9.2
-
-From fa0ab9b0a1e2dae89895919a9dcdff5f6851ee64 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 11:44:19 -0800
-Subject: [PATCH:libX11 20/38] Integer overflows in stringSectionSize() cause
- buffer overflow in ReadColornameDB()
- [CVE-2013-1981 6/13]
-
-LoadColornameDB() calls stringSectionSize() to do a first pass over the
-file (which may be provided by the user via XCMSDB environment variable)
-to determine how much memory needs to be allocated to read in the file,
-then allocates the returned sizes and calls ReadColornameDB() to load the
-data from the file into that newly allocated memory.
-
-If stringSectionSize() overflows the signed ints used to calculate the
-file size (say if you have an xcmsdb with ~4 billion lines in or a
-combined string length of ~4 gig - which while it may have been
-inconceivable when Xlib was written, is quite possible today), then
-LoadColornameDB() may allocate a memory buffer much smaller than the
-amount of data ReadColornameDB() will write to it.
-
-The total size is left limited to an int, because if your xcmsdb file
-is larger than 2gb, you're doing it wrong.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xcms/cmsColNm.c | 27 +++++++++++++++++++++------
- 1 file changed, 21 insertions(+), 6 deletions(-)
-
-diff --git a/src/xcms/cmsColNm.c b/src/xcms/cmsColNm.c
-index a6749c0..8d0d4a7 100644
---- a/src/xcms/cmsColNm.c
-+++ b/src/xcms/cmsColNm.c
-@@ -40,6 +40,7 @@
- #include <sys/stat.h>
- #include <stdio.h>
- #include <ctype.h>
-+#include <limits.h>
- #define XK_LATIN1
- #include <X11/keysymdef.h>
- #include "Cv.h"
-@@ -542,7 +543,10 @@ stringSectionSize(
- char *pBuf;
- char *f1;
- char *f2;
-- int i;
-+ size_t i;
-+
-+ unsigned int numEntries = 0;
-+ unsigned int sectionSize = 0;
-
- *pNumEntries = 0;
- *pSectionSize = 0;
-@@ -576,26 +580,37 @@ stringSectionSize(
- return(XcmsFailure);
- }
-
-- (*pNumEntries)++;
-+ numEntries++;
-+ if (numEntries >= INT_MAX)
-+ return(XcmsFailure);
-
-- (*pSectionSize) += (i = strlen(f1)) + 1;
-+ i = strlen(f1);
-+ if (i >= INT_MAX - sectionSize)
-+ return(XcmsFailure);
-+ sectionSize += i + 1;
- for (; i; i--, f1++) {
- /* REMOVE SPACES FROM COUNT */
- if (isspace(*f1)) {
-- (*pSectionSize)--;
-+ sectionSize--;
- }
- }
-
-- (*pSectionSize) += (i = strlen(f2)) + 1;
-+ i = strlen(f2);
-+ if (i >= INT_MAX - sectionSize)
-+ return(XcmsFailure);
-+ sectionSize += i + 1;
- for (; i; i--, f2++) {
- /* REMOVE SPACES FROM COUNT */
- if (isspace(*f2)) {
-- (*pSectionSize)--;
-+ sectionSize--;
- }
- }
-
- }
-
-+ *pNumEntries = (int) numEntries;
-+ *pSectionSize = (int) sectionSize;
-+
- return(XcmsSuccess);
- }
-
---
-1.7.9.2
-
-From de8462f73c41b2253d920a713725c96591ab5690 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 18:37:37 -0800
-Subject: [PATCH:libX11 21/38] integer overflow in ReadInFile() in Xrm.c
- [CVE-2013-1981 7/13]
-
-Called from XrmGetFileDatabase() which gets called from InitDefaults()
-which gets the filename from getenv ("XENVIRONMENT")
-
-If file is exactly 0xffffffff bytes long (or longer and truncates to
-0xffffffff, on implementations where off_t is larger than an int),
-then size may be set to a value which overflows causing less memory
-to be allocated than is written to by the following read() call.
-
-size is left limited to an int, because if your Xresources file is
-larger than 2gb, you're very definitely doing it wrong.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/Xrm.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/Xrm.c b/src/Xrm.c
-index d6899d9..3e29ab0 100644
---- a/src/Xrm.c
-+++ b/src/Xrm.c
-@@ -62,6 +62,7 @@ from The Open Group.
- #endif
- #include <X11/Xos.h>
- #include <sys/stat.h>
-+#include <limits.h>
- #include "Xresinternal.h"
- #include "Xresource.h"
-
-@@ -1594,11 +1595,12 @@ ReadInFile(_Xconst char *filename)
- */
- {
- struct stat status_buffer;
-- if ( (fstat(fd, &status_buffer)) == -1 ) {
-+ if ( ((fstat(fd, &status_buffer)) == -1 ) ||
-+ (status_buffer.st_size >= INT_MAX) ) {
- close (fd);
- return (char *)NULL;
- } else
-- size = status_buffer.st_size;
-+ size = (int) status_buffer.st_size;
- }
-
- if (!(filebuf = Xmalloc(size + 1))) { /* leave room for '\0' */
---
-1.7.9.2
-
-From 9a8117101fe3c6c615fbce34eca244f149bb2766 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 18:37:37 -0800
-Subject: [PATCH:libX11 24/38] integer truncation in _XimParseStringFile()
- [CVE-2013-1981 8/13]
-
-Called from _XimCreateDefaultTree() which uses getenv("XCOMPOSEFILE")
-to specify filename.
-
-If the size of off_t is larger than the size of unsigned long (as in
-32-bit builds with large file flags), a file larger than 4 gigs could
-have its size truncated, leading to data from that file being written
-past the end of the undersized buffer allocated for it.
-
-While configure.ac does not use AC_SYS_LARGEFILE to set large file mode,
-builders may have added the large file compilation flags to CFLAGS on
-their own.
-
-size is left limited to an int, because if your Xim file is
-larger than 2gb, you're doing it wrong.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- modules/im/ximcp/imLcPrs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/modules/im/ximcp/imLcPrs.c b/modules/im/ximcp/imLcPrs.c
-index 4c7d6f0..bcf4579 100644
---- a/modules/im/ximcp/imLcPrs.c
-+++ b/modules/im/ximcp/imLcPrs.c
-@@ -41,6 +41,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
- #include "Ximint.h"
- #include <sys/stat.h>
- #include <stdio.h>
-+#include <limits.h>
-
- #define XLC_BUFSIZE 256
-
-@@ -688,6 +689,8 @@ parsestringfile(
-
- if (fstat (fileno (fp), &st) != -1) {
- unsigned long size = (unsigned long) st.st_size;
-+ if (st.st_size >= INT_MAX)
-+ return;
- if (size <= sizeof tb) tbp = tb;
- else tbp = malloc (size);
-
---
-1.7.9.2
-
-From 692e43c2d5fbc56f38371f3f44a1d339595f0056 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 13:18:48 -0800
-Subject: [PATCH:libX11 25/38] integer overflows in TransFileName()
- [CVE-2013-1981 9/13]
-
-When trying to process file paths the tokens %H, %L, & %S are expanded
-to $HOME, the standard compose file path & the xlocaledir path.
-If enough of these tokens are repeated and values like $HOME are set to
-very large values, the calculation of the total string size required to
-hold the expanded path can overflow, resulting in allocating a smaller
-string than the amount of data we'll write to it.
-
-Simply restrict all of these values, and the total path size to PATH_MAX,
-because really, that's all you should need for a filename path.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- modules/im/ximcp/Makefile.am | 1 +
- modules/im/ximcp/imLcPrs.c | 45 +++++++++++++++++++++++++++++++-----------
- 2 files changed, 35 insertions(+), 11 deletions(-)
-
-diff --git a/modules/im/ximcp/Makefile.am b/modules/im/ximcp/Makefile.am
-index 16a6ca8..8aae839 100644
---- a/modules/im/ximcp/Makefile.am
-+++ b/modules/im/ximcp/Makefile.am
-@@ -6,6 +6,7 @@ AM_CPPFLAGS= \
- -I$(top_srcdir)/src/xcms \
- -I$(top_srcdir)/src/xkb \
- -I$(top_srcdir)/src/xlibi18n \
-+ -I$(top_srcdir)/src \
- -D_BSD_SOURCE -DXIM_t -DTRANS_CLIENT
-
- AM_CFLAGS= \
-diff --git a/modules/im/ximcp/imLcPrs.c b/modules/im/ximcp/imLcPrs.c
-index bcf4579..f3627a0 100644
---- a/modules/im/ximcp/imLcPrs.c
-+++ b/modules/im/ximcp/imLcPrs.c
-@@ -42,6 +42,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
- #include <sys/stat.h>
- #include <stdio.h>
- #include <limits.h>
-+#include "pathmax.h"
-
- #define XLC_BUFSIZE 256
-
-@@ -307,9 +308,9 @@ static char*
- TransFileName(Xim im, char *name)
- {
- char *home = NULL, *lcCompose = NULL;
-- char dir[XLC_BUFSIZE];
-- char *i = name, *ret, *j;
-- int l = 0;
-+ char dir[XLC_BUFSIZE] = "";
-+ char *i = name, *ret = NULL, *j;
-+ size_t l = 0;
-
- while (*i) {
- if (*i == '%') {
-@@ -319,30 +320,51 @@ TransFileName(Xim im, char *name)
- l++;
- break;
- case 'H':
-- home = getenv("HOME");
-- if (home)
-- l += strlen(home);
-+ if (home == NULL)
-+ home = getenv("HOME");
-+ if (home) {
-+ size_t Hsize = strlen(home);
-+ if (Hsize > PATH_MAX)
-+ /* your home directory length is ridiculous */
-+ goto end;
-+ l += Hsize;
-+ }
- break;
- case 'L':
- if (lcCompose == NULL)
- lcCompose = _XlcFileName(im->core.lcd, COMPOSE_FILE);
-- if (lcCompose)
-- l += strlen(lcCompose);
-+ if (lcCompose) {
-+ size_t Lsize = strlen(lcCompose);
-+ if (Lsize > PATH_MAX)
-+ /* your compose pathname length is ridiculous */
-+ goto end;
-+ l += Lsize;
-+ }
- break;
- case 'S':
-- xlocaledir(dir, XLC_BUFSIZE);
-- l += strlen(dir);
-+ if (dir[0] == '\0')
-+ xlocaledir(dir, XLC_BUFSIZE);
-+ if (dir[0]) {
-+ size_t Ssize = strlen(dir);
-+ if (Ssize > PATH_MAX)
-+ /* your locale directory path length is ridiculous */
-+ goto end;
-+ l += Ssize;
-+ }
- break;
- }
- } else {
- l++;
- }
- i++;
-+ if (l > PATH_MAX)
-+ /* your expanded path length is ridiculous */
-+ goto end;
- }
-
- j = ret = Xmalloc(l+1);
- if (ret == NULL)
-- return ret;
-+ goto end;
- i = name;
- while (*i) {
- if (*i == '%') {
-@@ -374,6 +396,7 @@ TransFileName(Xim im, char *name)
- }
- }
- *j = '\0';
-+end:
- Xfree(lcCompose);
- return ret;
- }
---
-1.7.9.2
-
-From ea8bc513f6849cadc93dd68de8a562d6e63b19d5 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 8 Mar 2013 22:25:35 -0800
-Subject: [PATCH:libX11 26/38] integer overflow in XGetWindowProperty()
- [CVE-2013-1981 10/13]
-
-If the reported number of properties is too large, the calculations
-to allocate memory for them may overflow, leaving us returning less
-memory to the caller than implied by the value written to *nitems.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/GetProp.c | 25 ++++++++++++++++---------
- 1 file changed, 16 insertions(+), 9 deletions(-)
-
-diff --git a/src/GetProp.c b/src/GetProp.c
-index 5d6e0b8..ae14edc 100644
---- a/src/GetProp.c
-+++ b/src/GetProp.c
-@@ -28,6 +28,7 @@ in this Software without prior written authorization from The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- int
- XGetWindowProperty(
-@@ -66,8 +67,17 @@ XGetWindowProperty(
-
- *prop = (unsigned char *) NULL;
- if (reply.propertyType != None) {
-- long nbytes, netbytes;
-- switch (reply.format) {
-+ unsigned long nbytes, netbytes;
-+ int format = reply.format;
-+
-+ /*
-+ * Protect against both integer overflow and just plain oversized
-+ * memory allocation - no server should ever return this many props.
-+ */
-+ if (reply.nItems >= (INT_MAX >> 4))
-+ format = -1; /* fall through to default error case */
-+
-+ switch (format) {
- /*
- * One extra byte is malloced than is needed to contain the property
- * data, but this last byte is null terminated and convenient for
-@@ -76,24 +86,21 @@ XGetWindowProperty(
- */
- case 8:
- nbytes = netbytes = reply.nItems;
-- if (nbytes + 1 > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
-+ if (nbytes + 1 > 0 && (*prop = Xmalloc (nbytes + 1)))
- _XReadPad (dpy, (char *) *prop, netbytes);
- break;
-
- case 16:
- nbytes = reply.nItems * sizeof (short);
- netbytes = reply.nItems << 1;
-- if (nbytes + 1 > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
-+ if (nbytes + 1 > 0 && (*prop = Xmalloc (nbytes + 1)))
- _XRead16Pad (dpy, (short *) *prop, netbytes);
- break;
-
- case 32:
- nbytes = reply.nItems * sizeof (long);
- netbytes = reply.nItems << 2;
-- if (nbytes + 1 > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
-+ if (nbytes + 1 > 0 && (*prop = Xmalloc (nbytes + 1)))
- _XRead32 (dpy, (long *) *prop, netbytes);
- break;
-
-@@ -115,7 +122,7 @@ XGetWindowProperty(
- break;
- }
- if (! *prop) {
-- _XEatData(dpy, (unsigned long) netbytes);
-+ _XEatDataWords(dpy, reply.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return(BadAlloc); /* not Success */
---
-1.7.9.2
-
-From 0febed454ee211deb6ae56d4febf71393e0aff2b Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 15:08:21 -0800
-Subject: [PATCH:libX11 27/38] integer overflow in XGetImage() [CVE-2013-1981
- 11/13]
-
-Ensure that we don't underallocate when the server claims to have sent a
-very large reply.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/GetImage.c | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/src/GetImage.c b/src/GetImage.c
-index e8f1b03..c461abc 100644
---- a/src/GetImage.c
-+++ b/src/GetImage.c
-@@ -30,6 +30,7 @@ in this Software without prior written authorization from The Open Group.
- #include "Xlibint.h"
- #include <X11/Xutil.h> /* for XDestroyImage */
- #include "ImUtil.h"
-+#include <limits.h>
-
- #define ROUNDUP(nbytes, pad) (((((nbytes) - 1) + (pad)) / (pad)) * (pad))
-
-@@ -56,7 +57,7 @@ XImage *XGetImage (
- xGetImageReply rep;
- register xGetImageReq *req;
- char *data;
-- long nbytes;
-+ unsigned long nbytes;
- XImage *image;
- LockDisplay(dpy);
- GetReq (GetImage, req);
-@@ -78,10 +79,13 @@ XImage *XGetImage (
- return (XImage *)NULL;
- }
-
-- nbytes = (long)rep.length << 2;
-- data = (char *) Xmalloc((unsigned) nbytes);
-+ if (rep.length < (INT_MAX >> 2)) {
-+ nbytes = (unsigned long)rep.length << 2;
-+ data = Xmalloc(nbytes);
-+ } else
-+ data = NULL;
- if (! data) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (XImage *) NULL;
---
-1.7.9.2
-
-From 83f1fc4205d2c9c886bdc4bdab2a27cb0e280110 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 15:08:21 -0800
-Subject: [PATCH:libX11 28/38] integer overflow in XGetPointerMapping() &
- XGetKeyboardMapping() [CVE-2013-1981 12/13]
-
-Ensure that we don't underallocate when the server claims a very large reply
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/GetPntMap.c | 31 ++++++++++++++++++++-----------
- 1 file changed, 20 insertions(+), 11 deletions(-)
-
-diff --git a/src/GetPntMap.c b/src/GetPntMap.c
-index 0fcdb66..29fdf21 100644
---- a/src/GetPntMap.c
-+++ b/src/GetPntMap.c
-@@ -29,6 +29,7 @@ in this Software without prior written authorization from The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- #ifdef MIN /* some systems define this in <sys/param.h> */
- #undef MIN
-@@ -42,7 +43,7 @@ int XGetPointerMapping (
-
- {
- unsigned char mapping[256]; /* known fixed size */
-- long nbytes, remainder = 0;
-+ unsigned long nbytes, remainder = 0;
- xGetPointerMappingReply rep;
- register xReq *req;
-
-@@ -54,9 +55,15 @@ int XGetPointerMapping (
- return 0;
- }
-
-- nbytes = (long)rep.length << 2;
--
- /* Don't count on the server returning a valid value */
-+ if (rep.length >= (INT_MAX >> 2)) {
-+ _XEatDataWords(dpy, rep.length);
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return 0;
-+ }
-+
-+ nbytes = (unsigned long) rep.length << 2;
- if (nbytes > sizeof mapping) {
- remainder = nbytes - sizeof mapping;
- nbytes = sizeof mapping;
-@@ -69,7 +76,7 @@ int XGetPointerMapping (
- }
-
- if (remainder)
-- _XEatData(dpy, (unsigned long)remainder);
-+ _XEatData(dpy, remainder);
-
- UnlockDisplay(dpy);
- SyncHandle();
-@@ -86,8 +93,8 @@ XGetKeyboardMapping (Display *dpy,
- int count,
- int *keysyms_per_keycode)
- {
-- long nbytes;
-- unsigned long nkeysyms;
-+ unsigned long nbytes;
-+ CARD32 nkeysyms;
- register KeySym *mapping = NULL;
- xGetKeyboardMappingReply rep;
- register xGetKeyboardMappingReq *req;
-@@ -102,17 +109,19 @@ XGetKeyboardMapping (Display *dpy,
- return (KeySym *) NULL;
- }
-
-- nkeysyms = (unsigned long) rep.length;
-+ nkeysyms = rep.length;
- if (nkeysyms > 0) {
-- nbytes = nkeysyms * sizeof (KeySym);
-- mapping = (KeySym *) Xmalloc ((unsigned) nbytes);
-- nbytes = nkeysyms << 2;
-+ if (nkeysyms < (INT_MAX / sizeof (KeySym))) {
-+ nbytes = nkeysyms * sizeof (KeySym);
-+ mapping = Xmalloc (nbytes);
-+ }
- if (! mapping) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (KeySym *) NULL;
- }
-+ nbytes = nkeysyms << 2;
- _XRead32 (dpy, (long *) mapping, nbytes);
- }
- *keysyms_per_keycode = rep.keySymsPerKeyCode;
---
-1.7.9.2
-
-From b2e9b2585a4528e23df9f9067c6c6c91115ae55b Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 15:08:21 -0800
-Subject: [PATCH:libX11 29/38] integer overflow in XGetModifierMapping()
- [CVE-2013-1981 13/13]
-
-Ensure that we don't underallocate when the server claims a very large reply
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/ModMap.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/src/ModMap.c b/src/ModMap.c
-index c99bfdd..122ca80 100644
---- a/src/ModMap.c
-+++ b/src/ModMap.c
-@@ -28,6 +28,7 @@ in this Software without prior written authorization from The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- XModifierKeymap *
- XGetModifierMapping(register Display *dpy)
-@@ -41,13 +42,17 @@ XGetModifierMapping(register Display *dpy)
- GetEmptyReq(GetModifierMapping, req);
- (void) _XReply (dpy, (xReply *)&rep, 0, xFalse);
-
-- nbytes = (unsigned long)rep.length << 2;
-- res = (XModifierKeymap *) Xmalloc(sizeof (XModifierKeymap));
-- if (res) res->modifiermap = (KeyCode *) Xmalloc ((unsigned) nbytes);
-+ if (rep.length < (LONG_MAX >> 2)) {
-+ nbytes = (unsigned long)rep.length << 2;
-+ res = Xmalloc(sizeof (XModifierKeymap));
-+ if (res)
-+ res->modifiermap = Xmalloc (nbytes);
-+ } else
-+ res = NULL;
- if ((! res) || (! res->modifiermap)) {
- if (res) Xfree((char *) res);
- res = (XModifierKeymap *) NULL;
-- _XEatData(dpy, nbytes);
-+ _XEatDataWords(dpy, rep.length);
- } else {
- _XReadPad(dpy, (char *) res->modifiermap, (long) nbytes);
- res->max_keypermod = rep.numKeyPerModifier;
---
-1.7.9.2
-
-From 3fb82a4726114c1e9916658dad659a4dbfb050c8 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 11:04:37 -0800
-Subject: [PATCH:libX11 33/38] Make XGetWindowProperty() always initialize
- returned values
-
-Avoids memory corruption and other errors when callers access them
-without checking to see if XGetWindowProperty() returned an error value.
-
-Callers are still required to check for errors, this just reduces the
-damage when they don't.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/GetProp.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/src/GetProp.c b/src/GetProp.c
-index ae14edc..9eb422e 100644
---- a/src/GetProp.c
-+++ b/src/GetProp.c
-@@ -49,6 +49,13 @@ XGetWindowProperty(
- register xGetPropertyReq *req;
- xError error = {0};
-
-+ /* Always initialize return values, in case callers fail to initialize
-+ them and fail to check the return code for an error. */
-+ *actual_type = None;
-+ *actual_format = 0;
-+ *nitems = *bytesafter = 0L;
-+ *prop = (unsigned char *) NULL;
-+
- LockDisplay(dpy);
- GetReq (GetProperty, req);
- req->window = w;
-@@ -65,7 +72,6 @@ XGetWindowProperty(
- return (1); /* not Success */
- }
-
-- *prop = (unsigned char *) NULL;
- if (reply.propertyType != None) {
- unsigned long nbytes, netbytes;
- int format = reply.format;
---
-1.7.9.2
-
--- a/open-src/lib/libX11/CVE-2013-1997.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,837 +0,0 @@
-From b68b8dcddbb517cee2fe370ffd3bacae99c75299 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 19:30:09 -0800
-Subject: [PATCH:libX11 08/38] unvalidated lengths in XAllocColorCells()
- [CVE-2013-1997 1/15]
-
-If a broken server returned larger than requested values for nPixels or
-nMasks, XAllocColorCells would happily overflow the buffers provided by
-the caller to write the results into.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/AllCells.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/AllCells.c b/src/AllCells.c
-index ddd9c22..6e97e11 100644
---- a/src/AllCells.c
-+++ b/src/AllCells.c
-@@ -53,8 +53,13 @@ Status XAllocColorCells(
- status = _XReply(dpy, (xReply *)&rep, 0, xFalse);
-
- if (status) {
-- _XRead32 (dpy, (long *) pixels, 4L * (long) (rep.nPixels));
-- _XRead32 (dpy, (long *) masks, 4L * (long) (rep.nMasks));
-+ if ((rep.nPixels > ncolors) || (rep.nMasks > nplanes)) {
-+ _XEatDataWords(dpy, rep.length);
-+ status = 0; /* Failure */
-+ } else {
-+ _XRead32 (dpy, (long *) pixels, 4L * (long) (rep.nPixels));
-+ _XRead32 (dpy, (long *) masks, 4L * (long) (rep.nMasks));
-+ }
- }
-
- UnlockDisplay(dpy);
---
-1.7.9.2
-
-From 638d668a99734cf68bea1b799aece5706fb18b08 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 22:49:01 -0800
-Subject: [PATCH:libX11 09/38] unvalidated index in
- _XkbReadGetDeviceInfoReply() [CVE-2013-1997
- 2/15]
-
-If the X server returns more buttons than are allocated in the XKB
-device info structures, out of bounds writes could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBExtDev.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/xkb/XKBExtDev.c b/src/xkb/XKBExtDev.c
-index 353e769..dd383bc 100644
---- a/src/xkb/XKBExtDev.c
-+++ b/src/xkb/XKBExtDev.c
-@@ -181,6 +181,9 @@ int tmp;
- return tmp;
- }
- if (rep->nBtnsWanted>0) {
-+ if (((unsigned short) rep->firstBtnWanted + rep->nBtnsWanted)
-+ >= devi->num_btns)
-+ goto BAILOUT;
- act= &devi->btn_acts[rep->firstBtnWanted];
- bzero((char *)act,(rep->nBtnsWanted*sizeof(XkbAction)));
- }
-@@ -190,6 +193,9 @@ int tmp;
- goto BAILOUT;
- if (rep->nBtnsRtrn>0) {
- int size;
-+ if (((unsigned short) rep->firstBtnRtrn + rep->nBtnsRtrn)
-+ >= devi->num_btns)
-+ goto BAILOUT;
- act= &devi->btn_acts[rep->firstBtnRtrn];
- size= rep->nBtnsRtrn*SIZEOF(xkbActionWireDesc);
- if (!_XkbCopyFromReadBuffer(&buf,(char *)act,size))
---
-1.7.9.2
-
-From 1807e71a8a30aa2cff099708c508a25a9b6ba9da Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 09:12:47 -0800
-Subject: [PATCH:libX11 10/38] unvalidated indexes in _XkbReadGeomShapes()
- [CVE-2013-1997 3/15]
-
-If the X server returns shape indexes outside the range of the number
-of shapes it told us to allocate, out of bounds memory access could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBGeom.c | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/src/xkb/XKBGeom.c b/src/xkb/XKBGeom.c
-index 7594a3d..4ad21f8 100644
---- a/src/xkb/XKBGeom.c
-+++ b/src/xkb/XKBGeom.c
-@@ -364,12 +364,16 @@ Status rtrn;
- }
- ol->num_points= olWire->nPoints;
- }
-- if (shapeWire->primaryNdx!=XkbNoShape)
-+ if ((shapeWire->primaryNdx!=XkbNoShape) &&
-+ (shapeWire->primaryNdx < shapeWire->nOutlines))
- shape->primary= &shape->outlines[shapeWire->primaryNdx];
-- else shape->primary= NULL;
-- if (shapeWire->approxNdx!=XkbNoShape)
-+ else
-+ shape->primary= NULL;
-+ if ((shapeWire->approxNdx!=XkbNoShape) &&
-+ (shapeWire->approxNdx < shapeWire->nOutlines))
- shape->approx= &shape->outlines[shapeWire->approxNdx];
-- else shape->approx= NULL;
-+ else
-+ shape->approx= NULL;
- XkbComputeShapeBounds(shape);
- }
- return Success;
---
-1.7.9.2
-
-From 8215ec8bcad57c9707353626d782ff66ebe13b06 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 09:18:26 -0800
-Subject: [PATCH:libX11 11/38] unvalidated indexes in
- _XkbReadGetGeometryReply() [CVE-2013-1997
- 4/15]
-
-If the X server returns color indexes outside the range of the number of
-colors it told us to allocate, out of bounds memory access could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBGeom.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/xkb/XKBGeom.c b/src/xkb/XKBGeom.c
-index 4ad21f8..7140a72 100644
---- a/src/xkb/XKBGeom.c
-+++ b/src/xkb/XKBGeom.c
-@@ -619,6 +619,9 @@ XkbGeometryPtr geom;
- if (status==Success)
- status= _XkbReadGeomKeyAliases(&buf,geom,rep);
- left= _XkbFreeReadBuffer(&buf);
-+ if ((rep->baseColorNdx > geom->num_colors) ||
-+ (rep->labelColorNdx > geom->num_colors))
-+ status = BadLength;
- if ((status!=Success) || left || buf.error) {
- if (status==Success)
- status= BadLength;
---
-1.7.9.2
-
-From 77009b1f37ec583ef5ff17834c8a5cf2413f9ba6 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 09:28:33 -0800
-Subject: [PATCH:libX11 12/38] unvalidated index in _XkbReadKeySyms()
- [CVE-2013-1997 5/15]
-
-If the X server returns keymap indexes outside the range of the number of
-keys it told us to allocate, out of bounds memory access could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBGetMap.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
-index 30fb629..4a428d3 100644
---- a/src/xkb/XKBGetMap.c
-+++ b/src/xkb/XKBGetMap.c
-@@ -151,9 +151,12 @@ XkbClientMapPtr map;
- map= xkb->map;
- if (map->key_sym_map==NULL) {
- register int offset;
-+ int size = xkb->max_key_code + 1;
- XkbSymMapPtr oldMap;
- xkbSymMapWireDesc *newMap;
-- map->key_sym_map= _XkbTypedCalloc((xkb->max_key_code+1),XkbSymMapRec);
-+ if (((unsigned short)rep->firstKeySym + rep->nKeySyms) > size)
-+ return BadLength;
-+ map->key_sym_map= _XkbTypedCalloc(size,XkbSymMapRec);
- if (map->key_sym_map==NULL)
- return BadAlloc;
- if (map->syms==NULL) {
-@@ -209,6 +212,8 @@ XkbClientMapPtr map;
- KeySym * newSyms;
- int tmp;
-
-+ if (((unsigned short)rep->firstKeySym + rep->nKeySyms) > map->num_syms)
-+ return BadLength;
- oldMap = &map->key_sym_map[rep->firstKeySym];
- for (i=0;i<(int)rep->nKeySyms;i++,oldMap++) {
- newMap= (xkbSymMapWireDesc *)
---
-1.7.9.2
-
-From ffc188aa4cbc0b0d0c612b62e45c29d485f86402 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 09:40:22 -0800
-Subject: [PATCH:libX11 13/38] unvalidated index in _XkbReadKeyActions()
- [CVE-2013-1997 6/15]
-
-If the X server returns key action indexes outside the range of the number
-of keys it told us to allocate, out of bounds memory access could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBGetMap.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
-index 4a428d3..86ecf9d 100644
---- a/src/xkb/XKBGetMap.c
-+++ b/src/xkb/XKBGetMap.c
-@@ -269,6 +269,10 @@ Status ret = Success;
- symMap = &info->map->key_sym_map[rep->firstKeyAct];
- for (i=0;i<(int)rep->nKeyActs;i++,symMap++) {
- if (numDesc[i]==0) {
-+ if ((i + rep->firstKeyAct) > (info->max_key_code + 1)) {
-+ ret = BadLength;
-+ goto done;
-+ }
- info->server->key_acts[i+rep->firstKeyAct]= 0;
- }
- else {
---
-1.7.9.2
-
-From 9f3d45b62875e7861deeecf849f90520395ee655 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 10:39:21 -0800
-Subject: [PATCH:libX11 14/38] unvalidated index in _XkbReadKeyBehaviors()
- [CVE-2013-1997 7/15]
-
-If the X server returns key behavior indexes outside the range of the number
-of keys it told us to allocate, out of bounds memory writes could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBGetMap.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
-index 86ecf9d..af93a5c 100644
---- a/src/xkb/XKBGetMap.c
-+++ b/src/xkb/XKBGetMap.c
-@@ -305,8 +305,10 @@ register int i;
- xkbBehaviorWireDesc *wire;
-
- if ( rep->totalKeyBehaviors>0 ) {
-+ int size = xkb->max_key_code + 1;
-+ if ( ((int) rep->firstKeyBehavior + rep->nKeyBehaviors) > size)
-+ return BadLength;
- if ( xkb->server->behaviors == NULL ) {
-- int size = xkb->max_key_code+1;
- xkb->server->behaviors = _XkbTypedCalloc(size,XkbBehavior);
- if (xkb->server->behaviors==NULL)
- return BadAlloc;
-@@ -318,7 +320,7 @@ xkbBehaviorWireDesc *wire;
- for (i=0;i<rep->totalKeyBehaviors;i++) {
- wire= (xkbBehaviorWireDesc *)_XkbGetReadBufferPtr(buf,
- SIZEOF(xkbBehaviorWireDesc));
-- if (wire==NULL)
-+ if (wire==NULL || wire->key >= size)
- return BadLength;
- xkb->server->behaviors[wire->key].type= wire->type;
- xkb->server->behaviors[wire->key].data= wire->data;
---
-1.7.9.2
-
-From b837305efa896d4bab4932faffb30d53cec546a3 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 10:51:51 -0800
-Subject: [PATCH:libX11 15/38] unvalidated index in _XkbReadModifierMap()
- [CVE-2013-1997 8/15]
-
-If the X server returns modifier map indexes outside the range of the number
-of keys it told us to allocate, out of bounds memory writes could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBGetMap.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
-index af93a5c..a68455b 100644
---- a/src/xkb/XKBGetMap.c
-+++ b/src/xkb/XKBGetMap.c
-@@ -390,6 +390,9 @@ register int i;
- unsigned char *wire;
-
- if ( rep->totalModMapKeys>0 ) {
-+ if ( ((int)rep->firstModMapKey + rep->nModMapKeys) >
-+ (xkb->max_key_code + 1))
-+ return BadLength;
- if ((xkb->map->modmap==NULL)&&
- (XkbAllocClientMap(xkb,XkbModifierMapMask,0)!=Success)) {
- return BadAlloc;
-@@ -402,6 +405,8 @@ unsigned char *wire;
- if (!wire)
- return BadLength;
- for (i=0;i<rep->totalModMapKeys;i++,wire+=2) {
-+ if (wire[0] > xkb->max_key_code || wire[1] > xkb->max_key_code)
-+ return BadLength;
- xkb->map->modmap[wire[0]]= wire[1];
- }
- }
---
-1.7.9.2
-
-From d71c0d7d138f8d15e7f4cfe747329405f0644423 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 11:04:44 -0800
-Subject: [PATCH:libX11 16/38] unvalidated index in
- _XkbReadExplicitComponents() [CVE-2013-1997
- 9/15]
-
-If the X server returns key indexes outside the range of the number of
-keys it told us to allocate, out of bounds memory writes could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBGetMap.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
-index a68455b..ea77f2a 100644
---- a/src/xkb/XKBGetMap.c
-+++ b/src/xkb/XKBGetMap.c
-@@ -362,8 +362,10 @@ register int i;
- unsigned char *wire;
-
- if ( rep->totalKeyExplicit>0 ) {
-+ int size = xkb->max_key_code + 1;
-+ if ( ((int) rep->firstKeyExplicit + rep->nKeyExplicit) > size)
-+ return BadLength;
- if ( xkb->server->explicit == NULL ) {
-- int size = xkb->max_key_code+1;
- xkb->server->explicit = _XkbTypedCalloc(size,unsigned char);
- if (xkb->server->explicit==NULL)
- return BadAlloc;
-@@ -377,6 +379,8 @@ unsigned char *wire;
- if (!wire)
- return BadLength;
- for (i=0;i<rep->totalKeyExplicit;i++,wire+=2) {
-+ if (wire[0] > xkb->max_key_code || wire[1] > xkb->max_key_code)
-+ return BadLength;
- xkb->server->explicit[wire[0]]= wire[1];
- }
- }
---
-1.7.9.2
-
-From fb927b6dbc0172c2ca63b5ad243bfb98bb61fc4c Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 11:01:04 -0800
-Subject: [PATCH:libX11 17/38] unvalidated index in _XkbReadVirtualModMap()
- [CVE-2013-1997 10/15]
-
-If the X server returns modifier map indexes outside the range of the number
-of keys it told us to allocate, out of bounds memory writes could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBGetMap.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
-index ea77f2a..5551298 100644
---- a/src/xkb/XKBGetMap.c
-+++ b/src/xkb/XKBGetMap.c
-@@ -425,6 +425,9 @@ xkbVModMapWireDesc * wire;
- XkbServerMapPtr srv;
-
- if ( rep->totalVModMapKeys>0 ) {
-+ if (((int) rep->firstVModMapKey + rep->nVModMapKeys)
-+ > xkb->max_key_code)
-+ return BadLength;
- if (((xkb->server==NULL)||(xkb->server->vmodmap==NULL))&&
- (XkbAllocServerMap(xkb,XkbVirtualModMapMask,0)!=Success)) {
- return BadAlloc;
---
-1.7.9.2
-
-From f06f3cdc343fd6d42021dba055f080b617432301 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 11:11:08 -0800
-Subject: [PATCH:libX11 18/38] unvalidated index/length in
- _XkbReadGetNamesReply() [CVE-2013-1997 11/15]
-
-If the X server returns key name indexes outside the range of the number
-of keys it told us to allocate, out of bounds memory writes could occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/xkb/XKBNames.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/xkb/XKBNames.c b/src/xkb/XKBNames.c
-index 0276c05..0f1e48e 100644
---- a/src/xkb/XKBNames.c
-+++ b/src/xkb/XKBNames.c
-@@ -180,6 +180,8 @@ _XkbReadGetNamesReply( Display * dpy,
- nKeys= xkb->max_key_code+1;
- names->keys= _XkbTypedCalloc(nKeys,XkbKeyNameRec);
- }
-+ else if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code)
-+ goto BAILOUT;
- if (names->keys!=NULL) {
- if (!_XkbCopyFromReadBuffer(&buf,
- (char *)&names->keys[rep->firstKey],
---
-1.7.9.2
-
-From d851a64b0704f79550a9507a34d057c7415f6516 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 11:25:25 -0800
-Subject: [PATCH:libX11 19/38] unvalidated length in _XimXGetReadData()
- [CVE-2013-1997 12/15]
-
-Check the provided buffer size against the amount of data we're going to
-write into it, not against the reported length from the ClientMessage.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- modules/im/ximcp/imTrX.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/im/ximcp/imTrX.c b/modules/im/ximcp/imTrX.c
-index 1412d70..76ff20e 100644
---- a/modules/im/ximcp/imTrX.c
-+++ b/modules/im/ximcp/imTrX.c
-@@ -372,7 +372,7 @@ _XimXGetReadData(
- XFree(prop_ret);
- return False;
- }
-- if (buf_len >= length) {
-+ if (buf_len >= (int)nitems) {
- (void)memcpy(buf, prop_ret, (int)nitems);
- *ret_len = (int)nitems;
- if (bytes_after_ret > 0) {
---
-1.7.9.2
-
-From 59ba5744cdb8831e53f6340279d9841a037c48bc Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 15:08:21 -0800
-Subject: [PATCH:libX11 30/38] Avoid overflows in XListFonts() [CVE-2013-1997
- 13/15]
-
-Ensure that when breaking the returned list into individual strings,
-we don't walk past the end of allocated memory to write the '\0' bytes
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/FontNames.c | 35 ++++++++++++++++++++++-------------
- 1 file changed, 22 insertions(+), 13 deletions(-)
-
-diff --git a/src/FontNames.c b/src/FontNames.c
-index 3018cf2..b5bc7b4 100644
---- a/src/FontNames.c
-+++ b/src/FontNames.c
-@@ -29,6 +29,7 @@ in this Software without prior written authorization from The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- char **
- XListFonts(
-@@ -40,11 +41,13 @@ int *actualCount) /* RETURN */
- register long nbytes;
- register unsigned i;
- register int length;
-- char **flist;
-- char *ch;
-+ char **flist = NULL;
-+ char *ch = NULL;
-+ char *chend;
-+ int count = 0;
- xListFontsReply rep;
- register xListFontsReq *req;
-- register long rlen;
-+ unsigned long rlen;
-
- LockDisplay(dpy);
- GetReq(ListFonts, req);
-@@ -62,15 +65,17 @@ int *actualCount) /* RETURN */
- }
-
- if (rep.nFonts) {
-- flist = (char **)Xmalloc ((unsigned)rep.nFonts * sizeof(char *));
-- rlen = rep.length << 2;
-- ch = (char *) Xmalloc((unsigned) (rlen + 1));
-+ flist = Xmalloc (rep.nFonts * sizeof(char *));
-+ if (rep.length < (LONG_MAX >> 2)) {
-+ rlen = rep.length << 2;
-+ ch = Xmalloc(rlen + 1);
- /* +1 to leave room for last null-terminator */
-+ }
-
- if ((! flist) || (! ch)) {
- if (flist) Xfree((char *) flist);
- if (ch) Xfree(ch);
-- _XEatData(dpy, (unsigned long) rlen);
-+ _XEatDataWords(dpy, rep.length);
- *actualCount = 0;
- UnlockDisplay(dpy);
- SyncHandle();
-@@ -81,17 +86,21 @@ int *actualCount) /* RETURN */
- /*
- * unpack into null terminated strings.
- */
-+ chend = ch + (rlen + 1);
- length = *(unsigned char *)ch;
- *ch = 1; /* make sure it is non-zero for XFreeFontNames */
- for (i = 0; i < rep.nFonts; i++) {
-- flist[i] = ch + 1; /* skip over length */
-- ch += length + 1; /* find next length ... */
-- length = *(unsigned char *)ch;
-- *ch = '\0'; /* and replace with null-termination */
-+ if (ch + length < chend) {
-+ flist[i] = ch + 1; /* skip over length */
-+ ch += length + 1; /* find next length ... */
-+ length = *(unsigned char *)ch;
-+ *ch = '\0'; /* and replace with null-termination */
-+ count++;
-+ } else
-+ flist[i] = NULL;
- }
- }
-- else flist = (char **) NULL;
-- *actualCount = rep.nFonts;
-+ *actualCount = count;
- UnlockDisplay(dpy);
- SyncHandle();
- return (flist);
---
-1.7.9.2
-
-From b5686ac6ad36e7742f8bba5b906bf2c57ba18955 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 15:08:21 -0800
-Subject: [PATCH:libX11 31/38] Avoid overflows in XGetFontPath()
- [CVE-2013-1997 14/15]
-
-Ensure that when breaking the returned list into individual strings,
-we don't walk past the end of allocated memory to write the '\0' bytes
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/GetFPath.c | 36 ++++++++++++++++++++++--------------
- 1 file changed, 22 insertions(+), 14 deletions(-)
-
-diff --git a/src/GetFPath.c b/src/GetFPath.c
-index 7d497c9..abd4a5d 100644
---- a/src/GetFPath.c
-+++ b/src/GetFPath.c
-@@ -28,15 +28,18 @@ in this Software without prior written authorization from The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- char **XGetFontPath(
- register Display *dpy,
- int *npaths) /* RETURN */
- {
- xGetFontPathReply rep;
-- register long nbytes;
-- char **flist;
-- char *ch;
-+ unsigned long nbytes;
-+ char **flist = NULL;
-+ char *ch = NULL;
-+ char *chend;
-+ int count = 0;
- register unsigned i;
- register int length;
- register xReq *req;
-@@ -46,16 +49,17 @@ char **XGetFontPath(
- (void) _XReply (dpy, (xReply *) &rep, 0, xFalse);
-
- if (rep.nPaths) {
-- flist = (char **)
-- Xmalloc((unsigned) rep.nPaths * sizeof (char *));
-- nbytes = (long)rep.length << 2;
-- ch = (char *) Xmalloc ((unsigned) (nbytes + 1));
-+ flist = Xmalloc(rep.nPaths * sizeof (char *));
-+ if (rep.length < (LONG_MAX >> 2)) {
-+ nbytes = (unsigned long) rep.length << 2;
-+ ch = Xmalloc (nbytes + 1);
- /* +1 to leave room for last null-terminator */
-+ }
-
- if ((! flist) || (! ch)) {
- if (flist) Xfree((char *) flist);
- if (ch) Xfree(ch);
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (char **) NULL;
-@@ -65,16 +69,20 @@ char **XGetFontPath(
- /*
- * unpack into null terminated strings.
- */
-+ chend = ch + (nbytes + 1);
- length = *ch;
- for (i = 0; i < rep.nPaths; i++) {
-- flist[i] = ch+1; /* skip over length */
-- ch += length + 1; /* find next length ... */
-- length = *ch;
-- *ch = '\0'; /* and replace with null-termination */
-+ if (ch + length < chend) {
-+ flist[i] = ch+1; /* skip over length */
-+ ch += length + 1; /* find next length ... */
-+ length = *ch;
-+ *ch = '\0'; /* and replace with null-termination */
-+ count++;
-+ } else
-+ flist[i] = NULL;
- }
- }
-- else flist = NULL;
-- *npaths = rep.nPaths;
-+ *npaths = count;
- UnlockDisplay(dpy);
- SyncHandle();
- return (flist);
---
-1.7.9.2
-
-From 910875c83c9e6741aba258f44f94b3d69f804d00 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 15:08:21 -0800
-Subject: [PATCH:libX11 32/38] Avoid overflows in XListExtensions()
- [CVE-2013-1997 15/15]
-
-Ensure that when breaking the returned list into individual strings,
-we don't walk past the end of allocated memory to write the '\0' bytes
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/ListExt.c | 36 ++++++++++++++++++++++--------------
- 1 file changed, 22 insertions(+), 14 deletions(-)
-
-diff --git a/src/ListExt.c b/src/ListExt.c
-index 16b522e..e925c47 100644
---- a/src/ListExt.c
-+++ b/src/ListExt.c
-@@ -28,18 +28,21 @@ in this Software without prior written authorization from The Open Group.
- #include <config.h>
- #endif
- #include "Xlibint.h"
-+#include <limits.h>
-
- char **XListExtensions(
- register Display *dpy,
- int *nextensions) /* RETURN */
- {
- xListExtensionsReply rep;
-- char **list;
-- char *ch;
-+ char **list = NULL;
-+ char *ch = NULL;
-+ char *chend;
-+ int count = 0;
- register unsigned i;
- register int length;
- register xReq *req;
-- register long rlen;
-+ unsigned long rlen;
-
- LockDisplay(dpy);
- GetEmptyReq (ListExtensions, req);
-@@ -51,16 +54,17 @@ char **XListExtensions(
- }
-
- if (rep.nExtensions) {
-- list = (char **) Xmalloc (
-- (unsigned)(rep.nExtensions * sizeof (char *)));
-- rlen = rep.length << 2;
-- ch = (char *) Xmalloc ((unsigned) rlen + 1);
-+ list = Xmalloc (rep.nExtensions * sizeof (char *));
-+ if (rep.length < (LONG_MAX >> 2)) {
-+ rlen = rep.length << 2;
-+ ch = Xmalloc (rlen + 1);
- /* +1 to leave room for last null-terminator */
-+ }
-
- if ((!list) || (!ch)) {
- if (list) Xfree((char *) list);
- if (ch) Xfree((char *) ch);
-- _XEatData(dpy, (unsigned long) rlen);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (char **) NULL;
-@@ -70,17 +74,21 @@ char **XListExtensions(
- /*
- * unpack into null terminated strings.
- */
-+ chend = ch + (rlen + 1);
- length = *ch;
- for (i = 0; i < rep.nExtensions; i++) {
-- list[i] = ch+1; /* skip over length */
-- ch += length + 1; /* find next length ... */
-- length = *ch;
-- *ch = '\0'; /* and replace with null-termination */
-+ if (ch + length < chend) {
-+ list[i] = ch+1; /* skip over length */
-+ ch += length + 1; /* find next length ... */
-+ length = *ch;
-+ *ch = '\0'; /* and replace with null-termination */
-+ count++;
-+ } else
-+ list[i] = NULL;
- }
- }
-- else list = (char **) NULL;
-
-- *nextensions = rep.nExtensions;
-+ *nextensions = count;
- UnlockDisplay(dpy);
- SyncHandle();
- return (list);
---
-1.7.9.2
-
-From 134944bfb0963151e4e65b9b17c5431a41acd28e Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sun, 31 Mar 2013 12:22:35 -0700
-Subject: [PATCH:libX11 37/38] _XkbReadGetMapReply: reject maxKeyCodes smaller
- than the minKeyCode
-
-Various other bounds checks in the code assume this is true, so
-enforce it when we first get the data from the X server.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/xkb/XKBGetMap.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
-index d4cc199..862807a 100644
---- a/src/xkb/XKBGetMap.c
-+++ b/src/xkb/XKBGetMap.c
-@@ -482,6 +482,8 @@ unsigned mask;
-
- if ( xkb->device_spec == XkbUseCoreKbd )
- xkb->device_spec= rep->deviceID;
-+ if ( rep->maxKeyCode < rep->minKeyCode )
-+ return BadImplementation;
- xkb->min_key_code = rep->minKeyCode;
- xkb->max_key_code = rep->maxKeyCode;
-
---
-1.7.9.2
-
-From a3bdd2b090915fe0163b062f0e6576fe05dd332e Mon Sep 17 00:00:00 2001
-From: Julien Cristau <[email protected]>
-Date: Thu, 23 May 2013 20:39:46 +0200
-Subject: [PATCH:libX11] xkb: fix off-by-one in _XkbReadGetNamesReply and
- _XkbReadVirtualModMap
-
-The size of the arrays is max_key_code + 1. This makes these functions
-consistent with the other checks added for CVE-2013-1997.
-
-Also check the XkbGetNames reply when names->keys was just allocated.
-
-Signed-off-by: Julien Cristau <[email protected]>
-Tested-by: Colin Walters <[email protected]>
-Reviewed-by: Alan Coopersmith <[email protected]>
----
- src/xkb/XKBGetMap.c | 2 +-
- src/xkb/XKBNames.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
-index 0875dfd..c73e655 100644
---- a/src/xkb/XKBGetMap.c
-+++ b/src/xkb/XKBGetMap.c
-@@ -426,7 +426,7 @@ XkbServerMapPtr srv;
-
- if ( rep->totalVModMapKeys>0 ) {
- if (((int) rep->firstVModMapKey + rep->nVModMapKeys)
-- > xkb->max_key_code)
-+ > xkb->max_key_code + 1)
- return BadLength;
- if (((xkb->server==NULL)||(xkb->server->vmodmap==NULL))&&
- (XkbAllocServerMap(xkb,XkbVirtualModMapMask,0)!=Success)) {
-diff --git a/src/xkb/XKBNames.c b/src/xkb/XKBNames.c
-index 0f1e48e..3a8860b 100644
---- a/src/xkb/XKBNames.c
-+++ b/src/xkb/XKBNames.c
-@@ -180,7 +180,7 @@ _XkbReadGetNamesReply( Display * dpy,
- nKeys= xkb->max_key_code+1;
- names->keys= _XkbTypedCalloc(nKeys,XkbKeyNameRec);
- }
-- else if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code)
-+ if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code + 1)
- goto BAILOUT;
- if (names->keys!=NULL) {
- if (!_XkbCopyFromReadBuffer(&buf,
---
-1.7.9.2
-
--- a/open-src/lib/libX11/CVE-2013-2004.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-From 5004f53889bf65aa9e78cea7a01a51948839dce3 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 12:01:39 -0800
-Subject: [PATCH:libX11 22/38] Unbounded recursion in GetDatabase() when
- parsing include files [CVE-2013-2004 1/2]
-
-GetIncludeFile() can call GetDatabase() which can call GetIncludeFile()
-which can call GetDatabase() which can call GetIncludeFile() ....
-eventually causing recursive stack overflow and crash.
-
-Easily reproduced with a resource file that #includes itself.
-
-Limit is set to a include depth of 100 files, which should be enough
-for all known use cases, but could be adjusted later if necessary.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/Xrm.c | 24 +++++++++++++++---------
- 1 file changed, 15 insertions(+), 9 deletions(-)
-
-diff --git a/src/Xrm.c b/src/Xrm.c
-index 3e29ab0..2c0c324 100644
---- a/src/Xrm.c
-+++ b/src/Xrm.c
-@@ -1088,13 +1088,15 @@ static void GetIncludeFile(
- XrmDatabase db,
- _Xconst char *base,
- _Xconst char *fname,
-- int fnamelen);
-+ int fnamelen,
-+ int depth);
-
- static void GetDatabase(
- XrmDatabase db,
- _Xconst char *str,
- _Xconst char *filename,
-- Bool doall)
-+ Bool doall,
-+ int depth)
- {
- char *rhs;
- char *lhs, lhs_s[DEF_BUFF_SIZE];
-@@ -1204,7 +1206,8 @@ static void GetDatabase(
- } while (c != '"' && !is_EOL(bits));
- /* must have an ending " */
- if (c == '"')
-- GetIncludeFile(db, filename, fname, str - len - fname);
-+ GetIncludeFile(db, filename, fname, str - len - fname,
-+ depth);
- }
- }
- /* spin to next newline */
-@@ -1545,7 +1548,7 @@ XrmPutLineResource(
- {
- if (!*pdb) *pdb = NewDatabase();
- _XLockMutex(&(*pdb)->linfo);
-- GetDatabase(*pdb, line, (char *)NULL, False);
-+ GetDatabase(*pdb, line, (char *)NULL, False, 0);
- _XUnlockMutex(&(*pdb)->linfo);
- }
-
-@@ -1557,7 +1560,7 @@ XrmGetStringDatabase(
-
- db = NewDatabase();
- _XLockMutex(&db->linfo);
-- GetDatabase(db, data, (char *)NULL, True);
-+ GetDatabase(db, data, (char *)NULL, True, 0);
- _XUnlockMutex(&db->linfo);
- return db;
- }
-@@ -1636,7 +1639,8 @@ GetIncludeFile(
- XrmDatabase db,
- _Xconst char *base,
- _Xconst char *fname,
-- int fnamelen)
-+ int fnamelen,
-+ int depth)
- {
- int len;
- char *str;
-@@ -1644,6 +1648,8 @@ GetIncludeFile(
-
- if (fnamelen <= 0 || fnamelen >= BUFSIZ)
- return;
-+ if (depth >= MAXDBDEPTH)
-+ return;
- if (*fname != '/' && base && (str = strrchr(base, '/'))) {
- len = str - base + 1;
- if (len + fnamelen >= BUFSIZ)
-@@ -1657,7 +1663,7 @@ GetIncludeFile(
- }
- if (!(str = ReadInFile(realfname)))
- return;
-- GetDatabase(db, str, realfname, True);
-+ GetDatabase(db, str, realfname, True, depth + 1);
- Xfree(str);
- }
-
-@@ -1673,7 +1679,7 @@ XrmGetFileDatabase(
-
- db = NewDatabase();
- _XLockMutex(&db->linfo);
-- GetDatabase(db, str, filename, True);
-+ GetDatabase(db, str, filename, True, 0);
- _XUnlockMutex(&db->linfo);
- Xfree(str);
- return db;
-@@ -1697,7 +1703,7 @@ XrmCombineFileDatabase(
- } else
- db = NewDatabase();
- _XLockMutex(&db->linfo);
-- GetDatabase(db, str, filename, True);
-+ GetDatabase(db, str, filename, True, 0);
- _XUnlockMutex(&db->linfo);
- Xfree(str);
- if (!override)
---
-1.7.9.2
-
-From f94dc4a99aa1845c6a25826e99e11aaa4fff78eb Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 12:39:58 -0800
-Subject: [PATCH:libX11 23/38] Unbounded recursion in _XimParseStringFile()
- when parsing include files [CVE-2013-2004 2/2]
-
-parseline() can call _XimParseStringFile() which can call parseline()
-which can call _XimParseStringFile() which can call parseline() ....
-eventually causing recursive stack overflow and crash.
-
-Limit is set to a include depth of 100 files, which should be enough
-for all known use cases, but could be adjusted later if necessary.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- modules/im/ximcp/imLcPrs.c | 20 +++++++++++++++++---
- 1 file changed, 17 insertions(+), 3 deletions(-)
-
-diff --git a/modules/im/ximcp/imLcPrs.c b/modules/im/ximcp/imLcPrs.c
-index 4e54385..4c7d6f0 100644
---- a/modules/im/ximcp/imLcPrs.c
-+++ b/modules/im/ximcp/imLcPrs.c
-@@ -56,6 +56,8 @@ extern int _Xmbstoutf8(
- int len
- );
-
-+static void parsestringfile(FILE *fp, Xim im, int depth);
-+
- /*
- * Parsing File Format:
- *
-@@ -423,7 +425,8 @@ static int
- parseline(
- FILE *fp,
- Xim im,
-- char* tokenbuf)
-+ char* tokenbuf,
-+ int depth)
- {
- int token;
- DTModifier modifier_mask;
-@@ -470,11 +473,13 @@ parseline(
- goto error;
- if ((filename = TransFileName(im, tokenbuf)) == NULL)
- goto error;
-+ if (++depth > 100)
-+ goto error;
- infp = _XFopenFile(filename, "r");
- Xfree(filename);
- if (infp == NULL)
- goto error;
-- _XimParseStringFile(infp, im);
-+ parsestringfile(infp, im, depth);
- fclose(infp);
- return (0);
- } else if ((token == KEY) && (strcmp("None", tokenbuf) == 0)) {
-@@ -668,6 +673,15 @@ _XimParseStringFile(
- FILE *fp,
- Xim im)
- {
-+ parsestringfile(fp, im, 0);
-+}
-+
-+static void
-+parsestringfile(
-+ FILE *fp,
-+ Xim im,
-+ int depth)
-+{
- char tb[8192];
- char* tbp;
- struct stat st;
-@@ -678,7 +692,7 @@ _XimParseStringFile(
- else tbp = malloc (size);
-
- if (tbp != NULL) {
-- while (parseline(fp, im, tbp) >= 0) {}
-+ while (parseline(fp, im, tbp, depth) >= 0) {}
- if (tbp != tb) free (tbp);
- }
- }
---
-1.7.9.2
-
--- a/open-src/lib/libX11/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -27,79 +27,68 @@
MODULE_NAME=libX11
# Version number (used in path names)
-MODULE_VERSION = 1.5.0
+MODULE_VERSION = 1.6.2
# Checksums for upstream tarball
-TARBALL_MD5 = 78b4b3bab4acbdf0abcfca30a8c70cc6
-TARBALL_SHA1 = 8177535c9c59d8c3ab98d55ce53520b5737ccd1a
-TARBALL_SHA256= c382efd7e92bfc3cef39a4b7f1ecf2744ba4414a705e3bc1e697f75502bd4d86
+TARBALL_MD5 = c35d6ad95b06635a524579e88622fdb5
+TARBALL_SHA1 = 0dd74854e6f6bb8a322e88ba3e89f87c3dcf9e08
+TARBALL_SHA256= 2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = \
1234757.patch,-p1 \
- 4010755.patch \
- 4614834.patch \
- 5039226.patch \
+ 4010755.patch,-p1 \
+ 4614834.patch,-p1 \
+ 5039226.patch,-p1 \
solaris-abi.patch,-p1 \
solaris-kbd.patch,-p1 \
SolarisIA.patch,-p1 \
- 6714036.patch,-p1 \
6789219.patch,-p1 \
- im-suneu-greek.patch \
- im-ximcp.patch \
- lc-jisx0212.patch \
- lc-jisx0208.patch \
+ im-suneu-greek.patch,-p1 \
+ im-ximcp.patch,-p1 \
+ lc-jisx0212.patch,-p1 \
+ lc-jisx0208.patch,-p1 \
lc-ksc5601.1992-3.patch,-p1 \
lc-gb18030.patch,-p1 \
om-generic.patch,-p1 \
- compose.dir.patch \
- compose-iso8859-1.patch \
- compose-iso8859-2.patch \
- compose-iso8859-5.patch \
- compose-iso8859-6.patch \
+ compose.dir.patch,-p1 \
+ compose-iso8859-1.patch,-p1 \
+ compose-iso8859-2.patch,-p1 \
+ compose-iso8859-5.patch,-p1 \
+ compose-iso8859-6.patch,-p1 \
compose-iso8859-7.patch,-p1 \
- compose-iso8859-8.patch \
- compose-iso8859-9.patch \
- compose-iso8859-13.patch \
- compose-iso8859-15.patch \
- compose-el_GR.UTF-8.patch \
+ compose-iso8859-8.patch,-p1 \
+ compose-iso8859-9.patch,-p1 \
+ compose-iso8859-13.patch,-p1 \
+ compose-iso8859-15.patch,-p1 \
+ compose-el_GR.UTF-8.patch,-p1 \
compose-en_US.UTF-8.patch,-p1 \
- compose-ja_JP.UTF-8.patch \
- compose-ko_KR.UTF-8.patch \
+ compose-ja_JP.UTF-8.patch,-p1 \
+ compose-ko_KR.UTF-8.patch,-p1 \
compose-pt_BR.UTF-8.patch,-p1 \
- compose-th_TH.UTF-8.patch \
- compose-zh_CN.UTF-8.patch \
- compose-zh_HK.UTF-8.patch \
- compose-zh_TW.UTF-8.patch \
+ compose-zh_CN.UTF-8.patch,-p1 \
+ compose-zh_HK.UTF-8.patch,-p1 \
+ compose-zh_TW.UTF-8.patch,-p1 \
locale.aliases.patch,-p1 \
- locale.dir.patch \
locale.paths.patch,-p1 \
- locale-C.patch \
- locale-iso8859-1.patch \
- locale-iso8859-6.patch \
- locale-iso8859-8.patch \
- locale-en_US.UTF-8.patch \
- locale-ja.SJIS.patch \
- locale-ja.patch \
- locale-ja_JP.UTF-8.patch \
- locale-ko.patch \
- locale-ko_KR.UTF-8.patch \
- locale-pt_BR.UTF-8.patch \
- locale-th_TH.UTF-8.patch \
- locale-zh_CN.UTF-8.patch \
- locale-zh_CN.gb18030.patch \
- locale-zh_HK.UTF-8.patch \
- locale-zh_TW.UTF-8.patch \
- locale-zh_TW.patch \
- locale-ru-RU.UTF-8.patch
-
-# Patches from May 2013 security alert - will be integrated into libX11 1.6
-SOURCE_PATCHES += upstream-cleanup.patch,-p1
-SOURCE_PATCHES += XEatDataWords.patch,-p1
-SOURCE_PATCHES += CVE-2013-1981.patch,-p1
-SOURCE_PATCHES += CVE-2013-1997.patch,-p1
-SOURCE_PATCHES += CVE-2013-2004.patch,-p1
-SOURCE_PATCHES += alloc-cleanup.patch,-p1
+ locale-C.patch,-p1 \
+ locale-iso8859-1.patch,-p1 \
+ locale-iso8859-6.patch,-p1 \
+ locale-iso8859-8.patch,-p1 \
+ locale-en_US.UTF-8.patch,-p1 \
+ locale-ja.SJIS.patch,-p1 \
+ locale-ja.patch,-p1 \
+ locale-ja_JP.UTF-8.patch,-p1 \
+ locale-ko.patch,-p1 \
+ locale-ko_KR.UTF-8.patch,-p1 \
+ locale-pt_BR.UTF-8.patch,-p1 \
+ locale-th_TH.UTF-8.patch,-p1 \
+ locale-zh_CN.UTF-8.patch,-p1 \
+ locale-zh_CN.gb18030.patch,-p1 \
+ locale-zh_HK.UTF-8.patch,-p1 \
+ locale-zh_TW.UTF-8.patch,-p1 \
+ locale-zh_TW.patch,-p1 \
+ locale-ru-RU.UTF-8.patch,-p1
# Library name (used for specfiles/mapfiles)
LIBNAME=X11
--- a/open-src/lib/libX11/SolarisIA.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/SolarisIA.patch Mon Sep 30 13:26:39 2013 -0700
@@ -22,10 +22,10 @@
#
diff --git a/src/Makefile.am b/src/Makefile.am
-index a825bb9..263b493 100644
+index ddad93c..677b0ee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -352,6 +352,9 @@ libX11_xcb_la_SOURCES = x11_xcb.c Xxcbint.h
+@@ -348,6 +348,9 @@ libX11_xcb_la_SOURCES = x11_xcb.c Xxcbint.h
libX11_xcb_la_LDFLAGS = -version-number 1:0:0 -no-undefined
libX11_xcb_la_LIBADD = libX11.la
@@ -36,7 +36,7 @@
# Figure out which sub-libraries to link into Xlib
#
diff --git a/src/OpenDis.c b/src/OpenDis.c
-index 6d6111e..ff717f9 100644
+index a14d13b..ead8703 100644
--- a/src/OpenDis.c
+++ b/src/OpenDis.c
@@ -38,6 +38,12 @@ in this Software without prior written authorization from The Open Group.
@@ -52,7 +52,7 @@
#if defined(XTHREADS) && defined(SUNSOFT)
struct _DisplayPtrLink {
Display *dpy;
-@@ -586,6 +592,21 @@ XOpenDisplay (
+@@ -581,6 +587,21 @@ XOpenDisplay (
#ifdef XKB
XkbUseExtension(dpy,NULL,NULL);
#endif
--- a/open-src/lib/libX11/XEatDataWords.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,306 +0,0 @@
-From d738eb47a3e781477101d706f01dd61148a9086f Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 20:54:24 -0800
-Subject: [PATCH:libX11 02/38] Add _XEatDataWords to discard a given number of
- 32-bit words of reply data
-
-Matches the units of the length field in X protocol replies, and provides
-a single implementation of overflow checking to avoid having to replicate
-those checks in every caller.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- include/X11/Xlibint.h | 4 ++++
- src/xcb_io.c | 17 +++++++++++++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index 06395b3..d63a534 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -855,6 +855,10 @@ extern void _XEatData(
- Display* /* dpy */,
- unsigned long /* n */
- );
-+extern void _XEatDataWords(
-+ Display* /* dpy */,
-+ unsigned long /* n */
-+);
- extern char *_XAllocScratch(
- Display* /* dpy */,
- unsigned long /* nbytes */
-diff --git a/src/xcb_io.c b/src/xcb_io.c
-index 300ef57..727c6c7 100644
---- a/src/xcb_io.c
-+++ b/src/xcb_io.c
-@@ -19,6 +19,7 @@
- #include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <limits.h>
- #ifdef HAVE_SYS_SELECT_H
- #include <sys/select.h>
- #endif
-@@ -757,3 +758,19 @@ void _XEatData(Display *dpy, unsigned long n)
- dpy->xcb->reply_consumed += n;
- _XFreeReplyData(dpy, False);
- }
-+
-+/*
-+ * Read and discard "n" 32-bit words of data
-+ * Matches the units of the length field in X protocol replies, and provides
-+ * a single implementation of overflow checking to avoid having to replicate
-+ * those checks in every caller.
-+ */
-+void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+ if (n < ((INT_MAX - dpy->xcb->reply_consumed) >> 2))
-+ dpy->xcb->reply_consumed += (n << 2);
-+ else
-+ /* Overflow would happen, so just eat the rest of the reply */
-+ dpy->xcb->reply_consumed = dpy->xcb->reply_length;
-+ _XFreeReplyData(dpy, False);
-+}
---
-1.7.9.2
-
-From 56623594bb0f132aa2792f76378a573c7efe31e2 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 19 Apr 2013 14:30:40 -0700
-Subject: [PATCH:libX11 38/38] Give GNU & Solaris Studio compilers hints about
- XEatData branches
-
-Try to offset the cost of all the recent checks we've added by giving
-the compiler a hint that the branches that involve us eating data
-are less likely to be used than the ones that process it.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- include/X11/Xlibint.h | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index d63a534..acbad6b 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -832,6 +832,15 @@ typedef struct _XExten { /* private to extension mechanism */
- struct _XExten *next_flush; /* next in list of those with flushes */
- } _XExtension;
-
-+/* Temporary definition until we can depend on an xproto release with it */
-+#ifdef _X_COLD
-+# define _XLIB_COLD _X_COLD
-+#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403) /* 4.3+ */
-+# define _XLIB_COLD __attribute__((__cold__))
-+#else
-+# define _XLIB_COLD /* nothing */
-+#endif
-+
- /* extension hooks */
-
- #ifdef DataRoutineIsProcedure
-@@ -854,11 +863,14 @@ extern int (*_XErrorFunction)(
- extern void _XEatData(
- Display* /* dpy */,
- unsigned long /* n */
--);
-+) _XLIB_COLD;
- extern void _XEatDataWords(
- Display* /* dpy */,
- unsigned long /* n */
--);
-+) _XLIB_COLD;
-+#if defined(__SUNPRO_C) /* Studio compiler alternative to "cold" attribute */
-+# pragma rarely_called(_XEatData, _XEatDataWords)
-+#endif
- extern char *_XAllocScratch(
- Display* /* dpy */,
- unsigned long /* nbytes */
---
-1.7.9.2
-
-From d0944b52f8debb74eb48359a8dc20706b12da834 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 16:56:16 -0800
-Subject: [PATCH:libX11 34/38] Convert more _XEatData callers to
- _XEatDataWords
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Matthieu Herrb <[email protected]>
----
- src/GetAtomNm.c | 4 ++--
- src/LiICmaps.c | 8 ++++----
- src/LiProps.c | 8 ++++----
- src/OpenDis.c | 2 +-
- src/QuColors.c | 10 +++++-----
- src/QuTree.c | 8 ++++----
- 6 files changed, 20 insertions(+), 20 deletions(-)
-
-diff --git a/src/GetAtomNm.c b/src/GetAtomNm.c
-index 9823c69..996f7eb 100644
---- a/src/GetAtomNm.c
-+++ b/src/GetAtomNm.c
-@@ -78,7 +78,7 @@ char *XGetAtomName(
- name[rep.nameLength] = '\0';
- _XUpdateAtomCache(dpy, name, atom, 0, -1, 0);
- } else {
-- _XEatData(dpy, (unsigned long) (rep.nameLength + 3) & ~3);
-+ _XEatDataWords(dpy, rep.length);
- name = (char *) NULL;
- }
- UnlockDisplay(dpy);
-@@ -176,7 +176,7 @@ XGetAtomNames (
- _XUpdateAtomCache(dpy, names_return[missed], atoms[missed],
- 0, -1, 0);
- } else {
-- _XEatData(dpy, (unsigned long) (rep.nameLength + 3) & ~3);
-+ _XEatDataWords(dpy, rep.length);
- async_state.status = 0;
- }
- }
-diff --git a/src/LiICmaps.c b/src/LiICmaps.c
-index e981619..45a2f2f 100644
---- a/src/LiICmaps.c
-+++ b/src/LiICmaps.c
-@@ -34,7 +34,7 @@ Colormap *XListInstalledColormaps(
- Window win,
- int *n) /* RETURN */
- {
-- long nbytes;
-+ unsigned long nbytes;
- Colormap *cmaps;
- xListInstalledColormapsReply rep;
- register xResourceReq *req;
-@@ -51,14 +51,14 @@ Colormap *XListInstalledColormaps(
-
- if (rep.nColormaps) {
- nbytes = rep.nColormaps * sizeof(Colormap);
-- cmaps = (Colormap *) Xmalloc((unsigned) nbytes);
-- nbytes = rep.nColormaps << 2;
-+ cmaps = Xmalloc(nbytes);
- if (! cmaps) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return((Colormap *) NULL);
- }
-+ nbytes = rep.nColormaps << 2;
- _XRead32 (dpy, (long *) cmaps, nbytes);
- }
- else cmaps = (Colormap *) NULL;
-diff --git a/src/LiProps.c b/src/LiProps.c
-index 72560ab..d9c7465 100644
---- a/src/LiProps.c
-+++ b/src/LiProps.c
-@@ -34,7 +34,7 @@ Atom *XListProperties(
- Window window,
- int *n_props) /* RETURN */
- {
-- long nbytes;
-+ unsigned long nbytes;
- xListPropertiesReply rep;
- Atom *properties;
- register xResourceReq *req;
-@@ -50,14 +50,14 @@ Atom *XListProperties(
-
- if (rep.nProperties) {
- nbytes = rep.nProperties * sizeof(Atom);
-- properties = (Atom *) Xmalloc ((unsigned) nbytes);
-- nbytes = rep.nProperties << 2;
-+ properties = Xmalloc (nbytes);
- if (! properties) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (Atom *) NULL;
- }
-+ nbytes = rep.nProperties << 2;
- _XRead32 (dpy, (long *) properties, nbytes);
- }
- else properties = (Atom *) NULL;
-diff --git a/src/OpenDis.c b/src/OpenDis.c
-index f6d8c70..0bf1b91 100644
---- a/src/OpenDis.c
-+++ b/src/OpenDis.c
-@@ -552,7 +552,7 @@ XOpenDisplay (
- dpy->xdefaults[reply.nItems] = '\0';
- }
- else if (reply.propertyType != None)
-- _XEatData(dpy, reply.nItems * (reply.format >> 3));
-+ _XEatDataWords(dpy, reply.length);
- }
- }
- UnlockDisplay(dpy);
-diff --git a/src/QuColors.c b/src/QuColors.c
-index 237b8bf..13a63eb 100644
---- a/src/QuColors.c
-+++ b/src/QuColors.c
-@@ -37,9 +37,7 @@ _XQueryColors(
- int ncolors)
- {
- register int i;
-- xrgb *color;
- xQueryColorsReply rep;
-- long nbytes;
- register xQueryColorsReq *req;
-
- GetReq(QueryColors, req);
-@@ -52,8 +50,9 @@ _XQueryColors(
- /* XXX this isn't very efficient */
-
- if (_XReply(dpy, (xReply *) &rep, 0, xFalse) != 0) {
-- if ((color = (xrgb *)
-- Xmalloc((unsigned) (nbytes = (long) ncolors * SIZEOF(xrgb))))) {
-+ unsigned long nbytes = (long) ncolors * SIZEOF(xrgb);
-+ xrgb *color = Xmalloc(nbytes);
-+ if (color != NULL) {
-
- _XRead(dpy, (char *) color, nbytes);
-
-@@ -67,7 +66,8 @@ _XQueryColors(
- }
- Xfree((char *)color);
- }
-- else _XEatData(dpy, (unsigned long) nbytes);
-+ else
-+ _XEatDataWords(dpy, rep.length);
- }
- }
-
-diff --git a/src/QuTree.c b/src/QuTree.c
-index 3cea282..8da2ae2 100644
---- a/src/QuTree.c
-+++ b/src/QuTree.c
-@@ -37,7 +37,7 @@ Status XQueryTree (
- Window **children, /* RETURN */
- unsigned int *nchildren) /* RETURN */
- {
-- long nbytes;
-+ unsigned long nbytes;
- xQueryTreeReply rep;
- register xResourceReq *req;
-
-@@ -52,14 +52,14 @@ Status XQueryTree (
- *children = (Window *) NULL;
- if (rep.nChildren != 0) {
- nbytes = rep.nChildren * sizeof(Window);
-- *children = (Window *) Xmalloc((unsigned) nbytes);
-- nbytes = rep.nChildren << 2;
-+ *children = Xmalloc(nbytes);
- if (! *children) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (0);
- }
-+ nbytes = rep.nChildren << 2;
- _XRead32 (dpy, (long *) *children, nbytes);
- }
- *parent = rep.parent;
---
-1.7.9.2
-
--- a/open-src/lib/libX11/alloc-cleanup.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1182 +0,0 @@
-From 995dd372e73fcec43fb65bd42ff5adb409765f66 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Thu, 7 Mar 2013 23:46:05 -0800
-Subject: [PATCH:libX11 35/38] Remove more unnecessary casts from
- Xmalloc/calloc calls
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Context.c | 8 ++++----
- src/CrGC.c | 2 +-
- src/Depths.c | 2 +-
- src/FSWrap.c | 6 +++---
- src/Font.c | 12 ++++++------
- src/GetAtomNm.c | 8 ++++----
- src/GetHints.c | 9 ++++-----
- src/GetRGBCMap.c | 3 +--
- src/ImUtil.c | 6 +++---
- src/InitExt.c | 4 ++--
- src/IntAtom.c | 6 +++---
- src/KeyBind.c | 8 +++-----
- src/ModMap.c | 4 ++--
- src/OpenDis.c | 21 +++++++--------------
- src/PixFormats.c | 4 ++--
- src/PolyReg.c | 13 +++++--------
- src/PropAlloc.c | 9 ++++-----
- src/PutBEvent.c | 2 +-
- src/PutImage.c | 13 ++++++-------
- src/Quarks.c | 9 ++++-----
- src/RdBitF.c | 2 +-
- src/Region.c | 19 +++++++++----------
- src/RegstFlt.c | 4 ++--
- src/SetFPath.c | 2 +-
- src/SetHints.c | 6 +++---
- src/StrToText.c | 2 +-
- src/TextToStr.c | 4 ++--
- src/VisUtil.c | 8 +++-----
- src/WrBitF.c | 2 +-
- src/XlibInt.c | 20 +++++++++-----------
- src/Xrm.c | 20 +++++++++-----------
- src/locking.c | 8 ++++----
- src/udcInf.c | 9 ++++-----
- 33 files changed, 115 insertions(+), 140 deletions(-)
-
-diff --git a/src/Context.c b/src/Context.c
-index 79ae7d6..4bb465b 100644
---- a/src/Context.c
-+++ b/src/Context.c
-@@ -111,7 +111,7 @@ static void ResizeTable(DB db)
- otable = db->table;
- for (i = INITHASHMASK+1; (i + i) < db->numentries; )
- i += i;
-- db->table = (TableEntry *) Xcalloc((unsigned)i, sizeof(TableEntry));
-+ db->table = Xcalloc(i, sizeof(TableEntry));
- if (!db->table) {
- db->table = otable;
- return;
-@@ -180,11 +180,11 @@ int XSaveContext(
- UnlockDisplay(display);
- }
- if (!db) {
-- db = (DB) Xmalloc(sizeof(DBRec));
-+ db = Xmalloc(sizeof(DBRec));
- if (!db)
- return XCNOMEM;
- db->mask = INITHASHMASK;
-- db->table = (TableEntry *)Xcalloc(db->mask + 1, sizeof(TableEntry));
-+ db->table = Xcalloc(db->mask + 1, sizeof(TableEntry));
- if (!db->table) {
- Xfree((char *)db);
- return XCNOMEM;
-@@ -210,7 +210,7 @@ int XSaveContext(
- return 0;
- }
- }
-- entry = (TableEntry) Xmalloc(sizeof(TableEntryRec));
-+ entry = Xmalloc(sizeof(TableEntryRec));
- if (!entry)
- return XCNOMEM;
- entry->rid = rid;
-diff --git a/src/CrGC.c b/src/CrGC.c
-index 11de94c..2d5f17c 100644
---- a/src/CrGC.c
-+++ b/src/CrGC.c
-@@ -72,7 +72,7 @@ GC XCreateGC (
- register _XExtension *ext;
-
- LockDisplay(dpy);
-- if ((gc = (GC)Xmalloc (sizeof(struct _XGC))) == NULL) {
-+ if ((gc = Xmalloc (sizeof(struct _XGC))) == NULL) {
- UnlockDisplay(dpy);
- SyncHandle();
- return (NULL);
-diff --git a/src/Depths.c b/src/Depths.c
-index f49655c..a8b719d 100644
---- a/src/Depths.c
-+++ b/src/Depths.c
-@@ -49,7 +49,7 @@ int *XListDepths (
- register Depth *dp;
- register int i;
-
-- depths = (int *) Xmalloc (count * sizeof(int));
-+ depths = Xmalloc (count * sizeof(int));
- if (!depths) return NULL;
- for (i = 0, dp = scr->depths; i < count; i++, dp++)
- depths[i] = dp->depth;
-diff --git a/src/FSWrap.c b/src/FSWrap.c
-index 910e602..12d0406 100644
---- a/src/FSWrap.c
-+++ b/src/FSWrap.c
-@@ -112,7 +112,7 @@ _XParseBaseFontNameList(
- if (!*ptr)
- break;
- }
-- if (!(list = (char **) Xmalloc((unsigned)sizeof(char *) * (*num + 1)))) {
-+ if (!(list = Xmalloc(sizeof(char *) * (*num + 1)))) {
- Xfree(psave);
- return (char **)NULL;
- }
-@@ -133,7 +133,7 @@ copy_string_list(
- if (string_list == NULL || list_count <= 0)
- return (char **) NULL;
-
-- string_list_ret = (char **) Xmalloc(sizeof(char *) * list_count);
-+ string_list_ret = Xmalloc(sizeof(char *) * list_count);
- if (string_list_ret == NULL)
- return (char **) NULL;
-
-@@ -142,7 +142,7 @@ copy_string_list(
- for (length = 0; count-- > 0; list_src++)
- length += strlen(*list_src) + 1;
-
-- dst = (char *) Xmalloc(length);
-+ dst = Xmalloc(length);
- if (dst == NULL) {
- Xfree(string_list_ret);
- return (char **) NULL;
-diff --git a/src/Font.c b/src/Font.c
-index 5dbdb29..3beb8a5 100644
---- a/src/Font.c
-+++ b/src/Font.c
-@@ -215,7 +215,7 @@ _XQueryFont (
- DeqAsyncHandler(dpy, &async);
- reply_left = reply.length -
- ((SIZEOF(xQueryFontReply) - SIZEOF(xReply)) >> 2);
-- if (! (fs = (XFontStruct *) Xmalloc (sizeof (XFontStruct)))) {
-+ if (! (fs = Xmalloc (sizeof (XFontStruct)))) {
- _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
-@@ -323,7 +323,7 @@ _XF86BigfontCodes (
- if (pData)
- return (XF86BigfontCodes *) pData->private_data;
-
-- pData = (XExtData *) Xmalloc(sizeof(XExtData) + sizeof(XF86BigfontCodes));
-+ pData = Xmalloc(sizeof(XExtData) + sizeof(XF86BigfontCodes));
- if (!pData) {
- /* Out of luck. */
- return (XF86BigfontCodes *) NULL;
-@@ -459,7 +459,7 @@ _XF86BigfontQueryFont (
- DeqAsyncHandler(dpy, &async1);
- reply_left = reply.length -
- ((SIZEOF(xXF86BigfontQueryFontReply) - SIZEOF(xReply)) >> 2);
-- if (! (fs = (XFontStruct *) Xmalloc (sizeof (XFontStruct)))) {
-+ if (! (fs = Xmalloc (sizeof (XFontStruct)))) {
- _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
-@@ -521,14 +521,14 @@ _XF86BigfontQueryFont (
-
- nbytes = reply.nUniqCharInfos * SIZEOF(xCharInfo)
- + (reply.nCharInfos+1)/2 * 2 * sizeof(CARD16);
-- pUniqCI = (xCharInfo *) Xmalloc (nbytes);
-+ pUniqCI = Xmalloc (nbytes);
- if (!pUniqCI) {
- if (fs->properties) Xfree((char *) fs->properties);
- Xfree((char *) fs);
- _XEatDataWords(dpy, reply_left);
- return (XFontStruct *)NULL;
- }
-- if (! (fs->per_char = (XCharStruct *) Xmalloc (reply.nCharInfos * sizeof(XCharStruct)))) {
-+ if (! (fs->per_char = Xmalloc (reply.nCharInfos * sizeof(XCharStruct)))) {
- Xfree((char *) pUniqCI);
- if (fs->properties) Xfree((char *) fs->properties);
- Xfree((char *) fs);
-@@ -555,7 +555,7 @@ _XF86BigfontQueryFont (
- XEDataObject fs_union;
- char *addr;
-
-- pData = (XExtData *) Xmalloc(sizeof(XExtData));
-+ pData = Xmalloc(sizeof(XExtData));
- if (!pData) {
- if (fs->properties) Xfree((char *) fs->properties);
- Xfree((char *) fs);
-diff --git a/src/GetAtomNm.c b/src/GetAtomNm.c
-index 996f7eb..32de50d 100644
---- a/src/GetAtomNm.c
-+++ b/src/GetAtomNm.c
-@@ -46,7 +46,7 @@ char *_XGetAtomName(
- for (idx = TABLESIZE; --idx >= 0; ) {
- if ((e = *table++) && (e->atom == atom)) {
- idx = strlen(EntryName(e)) + 1;
-- if ((name = (char *)Xmalloc(idx)))
-+ if ((name = Xmalloc(idx)))
- strcpy(name, EntryName(e));
- return name;
- }
-@@ -73,7 +73,7 @@ char *XGetAtomName(
- SyncHandle();
- return(NULL);
- }
-- if ((name = (char *) Xmalloc(rep.nameLength+1))) {
-+ if ((name = Xmalloc(rep.nameLength + 1))) {
- _XReadPad(dpy, name, (long)rep.nameLength);
- name[rep.nameLength] = '\0';
- _XUpdateAtomCache(dpy, name, atom, 0, -1, 0);
-@@ -124,7 +124,7 @@ Bool _XGetAtomNameHandler(
- _XGetAsyncReply(dpy, (char *)&replbuf, rep, buf, len,
- (SIZEOF(xGetAtomNameReply) - SIZEOF(xReply)) >> 2,
- False);
-- state->names[state->idx] = (char *) Xmalloc(repl->nameLength+1);
-+ state->names[state->idx] = Xmalloc(repl->nameLength + 1);
- _XGetAsyncData(dpy, state->names[state->idx], buf, len,
- SIZEOF(xGetAtomNameReply), repl->nameLength,
- repl->length << 2);
-@@ -170,7 +170,7 @@ XGetAtomNames (
- }
- if (missed >= 0) {
- if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
-- if ((names_return[missed] = (char *) Xmalloc(rep.nameLength+1))) {
-+ if ((names_return[missed] = Xmalloc(rep.nameLength + 1))) {
- _XReadPad(dpy, names_return[missed], (long)rep.nameLength);
- names_return[missed][rep.nameLength] = '\0';
- _XUpdateAtomCache(dpy, names_return[missed], atoms[missed],
-diff --git a/src/GetHints.c b/src/GetHints.c
-index 4800fe7..3c410d3 100644
---- a/src/GetHints.c
-+++ b/src/GetHints.c
-@@ -128,7 +128,7 @@ XWMHints *XGetWMHints (
- return(NULL);
- }
- /* static copies not allowed in library, due to reentrancy constraint*/
-- if ((hints = (XWMHints *) Xcalloc (1, (unsigned) sizeof(XWMHints)))) {
-+ if ((hints = Xcalloc (1, sizeof(XWMHints)))) {
- hints->flags = prop->flags;
- hints->input = (prop->input ? True : False);
- hints->initial_state = cvtINT32toInt (prop->initialState);
-@@ -203,8 +203,7 @@ Status XGetIconSizes (
- /* static copies not allowed in library, due to reentrancy constraint*/
-
- nitems /= NumPropIconSizeElements;
-- if (! (hp = hints = (XIconSize *)
-- Xcalloc ((unsigned) nitems, (unsigned) sizeof(XIconSize)))) {
-+ if (! (hp = hints = Xcalloc (nitems, sizeof(XIconSize)))) {
- if (prop) Xfree ((char *) prop);
- return 0;
- }
-@@ -317,14 +316,14 @@ XGetClassHint(
-
- if ( (actual_type == XA_STRING) && (actual_format == 8) ) {
- len_name = strlen((char *) data);
-- if (! (classhint->res_name = Xmalloc((unsigned) (len_name+1)))) {
-+ if (! (classhint->res_name = Xmalloc(len_name + 1))) {
- Xfree((char *) data);
- return (0);
- }
- strcpy(classhint->res_name, (char *) data);
- if (len_name == nitems) len_name--;
- len_class = strlen((char *) (data+len_name+1));
-- if (! (classhint->res_class = Xmalloc((unsigned) (len_class+1)))) {
-+ if (! (classhint->res_class = Xmalloc(len_class + 1))) {
- Xfree(classhint->res_name);
- classhint->res_name = (char *) NULL;
- Xfree((char *) data);
-diff --git a/src/GetRGBCMap.c b/src/GetRGBCMap.c
-index 9e227a2..2f0b752 100644
---- a/src/GetRGBCMap.c
-+++ b/src/GetRGBCMap.c
-@@ -99,8 +99,7 @@ Status XGetRGBColormaps (
- /*
- * allocate array
- */
-- cmaps = (XStandardColormap *) Xmalloc (ncmaps *
-- sizeof (XStandardColormap));
-+ cmaps = Xmalloc (ncmaps * sizeof (XStandardColormap));
- if (!cmaps) {
- if (data) Xfree ((char *) data);
- return False;
-diff --git a/src/ImUtil.c b/src/ImUtil.c
-index fa8d464..240a261 100644
---- a/src/ImUtil.c
-+++ b/src/ImUtil.c
-@@ -332,7 +332,7 @@ XImage *XCreateImage (
- (xpad != 8 && xpad != 16 && xpad != 32) ||
- offset < 0)
- return (XImage *) NULL;
-- if ((image = (XImage *) Xcalloc(1, (unsigned) sizeof(XImage))) == NULL)
-+ if ((image = Xcalloc(1, sizeof(XImage))) == NULL)
- return (XImage *) NULL;
-
- image->width = width;
-@@ -842,7 +842,7 @@ static XImage *_XSubImage (
- register unsigned long pixel;
- char *data;
-
-- if ((subimage = (XImage *) Xcalloc (1, sizeof (XImage))) == NULL)
-+ if ((subimage = Xcalloc (1, sizeof (XImage))) == NULL)
- return (XImage *) NULL;
- subimage->width = width;
- subimage->height = height;
-@@ -868,7 +868,7 @@ static XImage *_XSubImage (
- _XInitImageFuncPtrs (subimage);
- dsize = subimage->bytes_per_line * height;
- if (subimage->format == XYPixmap) dsize = dsize * subimage->depth;
-- if (((data = Xcalloc (1, (unsigned) dsize)) == NULL) && (dsize > 0)) {
-+ if (((data = Xcalloc (1, dsize)) == NULL) && (dsize > 0)) {
- Xfree((char *) subimage);
- return (XImage *) NULL;
- }
-diff --git a/src/InitExt.c b/src/InitExt.c
-index 19515cc..75991bd 100644
---- a/src/InitExt.c
-+++ b/src/InitExt.c
-@@ -49,7 +49,7 @@ XExtCodes *XInitExtension (
- &codes.first_error)) return (NULL);
-
- LockDisplay (dpy);
-- if (! (ext = (_XExtension *) Xcalloc (1, sizeof (_XExtension))) ||
-+ if (! (ext = Xcalloc (1, sizeof (_XExtension))) ||
- ! (ext->name = strdup(name))) {
- if (ext) Xfree((char *) ext);
- UnlockDisplay(dpy);
-@@ -71,7 +71,7 @@ XExtCodes *XAddExtension (Display *dpy)
- register _XExtension *ext;
-
- LockDisplay (dpy);
-- if (! (ext = (_XExtension *) Xcalloc (1, sizeof (_XExtension)))) {
-+ if (! (ext = Xcalloc (1, sizeof (_XExtension)))) {
- UnlockDisplay(dpy);
- return (XExtCodes *) NULL;
- }
-diff --git a/src/IntAtom.c b/src/IntAtom.c
-index 7a56258..25466ca 100644
---- a/src/IntAtom.c
-+++ b/src/IntAtom.c
-@@ -72,7 +72,7 @@ Atom _XInternAtom(
-
- /* look in the cache first */
- if (!(atoms = dpy->atoms)) {
-- dpy->atoms = atoms = (AtomTable *)Xcalloc(1, sizeof(AtomTable));
-+ dpy->atoms = atoms = Xcalloc(1, sizeof(AtomTable));
- dpy->free_funcs->atoms = _XFreeAtomTable;
- }
- sig = 0;
-@@ -127,7 +127,7 @@ _XUpdateAtomCache(
-
- if (!dpy->atoms) {
- if (idx < 0) {
-- dpy->atoms = (AtomTable *)Xcalloc(1, sizeof(AtomTable));
-+ dpy->atoms = Xcalloc(1, sizeof(AtomTable));
- dpy->free_funcs->atoms = _XFreeAtomTable;
- }
- if (!dpy->atoms)
-@@ -147,7 +147,7 @@ _XUpdateAtomCache(
- }
- }
- }
-- e = (Entry)Xmalloc(sizeof(EntryRec) + n + 1);
-+ e = Xmalloc(sizeof(EntryRec) + n + 1);
- if (e) {
- e->sig = sig;
- e->atom = atom;
-diff --git a/src/KeyBind.c b/src/KeyBind.c
-index f22feca..2110772 100644
---- a/src/KeyBind.c
-+++ b/src/KeyBind.c
-@@ -997,11 +997,9 @@ XRebindKeysym (
- tmp = dpy->key_bindings;
- nb = sizeof(KeySym) * nm;
-
-- if ((! (p = (struct _XKeytrans *) Xcalloc( 1, sizeof(struct _XKeytrans)))) ||
-- ((! (p->string = (char *) Xmalloc( (unsigned) nbytes))) &&
-- (nbytes > 0)) ||
-- ((! (p->modifiers = (KeySym *) Xmalloc( (unsigned) nb))) &&
-- (nb > 0))) {
-+ if ((! (p = Xcalloc( 1, sizeof(struct _XKeytrans)))) ||
-+ ((! (p->string = Xmalloc(nbytes))) && (nbytes > 0)) ||
-+ ((! (p->modifiers = Xmalloc(nb))) && (nb > 0))) {
- if (p) {
- if (p->string) Xfree(p->string);
- if (p->modifiers) Xfree((char *) p->modifiers);
-diff --git a/src/ModMap.c b/src/ModMap.c
-index 122ca80..5c5b426 100644
---- a/src/ModMap.c
-+++ b/src/ModMap.c
-@@ -97,11 +97,11 @@ XSetModifierMapping(
- XModifierKeymap *
- XNewModifiermap(int keyspermodifier)
- {
-- XModifierKeymap *res = (XModifierKeymap *) Xmalloc((sizeof (XModifierKeymap)));
-+ XModifierKeymap *res = Xmalloc((sizeof (XModifierKeymap)));
- if (res) {
- res->max_keypermod = keyspermodifier;
- res->modifiermap = (keyspermodifier > 0 ?
-- (KeyCode *) Xmalloc((unsigned) (8 * keyspermodifier))
-+ Xmalloc(8 * keyspermodifier)
- : (KeyCode *) NULL);
- if (keyspermodifier && (res->modifiermap == NULL)) {
- Xfree((char *) res);
-diff --git a/src/OpenDis.c b/src/OpenDis.c
-index 0bf1b91..7318ad9 100644
---- a/src/OpenDis.c
-+++ b/src/OpenDis.c
-@@ -112,7 +112,7 @@ XOpenDisplay (
- /*
- * Attempt to allocate a display structure. Return NULL if allocation fails.
- */
-- if ((dpy = (Display *)Xcalloc(1, sizeof(Display))) == NULL) {
-+ if ((dpy = Xcalloc(1, sizeof(Display))) == NULL) {
- return(NULL);
- }
-
-@@ -246,9 +246,7 @@ XOpenDisplay (
- dpy->qlen = 0;
-
- /* Set up free-function record */
-- if ((dpy->free_funcs = (_XFreeFuncRec *)Xcalloc(1,
-- sizeof(_XFreeFuncRec)))
-- == NULL) {
-+ if ((dpy->free_funcs = Xcalloc(1, sizeof(_XFreeFuncRec))) == NULL) {
- OutOfMemory (dpy);
- return(NULL);
- }
-@@ -316,7 +314,7 @@ XOpenDisplay (
- return (NULL);
- }
-
-- dpy->vendor = (char *) Xmalloc((unsigned) (u.setup->nbytesVendor + 1));
-+ dpy->vendor = Xmalloc(u.setup->nbytesVendor + 1);
- if (dpy->vendor == NULL) {
- OutOfMemory(dpy);
- return (NULL);
-@@ -342,9 +340,7 @@ XOpenDisplay (
- /*
- * Now iterate down setup information.....
- */
-- dpy->pixmap_format =
-- (ScreenFormat *)Xmalloc(
-- (unsigned) (dpy->nformats *sizeof(ScreenFormat)));
-+ dpy->pixmap_format = Xmalloc(dpy->nformats * sizeof(ScreenFormat));
- if (dpy->pixmap_format == NULL) {
- OutOfMemory (dpy);
- return(NULL);
-@@ -372,8 +368,7 @@ XOpenDisplay (
- /*
- * next the Screen structures.
- */
-- dpy->screens =
-- (Screen *)Xmalloc((unsigned) dpy->nscreens*sizeof(Screen));
-+ dpy->screens = Xmalloc(dpy->nscreens * sizeof(Screen));
- if (dpy->screens == NULL) {
- OutOfMemory (dpy);
- return(NULL);
-@@ -415,8 +410,7 @@ XOpenDisplay (
- /*
- * lets set up the depth structures.
- */
-- sp->depths = (Depth *)Xmalloc(
-- (unsigned)sp->ndepths*sizeof(Depth));
-+ sp->depths = Xmalloc(sp->ndepths * sizeof(Depth));
- if (sp->depths == NULL) {
- OutOfMemory (dpy);
- return(NULL);
-@@ -438,8 +432,7 @@ XOpenDisplay (
- dp->nvisuals = u.dp->nVisuals;
- u.dp = (xDepth *) (((char *) u.dp) + sz_xDepth);
- if (dp->nvisuals > 0) {
-- dp->visuals =
-- (Visual *)Xmalloc((unsigned)dp->nvisuals*sizeof(Visual));
-+ dp->visuals = Xmalloc(dp->nvisuals * sizeof(Visual));
- if (dp->visuals == NULL) {
- OutOfMemory (dpy);
- return(NULL);
-diff --git a/src/PixFormats.c b/src/PixFormats.c
-index 8e4a100..6d9f64d 100644
---- a/src/PixFormats.c
-+++ b/src/PixFormats.c
-@@ -38,8 +38,8 @@ XPixmapFormatValues *XListPixmapFormats (
- Display *dpy,
- int *count) /* RETURN */
- {
-- XPixmapFormatValues *formats = (XPixmapFormatValues *)
-- Xmalloc((unsigned) (dpy->nformats * sizeof (XPixmapFormatValues)));
-+ XPixmapFormatValues *formats =
-+ Xmalloc(dpy->nformats * sizeof (XPixmapFormatValues));
-
- if (formats) {
- register int i;
-diff --git a/src/PolyReg.c b/src/PolyReg.c
-index 74c8765..6d02773 100644
---- a/src/PolyReg.c
-+++ b/src/PolyReg.c
-@@ -95,8 +95,7 @@ InsertEdgeInET(
- {
- if (*iSLLBlock > SLLSPERBLOCK-1)
- {
-- tmpSLLBlock =
-- (ScanLineListBlock *)Xmalloc(sizeof(ScanLineListBlock));
-+ tmpSLLBlock = Xmalloc(sizeof(ScanLineListBlock));
- (*SLLBlock)->next = tmpSLLBlock;
- tmpSLLBlock->next = (ScanLineListBlock *)NULL;
- *SLLBlock = tmpSLLBlock;
-@@ -410,8 +409,7 @@ static int PtsToRegion(
-
- numRects = ((numFullPtBlocks * NUMPTSTOBUFFER) + iCurPtBlock) >> 1;
-
-- if (!(reg->rects = (BOX *)Xrealloc((char *)reg->rects,
-- (unsigned) (sizeof(BOX) * numRects)))) {
-+ if (!(reg->rects = Xrealloc(reg->rects, sizeof(BOX) * numRects))) {
- Xfree(prevRects);
- return(0);
- }
-@@ -521,8 +519,7 @@ XPolygonRegion(
-
- if (Count < 2) return region;
-
-- if (! (pETEs = (EdgeTableEntry *)
-- Xmalloc((unsigned) (sizeof(EdgeTableEntry) * Count)))) {
-+ if (! (pETEs = Xmalloc(sizeof(EdgeTableEntry) * Count))) {
- XDestroyRegion(region);
- return (Region) NULL;
- }
-@@ -559,7 +556,7 @@ XPolygonRegion(
- * send out the buffer
- */
- if (iPts == NUMPTSTOBUFFER) {
-- tmpPtBlock = (POINTBLOCK *)Xmalloc(sizeof(POINTBLOCK));
-+ tmpPtBlock = Xmalloc(sizeof(POINTBLOCK));
- curPtBlock->next = tmpPtBlock;
- curPtBlock = tmpPtBlock;
- pts = curPtBlock->pts;
-@@ -605,7 +602,7 @@ XPolygonRegion(
- * send out the buffer
- */
- if (iPts == NUMPTSTOBUFFER) {
-- tmpPtBlock = (POINTBLOCK *)Xmalloc(sizeof(POINTBLOCK));
-+ tmpPtBlock = Xmalloc(sizeof(POINTBLOCK));
- curPtBlock->next = tmpPtBlock;
- curPtBlock = tmpPtBlock;
- pts = curPtBlock->pts;
-diff --git a/src/PropAlloc.c b/src/PropAlloc.c
-index 5162830..87817d8 100644
---- a/src/PropAlloc.c
-+++ b/src/PropAlloc.c
-@@ -39,20 +39,19 @@ in this Software without prior written authorization from The Open Group.
-
- XSizeHints *XAllocSizeHints (void)
- {
-- return ((XSizeHints *) Xcalloc (1, (unsigned) sizeof (XSizeHints)));
-+ return Xcalloc (1, sizeof (XSizeHints));
- }
-
-
- XStandardColormap *XAllocStandardColormap (void)
- {
-- return ((XStandardColormap *)
-- Xcalloc (1, (unsigned) sizeof (XStandardColormap)));
-+ return Xcalloc (1, sizeof (XStandardColormap));
- }
-
-
- XWMHints *XAllocWMHints (void)
- {
-- return ((XWMHints *) Xcalloc (1, (unsigned) sizeof (XWMHints)));
-+ return Xcalloc (1, sizeof (XWMHints));
- }
-
-
-@@ -64,7 +63,7 @@ XClassHint *XAllocClassHint (void)
-
- XIconSize *XAllocIconSize (void)
- {
-- return ((XIconSize *) Xcalloc (1, (unsigned) sizeof (XIconSize)));
-+ return Xcalloc (1, sizeof (XIconSize));
- }
-
-
-diff --git a/src/PutBEvent.c b/src/PutBEvent.c
-index f9d4c29..1768e03 100644
---- a/src/PutBEvent.c
-+++ b/src/PutBEvent.c
-@@ -41,7 +41,7 @@ _XPutBackEvent (
- XEvent store = *event;
-
- if (!dpy->qfree) {
-- if ((dpy->qfree = (_XQEvent *) Xmalloc (sizeof (_XQEvent))) == NULL) {
-+ if ((dpy->qfree = Xmalloc (sizeof (_XQEvent))) == NULL) {
- return 0;
- }
- dpy->qfree->next = NULL;
-diff --git a/src/PutImage.c b/src/PutImage.c
-index 6dad4f1..2a694f0 100644
---- a/src/PutImage.c
-+++ b/src/PutImage.c
-@@ -680,7 +680,7 @@ SendXYImage(
-
- length = ROUNDUP(length, 4);
- if ((dpy->bufptr + length) > dpy->bufmax) {
-- if ((buf = _XAllocScratch(dpy, (unsigned long) (length))) == NULL) {
-+ if ((buf = _XAllocScratch(dpy, length)) == NULL) {
- UnGetReq(PutImage);
- return;
- }
-@@ -703,13 +703,13 @@ SendXYImage(
- bytes_per_temp_plane = bytes_per_line * req->height;
- temp_length = ROUNDUP(bytes_per_temp_plane * image->depth, 4);
- if (buf == dpy->bufptr) {
-- if (! (temp = _XAllocScratch(dpy, (unsigned long) temp_length))) {
-+ if (! (temp = _XAllocScratch(dpy, temp_length))) {
- UnGetReq(PutImage);
- return;
- }
- }
- else
-- if ((extra = temp = Xmalloc((unsigned) temp_length)) == NULL) {
-+ if ((extra = temp = Xmalloc(temp_length)) == NULL) {
- UnGetReq(PutImage);
- return;
- }
-@@ -778,8 +778,7 @@ SendZImage(
- (req_yoffset * image->bytes_per_line) +
- ((req_xoffset * image->bits_per_pixel) >> 3);
- if ((image->bits_per_pixel == 4) && ((unsigned int) req_xoffset & 0x01)) {
-- if (! (shifted_src = (unsigned char *)
-- Xmalloc((unsigned) (req->height * image->bytes_per_line)))) {
-+ if (! (shifted_src = Xmalloc(req->height * image->bytes_per_line))) {
- UnGetReq(PutImage);
- return;
- }
-@@ -810,7 +809,7 @@ SendZImage(
- dest = (unsigned char *)dpy->bufptr;
- else
- if ((dest = (unsigned char *)
-- _XAllocScratch(dpy, (unsigned long)(length))) == NULL) {
-+ _XAllocScratch(dpy, length)) == NULL) {
- if (shifted_src) Xfree((char *) shifted_src);
- UnGetReq(PutImage);
- return;
-@@ -1001,7 +1000,7 @@ XPutImage (
- img.bits_per_pixel = dest_bits_per_pixel;
- img.bytes_per_line = ROUNDUP((dest_bits_per_pixel * width),
- dest_scanline_pad) >> 3;
-- img.data = Xmalloc((unsigned) (img.bytes_per_line * height));
-+ img.data = Xmalloc(img.bytes_per_line * height);
- if (img.data == NULL)
- return 0;
- _XInitImageFuncPtrs(&img);
-diff --git a/src/Quarks.c b/src/Quarks.c
-index 4eb90c5..60fe127 100644
---- a/src/Quarks.c
-+++ b/src/Quarks.c
-@@ -186,15 +186,14 @@ ExpandQuarkTable(void)
- newmask = (oldmask << 1) + 1;
- else {
- if (!stringTable) {
-- stringTable = (XrmString **)Xmalloc(sizeof(XrmString *) *
-- CHUNKPER);
-+ stringTable = Xmalloc(sizeof(XrmString *) * CHUNKPER);
- if (!stringTable)
- return False;
- stringTable[0] = (XrmString *)NULL;
- }
- #ifdef PERMQ
- if (!permTable)
-- permTable = (Bits **)Xmalloc(sizeof(Bits *) * CHUNKPER);
-+ permTable = Xmalloc(sizeof(Bits *) * CHUNKPER);
- if (!permTable)
- return False;
- #endif
-@@ -289,13 +288,13 @@ nomatch: if (!rehash)
- q = nextQuark;
- if (!(q & QUANTUMMASK)) {
- if (!(q & CHUNKMASK)) {
-- if (!(new = Xrealloc((char *)stringTable,
-+ if (!(new = Xrealloc(stringTable,
- sizeof(XrmString *) *
- ((q >> QUANTUMSHIFT) + CHUNKPER))))
- goto fail;
- stringTable = (XrmString **)new;
- #ifdef PERMQ
-- if (!(new = Xrealloc((char *)permTable,
-+ if (!(new = Xrealloc(permTable,
- sizeof(Bits *) *
- ((q >> QUANTUMSHIFT) + CHUNKPER))))
- goto fail;
-diff --git a/src/RdBitF.c b/src/RdBitF.c
-index ab7d800..727204f 100644
---- a/src/RdBitF.c
-+++ b/src/RdBitF.c
-@@ -191,7 +191,7 @@ XReadBitmapFileData (
- bytes_per_line = (ww+7)/8 + padding;
-
- size = bytes_per_line * hh;
-- bits = (unsigned char *) Xmalloc ((unsigned int) size);
-+ bits = Xmalloc (size);
- if (!bits)
- RETURN (BitmapNoMemory);
-
-diff --git a/src/Region.c b/src/Region.c
-index 41047b2..d3d431a 100644
---- a/src/Region.c
-+++ b/src/Region.c
-@@ -139,9 +139,9 @@ XCreateRegion(void)
- {
- Region temp;
-
-- if (! (temp = ( Region )Xmalloc( (unsigned) sizeof( REGION ))))
-+ if (! (temp = Xmalloc(sizeof( REGION ))))
- return (Region) NULL;
-- if (! (temp->rects = ( BOX * )Xmalloc( (unsigned) sizeof( BOX )))) {
-+ if (! (temp->rects = Xmalloc(sizeof( BOX )))) {
- Xfree((char *) temp);
- return (Region) NULL;
- }
-@@ -521,9 +521,9 @@ miRegionCopy(
- {
- BOX *prevRects = dstrgn->rects;
-
-- if (! (dstrgn->rects = (BOX *)
-- Xrealloc((char *) dstrgn->rects,
-- (unsigned) rgn->numRects * (sizeof(BOX))))) {
-+ dstrgn->rects = Xrealloc(dstrgn->rects,
-+ rgn->numRects * (sizeof(BOX)));
-+ if (! dstrgn->rects) {
- Xfree(prevRects);
- return;
- }
-@@ -788,8 +788,7 @@ miRegionOp(
- */
- newReg->size = max(reg1->numRects,reg2->numRects) * 2;
-
-- if (! (newReg->rects = (BoxPtr)
-- Xmalloc ((unsigned) (sizeof(BoxRec) * newReg->size)))) {
-+ if (! (newReg->rects = Xmalloc (sizeof(BoxRec) * newReg->size))) {
- newReg->size = 0;
- return;
- }
-@@ -980,8 +979,8 @@ miRegionOp(
- {
- BoxPtr prev_rects = newReg->rects;
- newReg->size = newReg->numRects;
-- newReg->rects = (BoxPtr) Xrealloc ((char *) newReg->rects,
-- (unsigned) (sizeof(BoxRec) * newReg->size));
-+ newReg->rects = Xrealloc (newReg->rects,
-+ sizeof(BoxRec) * newReg->size);
- if (! newReg->rects)
- newReg->rects = prev_rects;
- }
-@@ -993,7 +992,7 @@ miRegionOp(
- */
- newReg->size = 1;
- Xfree((char *) newReg->rects);
-- newReg->rects = (BoxPtr) Xmalloc(sizeof(BoxRec));
-+ newReg->rects = Xmalloc(sizeof(BoxRec));
- }
- }
- Xfree ((char *) oldRects);
-diff --git a/src/RegstFlt.c b/src/RegstFlt.c
-index 9a560e7..5a1faa7 100644
---- a/src/RegstFlt.c
-+++ b/src/RegstFlt.c
-@@ -85,7 +85,7 @@ _XRegisterFilterByMask(
- {
- XFilterEventRec *rec;
-
-- rec = (XFilterEventList)Xmalloc(sizeof(XFilterEventRec));
-+ rec = Xmalloc(sizeof(XFilterEventRec));
- if (!rec)
- return;
- rec->window = window;
-@@ -117,7 +117,7 @@ _XRegisterFilterByType(
- {
- XFilterEventRec *rec;
-
-- rec = (XFilterEventList)Xmalloc(sizeof(XFilterEventRec));
-+ rec = Xmalloc(sizeof(XFilterEventRec));
- if (!rec)
- return;
- rec->window = window;
-diff --git a/src/SetFPath.c b/src/SetFPath.c
-index 89955c2..b1afd82 100644
---- a/src/SetFPath.c
-+++ b/src/SetFPath.c
-@@ -52,7 +52,7 @@ XSetFontPath (
- }
- nbytes = (n + 3) & ~3;
- req->length += nbytes >> 2;
-- if ((p = (char *) Xmalloc ((unsigned) nbytes))) {
-+ if ((p = Xmalloc (nbytes))) {
- /*
- * pack into counted strings.
- */
-diff --git a/src/SetHints.c b/src/SetHints.c
-index 1cde48f..0ae0764 100644
---- a/src/SetHints.c
-+++ b/src/SetHints.c
-@@ -184,7 +184,7 @@ XSetIconSizes (
- #define size_of_the_real_thing sizeof /* avoid grepping screwups */
- unsigned nbytes = count * size_of_the_real_thing(xPropIconSize);
- #undef size_of_the_real_thing
-- if ((prop = pp = (xPropIconSize *) Xmalloc (nbytes))) {
-+ if ((prop = pp = Xmalloc (nbytes))) {
- for (i = 0; i < count; i++) {
- pp->minWidth = list->min_width;
- pp->minHeight = list->min_height;
-@@ -216,7 +216,7 @@ XSetCommand (
- for (i = 0, nbytes = 0; i < argc; i++) {
- nbytes += safestrlen(argv[i]) + 1;
- }
-- if ((bp = buf = Xmalloc((unsigned) nbytes))) {
-+ if ((bp = buf = Xmalloc(nbytes))) {
- /* copy arguments into single buffer */
- for (i = 0; i < argc; i++) {
- if (argv[i]) {
-@@ -299,7 +299,7 @@ XSetClassHint(
-
- len_nm = safestrlen(classhint->res_name);
- len_cl = safestrlen(classhint->res_class);
-- if ((class_string = s = Xmalloc((unsigned) (len_nm + len_cl + 2)))) {
-+ if ((class_string = s = Xmalloc(len_nm + len_cl + 2))) {
- if (len_nm) {
- strcpy(s, classhint->res_name);
- s += len_nm + 1;
-diff --git a/src/StrToText.c b/src/StrToText.c
-index b5327e8..ef927f3 100644
---- a/src/StrToText.c
-+++ b/src/StrToText.c
-@@ -78,7 +78,7 @@ Status XStringListToTextProperty (
- }
- }
- } else {
-- proto.value = (unsigned char *) Xmalloc (1); /* easier for client */
-+ proto.value = Xmalloc (1); /* easier for client */
- if (!proto.value) return False;
-
- proto.value[0] = '\0';
-diff --git a/src/TextToStr.c b/src/TextToStr.c
-index 216391c..36d9f07 100644
---- a/src/TextToStr.c
-+++ b/src/TextToStr.c
-@@ -72,10 +72,10 @@ Status XTextPropertyToStringList (
- /*
- * allocate list and duplicate
- */
-- list = (char **) Xmalloc (nelements * sizeof (char *));
-+ list = Xmalloc (nelements * sizeof (char *));
- if (!list) return False;
-
-- start = (char *) Xmalloc ((datalen + 1) * sizeof (char)); /* for <NUL> */
-+ start = Xmalloc ((datalen + 1) * sizeof (char)); /* for <NUL> */
- if (!start) {
- Xfree ((char *) list);
- return False;
-diff --git a/src/VisUtil.c b/src/VisUtil.c
-index 3434c01..aa67992 100644
---- a/src/VisUtil.c
-+++ b/src/VisUtil.c
-@@ -75,8 +75,7 @@ XVisualInfo *XGetVisualInfo(
-
- count = 0;
- total = 10;
-- if (! (vip_base = vip = (XVisualInfo *)
-- Xmalloc((unsigned) (sizeof(XVisualInfo) * total)))) {
-+ if (! (vip_base = vip = Xmalloc(sizeof(XVisualInfo) * total))) {
- UnlockDisplay(dpy);
- return (XVisualInfo *) NULL;
- }
-@@ -132,9 +131,8 @@ XVisualInfo *XGetVisualInfo(
- {
- XVisualInfo *old_vip_base = vip_base;
- total += 10;
-- if (! (vip_base = (XVisualInfo *)
-- Xrealloc((char *) vip_base,
-- (unsigned) (sizeof(XVisualInfo) * total)))) {
-+ if (! (vip_base = Xrealloc(vip_base,
-+ sizeof(XVisualInfo) * total))) {
- Xfree((char *) old_vip_base);
- UnlockDisplay(dpy);
- return (XVisualInfo *) NULL;
-diff --git a/src/WrBitF.c b/src/WrBitF.c
-index 1ec6280..75a93a7 100644
---- a/src/WrBitF.c
-+++ b/src/WrBitF.c
-@@ -53,7 +53,7 @@ static char *Format_Image(
- bytes_per_line = (width+7)/8;
- *resultsize = bytes_per_line * height; /* Calculate size of data */
-
-- data = (char *) Xmalloc( *resultsize ); /* Get space for data */
-+ data = Xmalloc( *resultsize ); /* Get space for data */
- if (!data)
- return(ERR_RETURN);
-
-diff --git a/src/XlibInt.c b/src/XlibInt.c
-index 1c964fd..b06e57b 100644
---- a/src/XlibInt.c
-+++ b/src/XlibInt.c
-@@ -152,7 +152,7 @@ Bool _XPollfdCacheInit(
- #ifdef USE_POLL
- struct pollfd *pfp;
-
-- pfp = (struct pollfd *)Xmalloc(POLLFD_CACHE_SIZE * sizeof(struct pollfd));
-+ pfp = Xmalloc(POLLFD_CACHE_SIZE * sizeof(struct pollfd));
- if (!pfp)
- return False;
- pfp[0].fd = dpy->fd;
-@@ -374,10 +374,10 @@ _XRegisterInternalConnection(
- struct _XConnWatchInfo *watchers;
- XPointer *wd;
-
-- new_conni = (struct _XConnectionInfo*)Xmalloc(sizeof(struct _XConnectionInfo));
-+ new_conni = Xmalloc(sizeof(struct _XConnectionInfo));
- if (!new_conni)
- return 0;
-- new_conni->watch_data = (XPointer *)Xmalloc(dpy->watcher_count * sizeof(XPointer));
-+ new_conni->watch_data = Xmalloc(dpy->watcher_count * sizeof(XPointer));
- if (!new_conni->watch_data) {
- Xfree(new_conni);
- return 0;
-@@ -464,7 +464,7 @@ XInternalConnectionNumbers(
- count = 0;
- for (info_list=dpy->im_fd_info; info_list; info_list=info_list->next)
- count++;
-- fd_list = (int*) Xmalloc (count * sizeof(int));
-+ fd_list = Xmalloc (count * sizeof(int));
- if (!fd_list) {
- UnlockDisplay(dpy);
- return 0;
-@@ -537,9 +537,8 @@ XAddConnectionWatch(
-
- /* allocate new watch data */
- for (info_list=dpy->im_fd_info; info_list; info_list=info_list->next) {
-- wd_array = (XPointer *)Xrealloc((char *)info_list->watch_data,
-- (dpy->watcher_count + 1) *
-- sizeof(XPointer));
-+ wd_array = Xrealloc(info_list->watch_data,
-+ (dpy->watcher_count + 1) * sizeof(XPointer));
- if (!wd_array) {
- UnlockDisplay(dpy);
- return 0;
-@@ -548,7 +547,7 @@ XAddConnectionWatch(
- wd_array[dpy->watcher_count] = NULL; /* for cleanliness */
- }
-
-- new_watcher = (struct _XConnWatchInfo*)Xmalloc(sizeof(struct _XConnWatchInfo));
-+ new_watcher = Xmalloc(sizeof(struct _XConnWatchInfo));
- if (!new_watcher) {
- UnlockDisplay(dpy);
- return 0;
-@@ -756,8 +755,7 @@ void _XEnq(
- /* If dpy->qfree is non-NULL do this, else malloc a new one. */
- dpy->qfree = qelt->next;
- }
-- else if ((qelt =
-- (_XQEvent *) Xmalloc((unsigned)sizeof(_XQEvent))) == NULL) {
-+ else if ((qelt = Xmalloc(sizeof(_XQEvent))) == NULL) {
- /* Malloc call failed! */
- ESET(ENOMEM);
- _XIOError(dpy);
-@@ -1518,7 +1516,7 @@ char *_XAllocScratch(
- {
- if (nbytes > dpy->scratch_length) {
- if (dpy->scratch_buffer) Xfree (dpy->scratch_buffer);
-- if ((dpy->scratch_buffer = Xmalloc((unsigned) nbytes)))
-+ if ((dpy->scratch_buffer = Xmalloc(nbytes)))
- dpy->scratch_length = nbytes;
- else dpy->scratch_length = 0;
- }
-diff --git a/src/Xrm.c b/src/Xrm.c
-index 2c0c324..d8272ee 100644
---- a/src/Xrm.c
-+++ b/src/Xrm.c
-@@ -495,7 +495,7 @@ static XrmDatabase NewDatabase(void)
- {
- register XrmDatabase db;
-
-- db = (XrmDatabase) Xmalloc(sizeof(XrmHashBucketRec));
-+ db = Xmalloc(sizeof(XrmHashBucketRec));
- if (db) {
- _XCreateMutex(&db->linfo);
- db->table = (NTable)NULL;
-@@ -828,7 +828,7 @@ static void PutEntry(
- NTable *nprev, *firstpprev;
-
- #define NEWTABLE(q,i) \
-- table = (NTable)Xmalloc(sizeof(LTableRec)); \
-+ table = Xmalloc(sizeof(LTableRec)); \
- if (!table) \
- return; \
- table->name = q; \
-@@ -841,7 +841,7 @@ static void PutEntry(
- nprev = NodeBuckets(table); \
- } else { \
- table->leaf = 1; \
-- if (!(nprev = (NTable *)Xmalloc(sizeof(VEntry *)))) {\
-+ if (!(nprev = Xmalloc(sizeof(VEntry *)))) {\
- Xfree(table); \
- return; \
- } \
-@@ -955,9 +955,8 @@ static void PutEntry(
- prev = nprev;
- }
- /* now allocate the value entry */
-- entry = (VEntry)Xmalloc(((type == XrmQString) ?
-- sizeof(VEntryRec) : sizeof(DEntryRec)) +
-- value->size);
-+ entry = Xmalloc(((type == XrmQString) ?
-+ sizeof(VEntryRec) : sizeof(DEntryRec)) + value->size);
- if (!entry)
- return;
- entry->name = q = *quarks;
-@@ -987,13 +986,12 @@ static void PutEntry(
- if (resourceQuarks) {
- unsigned char *prevQuarks = resourceQuarks;
-
-- resourceQuarks = (unsigned char *)Xrealloc((char *)resourceQuarks,
-- size);
-+ resourceQuarks = Xrealloc(resourceQuarks, size);
- if (!resourceQuarks) {
- Xfree(prevQuarks);
- }
- } else
-- resourceQuarks = (unsigned char *)Xmalloc(size);
-+ resourceQuarks = Xmalloc(size);
- if (resourceQuarks) {
- bzero((char *)&resourceQuarks[oldsize], size - oldsize);
- maxResourceQuark = (size << 3) - 1;
-@@ -1138,11 +1136,11 @@ static void GetDatabase(
-
- str_len = strlen (str);
- if (DEF_BUFF_SIZE > str_len) lhs = lhs_s;
-- else if ((lhs = (char*) Xmalloc (str_len)) == NULL)
-+ else if ((lhs = Xmalloc (str_len)) == NULL)
- return;
-
- alloc_chars = DEF_BUFF_SIZE < str_len ? str_len : DEF_BUFF_SIZE;
-- if ((rhs = (char*) Xmalloc (alloc_chars)) == NULL) {
-+ if ((rhs = Xmalloc (alloc_chars)) == NULL) {
- if (lhs != lhs_s) Xfree (lhs);
- return;
- }
-diff --git a/src/locking.c b/src/locking.c
-index b3dfb3b..7c09c44 100644
---- a/src/locking.c
-+++ b/src/locking.c
-@@ -82,7 +82,7 @@ _Xthread_waiter(void)
- struct _xthread_waiter *me;
-
- if (!(me = TlsGetValue(_X_TlsIndex))) {
-- me = (struct _xthread_waiter *)xmalloc(sizeof(struct _xthread_waiter));
-+ me = xmalloc(sizeof(struct _xthread_waiter));
- me->sem = CreateSemaphore(NULL, 0, 1, NULL);
- me->next = NULL;
- TlsSetValue(_X_TlsIndex, me);
-@@ -249,7 +249,7 @@ static struct _XCVList *_XCreateCVL(
- dpy->lock->free_cvls = cvl->next;
- dpy->lock->num_free_cvls--;
- } else {
-- cvl = (struct _XCVList *)Xmalloc(sizeof(struct _XCVList));
-+ cvl = Xmalloc(sizeof(struct _XCVList));
- if (!cvl)
- return NULL;
- cvl->cv = xcondition_malloc();
-@@ -512,10 +512,10 @@ void _XUserUnlockDisplay(
- static int _XInitDisplayLock(
- Display *dpy)
- {
-- dpy->lock_fns = (struct _XLockPtrs*)Xmalloc(sizeof(struct _XLockPtrs));
-+ dpy->lock_fns = Xmalloc(sizeof(struct _XLockPtrs));
- if (dpy->lock_fns == NULL)
- return -1;
-- dpy->lock = (struct _XLockInfo *)Xmalloc(sizeof(struct _XLockInfo));
-+ dpy->lock = Xmalloc(sizeof(struct _XLockInfo));
- if (dpy->lock == NULL) {
- _XFreeDisplayLock(dpy);
- return -1;
-diff --git a/src/udcInf.c b/src/udcInf.c
-index b7577ac..9ecf156 100644
---- a/src/udcInf.c
-+++ b/src/udcInf.c
-@@ -145,12 +145,11 @@ int *num_codeset;
- if(!_XlcCompareISOLatin1(charset_str,buf)){
- num_ret += 1;
- if(num_ret == 1){
-- ret = (int *)Xmalloc(sizeof(int));
-+ ret = Xmalloc(sizeof(int));
- } else {
- int *prev_ret = ret;
-
-- ret =
-- (int *)Xrealloc(ret,num_ret*sizeof(int));
-+ ret = Xrealloc(ret, num_ret * sizeof(int));
- if (ret == NULL){
- Xfree(prev_ret);
- }
-@@ -272,7 +271,7 @@ int *num_gr;
- sprintf(buf, "fs%d.charset.udc_area", codeset-1);
- _XlcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
- if(count > 0){
-- udc = (_XUDCGlyphRegion *)Xmalloc(count * sizeof(_XUDCGlyphRegion));
-+ udc = Xmalloc(count * sizeof(_XUDCGlyphRegion));
- if(udc == NULL){
- _xudc_utyerrno = 0x03 ;
- _xudc_utyerrno |= (0x0b<<8) ;
-@@ -524,7 +523,7 @@ int *num_cr;
- return(ret);
- }
-
-- crr = (_XUDCCodeRegion *)Xmalloc(num_gr*sizeof(_XUDCCodeRegion));
-+ crr = Xmalloc(num_gr * sizeof(_XUDCCodeRegion));
- if(crr == NULL){
- Xfree(gr);
- _xudc_utyerrno = 0x03 ;
---
-1.7.9.2
-
-From 993349bf944ad312b0dd7096558fb8cfe1eff16b Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 16 Mar 2013 10:03:13 -0700
-Subject: [PATCH:libX11 36/38] Use calloc in XOpenDisplay to initialize
- structs containing pointers
-
-Prevents trying to free uninitialized pointers if we have to bail out
-partway through setup, such as if we receive a corrupted or incomplete
-connection setup block from the server.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/OpenDis.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/OpenDis.c b/src/OpenDis.c
-index 7318ad9..fc67d1a 100644
---- a/src/OpenDis.c
-+++ b/src/OpenDis.c
-@@ -340,7 +340,7 @@ XOpenDisplay (
- /*
- * Now iterate down setup information.....
- */
-- dpy->pixmap_format = Xmalloc(dpy->nformats * sizeof(ScreenFormat));
-+ dpy->pixmap_format = Xcalloc(dpy->nformats, sizeof(ScreenFormat));
- if (dpy->pixmap_format == NULL) {
- OutOfMemory (dpy);
- return(NULL);
-@@ -368,7 +368,7 @@ XOpenDisplay (
- /*
- * next the Screen structures.
- */
-- dpy->screens = Xmalloc(dpy->nscreens * sizeof(Screen));
-+ dpy->screens = Xcalloc(dpy->nscreens, sizeof(Screen));
- if (dpy->screens == NULL) {
- OutOfMemory (dpy);
- return(NULL);
-@@ -410,7 +410,7 @@ XOpenDisplay (
- /*
- * lets set up the depth structures.
- */
-- sp->depths = Xmalloc(sp->ndepths * sizeof(Depth));
-+ sp->depths = Xcalloc(sp->ndepths, sizeof(Depth));
- if (sp->depths == NULL) {
- OutOfMemory (dpy);
- return(NULL);
-@@ -432,7 +432,7 @@ XOpenDisplay (
- dp->nvisuals = u.dp->nVisuals;
- u.dp = (xDepth *) (((char *) u.dp) + sz_xDepth);
- if (dp->nvisuals > 0) {
-- dp->visuals = Xmalloc(dp->nvisuals * sizeof(Visual));
-+ dp->visuals = Xcalloc(dp->nvisuals, sizeof(Visual));
- if (dp->visuals == NULL) {
- OutOfMemory (dpy);
- return(NULL);
---
-1.7.9.2
-
--- a/open-src/lib/libX11/compose-el_GR.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-el_GR.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/el_GR.UTF-8/Compose.pre nls/el_GR.UTF-8/Compose.pre
---- nls/el_GR.UTF-8/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/el_GR.UTF-8/Compose.pre 2010-06-07 15:49:35.703893203 -0700
+diff --git a/nls/el_GR.UTF-8/Compose.pre b/nls/el_GR.UTF-8/Compose.pre
+index ad90337..834af21 100644
+--- a/nls/el_GR.UTF-8/Compose.pre
++++ b/nls/el_GR.UTF-8/Compose.pre
@@ -1,1981 +1,2680 @@
XCOMM
+XCOMM Copyright 1996, 2002, Oracle and/or its affiliates. All rights reserved.
@@ -1082,18 +1083,7 @@
+<diaeresis> <e> : "\xc3\xab" ediaeresis
+<diaeresis> <o> : "\xc3\xb6" odiaeresis
+<diaeresis> <u> : "\xc3\xbc" udiaeresis
- XCOMM
--XCOMM The definitions herein cover the following ISO 10646 / Unicode
--XCOMM ranges:
--XCOMM - Basic Latin (0000-007F) (complete coverage)
--XCOMM - Latin-1 Supplement (0080-00FF) (complete coverage)
--XCOMM - Greek and Coptic (0370-03FF) (only the big ISO 8859-7 based
--XCOMM part at the beginning)
--XCOMM - Greek Extended (1F00-1FFF) (complete coverage)
--XCOMM - There are also six (6) characters from other ranges.
--XCOMM Moreover, the following character sets are completely covered:
--XCOMM - ISO 8859-1
--XCOMM - ISO 8859-7
++XCOMM
+XCOMM Additional latin-2 sequences
+<Ukrainian_IE> : "\xd0\x84" Ukrainian_IE
+<Ukrainian_ie> : "\xd1\x94" Ukrainian_ie
@@ -1219,15 +1209,7 @@
+<Multi_key> <r> <apostrophe> : "\xc5\x95" racute
+<Multi_key> <u> <asterisk> : "\xc5\xaf" uring
+<Multi_key> <z> <apostrophe> : "\xc5\xba" zacute
- XCOMM
--XCOMM This file consists of four parts. Two of them have been adapted from
--XCOMM the iso8859-1/Compose and iso8859-7/Compose files. The other two
--XCOMM parts have been created by:
--XCOMM Vasilis Vasaitis <[email protected]>
--XCOMM based on the idea and initial implementation by:
--XCOMM Alejandros Diamandidis <[email protected]>
--
--XCOMM Part 1
++XCOMM
+XCOMM Latin-3 sequences
+<Multi_key> <C> <asciicircum> : "\xc4\x88" Ccircumflex
+<Multi_key> <asciicircum> <C> : "\xc4\x88" Ccircumflex
@@ -1300,6 +1282,434 @@
+<Multi_key> <breve> <u> : "\xc5\xad" ubreve
+<Multi_key> <u> <u> : "\xc5\xad" ubreve
XCOMM
+-XCOMM The definitions herein cover the following ISO 10646 / Unicode
+-XCOMM ranges:
+-XCOMM - Basic Latin (0000-007F) (complete coverage)
+-XCOMM - Latin-1 Supplement (0080-00FF) (complete coverage)
+-XCOMM - Greek and Coptic (0370-03FF) (only the big ISO 8859-7 based
+-XCOMM part at the beginning)
+-XCOMM - Greek Extended (1F00-1FFF) (complete coverage)
+-XCOMM - There are also six (6) characters from other ranges.
+-XCOMM Moreover, the following character sets are completely covered:
+-XCOMM - ISO 8859-1
+-XCOMM - ISO 8859-7
++XCOMM Latin-4 sequences
++<Multi_key> <N> <N> : "\xc5\x8a" ENG
++<Multi_key> <U> <a> : "\xc5\xb2" Uogonek
++<Multi_key> <u> <a> : "\xc5\xb3" uogonek
++<Multi_key> <k> <k> : "\xc4\xb8" kra
++<Multi_key> <R> <comma> : "\xc5\x96" Rcedilla
++<Multi_key> <comma> <R> : "\xc5\x96" Rcedilla
++<Multi_key> <r> <comma> : "\xc5\x97" rcedilla
++<Multi_key> <comma> <r> : "\xc5\x97" rcedilla
++<Multi_key> <I> <asciitilde> : "\xc4\xa8" Itilde
++<Multi_key> <asciitilde> <I> : "\xc4\xa8" Itilde
++<Multi_key> <i> <asciitilde> : "\xc4\xa9" itilde
++<Multi_key> <asciitilde> <i> : "\xc4\xa9" itilde
++<Multi_key> <L> <comma> : "\xc4\xbb" Lcedilla
++<Multi_key> <comma> <L> : "\xc4\xbb" Lcedilla
++<Multi_key> <l> <comma> : "\xc4\xbc" lcedilla
++<Multi_key> <comma> <l> : "\xc4\xbc" lcedilla
++<Multi_key> <S> <v> : "\xc5\xa0" Scaron
++<Multi_key> <S> <V> : "\xc5\xa0" Scaron
++<Multi_key> <v> <S> : "\xc5\xa0" Scaron
++<Multi_key> <V> <S> : "\xc5\xa0" Scaron
++<Multi_key> <s> <v> : "\xc5\xa1" scaron
++<Multi_key> <s> <V> : "\xc5\xa1" scaron
++<Multi_key> <v> <s> : "\xc5\xa1" scaron
++<Multi_key> <V> <s> : "\xc5\xa1" scaron
++<Multi_key> <E> <underscore> : "\xc4\x92" Emacron
++<Multi_key> <underscore> <E> : "\xc4\x92" Emacron
++<Multi_key> <e> <underscore> : "\xc4\x93" emacron
++<Multi_key> <underscore> <e> : "\xc4\x93" emacron
++<Multi_key> <G> <comma> : "\xc4\xa2" Gcedilla
++<Multi_key> <comma> <G> : "\xc4\xa2" Gcedilla
++<Multi_key> <g> <comma> : "\xc4\xa3" gcedilla
++<Multi_key> <comma> <g> : "\xc4\xa3" gcedilla
++<Multi_key> <T> <bar> : "\xc5\xa6" Tslash
++<Multi_key> <bar> <T> : "\xc5\xa6" Tslash
++<Multi_key> <t> <bar> : "\xc5\xa7" tslash
++<Multi_key> <bar> <t> : "\xc5\xa7" tslash
++<Multi_key> <n> <n> : "\xc5\x8b" eng
++<Multi_key> <A> <underscore> : "\xc4\x80" Amacron
++<Multi_key> <underscore> <A> : "\xc4\x80" Amacron
++<Multi_key> <a> <underscore> : "\xc4\x81" amacron
++<Multi_key> <underscore> <a> : "\xc4\x81" amacron
++<Multi_key> <d> <underscore> : "\xc4\x91"
++<Multi_key> <underscore> <d> : "\xc4\x91"
++<Multi_key> <N> <comma> : "\xc5\x85" Ncedilla
++<Multi_key> <comma> <N> : "\xc5\x85" Ncedilla
++<Multi_key> <n> <comma> : "\xc5\x86" ncedilla
++<Multi_key> <comma> <n> : "\xc5\x86" ncedilla
++<Multi_key> <O> <underscore> : "\xc5\x8c" Omacron
++<Multi_key> <underscore> <O> : "\xc5\x8c" Omacron
++<Multi_key> <o> <underscore> : "\xc5\x8d" omacron
++<Multi_key> <underscore> <o> : "\xc5\x8d" omacron
++<Multi_key> <K> <comma> : "\xc4\xb6" Kcedilla
++<Multi_key> <comma> <K> : "\xc4\xb6" Kcedilla
++<Multi_key> <k> <comma> : "\xc4\xb7" kcedilla
++<Multi_key> <comma> <k> : "\xc4\xb7" kcedilla
++<Multi_key> <I> <a> : "\xc4\xae" Iogonek
++<Multi_key> <a> <I> : "\xc4\xae" Iogonek
++<Multi_key> <i> <a> : "\xc4\xaf" iogonek
++<Multi_key> <a> <i> : "\xc4\xaf" iogonek
++<Multi_key> <E> <period> : "\xc4\x96" Eabovedot
++<Multi_key> <e> <period> : "\xc4\x97" eabovedot
++<Multi_key> <U> <asciitilde> : "\xc5\xa8" Utilde
++<Multi_key> <asciitilde> <U> : "\xc5\xa8" Utilde
++<Multi_key> <u> <asciitilde> : "\xc5\xa9" utilde
++<Multi_key> <asciitilde> <u> : "\xc5\xa9" utilde
++<Multi_key> <U> <underscore> : "\xc5\xaa" Umacron
++<Multi_key> <underscore> <U> : "\xc5\xaa" Umacron
++<Multi_key> <u> <underscore> : "\xc5\xab" umacron
++<Multi_key> <underscore> <u> : "\xc5\xab" umacron
++<Multi_key> <I> <underscore> : "\xc4\xaa" Imacron
++<Multi_key> <underscore> <I> : "\xc4\xaa" Imacron
++<Multi_key> <i> <underscore> : "\xc4\xab" imacron
++<Multi_key> <underscore> <i> : "\xc4\xab" imacron
++
++XCOMM Ctrl<T> combo
++Ctrl<T> <a> <A> : "\xc4\x84" Aogonek
++Ctrl<T> <A> <a> : "\xc4\x84" Aogonek
++Ctrl<T> <a> <a> : "\xc4\x85" aogonek
++Ctrl<T> <C> <acute> : "\xc4\x86" Cacute
++Ctrl<T> <c> <acute> : "\xc4\x87" cacute
++Ctrl<T> <acute> <C> : "\xc4\x86" Cacute
++Ctrl<T> <acute> <c> : "\xc4\x87" cacute
++Ctrl<T> <acute> <N> : "\xc5\x83" Nacute
++Ctrl<T> <N> <acute> : "\xc5\x83" Nacute
++XCOMM Ctrl<T> <minus> <D> : "\xc3\x90" ETH
++XCOMM Ctrl<T> <minus> <d> : "\xc3\xb0" eth
++Ctrl<T> <slash> <D> : "\xc4\x90" Dstroke
++Ctrl<T> <slash> <d> : "\xc4\x91" dstroke
++Ctrl<T> <caron> <Z> : "\xc5\xbd" Zcaron
++Ctrl<T> <Z> <caron> : "\xc5\xbd" Zcaron
++Ctrl<T> <v> <Z> : "\xc5\xbd" Zcaron
++Ctrl<T> <Z> <v> : "\xc5\xbd" Zcaron
++Ctrl<T> <caron> <z> : "\xc5\xbe" zcaron
++Ctrl<T> <z> <caron> : "\xc5\xbe" zcaron
++Ctrl<T> <z> <v> : "\xc5\xbe" zcaron
++Ctrl<T> <v> <z> : "\xc5\xbe" zcaron
++Ctrl<T> <G> <u> : "\xc4\x9e" Gbreve
++Ctrl<T> <u> <G> : "\xc4\x9e" Gbreve
++Ctrl<T> <g> <u> : "\xc4\x9f" gbreve
++Ctrl<T> <u> <g> : "\xc4\x9f" gbreve
++Ctrl<T> <I> <period> : "\xc4\xb0" Iabovedot
++Ctrl<T> <period> <I> : "\xc4\xb0" Iabovedot
++Ctrl<T> <i> <period> : "\xc4\xb1" idotless
++Ctrl<T> <period> <i> : "\xc4\xb1" idotless
++Ctrl<T> <space> <breve> : "\xcb\x98" breve
++Ctrl<T> <space> <degree> : "\xc2\xb0" degree
++Ctrl<T> <space> <ogonek> : "\xcb\x9b" ogonek
++Ctrl<T> <space> <caron> : "\xcb\x87" caron
++Ctrl<T> <space> <v> : "\xcb\x87" caron
++Ctrl<T> <space> <doubleacute> : "\xcb\x9d" doubleacute
++Ctrl<T> <diaeresis> <A> : "\xc3\x84" Adiaeresis
++Ctrl<T> <A> <diaeresis> : "\xc3\x84" Adiaeresis
++Ctrl<T> <diaeresis> <E> : "\xc3\x8b" Ediaeresis
++Ctrl<T> <E> <diaeresis> : "\xc3\x8b" Ediaeresis
++Ctrl<T> <diaeresis> <O> : "\xc3\x96" Odiaeresis
++Ctrl<T> <O> <diaeresis> : "\xc3\x96" Odiaeresis
++Ctrl<T> <diaeresis> <U> : "\xc3\x9c" Udiaeresis
++Ctrl<T> <U> <diaeresis> : "\xc3\x9c" Udiaeresis
++Ctrl<T> <diaeresis> <a> : "\xc3\xa4" adiaeresis
++Ctrl<T> <a> <diaeresis> : "\xc3\xa4" adiaeresis
++Ctrl<T> <diaeresis> <e> : "\xc3\xab" ediaeresis
++Ctrl<T> <e> <diaeresis> : "\xc3\xab" ediaeresis
++Ctrl<T> <diaeresis> <o> : "\xc3\xb6" odiaeresis
++Ctrl<T> <o> <diaeresis> : "\xc3\xb6" odiaeresis
++Ctrl<T> <diaeresis> <u> : "\xc3\xbc" udiaeresis
++Ctrl<T> <u> <diaeresis> : "\xc3\xbc" udiaeresis
++Ctrl<T> <acute> <R> : "\xc5\x94" Racute
++Ctrl<T> <R> <acute> : "\xc5\x94" Racute
++Ctrl<T> <acute> <S> : "\xc5\x9a" Sacute
++Ctrl<T> <S> <acute> : "\xc5\x9a" Sacute
++Ctrl<T> <acute> <Z> : "\xc4\xbe" Zacute
++Ctrl<T> <Z> <acute> : "\xc4\xbe" Zacute
++Ctrl<T> <acute> <n> : "\xc5\x84" nacute
++Ctrl<T> <n> <acute> : "\xc5\x84" nacute
++Ctrl<T> <acute> <r> : "\xc5\x95" racute
++Ctrl<T> <r> <acute> : "\xc5\x95" racute
++Ctrl<T> <acute> <s> : "\xc5\x9b" sacute
++Ctrl<T> <s> <acute> : "\xc5\x9b" sacute
++Ctrl<T> <acute> <z> : "\xc5\xba" zacute
++Ctrl<T> <z> <acute> : "\xc5\xba" zacute
++Ctrl<T> <0> <O> : "\xc2\xb0" degree
++Ctrl<T> <o> <o> : "\xc2\xb0" degree
++Ctrl<T> <comma> <S> : "\xc5\x9e" Scedilla
++Ctrl<T> <S> <comma> : "\xc5\x9e" Scedilla
++Ctrl<T> <comma> <T> : "\xc5\xa2" Tcedilla
++Ctrl<T> <T> <comma> : "\xc5\xa2" Tcedilla
++Ctrl<T> <comma> <s> : "\xc5\x9f" scedilla
++Ctrl<T> <s> <comma> : "\xc5\x9f" scedilla
++Ctrl<T> <comma> <t> : "\xc5\xa3" tcedilla
++Ctrl<T> <t> <comma> : "\xc5\xa3" tcedilla
++Ctrl<T> <caron> <C> : "\xc4\x8c" Ccaron
++Ctrl<T> <C> <caron> : "\xc4\x8c" Ccaron
++Ctrl<T> <caron> <D> : "\xc4\x8e" Dcaron
++Ctrl<T> <D> <caron> : "\xc4\x8e" Dcaron
++Ctrl<T> <caron> <E> : "\xc4\x9a" Ecaron
++Ctrl<T> <E> <caron> : "\xc4\x9a" Ecaron
++Ctrl<T> <caron> <L> : "\xc4\xbd" Lcaron
++Ctrl<T> <L> <caron> : "\xc4\xbd" Lcaron
++Ctrl<T> <caron> <N> : "\xc5\x87" Ncaron
++Ctrl<T> <N> <caron> : "\xc5\x87" Ncaron
++Ctrl<T> <caron> <R> : "\xc5\x98" Rcaron
++Ctrl<T> <R> <caron> : "\xc5\x98" Rcaron
++Ctrl<T> <caron> <S> : "\xc5\xa0" Scaron
++Ctrl<T> <S> <caron> : "\xc5\xa0" Scaron
++Ctrl<T> <caron> <T> : "\xc5\xa4" Tcaron
++Ctrl<T> <T> <caron> : "\xc5\xa4" Tcaron
++Ctrl<T> <caron> <U> : "\xc5\xae" Uring
++Ctrl<T> <U> <caron> : "\xc5\xae" Uring
++Ctrl<T> <caron> <c> : "\xc4\x8d" ccaron
++Ctrl<T> <c> <caron> : "\xc4\x8d" ccaron
++Ctrl<T> <caron> <d> : "\xc4\x8f" dcaron
++Ctrl<T> <d> <caron> : "\xc4\x8f" dcaron
++Ctrl<T> <caron> <e> : "\xc4\x9b" ecaron
++Ctrl<T> <e> <caron> : "\xc4\x9b" ecaron
++Ctrl<T> <caron> <l> : "\xc4\xbe" lcaron
++Ctrl<T> <l> <caron> : "\xc4\xbe" lcaron
++Ctrl<T> <caron> <n> : "\xc5\x88" ncaron
++Ctrl<T> <n> <caron> : "\xc5\x88" ncaron
++Ctrl<T> <caron> <r> : "\xc5\x99" rcaron
++Ctrl<T> <r> <caron> : "\xc5\x99" rcaron
++Ctrl<T> <caron> <s> : "\xc5\xa1" scaron
++Ctrl<T> <s> <caron> : "\xc5\xa1" scaron
++Ctrl<T> <caron> <t> : "\xc5\xa5" tcaron
++Ctrl<T> <t> <caron> : "\xc5\xa5" tcaron
++Ctrl<T> <caron> <u> : "\xc5\xaf" uring
++Ctrl<T> <u> <caron> : "\xc5\xaf" uring
++Ctrl<T> <v> <C> : "\xc4\x8c" Ccaron
++Ctrl<T> <C> <v> : "\xc4\x8c" Ccaron
++Ctrl<T> <v> <D> : "\xc4\x8e" Dcaron
++Ctrl<T> <D> <v> : "\xc4\x8e" Dcaron
++Ctrl<T> <v> <E> : "\xc4\x9a" Ecaron
++Ctrl<T> <E> <v> : "\xc4\x9a" Ecaron
++Ctrl<T> <v> <N> : "\xc5\x87" Ncaron
++Ctrl<T> <N> <v> : "\xc5\x87" Ncaron
++Ctrl<T> <v> <R> : "\xc5\x98" Rcaron
++Ctrl<T> <R> <v> : "\xc5\x98" Rcaron
++Ctrl<T> <v> <T> : "\xc5\xa4" Tcaron
++Ctrl<T> <T> <v> : "\xc5\xa4" Tcaron
++Ctrl<T> <v> <U> : "\xc5\xae" Uring
++Ctrl<T> <U> <v> : "\xc5\xae" Uring
++Ctrl<T> <v> <c> : "\xc4\x8d" ccaron
++Ctrl<T> <c> <v> : "\xc4\x8d" ccaron
++Ctrl<T> <v> <d> : "\xc4\x8f" dcaron
++Ctrl<T> <d> <v> : "\xc4\x8f" dcaron
++Ctrl<T> <v> <e> : "\xc4\x9b" ecaron
++Ctrl<T> <e> <v> : "\xc4\x9b" ecaron
++Ctrl<T> <v> <n> : "\xc5\x88" ncaron
++Ctrl<T> <n> <v> : "\xc5\x88" ncaron
++Ctrl<T> <v> <r> : "\xc5\x99" rcaron
++Ctrl<T> <r> <v> : "\xc5\x99" rcaron
++Ctrl<T> <v> <t> : "\xc5\xa5" tcaron
++Ctrl<T> <t> <v> : "\xc5\xa5" tcaron
++Ctrl<T> <v> <u> : "\xc5\xaf" uring
++Ctrl<T> <u> <v> : "\xc5\xaf" uring
++Ctrl<T> <breve> <A> : "\xc4\x82" Abreve
++Ctrl<T> <A> <breve> : "\xc4\x82" Abreve
++Ctrl<T> <breve> <a> : "\xc4\x83" abreve
++Ctrl<T> <a> <breve> : "\xc4\x83" abreve
++Ctrl<T> <ogonek> <A> : "\xc4\x84" Aogonek
++Ctrl<T> <A> <ogonek> : "\xc4\x84" Aogonek
++Ctrl<T> <ogonek> <E> : "\xc4\x98" Eogonek
++Ctrl<T> <E> <ogonek> : "\xc4\x98" Eogonek
++Ctrl<T> <ogonek> <a> : "\xc4\x85" aogonek
++Ctrl<T> <a> <ogonek> : "\xc4\x85" aogonek
++Ctrl<T> <ogonek> <e> : "\xc4\x99" eogonek
++Ctrl<T> <e> <ogonek> : "\xc4\x99" eogonek
++Ctrl<T> <E> <a> : "\xc4\x98" Eogonek
++Ctrl<T> <e> <a> : "\xc4\x99" eogonek
++Ctrl<T> <doubleacute> <O> : "\xc5\x90" Odoubleacute
++Ctrl<T> <O> <doubleacute> : "\xc5\x90" Odoubleacute
++Ctrl<T> <doubleacute> <U> : "\xc5\xb0" Udoubleacute
++Ctrl<T> <U> <doubleacute> : "\xc5\xb0" Udoubleacute
++Ctrl<T> <doubleacute> <o> : "\xc5\x91" odoubleacute
++Ctrl<T> <o> <doubleacute> : "\xc5\x91" odoubleacute
++Ctrl<T> <doubleacute> <u> : "\xc5\xb1" udoubleacute
++Ctrl<T> <u> <doubleacute> : "\xc5\xb1" udoubleacute
++Ctrl<T> <period> <U> : "\xc5\xae" Uring
++Ctrl<T> <U> <period> : "\xc5\xae" Uring
++Ctrl<T> <period> <u> : "\xc5\xaf" uring
++Ctrl<T> <u> <period> : "\xc5\xaf" uring
++Ctrl<T> <period> <z> : "\xc5\xbc" zabovedot
++Ctrl<T> <z> <period> : "\xc5\xbc" zabovedot
++Ctrl<T> <period> <Z> : "\xc5\xbb" Zabovedot
++Ctrl<T> <Z> <period> : "\xc5\xbb" Zabovedot
++Ctrl<T> <a> <space> : "\xcb\x9b" ogonek
++Ctrl<T> <u> <space> : "\xcb\x98" breve
++Ctrl<T> <v> <space> : "\xcb\x87" caron
++Ctrl<T> <quotedbl> <space> : "\xcb\x9d" doubleacute
++Ctrl<T> <A> <u> : "\xc4\x82" Abreve
++Ctrl<T> <C> <apostrophe> : "\xc4\x86" Cacute
++Ctrl<T> <L> <apostrophe> : "\xc4\xb9" Lacute
++Ctrl<T> <L> <slash> : "\xc5\x81" Lstroke
++Ctrl<T> <L> <greater> : "\xc4\xbd" Lcaron
++Ctrl<T> <N> <apostrophe> : "\xc5\x83" Nacute
++Ctrl<T> <S> <apostrophe> : "\xc5\x9a" Sacute
++Ctrl<T> <R> <apostrophe> : "\xc5\x94" Racute
++Ctrl<T> <U> <asterisk> : "\xc5\xae" Uring
++Ctrl<T> <Z> <apostrophe> : "\xc5\xb9" Zacute
++Ctrl<T> <a> <u> : "\xc4\x83" abreve
++Ctrl<T> <c> <apostrophe> : "\xc4\x87" cacute
++Ctrl<T> <l> <apostrophe> : "\xc4\xba" lacute
++Ctrl<T> <l> <slash> : "\xc5\x82" lstroke
++Ctrl<T> <l> <greater> : "\xc4\xbe" lcaron
++Ctrl<T> <n> <apostrophe> : "\xc5\x84" nacute
++Ctrl<T> <s> <apostrophe> : "\xc5\x9b" sacute
++Ctrl<T> <r> <apostrophe> : "\xc5\x95" racute
++Ctrl<T> <u> <asterisk> : "\xc5\xaf" uring
++Ctrl<T> <z> <apostrophe> : "\xc5\xba" zacute
++XCOMM
++XCOMM Latin-3 sequences
++Ctrl<T> <C> <asciicircum> : "\xc4\x88" Ccircumflex
++Ctrl<T> <asciicircum> <C> : "\xc4\x88" Ccircumflex
++Ctrl<T> <C> <greater> : "\xc4\x88" Ccircumflex
++Ctrl<T> <greater> <C> : "\xc4\x88" Ccircumflex
++
++Ctrl<T> <c> <asciicircum> : "\xc4\x89" ccircumflex
++Ctrl<T> <asciicircum> <c> : "\xc4\x89" ccircumflex
++Ctrl<T> <c> <greater> : "\xc4\x89" ccircumflex
++Ctrl<T> <greater> <c> : "\xc4\x89" ccircumflex
++
++Ctrl<T> <period> <C> : "\xc4\x8a" Cabovedot
++Ctrl<T> <C> <period> : "\xc4\x8a" Cabovedot
++
++Ctrl<T> <period> <c> : "\xc4\x8b" cabovedot
++Ctrl<T> <c> <period> : "\xc4\x8b" cabovedot
++
++Ctrl<T> <G> <asciicircum> : "\xc4\x9c" Gcircumflex
++Ctrl<T> <asciicircum> <G> : "\xc4\x9c" Gcircumflex
++Ctrl<T> <G> <greater> : "\xc4\x9c" Gcircumflex
++Ctrl<T> <greater> <G> : "\xc4\x9c" Gcircumflex
++
++Ctrl<T> <g> <asciicircum> : "\xc4\x9d" gcircumflex
++Ctrl<T> <asciicircum> <g> : "\xc4\x9d" gcircumflex
++Ctrl<T> <g> <greater> : "\xc4\x9d" gcircumflex
++Ctrl<T> <greater> <g> : "\xc4\x9d" gcircumflex
++
++Ctrl<T> <period> <G> : "\xc4\xa0" Gabovedot
++Ctrl<T> <G> <period> : "\xc4\xa0" Gabovedot
++
++Ctrl<T> <period> <g> : "\xc4\xa1" gabovedot
++Ctrl<T> <g> <period> : "\xc4\xa1" gabovedot
++
++Ctrl<T> <H> <asciicircum> : "\xc4\xa4" Hcircumflex
++Ctrl<T> <asciicircum> <H> : "\xc4\xa4" Hcircumflex
++Ctrl<T> <H> <greater> : "\xc4\xa4" Hcircumflex
++Ctrl<T> <greater> <H> : "\xc4\xa4" Hcircumflex
++
++Ctrl<T> <h> <asciicircum> : "\xc4\xa5" hcircumflex
++Ctrl<T> <asciicircum> <h> : "\xc4\xa5" hcircumflex
++Ctrl<T> <h> <greater> : "\xc4\xa5" hcircumflex
++Ctrl<T> <greater> <h> : "\xc4\xa5" hcircumflex
++
++Ctrl<T> <J> <asciicircum> : "\xc4\xb4" Jcircumflex
++Ctrl<T> <asciicircum> <J> : "\xc4\xb4" Jcircumflex
++Ctrl<T> <J> <greater> : "\xc4\xb4" Jcircumflex
++Ctrl<T> <greater> <J> : "\xc4\xb4" Jcircumflex
++
++Ctrl<T> <j> <asciicircum> : "\xc4\xb5" jcircumflex
++Ctrl<T> <asciicircum> <j> : "\xc4\xb5" jcircumflex
++Ctrl<T> <j> <greater> : "\xc4\xb5" jcircumflex
++Ctrl<T> <greater> <j> : "\xc4\xb5" jcircumflex
++
++Ctrl<T> <S> <asciicircum> : "\xc5\x9c" Scircumflex
++Ctrl<T> <asciicircum> <S> : "\xc5\x9c" Scircumflex
++Ctrl<T> <S> <greater> : "\xc5\x9c" Scircumflex
++Ctrl<T> <greater> <S> : "\xc5\x9c" Scircumflex
++
++Ctrl<T> <s> <asciicircum> : "\xc5\x9d" scircumflex
++Ctrl<T> <asciicircum> <s> : "\xc5\x9d" scircumflex
++Ctrl<T> <s> <greater> : "\xc5\x9d" scircumflex
++Ctrl<T> <greater> <s> : "\xc5\x9d" scircumflex
++
++Ctrl<T> <U> <breve> : "\xc5\xac" Ubreve
++Ctrl<T> <breve> <U> : "\xc5\xac" Ubreve
++Ctrl<T> <U> <u> : "\xc5\xac" Ubreve
++Ctrl<T> <u> <U> : "\xc5\xac" Ubreve
++
++Ctrl<T> <u> <breve> : "\xc5\xad" ubreve
++Ctrl<T> <breve> <u> : "\xc5\xad" ubreve
++Ctrl<T> <u> <u> : "\xc5\xad" ubreve
+ XCOMM
+-XCOMM This file consists of four parts. Two of them have been adapted from
+-XCOMM the iso8859-1/Compose and iso8859-7/Compose files. The other two
+-XCOMM parts have been created by:
+-XCOMM Vasilis Vasaitis <[email protected]>
+-XCOMM based on the idea and initial implementation by:
+-XCOMM Alejandros Diamandidis <[email protected]>
+-
+-XCOMM Part 1
++XCOMM Latin-4 sequences
++Ctrl<T> <N> <N> : "\xc5\x8a" ENG
++Ctrl<T> <U> <a> : "\xc5\xb2" Uogonek
++Ctrl<T> <u> <a> : "\xc5\xb3" uogonek
++Ctrl<T> <k> <k> : "\xc4\xb8" kra
++Ctrl<T> <R> <comma> : "\xc5\x96" Rcedilla
++Ctrl<T> <comma> <R> : "\xc5\x96" Rcedilla
++Ctrl<T> <r> <comma> : "\xc5\x97" rcedilla
++Ctrl<T> <comma> <r> : "\xc5\x97" rcedilla
++Ctrl<T> <I> <asciitilde> : "\xc4\xa8" Itilde
++Ctrl<T> <asciitilde> <I> : "\xc4\xa8" Itilde
++Ctrl<T> <i> <asciitilde> : "\xc4\xa9" itilde
++Ctrl<T> <asciitilde> <i> : "\xc4\xa9" itilde
++Ctrl<T> <L> <comma> : "\xc4\xbb" Lcedilla
++Ctrl<T> <comma> <L> : "\xc4\xbb" Lcedilla
++Ctrl<T> <l> <comma> : "\xc4\xbc" lcedilla
++Ctrl<T> <comma> <l> : "\xc4\xbc" lcedilla
++Ctrl<T> <S> <v> : "\xc5\xa0" Scaron
++Ctrl<T> <S> <V> : "\xc5\xa0" Scaron
++Ctrl<T> <v> <S> : "\xc5\xa0" Scaron
++Ctrl<T> <V> <S> : "\xc5\xa0" Scaron
++Ctrl<T> <s> <v> : "\xc5\xa1" scaron
++Ctrl<T> <s> <V> : "\xc5\xa1" scaron
++Ctrl<T> <v> <s> : "\xc5\xa1" scaron
++Ctrl<T> <V> <s> : "\xc5\xa1" scaron
++Ctrl<T> <E> <underscore> : "\xc4\x92" Emacron
++Ctrl<T> <underscore> <E> : "\xc4\x92" Emacron
++Ctrl<T> <e> <underscore> : "\xc4\x93" emacron
++Ctrl<T> <underscore> <e> : "\xc4\x93" emacron
++Ctrl<T> <G> <comma> : "\xc4\xa2" Gcedilla
++Ctrl<T> <comma> <G> : "\xc4\xa2" Gcedilla
++Ctrl<T> <g> <comma> : "\xc4\xa3" gcedilla
++Ctrl<T> <comma> <g> : "\xc4\xa3" gcedilla
++Ctrl<T> <T> <bar> : "\xc5\xa6" Tslash
++Ctrl<T> <bar> <T> : "\xc5\xa6" Tslash
++Ctrl<T> <t> <bar> : "\xc5\xa7" tslash
++Ctrl<T> <bar> <t> : "\xc5\xa7" tslash
++Ctrl<T> <n> <n> : "\xc5\x8b" eng
++Ctrl<T> <d> <underscore> : "\xc4\x91"
++Ctrl<T> <underscore> <d> : "\xc4\x91"
++Ctrl<T> <N> <comma> : "\xc5\x85" Ncedilla
++Ctrl<T> <comma> <N> : "\xc5\x85" Ncedilla
++Ctrl<T> <n> <comma> : "\xc5\x86" ncedilla
++Ctrl<T> <comma> <n> : "\xc5\x86" ncedilla
++Ctrl<T> <K> <comma> : "\xc4\xb6" Kcedilla
++Ctrl<T> <comma> <K> : "\xc4\xb6" Kcedilla
++Ctrl<T> <k> <comma> : "\xc4\xb7" kcedilla
++Ctrl<T> <comma> <k> : "\xc4\xb7" kcedilla
++Ctrl<T> <I> <a> : "\xc4\xae" Iogonek
++Ctrl<T> <a> <I> : "\xc4\xae" Iogonek
++Ctrl<T> <i> <a> : "\xc4\xaf" iogonek
++Ctrl<T> <a> <i> : "\xc4\xaf" iogonek
++Ctrl<T> <E> <period> : "\xc4\x96" Eabovedot
++Ctrl<T> <e> <period> : "\xc4\x97" eabovedot
++Ctrl<T> <U> <asciitilde> : "\xc5\xa8" Utilde
++Ctrl<T> <asciitilde> <U> : "\xc5\xa8" Utilde
++Ctrl<T> <u> <asciitilde> : "\xc5\xa9" utilde
++Ctrl<T> <asciitilde> <u> : "\xc5\xa9" utilde
++Ctrl<T> <U> <underscore> : "\xc5\xaa" Umacron
++Ctrl<T> <underscore> <U> : "\xc5\xaa" Umacron
++Ctrl<T> <u> <underscore> : "\xc5\xab" umacron
++Ctrl<T> <underscore> <u> : "\xc5\xab" umacron
++Ctrl<T> <I> <underscore> : "\xc4\xaa" Imacron
++Ctrl<T> <underscore> <I> : "\xc4\xaa" Imacron
++Ctrl<T> <i> <underscore> : "\xc4\xab" imacron
++Ctrl<T> <underscore> <i> : "\xc4\xab" imacron
+ XCOMM
-XCOMM ISO 8859-1 (Latin-1) multi-key definitions extracted and converted
-XCOMM from the iso8859-1/Compose file.
-
@@ -1680,347 +2090,256 @@
-<Multi_key> <diaeresis> <y> : "ÿ" ydiaeresis
-
-XCOMM Part 2
-+XCOMM Latin-4 sequences
-+<Multi_key> <N> <N> : "\xc5\x8a" ENG
-+<Multi_key> <U> <a> : "\xc5\xb2" Uogonek
-+<Multi_key> <u> <a> : "\xc5\xb3" uogonek
-+<Multi_key> <k> <k> : "\xc4\xb8" kra
-+<Multi_key> <R> <comma> : "\xc5\x96" Rcedilla
-+<Multi_key> <comma> <R> : "\xc5\x96" Rcedilla
-+<Multi_key> <r> <comma> : "\xc5\x97" rcedilla
-+<Multi_key> <comma> <r> : "\xc5\x97" rcedilla
-+<Multi_key> <I> <asciitilde> : "\xc4\xa8" Itilde
-+<Multi_key> <asciitilde> <I> : "\xc4\xa8" Itilde
-+<Multi_key> <i> <asciitilde> : "\xc4\xa9" itilde
-+<Multi_key> <asciitilde> <i> : "\xc4\xa9" itilde
-+<Multi_key> <L> <comma> : "\xc4\xbb" Lcedilla
-+<Multi_key> <comma> <L> : "\xc4\xbb" Lcedilla
-+<Multi_key> <l> <comma> : "\xc4\xbc" lcedilla
-+<Multi_key> <comma> <l> : "\xc4\xbc" lcedilla
-+<Multi_key> <S> <v> : "\xc5\xa0" Scaron
-+<Multi_key> <S> <V> : "\xc5\xa0" Scaron
-+<Multi_key> <v> <S> : "\xc5\xa0" Scaron
-+<Multi_key> <V> <S> : "\xc5\xa0" Scaron
-+<Multi_key> <s> <v> : "\xc5\xa1" scaron
-+<Multi_key> <s> <V> : "\xc5\xa1" scaron
-+<Multi_key> <v> <s> : "\xc5\xa1" scaron
-+<Multi_key> <V> <s> : "\xc5\xa1" scaron
-+<Multi_key> <E> <underscore> : "\xc4\x92" Emacron
-+<Multi_key> <underscore> <E> : "\xc4\x92" Emacron
-+<Multi_key> <e> <underscore> : "\xc4\x93" emacron
-+<Multi_key> <underscore> <e> : "\xc4\x93" emacron
-+<Multi_key> <G> <comma> : "\xc4\xa2" Gcedilla
-+<Multi_key> <comma> <G> : "\xc4\xa2" Gcedilla
-+<Multi_key> <g> <comma> : "\xc4\xa3" gcedilla
-+<Multi_key> <comma> <g> : "\xc4\xa3" gcedilla
-+<Multi_key> <T> <bar> : "\xc5\xa6" Tslash
-+<Multi_key> <bar> <T> : "\xc5\xa6" Tslash
-+<Multi_key> <t> <bar> : "\xc5\xa7" tslash
-+<Multi_key> <bar> <t> : "\xc5\xa7" tslash
-+<Multi_key> <n> <n> : "\xc5\x8b" eng
-+<Multi_key> <A> <underscore> : "\xc4\x80" Amacron
-+<Multi_key> <underscore> <A> : "\xc4\x80" Amacron
-+<Multi_key> <a> <underscore> : "\xc4\x81" amacron
-+<Multi_key> <underscore> <a> : "\xc4\x81" amacron
-+<Multi_key> <d> <underscore> : "\xc4\x91"
-+<Multi_key> <underscore> <d> : "\xc4\x91"
-+<Multi_key> <N> <comma> : "\xc5\x85" Ncedilla
-+<Multi_key> <comma> <N> : "\xc5\x85" Ncedilla
-+<Multi_key> <n> <comma> : "\xc5\x86" ncedilla
-+<Multi_key> <comma> <n> : "\xc5\x86" ncedilla
-+<Multi_key> <O> <underscore> : "\xc5\x8c" Omacron
-+<Multi_key> <underscore> <O> : "\xc5\x8c" Omacron
-+<Multi_key> <o> <underscore> : "\xc5\x8d" omacron
-+<Multi_key> <underscore> <o> : "\xc5\x8d" omacron
-+<Multi_key> <K> <comma> : "\xc4\xb6" Kcedilla
-+<Multi_key> <comma> <K> : "\xc4\xb6" Kcedilla
-+<Multi_key> <k> <comma> : "\xc4\xb7" kcedilla
-+<Multi_key> <comma> <k> : "\xc4\xb7" kcedilla
-+<Multi_key> <I> <a> : "\xc4\xae" Iogonek
-+<Multi_key> <a> <I> : "\xc4\xae" Iogonek
-+<Multi_key> <i> <a> : "\xc4\xaf" iogonek
-+<Multi_key> <a> <i> : "\xc4\xaf" iogonek
-+<Multi_key> <E> <period> : "\xc4\x96" Eabovedot
-+<Multi_key> <e> <period> : "\xc4\x97" eabovedot
-+<Multi_key> <U> <asciitilde> : "\xc5\xa8" Utilde
-+<Multi_key> <asciitilde> <U> : "\xc5\xa8" Utilde
-+<Multi_key> <u> <asciitilde> : "\xc5\xa9" utilde
-+<Multi_key> <asciitilde> <u> : "\xc5\xa9" utilde
-+<Multi_key> <U> <underscore> : "\xc5\xaa" Umacron
-+<Multi_key> <underscore> <U> : "\xc5\xaa" Umacron
-+<Multi_key> <u> <underscore> : "\xc5\xab" umacron
-+<Multi_key> <underscore> <u> : "\xc5\xab" umacron
-+<Multi_key> <I> <underscore> : "\xc4\xaa" Imacron
-+<Multi_key> <underscore> <I> : "\xc4\xaa" Imacron
-+<Multi_key> <i> <underscore> : "\xc4\xab" imacron
-+<Multi_key> <underscore> <i> : "\xc4\xab" imacron
++XCOMM Rules for SunXK_FA_* keysyms:
++<SunFA_Acute> <apostrophe> : "\xc2\xb4"
++<SunFA_Acute> <A> : "\xc3\x81"
++<SunFA_Acute> <a> : "\xc3\xa1"
++<SunFA_Acute> <C> : "\xc4\x86"
++<SunFA_Acute> <c> : "\xc4\x87"
++<SunFA_Acute> <E> : "\xc3\x89"
++<SunFA_Acute> <e> : "\xc3\xa9"
++<SunFA_Acute> <I> : "\xc3\x8d"
++<SunFA_Acute> <i> : "\xc3\xad"
++<SunFA_Acute> <L> : "\xc4\xb9"
++<SunFA_Acute> <l> : "\xc4\xba"
++<SunFA_Acute> <N> : "\xc5\x83"
++<SunFA_Acute> <n> : "\xc5\x84"
++<SunFA_Acute> <O> : "\xc3\x93"
++<SunFA_Acute> <o> : "\xc3\xb3"
++<SunFA_Acute> <R> : "\xc5\x94"
++<SunFA_Acute> <r> : "\xc5\x95"
++<SunFA_Acute> <space> : "\x27"
++<SunFA_Acute> <S> : "\xc5\x9a"
++<SunFA_Acute> <s> : "\xc5\x9b"
++<SunFA_Acute> <U> : "\xc3\x9a"
++<SunFA_Acute> <u> : "\xc3\xba"
++<SunFA_Acute> <Y> : "\xc3\x9d"
++<SunFA_Acute> <y> : "\xc3\xbd"
++<SunFA_Acute> <Z> : "\xc4\xbe"
++<SunFA_Acute> <z> : "\xc5\xba"
++<SunFA_Cedilla> <comma> : "\xc2\xb8"
++<SunFA_Cedilla> <C> : "\xc3\x87"
++<SunFA_Cedilla> <c> : "\xc3\xa7"
++<SunFA_Cedilla> <G> : "\xc4\xa2"
++<SunFA_Cedilla> <g> : "\xc4\xa3"
++<SunFA_Cedilla> <K> : "\xc4\xb6"
++<SunFA_Cedilla> <k> : "\xc4\xb7"
++<SunFA_Cedilla> <L> : "\xc4\xbb"
++<SunFA_Cedilla> <l> : "\xc4\xbc"
++<SunFA_Cedilla> <minus> : "\xc2\xac"
++<SunFA_Cedilla> <N> : "\xc5\x85"
++<SunFA_Cedilla> <n> : "\xc5\x86"
++<SunFA_Cedilla> <R> : "\xc5\x96"
++<SunFA_Cedilla> <r> : "\xc5\x97"
++<SunFA_Cedilla> <S> : "\xc5\x9e"
++<SunFA_Cedilla> <s> : "\xc5\x9f"
++<SunFA_Cedilla> <T> : "\xc5\xa2"
++<SunFA_Cedilla> <t> : "\xc5\xa3"
++<SunFA_Circum> <0> : "\xc2\xb0"
++<SunFA_Circum> <1> : "\xc2\xb9"
++<SunFA_Circum> <2> : "\xc2\xb2"
++<SunFA_Circum> <3> : "\xc2\xb3"
++<SunFA_Circum> <A> : "\xc3\x82"
++<SunFA_Circum> <a> : "\xc3\xa2"
++<SunFA_Circum> <C> : "\xc4\x88"
++<SunFA_Circum> <c> : "\xc4\x89"
++<SunFA_Circum> <E> : "\xc3\x8a"
++<SunFA_Circum> <e> : "\xc3\xaa"
++<SunFA_Circum> <exclam> : "\xc2\xa6"
++<SunFA_Circum> <G> : "\xc4\x9c"
++<SunFA_Circum> <g> : "\xc4\x9d"
++<SunFA_Circum> <H> : "\xc4\xa4"
++<SunFA_Circum> <h> : "\xc4\xa5"
++<SunFA_Circum> <I> : "\xc3\x8e"
++<SunFA_Circum> <i> : "\xc3\xae"
++<SunFA_Circum> <J> : "\xc4\xb4"
++<SunFA_Circum> <j> : "\xc4\xb5"
++<SunFA_Circum> <minus> : "\xc2\xaf"
++<SunFA_Circum> <O> : "\xc3\x94"
++<SunFA_Circum> <o> : "\xc3\xb4"
++<SunFA_Circum> <period> : "\xc2\xb7"
++<SunFA_Circum> <slash> : "\x7c"
++<SunFA_Circum> <space> : "\x5e"
++<SunFA_Circum> <S> : "\xc5\x9c"
++<SunFA_Circum> <s> : "\xc5\x9d"
++<SunFA_Circum> <underscore> : "\xc2\xaf"
++<SunFA_Circum> <U> : "\xc3\x9b"
++<SunFA_Circum> <u> : "\xc3\xbb"
++<SunFA_Diaeresis> <A> : "\xc3\x84"
++<SunFA_Diaeresis> <a> : "\xc3\xa4"
++<SunFA_Diaeresis> <E> : "\xc3\x8b"
++<SunFA_Diaeresis> <e> : "\xc3\xab"
++<SunFA_Diaeresis> <I> : "\xc3\x8f"
++<SunFA_Diaeresis> <i> : "\xc3\xaf"
++<SunFA_Diaeresis> <O> : "\xc3\x96"
++<SunFA_Diaeresis> <o> : "\xc3\xb6"
++<SunFA_Diaeresis> <quotedbl> : "\xc2\xa8"
++<SunFA_Diaeresis> <space> : "\xc2\xa8"
++<SunFA_Diaeresis> <U> : "\xc3\x9c"
++<SunFA_Diaeresis> <u> : "\xc3\xbc"
++<SunFA_Diaeresis> <y> : "\xc3\xbf"
++<SunFA_Grave> <A> : "\xc3\x80"
++<SunFA_Grave> <a> : "\xc3\xa0"
++<SunFA_Grave> <E> : "\xc3\x88"
++<SunFA_Grave> <e> : "\xc3\xa8"
++<SunFA_Grave> <I> : "\xc3\x8c"
++<SunFA_Grave> <i> : "\xc3\xac"
++<SunFA_Grave> <O> : "\xc3\x92"
++<SunFA_Grave> <o> : "\xc3\xb2"
++<SunFA_Grave> <space> : "\x60"
++<SunFA_Grave> <U> : "\xc3\x99"
++<SunFA_Grave> <u> : "\xc3\xb9"
++<SunFA_Tilde> <A> : "\xc3\x83"
++<SunFA_Tilde> <a> : "\xc3\xa3"
++<SunFA_Tilde> <N> : "\xc3\x91"
++<SunFA_Tilde> <n> : "\xc3\xb1"
++<SunFA_Tilde> <O> : "\xc3\x95"
++<SunFA_Tilde> <o> : "\xc3\xb5"
++<SunFA_Tilde> <space> : "\x7e"
++END_STATE
++
++STATE "[ Cyrillic ]"
++Ctrl<space> : SWITCH_STATE_TO "[ English/European ]"
++<Multi_key> <g> <g> : SWITCH_STATE_TO "[ Greek ]"
++<Multi_key> <t> <t> : SWITCH_STATE_TO "[ Thai ]"
++<Multi_key> <a> <r> : SWITCH_STATE_TO "[ Arabic ]"
++<Multi_key> <h> <i> : SWITCH_STATE_TO "[ Indic ]"
++<Multi_key> <i> <n> : SWITCH_STATE_TO "[ Indic ]"
++<Multi_key> <h> <h> : SWITCH_STATE_TO "[ Hebrew ]"
++<Multi_key> <u> <h> : SWITCH_STATE_TO "[ Unicode Hex ]"
++<Multi_key> <u> <o> : SWITCH_STATE_TO "[ Unicode Octal ]"
++<Multi_key> <l> <l> : SWITCH_STATE_TO "[ Lookup ]"
++<Multi_key> <j> <a> : SWITCH_STATE_TO "[ Japanese ]"
++<Multi_key> <k> <o> : SWITCH_STATE_TO "[ Korean ]"
++<Multi_key> <s> <c> : SWITCH_STATE_TO "[ S-Chinese ]"
++<Multi_key> <t> <c> : SWITCH_STATE_TO "[ T-Chinese ]"
++<Multi_key> <h> <k> : SWITCH_STATE_TO "[ T-Chinese (Hong Kong) ]"
+
-+XCOMM Ctrl<T> combo
-+Ctrl<T> <a> <A> : "\xc4\x84" Aogonek
-+Ctrl<T> <A> <a> : "\xc4\x84" Aogonek
-+Ctrl<T> <a> <a> : "\xc4\x85" aogonek
-+Ctrl<T> <C> <acute> : "\xc4\x86" Cacute
-+Ctrl<T> <c> <acute> : "\xc4\x87" cacute
-+Ctrl<T> <acute> <C> : "\xc4\x86" Cacute
-+Ctrl<T> <acute> <c> : "\xc4\x87" cacute
-+Ctrl<T> <acute> <N> : "\xc5\x83" Nacute
-+Ctrl<T> <N> <acute> : "\xc5\x83" Nacute
-+XCOMM Ctrl<T> <minus> <D> : "\xc3\x90" ETH
-+XCOMM Ctrl<T> <minus> <d> : "\xc3\xb0" eth
-+Ctrl<T> <slash> <D> : "\xc4\x90" Dstroke
-+Ctrl<T> <slash> <d> : "\xc4\x91" dstroke
-+Ctrl<T> <caron> <Z> : "\xc5\xbd" Zcaron
-+Ctrl<T> <Z> <caron> : "\xc5\xbd" Zcaron
-+Ctrl<T> <v> <Z> : "\xc5\xbd" Zcaron
-+Ctrl<T> <Z> <v> : "\xc5\xbd" Zcaron
-+Ctrl<T> <caron> <z> : "\xc5\xbe" zcaron
-+Ctrl<T> <z> <caron> : "\xc5\xbe" zcaron
-+Ctrl<T> <z> <v> : "\xc5\xbe" zcaron
-+Ctrl<T> <v> <z> : "\xc5\xbe" zcaron
-+Ctrl<T> <G> <u> : "\xc4\x9e" Gbreve
-+Ctrl<T> <u> <G> : "\xc4\x9e" Gbreve
-+Ctrl<T> <g> <u> : "\xc4\x9f" gbreve
-+Ctrl<T> <u> <g> : "\xc4\x9f" gbreve
-+Ctrl<T> <I> <period> : "\xc4\xb0" Iabovedot
-+Ctrl<T> <period> <I> : "\xc4\xb0" Iabovedot
-+Ctrl<T> <i> <period> : "\xc4\xb1" idotless
-+Ctrl<T> <period> <i> : "\xc4\xb1" idotless
-+Ctrl<T> <space> <breve> : "\xcb\x98" breve
-+Ctrl<T> <space> <degree> : "\xc2\xb0" degree
-+Ctrl<T> <space> <ogonek> : "\xcb\x9b" ogonek
-+Ctrl<T> <space> <caron> : "\xcb\x87" caron
-+Ctrl<T> <space> <v> : "\xcb\x87" caron
-+Ctrl<T> <space> <doubleacute> : "\xcb\x9d" doubleacute
-+Ctrl<T> <diaeresis> <A> : "\xc3\x84" Adiaeresis
-+Ctrl<T> <A> <diaeresis> : "\xc3\x84" Adiaeresis
-+Ctrl<T> <diaeresis> <E> : "\xc3\x8b" Ediaeresis
-+Ctrl<T> <E> <diaeresis> : "\xc3\x8b" Ediaeresis
-+Ctrl<T> <diaeresis> <O> : "\xc3\x96" Odiaeresis
-+Ctrl<T> <O> <diaeresis> : "\xc3\x96" Odiaeresis
-+Ctrl<T> <diaeresis> <U> : "\xc3\x9c" Udiaeresis
-+Ctrl<T> <U> <diaeresis> : "\xc3\x9c" Udiaeresis
-+Ctrl<T> <diaeresis> <a> : "\xc3\xa4" adiaeresis
-+Ctrl<T> <a> <diaeresis> : "\xc3\xa4" adiaeresis
-+Ctrl<T> <diaeresis> <e> : "\xc3\xab" ediaeresis
-+Ctrl<T> <e> <diaeresis> : "\xc3\xab" ediaeresis
-+Ctrl<T> <diaeresis> <o> : "\xc3\xb6" odiaeresis
-+Ctrl<T> <o> <diaeresis> : "\xc3\xb6" odiaeresis
-+Ctrl<T> <diaeresis> <u> : "\xc3\xbc" udiaeresis
-+Ctrl<T> <u> <diaeresis> : "\xc3\xbc" udiaeresis
-+Ctrl<T> <acute> <R> : "\xc5\x94" Racute
-+Ctrl<T> <R> <acute> : "\xc5\x94" Racute
-+Ctrl<T> <acute> <S> : "\xc5\x9a" Sacute
-+Ctrl<T> <S> <acute> : "\xc5\x9a" Sacute
-+Ctrl<T> <acute> <Z> : "\xc4\xbe" Zacute
-+Ctrl<T> <Z> <acute> : "\xc4\xbe" Zacute
-+Ctrl<T> <acute> <n> : "\xc5\x84" nacute
-+Ctrl<T> <n> <acute> : "\xc5\x84" nacute
-+Ctrl<T> <acute> <r> : "\xc5\x95" racute
-+Ctrl<T> <r> <acute> : "\xc5\x95" racute
-+Ctrl<T> <acute> <s> : "\xc5\x9b" sacute
-+Ctrl<T> <s> <acute> : "\xc5\x9b" sacute
-+Ctrl<T> <acute> <z> : "\xc5\xba" zacute
-+Ctrl<T> <z> <acute> : "\xc5\xba" zacute
-+Ctrl<T> <0> <O> : "\xc2\xb0" degree
-+Ctrl<T> <o> <o> : "\xc2\xb0" degree
-+Ctrl<T> <comma> <S> : "\xc5\x9e" Scedilla
-+Ctrl<T> <S> <comma> : "\xc5\x9e" Scedilla
-+Ctrl<T> <comma> <T> : "\xc5\xa2" Tcedilla
-+Ctrl<T> <T> <comma> : "\xc5\xa2" Tcedilla
-+Ctrl<T> <comma> <s> : "\xc5\x9f" scedilla
-+Ctrl<T> <s> <comma> : "\xc5\x9f" scedilla
-+Ctrl<T> <comma> <t> : "\xc5\xa3" tcedilla
-+Ctrl<T> <t> <comma> : "\xc5\xa3" tcedilla
-+Ctrl<T> <caron> <C> : "\xc4\x8c" Ccaron
-+Ctrl<T> <C> <caron> : "\xc4\x8c" Ccaron
-+Ctrl<T> <caron> <D> : "\xc4\x8e" Dcaron
-+Ctrl<T> <D> <caron> : "\xc4\x8e" Dcaron
-+Ctrl<T> <caron> <E> : "\xc4\x9a" Ecaron
-+Ctrl<T> <E> <caron> : "\xc4\x9a" Ecaron
-+Ctrl<T> <caron> <L> : "\xc4\xbd" Lcaron
-+Ctrl<T> <L> <caron> : "\xc4\xbd" Lcaron
-+Ctrl<T> <caron> <N> : "\xc5\x87" Ncaron
-+Ctrl<T> <N> <caron> : "\xc5\x87" Ncaron
-+Ctrl<T> <caron> <R> : "\xc5\x98" Rcaron
-+Ctrl<T> <R> <caron> : "\xc5\x98" Rcaron
-+Ctrl<T> <caron> <S> : "\xc5\xa0" Scaron
-+Ctrl<T> <S> <caron> : "\xc5\xa0" Scaron
-+Ctrl<T> <caron> <T> : "\xc5\xa4" Tcaron
-+Ctrl<T> <T> <caron> : "\xc5\xa4" Tcaron
-+Ctrl<T> <caron> <U> : "\xc5\xae" Uring
-+Ctrl<T> <U> <caron> : "\xc5\xae" Uring
-+Ctrl<T> <caron> <c> : "\xc4\x8d" ccaron
-+Ctrl<T> <c> <caron> : "\xc4\x8d" ccaron
-+Ctrl<T> <caron> <d> : "\xc4\x8f" dcaron
-+Ctrl<T> <d> <caron> : "\xc4\x8f" dcaron
-+Ctrl<T> <caron> <e> : "\xc4\x9b" ecaron
-+Ctrl<T> <e> <caron> : "\xc4\x9b" ecaron
-+Ctrl<T> <caron> <l> : "\xc4\xbe" lcaron
-+Ctrl<T> <l> <caron> : "\xc4\xbe" lcaron
-+Ctrl<T> <caron> <n> : "\xc5\x88" ncaron
-+Ctrl<T> <n> <caron> : "\xc5\x88" ncaron
-+Ctrl<T> <caron> <r> : "\xc5\x99" rcaron
-+Ctrl<T> <r> <caron> : "\xc5\x99" rcaron
-+Ctrl<T> <caron> <s> : "\xc5\xa1" scaron
-+Ctrl<T> <s> <caron> : "\xc5\xa1" scaron
-+Ctrl<T> <caron> <t> : "\xc5\xa5" tcaron
-+Ctrl<T> <t> <caron> : "\xc5\xa5" tcaron
-+Ctrl<T> <caron> <u> : "\xc5\xaf" uring
-+Ctrl<T> <u> <caron> : "\xc5\xaf" uring
-+Ctrl<T> <v> <C> : "\xc4\x8c" Ccaron
-+Ctrl<T> <C> <v> : "\xc4\x8c" Ccaron
-+Ctrl<T> <v> <D> : "\xc4\x8e" Dcaron
-+Ctrl<T> <D> <v> : "\xc4\x8e" Dcaron
-+Ctrl<T> <v> <E> : "\xc4\x9a" Ecaron
-+Ctrl<T> <E> <v> : "\xc4\x9a" Ecaron
-+Ctrl<T> <v> <N> : "\xc5\x87" Ncaron
-+Ctrl<T> <N> <v> : "\xc5\x87" Ncaron
-+Ctrl<T> <v> <R> : "\xc5\x98" Rcaron
-+Ctrl<T> <R> <v> : "\xc5\x98" Rcaron
-+Ctrl<T> <v> <T> : "\xc5\xa4" Tcaron
-+Ctrl<T> <T> <v> : "\xc5\xa4" Tcaron
-+Ctrl<T> <v> <U> : "\xc5\xae" Uring
-+Ctrl<T> <U> <v> : "\xc5\xae" Uring
-+Ctrl<T> <v> <c> : "\xc4\x8d" ccaron
-+Ctrl<T> <c> <v> : "\xc4\x8d" ccaron
-+Ctrl<T> <v> <d> : "\xc4\x8f" dcaron
-+Ctrl<T> <d> <v> : "\xc4\x8f" dcaron
-+Ctrl<T> <v> <e> : "\xc4\x9b" ecaron
-+Ctrl<T> <e> <v> : "\xc4\x9b" ecaron
-+Ctrl<T> <v> <n> : "\xc5\x88" ncaron
-+Ctrl<T> <n> <v> : "\xc5\x88" ncaron
-+Ctrl<T> <v> <r> : "\xc5\x99" rcaron
-+Ctrl<T> <r> <v> : "\xc5\x99" rcaron
-+Ctrl<T> <v> <t> : "\xc5\xa5" tcaron
-+Ctrl<T> <t> <v> : "\xc5\xa5" tcaron
-+Ctrl<T> <v> <u> : "\xc5\xaf" uring
-+Ctrl<T> <u> <v> : "\xc5\xaf" uring
-+Ctrl<T> <breve> <A> : "\xc4\x82" Abreve
-+Ctrl<T> <A> <breve> : "\xc4\x82" Abreve
-+Ctrl<T> <breve> <a> : "\xc4\x83" abreve
-+Ctrl<T> <a> <breve> : "\xc4\x83" abreve
-+Ctrl<T> <ogonek> <A> : "\xc4\x84" Aogonek
-+Ctrl<T> <A> <ogonek> : "\xc4\x84" Aogonek
-+Ctrl<T> <ogonek> <E> : "\xc4\x98" Eogonek
-+Ctrl<T> <E> <ogonek> : "\xc4\x98" Eogonek
-+Ctrl<T> <ogonek> <a> : "\xc4\x85" aogonek
-+Ctrl<T> <a> <ogonek> : "\xc4\x85" aogonek
-+Ctrl<T> <ogonek> <e> : "\xc4\x99" eogonek
-+Ctrl<T> <e> <ogonek> : "\xc4\x99" eogonek
-+Ctrl<T> <E> <a> : "\xc4\x98" Eogonek
-+Ctrl<T> <e> <a> : "\xc4\x99" eogonek
-+Ctrl<T> <doubleacute> <O> : "\xc5\x90" Odoubleacute
-+Ctrl<T> <O> <doubleacute> : "\xc5\x90" Odoubleacute
-+Ctrl<T> <doubleacute> <U> : "\xc5\xb0" Udoubleacute
-+Ctrl<T> <U> <doubleacute> : "\xc5\xb0" Udoubleacute
-+Ctrl<T> <doubleacute> <o> : "\xc5\x91" odoubleacute
-+Ctrl<T> <o> <doubleacute> : "\xc5\x91" odoubleacute
-+Ctrl<T> <doubleacute> <u> : "\xc5\xb1" udoubleacute
-+Ctrl<T> <u> <doubleacute> : "\xc5\xb1" udoubleacute
-+Ctrl<T> <period> <U> : "\xc5\xae" Uring
-+Ctrl<T> <U> <period> : "\xc5\xae" Uring
-+Ctrl<T> <period> <u> : "\xc5\xaf" uring
-+Ctrl<T> <u> <period> : "\xc5\xaf" uring
-+Ctrl<T> <period> <z> : "\xc5\xbc" zabovedot
-+Ctrl<T> <z> <period> : "\xc5\xbc" zabovedot
-+Ctrl<T> <period> <Z> : "\xc5\xbb" Zabovedot
-+Ctrl<T> <Z> <period> : "\xc5\xbb" Zabovedot
-+Ctrl<T> <a> <space> : "\xcb\x9b" ogonek
-+Ctrl<T> <u> <space> : "\xcb\x98" breve
-+Ctrl<T> <v> <space> : "\xcb\x87" caron
-+Ctrl<T> <quotedbl> <space> : "\xcb\x9d" doubleacute
-+Ctrl<T> <A> <u> : "\xc4\x82" Abreve
-+Ctrl<T> <C> <apostrophe> : "\xc4\x86" Cacute
-+Ctrl<T> <L> <apostrophe> : "\xc4\xb9" Lacute
-+Ctrl<T> <L> <slash> : "\xc5\x81" Lstroke
-+Ctrl<T> <L> <greater> : "\xc4\xbd" Lcaron
-+Ctrl<T> <N> <apostrophe> : "\xc5\x83" Nacute
-+Ctrl<T> <S> <apostrophe> : "\xc5\x9a" Sacute
-+Ctrl<T> <R> <apostrophe> : "\xc5\x94" Racute
-+Ctrl<T> <U> <asterisk> : "\xc5\xae" Uring
-+Ctrl<T> <Z> <apostrophe> : "\xc5\xb9" Zacute
-+Ctrl<T> <a> <u> : "\xc4\x83" abreve
-+Ctrl<T> <c> <apostrophe> : "\xc4\x87" cacute
-+Ctrl<T> <l> <apostrophe> : "\xc4\xba" lacute
-+Ctrl<T> <l> <slash> : "\xc5\x82" lstroke
-+Ctrl<T> <l> <greater> : "\xc4\xbe" lcaron
-+Ctrl<T> <n> <apostrophe> : "\xc5\x84" nacute
-+Ctrl<T> <s> <apostrophe> : "\xc5\x9b" sacute
-+Ctrl<T> <r> <apostrophe> : "\xc5\x95" racute
-+Ctrl<T> <u> <asterisk> : "\xc5\xaf" uring
-+Ctrl<T> <z> <apostrophe> : "\xc5\xba" zacute
-+XCOMM
-+XCOMM Latin-3 sequences
-+Ctrl<T> <C> <asciicircum> : "\xc4\x88" Ccircumflex
-+Ctrl<T> <asciicircum> <C> : "\xc4\x88" Ccircumflex
-+Ctrl<T> <C> <greater> : "\xc4\x88" Ccircumflex
-+Ctrl<T> <greater> <C> : "\xc4\x88" Ccircumflex
++Ctrl<T> <g> <g> : SWITCH_STATE_TO "[ Greek ]"
++Ctrl<T> <t> <t> : SWITCH_STATE_TO "[ Thai ]"
++Ctrl<T> <a> <r> : SWITCH_STATE_TO "[ Arabic ]"
++Ctrl<T> <h> <i> : SWITCH_STATE_TO "[ Indic ]"
++Ctrl<T> <i> <n> : SWITCH_STATE_TO "[ Indic ]"
++Ctrl<T> <h> <h> : SWITCH_STATE_TO "[ Hebrew ]"
++Ctrl<T> <u> <h> : SWITCH_STATE_TO "[ Unicode Hex ]"
++Ctrl<T> <u> <o> : SWITCH_STATE_TO "[ Unicode Octal ]"
++Ctrl<T> <l> <l> : SWITCH_STATE_TO "[ Lookup ]"
++Ctrl<T> <j> <a> : SWITCH_STATE_TO "[ Japanese ]"
++Ctrl<T> <k> <o> : SWITCH_STATE_TO "[ Korean ]"
++Ctrl<T> <s> <c> : SWITCH_STATE_TO "[ S-Chinese ]"
++Ctrl<T> <t> <c> : SWITCH_STATE_TO "[ T-Chinese ]"
++Ctrl<T> <h> <k> : SWITCH_STATE_TO "[ T-Chinese (Hong Kong) ]"
+
-+Ctrl<T> <c> <asciicircum> : "\xc4\x89" ccircumflex
-+Ctrl<T> <asciicircum> <c> : "\xc4\x89" ccircumflex
-+Ctrl<T> <c> <greater> : "\xc4\x89" ccircumflex
-+Ctrl<T> <greater> <c> : "\xc4\x89" ccircumflex
-+
-+Ctrl<T> <period> <C> : "\xc4\x8a" Cabovedot
-+Ctrl<T> <C> <period> : "\xc4\x8a" Cabovedot
-+
-+Ctrl<T> <period> <c> : "\xc4\x8b" cabovedot
-+Ctrl<T> <c> <period> : "\xc4\x8b" cabovedot
-+
-+Ctrl<T> <G> <asciicircum> : "\xc4\x9c" Gcircumflex
-+Ctrl<T> <asciicircum> <G> : "\xc4\x9c" Gcircumflex
-+Ctrl<T> <G> <greater> : "\xc4\x9c" Gcircumflex
-+Ctrl<T> <greater> <G> : "\xc4\x9c" Gcircumflex
-+
-+Ctrl<T> <g> <asciicircum> : "\xc4\x9d" gcircumflex
-+Ctrl<T> <asciicircum> <g> : "\xc4\x9d" gcircumflex
-+Ctrl<T> <g> <greater> : "\xc4\x9d" gcircumflex
-+Ctrl<T> <greater> <g> : "\xc4\x9d" gcircumflex
-+
-+Ctrl<T> <period> <G> : "\xc4\xa0" Gabovedot
-+Ctrl<T> <G> <period> : "\xc4\xa0" Gabovedot
-+
-+Ctrl<T> <period> <g> : "\xc4\xa1" gabovedot
-+Ctrl<T> <g> <period> : "\xc4\xa1" gabovedot
-+
-+Ctrl<T> <H> <asciicircum> : "\xc4\xa4" Hcircumflex
-+Ctrl<T> <asciicircum> <H> : "\xc4\xa4" Hcircumflex
-+Ctrl<T> <H> <greater> : "\xc4\xa4" Hcircumflex
-+Ctrl<T> <greater> <H> : "\xc4\xa4" Hcircumflex
++<at> : "\x22" quotedbl
++<numbersign> : "\xe2\x84\x96" numerosign
++<dollar> : "\x25" percent
++<percent> : "\x3a" colon
++<asciicircum> : "\x2c" comma
++<ampersand> : "\x2e" period
++<asterisk> : "\x3b" semicolon
++<numerosign> : "\xe2\x84\x96" numerosign
++<q> : "\xd0\xb9" Cyrillic_shorti
++<w> : "\xd1\x86" Cyrillic_tse
++<e> : "\xd1\x83" Cyrillic_u
++<r> : "\xd0\xba" Cyrillic_ka
++<t> : "\xd0\xb5" Cyrillic_ie
++<y> : "\xd0\xbd" Cyrillic_en
++<u> : "\xd0\xb3" Cyrillic_ghe
++<i> : "\xd1\x88" Cyrillic_sha
++<o> : "\xd1\x89" Cyrillic_shcha
++<p> : "\xd0\xb7" Cyrillic_ze
++<bracketleft> : "\xd1\x85" Cyrillic_ha
++<bracketright> : "\xd1\x8a" Cyrillic_hardsign
++<Q> : "\xd0\x99" Cyrillic_SHORTI
++<W> : "\xd0\xa6" Cyrillic_TSE
++<E> : "\xd0\xa3" Cyrillic_U
++<R> : "\xd0\x9a" Cyrillic_KA
++<T> : "\xd0\x95" Cyrillic_IE
++<Y> : "\xd0\x9d" Cyrillic_EN
++<U> : "\xd0\x93" Cyrillic_GHE
++<I> : "\xd0\xa8" Cyrillic_SHA
++<O> : "\xd0\xa9" Cyrillic_SHCHA
++<P> : "\xd0\x97" Cyrillic_ZE
++Lock<bracketleft> : "\xd0\xa5" Cyrillic_HA
++Lock<bracketright> : "\xd0\xaa" Cyrillic_HARDSIGN
++<braceleft> : "\xd0\xa5" Cyrillic_HA
++<braceright> : "\xd0\xaa" Cyrillic_HARDSIGN
++<a> : "\xd1\x84" Cyrillic_ef
++<s> : "\xd1\x8b" Cyrillic_yeru
++<d> : "\xd0\xb2" Cyrillic_ve
++<f> : "\xd0\xb0" Cyrillic_a
++<g> : "\xd0\xbf" Cyrillic_pe
++<h> : "\xd1\x80" Cyrillic_er
++<j> : "\xd0\xbe" Cyrillic_o
++<k> : "\xd0\xbb" Cyrillic_el
++<l> : "\xd0\xb4" Cyrillic_de
++<semicolon> : "\xd0\xb6" Cyrillic_zhe
++<quoteright> : "\xd1\x8d" Cyrillic_e
++<A> : "\xd0\xa4" Cyrillic_EF
++<S> : "\xd0\xab" Cyrillic_YERU
++<D> : "\xd0\x92" Cyrillic_VE
++<F> : "\xd0\x90" Cyrillic_A
++<G> : "\xd0\x9f" Cyrillic_PE
++<H> : "\xd0\xa0" Cyrillic_ER
++<J> : "\xd0\x9e" Cyrillic_O
++<K> : "\xd0\x9b" Cyrillic_EL
++<L> : "\xd0\x94" Cyrillic_DE
++<colon> : "\xd0\x96" Cyrillic_ZHE
++<quotedbl> : "\xd0\xad" Cyrillic_E
++<z> : "\xd1\x8f" Cyrillic_ya
++<x> : "\xd1\x87" Cyrillic_che
++<c> : "\xd1\x81" Cyrillic_es
++<v> : "\xd0\xbc" Cyrillic_em
++<b> : "\xd0\xb8" Cyrillic_i
++<n> : "\xd1\x82" Cyrillic_te
++<m> : "\xd1\x8c" Cyrillic_softsign
++<comma> : "\xd0\xb1" Cyrillic_be
++<period> : "\xd1\x8e" Cyrillic_yu
++<slash> : "\xd1\x91" Cyrillic_io
++<Z> : "\xd0\xaf" Cyrillic_YA
++<X> : "\xd0\xa7" Cyrillic_CHE
++<C> : "\xd0\xa1" Cyrillic_ES
++<V> : "\xd0\x9c" Cyrillic_EM
++<B> : "\xd0\x98" Cyrillic_I
++<N> : "\xd0\xa2" Cyrillic_TE
++<M> : "\xd0\xac" Cyrillic_SOFTSIGN
++<less> : "\xd0\x91" Cyrillic_BE
++<greater> : "\xd0\xae" Cyrillic_YU
++<question> : "\xd0\x81" Cyrillic_IO
++END_STATE
+
-+Ctrl<T> <h> <asciicircum> : "\xc4\xa5" hcircumflex
-+Ctrl<T> <asciicircum> <h> : "\xc4\xa5" hcircumflex
-+Ctrl<T> <h> <greater> : "\xc4\xa5" hcircumflex
-+Ctrl<T> <greater> <h> : "\xc4\xa5" hcircumflex
-+
-+Ctrl<T> <J> <asciicircum> : "\xc4\xb4" Jcircumflex
-+Ctrl<T> <asciicircum> <J> : "\xc4\xb4" Jcircumflex
-+Ctrl<T> <J> <greater> : "\xc4\xb4" Jcircumflex
-+Ctrl<T> <greater> <J> : "\xc4\xb4" Jcircumflex
-+
-+Ctrl<T> <j> <asciicircum> : "\xc4\xb5" jcircumflex
-+Ctrl<T> <asciicircum> <j> : "\xc4\xb5" jcircumflex
-+Ctrl<T> <j> <greater> : "\xc4\xb5" jcircumflex
-+Ctrl<T> <greater> <j> : "\xc4\xb5" jcircumflex
++STATE "[ Greek ]"
++Ctrl<space> : SWITCH_STATE_TO "[ English/European ]"
++<Multi_key> <c> <c> : SWITCH_STATE_TO "[ Cyrillic ]"
++<Multi_key> <t> <t> : SWITCH_STATE_TO "[ Thai ]"
++<Multi_key> <a> <r> : SWITCH_STATE_TO "[ Arabic ]"
++<Multi_key> <h> <i> : SWITCH_STATE_TO "[ Indic ]"
++<Multi_key> <i> <n> : SWITCH_STATE_TO "[ Indic ]"
++<Multi_key> <h> <h> : SWITCH_STATE_TO "[ Hebrew ]"
++<Multi_key> <u> <h> : SWITCH_STATE_TO "[ Unicode Hex ]"
++<Multi_key> <u> <o> : SWITCH_STATE_TO "[ Unicode Octal ]"
++<Multi_key> <l> <l> : SWITCH_STATE_TO "[ Lookup ]"
++<Multi_key> <j> <a> : SWITCH_STATE_TO "[ Japanese ]"
++<Multi_key> <k> <o> : SWITCH_STATE_TO "[ Korean ]"
++<Multi_key> <s> <c> : SWITCH_STATE_TO "[ S-Chinese ]"
++<Multi_key> <t> <c> : SWITCH_STATE_TO "[ T-Chinese ]"
++<Multi_key> <h> <k> : SWITCH_STATE_TO "[ T-Chinese (Hong Kong) ]"
+
-+Ctrl<T> <S> <asciicircum> : "\xc5\x9c" Scircumflex
-+Ctrl<T> <asciicircum> <S> : "\xc5\x9c" Scircumflex
-+Ctrl<T> <S> <greater> : "\xc5\x9c" Scircumflex
-+Ctrl<T> <greater> <S> : "\xc5\x9c" Scircumflex
++Ctrl<T> <c> <c> : SWITCH_STATE_TO "[ Cyrillic ]"
++Ctrl<T> <t> <t> : SWITCH_STATE_TO "[ Thai ]"
++Ctrl<T> <a> <r> : SWITCH_STATE_TO "[ Arabic ]"
++Ctrl<T> <h> <i> : SWITCH_STATE_TO "[ Indic ]"
++Ctrl<T> <i> <n> : SWITCH_STATE_TO "[ Indic ]"
++Ctrl<T> <h> <h> : SWITCH_STATE_TO "[ Hebrew ]"
++Ctrl<T> <u> <h> : SWITCH_STATE_TO "[ Unicode Hex ]"
++Ctrl<T> <u> <o> : SWITCH_STATE_TO "[ Unicode Octal ]"
++Ctrl<T> <l> <l> : SWITCH_STATE_TO "[ Lookup ]"
++Ctrl<T> <j> <a> : SWITCH_STATE_TO "[ Japanese ]"
++Ctrl<T> <k> <o> : SWITCH_STATE_TO "[ Korean ]"
++Ctrl<T> <s> <c> : SWITCH_STATE_TO "[ S-Chinese ]"
++Ctrl<T> <t> <c> : SWITCH_STATE_TO "[ T-Chinese ]"
++Ctrl<T> <h> <k> : SWITCH_STATE_TO "[ T-Chinese (Hong Kong) ]"
+
-+Ctrl<T> <s> <asciicircum> : "\xc5\x9d" scircumflex
-+Ctrl<T> <asciicircum> <s> : "\xc5\x9d" scircumflex
-+Ctrl<T> <s> <greater> : "\xc5\x9d" scircumflex
-+Ctrl<T> <greater> <s> : "\xc5\x9d" scircumflex
-+
-+Ctrl<T> <U> <breve> : "\xc5\xac" Ubreve
-+Ctrl<T> <breve> <U> : "\xc5\xac" Ubreve
-+Ctrl<T> <U> <u> : "\xc5\xac" Ubreve
-+Ctrl<T> <u> <U> : "\xc5\xac" Ubreve
-+
-+Ctrl<T> <u> <breve> : "\xc5\xad" ubreve
-+Ctrl<T> <breve> <u> : "\xc5\xad" ubreve
-+Ctrl<T> <u> <u> : "\xc5\xad" ubreve
XCOMM
-XCOMM Greek Extended multi-key and dead key definitions. These have been
-XCOMM machine-generated by a perl script, found at:
@@ -3433,327 +3752,8 @@
-<dead_iota> <underscore> : "ι" U1fbe
-<dead_iota> <space> : "ͺ" U037a
-<dead_iota> <dead_iota> : "ͺ" U037a
-+XCOMM Latin-4 sequences
-+Ctrl<T> <N> <N> : "\xc5\x8a" ENG
-+Ctrl<T> <U> <a> : "\xc5\xb2" Uogonek
-+Ctrl<T> <u> <a> : "\xc5\xb3" uogonek
-+Ctrl<T> <k> <k> : "\xc4\xb8" kra
-+Ctrl<T> <R> <comma> : "\xc5\x96" Rcedilla
-+Ctrl<T> <comma> <R> : "\xc5\x96" Rcedilla
-+Ctrl<T> <r> <comma> : "\xc5\x97" rcedilla
-+Ctrl<T> <comma> <r> : "\xc5\x97" rcedilla
-+Ctrl<T> <I> <asciitilde> : "\xc4\xa8" Itilde
-+Ctrl<T> <asciitilde> <I> : "\xc4\xa8" Itilde
-+Ctrl<T> <i> <asciitilde> : "\xc4\xa9" itilde
-+Ctrl<T> <asciitilde> <i> : "\xc4\xa9" itilde
-+Ctrl<T> <L> <comma> : "\xc4\xbb" Lcedilla
-+Ctrl<T> <comma> <L> : "\xc4\xbb" Lcedilla
-+Ctrl<T> <l> <comma> : "\xc4\xbc" lcedilla
-+Ctrl<T> <comma> <l> : "\xc4\xbc" lcedilla
-+Ctrl<T> <S> <v> : "\xc5\xa0" Scaron
-+Ctrl<T> <S> <V> : "\xc5\xa0" Scaron
-+Ctrl<T> <v> <S> : "\xc5\xa0" Scaron
-+Ctrl<T> <V> <S> : "\xc5\xa0" Scaron
-+Ctrl<T> <s> <v> : "\xc5\xa1" scaron
-+Ctrl<T> <s> <V> : "\xc5\xa1" scaron
-+Ctrl<T> <v> <s> : "\xc5\xa1" scaron
-+Ctrl<T> <V> <s> : "\xc5\xa1" scaron
-+Ctrl<T> <E> <underscore> : "\xc4\x92" Emacron
-+Ctrl<T> <underscore> <E> : "\xc4\x92" Emacron
-+Ctrl<T> <e> <underscore> : "\xc4\x93" emacron
-+Ctrl<T> <underscore> <e> : "\xc4\x93" emacron
-+Ctrl<T> <G> <comma> : "\xc4\xa2" Gcedilla
-+Ctrl<T> <comma> <G> : "\xc4\xa2" Gcedilla
-+Ctrl<T> <g> <comma> : "\xc4\xa3" gcedilla
-+Ctrl<T> <comma> <g> : "\xc4\xa3" gcedilla
-+Ctrl<T> <T> <bar> : "\xc5\xa6" Tslash
-+Ctrl<T> <bar> <T> : "\xc5\xa6" Tslash
-+Ctrl<T> <t> <bar> : "\xc5\xa7" tslash
-+Ctrl<T> <bar> <t> : "\xc5\xa7" tslash
-+Ctrl<T> <n> <n> : "\xc5\x8b" eng
-+Ctrl<T> <d> <underscore> : "\xc4\x91"
-+Ctrl<T> <underscore> <d> : "\xc4\x91"
-+Ctrl<T> <N> <comma> : "\xc5\x85" Ncedilla
-+Ctrl<T> <comma> <N> : "\xc5\x85" Ncedilla
-+Ctrl<T> <n> <comma> : "\xc5\x86" ncedilla
-+Ctrl<T> <comma> <n> : "\xc5\x86" ncedilla
-+Ctrl<T> <K> <comma> : "\xc4\xb6" Kcedilla
-+Ctrl<T> <comma> <K> : "\xc4\xb6" Kcedilla
-+Ctrl<T> <k> <comma> : "\xc4\xb7" kcedilla
-+Ctrl<T> <comma> <k> : "\xc4\xb7" kcedilla
-+Ctrl<T> <I> <a> : "\xc4\xae" Iogonek
-+Ctrl<T> <a> <I> : "\xc4\xae" Iogonek
-+Ctrl<T> <i> <a> : "\xc4\xaf" iogonek
-+Ctrl<T> <a> <i> : "\xc4\xaf" iogonek
-+Ctrl<T> <E> <period> : "\xc4\x96" Eabovedot
-+Ctrl<T> <e> <period> : "\xc4\x97" eabovedot
-+Ctrl<T> <U> <asciitilde> : "\xc5\xa8" Utilde
-+Ctrl<T> <asciitilde> <U> : "\xc5\xa8" Utilde
-+Ctrl<T> <u> <asciitilde> : "\xc5\xa9" utilde
-+Ctrl<T> <asciitilde> <u> : "\xc5\xa9" utilde
-+Ctrl<T> <U> <underscore> : "\xc5\xaa" Umacron
-+Ctrl<T> <underscore> <U> : "\xc5\xaa" Umacron
-+Ctrl<T> <u> <underscore> : "\xc5\xab" umacron
-+Ctrl<T> <underscore> <u> : "\xc5\xab" umacron
-+Ctrl<T> <I> <underscore> : "\xc4\xaa" Imacron
-+Ctrl<T> <underscore> <I> : "\xc4\xaa" Imacron
-+Ctrl<T> <i> <underscore> : "\xc4\xab" imacron
-+Ctrl<T> <underscore> <i> : "\xc4\xab" imacron
-+XCOMM
-+XCOMM Rules for SunXK_FA_* keysyms:
-+<SunFA_Acute> <apostrophe> : "\xc2\xb4"
-+<SunFA_Acute> <A> : "\xc3\x81"
-+<SunFA_Acute> <a> : "\xc3\xa1"
-+<SunFA_Acute> <C> : "\xc4\x86"
-+<SunFA_Acute> <c> : "\xc4\x87"
-+<SunFA_Acute> <E> : "\xc3\x89"
-+<SunFA_Acute> <e> : "\xc3\xa9"
-+<SunFA_Acute> <I> : "\xc3\x8d"
-+<SunFA_Acute> <i> : "\xc3\xad"
-+<SunFA_Acute> <L> : "\xc4\xb9"
-+<SunFA_Acute> <l> : "\xc4\xba"
-+<SunFA_Acute> <N> : "\xc5\x83"
-+<SunFA_Acute> <n> : "\xc5\x84"
-+<SunFA_Acute> <O> : "\xc3\x93"
-+<SunFA_Acute> <o> : "\xc3\xb3"
-+<SunFA_Acute> <R> : "\xc5\x94"
-+<SunFA_Acute> <r> : "\xc5\x95"
-+<SunFA_Acute> <space> : "\x27"
-+<SunFA_Acute> <S> : "\xc5\x9a"
-+<SunFA_Acute> <s> : "\xc5\x9b"
-+<SunFA_Acute> <U> : "\xc3\x9a"
-+<SunFA_Acute> <u> : "\xc3\xba"
-+<SunFA_Acute> <Y> : "\xc3\x9d"
-+<SunFA_Acute> <y> : "\xc3\xbd"
-+<SunFA_Acute> <Z> : "\xc4\xbe"
-+<SunFA_Acute> <z> : "\xc5\xba"
-+<SunFA_Cedilla> <comma> : "\xc2\xb8"
-+<SunFA_Cedilla> <C> : "\xc3\x87"
-+<SunFA_Cedilla> <c> : "\xc3\xa7"
-+<SunFA_Cedilla> <G> : "\xc4\xa2"
-+<SunFA_Cedilla> <g> : "\xc4\xa3"
-+<SunFA_Cedilla> <K> : "\xc4\xb6"
-+<SunFA_Cedilla> <k> : "\xc4\xb7"
-+<SunFA_Cedilla> <L> : "\xc4\xbb"
-+<SunFA_Cedilla> <l> : "\xc4\xbc"
-+<SunFA_Cedilla> <minus> : "\xc2\xac"
-+<SunFA_Cedilla> <N> : "\xc5\x85"
-+<SunFA_Cedilla> <n> : "\xc5\x86"
-+<SunFA_Cedilla> <R> : "\xc5\x96"
-+<SunFA_Cedilla> <r> : "\xc5\x97"
-+<SunFA_Cedilla> <S> : "\xc5\x9e"
-+<SunFA_Cedilla> <s> : "\xc5\x9f"
-+<SunFA_Cedilla> <T> : "\xc5\xa2"
-+<SunFA_Cedilla> <t> : "\xc5\xa3"
-+<SunFA_Circum> <0> : "\xc2\xb0"
-+<SunFA_Circum> <1> : "\xc2\xb9"
-+<SunFA_Circum> <2> : "\xc2\xb2"
-+<SunFA_Circum> <3> : "\xc2\xb3"
-+<SunFA_Circum> <A> : "\xc3\x82"
-+<SunFA_Circum> <a> : "\xc3\xa2"
-+<SunFA_Circum> <C> : "\xc4\x88"
-+<SunFA_Circum> <c> : "\xc4\x89"
-+<SunFA_Circum> <E> : "\xc3\x8a"
-+<SunFA_Circum> <e> : "\xc3\xaa"
-+<SunFA_Circum> <exclam> : "\xc2\xa6"
-+<SunFA_Circum> <G> : "\xc4\x9c"
-+<SunFA_Circum> <g> : "\xc4\x9d"
-+<SunFA_Circum> <H> : "\xc4\xa4"
-+<SunFA_Circum> <h> : "\xc4\xa5"
-+<SunFA_Circum> <I> : "\xc3\x8e"
-+<SunFA_Circum> <i> : "\xc3\xae"
-+<SunFA_Circum> <J> : "\xc4\xb4"
-+<SunFA_Circum> <j> : "\xc4\xb5"
-+<SunFA_Circum> <minus> : "\xc2\xaf"
-+<SunFA_Circum> <O> : "\xc3\x94"
-+<SunFA_Circum> <o> : "\xc3\xb4"
-+<SunFA_Circum> <period> : "\xc2\xb7"
-+<SunFA_Circum> <slash> : "\x7c"
-+<SunFA_Circum> <space> : "\x5e"
-+<SunFA_Circum> <S> : "\xc5\x9c"
-+<SunFA_Circum> <s> : "\xc5\x9d"
-+<SunFA_Circum> <underscore> : "\xc2\xaf"
-+<SunFA_Circum> <U> : "\xc3\x9b"
-+<SunFA_Circum> <u> : "\xc3\xbb"
-+<SunFA_Diaeresis> <A> : "\xc3\x84"
-+<SunFA_Diaeresis> <a> : "\xc3\xa4"
-+<SunFA_Diaeresis> <E> : "\xc3\x8b"
-+<SunFA_Diaeresis> <e> : "\xc3\xab"
-+<SunFA_Diaeresis> <I> : "\xc3\x8f"
-+<SunFA_Diaeresis> <i> : "\xc3\xaf"
-+<SunFA_Diaeresis> <O> : "\xc3\x96"
-+<SunFA_Diaeresis> <o> : "\xc3\xb6"
-+<SunFA_Diaeresis> <quotedbl> : "\xc2\xa8"
-+<SunFA_Diaeresis> <space> : "\xc2\xa8"
-+<SunFA_Diaeresis> <U> : "\xc3\x9c"
-+<SunFA_Diaeresis> <u> : "\xc3\xbc"
-+<SunFA_Diaeresis> <y> : "\xc3\xbf"
-+<SunFA_Grave> <A> : "\xc3\x80"
-+<SunFA_Grave> <a> : "\xc3\xa0"
-+<SunFA_Grave> <E> : "\xc3\x88"
-+<SunFA_Grave> <e> : "\xc3\xa8"
-+<SunFA_Grave> <I> : "\xc3\x8c"
-+<SunFA_Grave> <i> : "\xc3\xac"
-+<SunFA_Grave> <O> : "\xc3\x92"
-+<SunFA_Grave> <o> : "\xc3\xb2"
-+<SunFA_Grave> <space> : "\x60"
-+<SunFA_Grave> <U> : "\xc3\x99"
-+<SunFA_Grave> <u> : "\xc3\xb9"
-+<SunFA_Tilde> <A> : "\xc3\x83"
-+<SunFA_Tilde> <a> : "\xc3\xa3"
-+<SunFA_Tilde> <N> : "\xc3\x91"
-+<SunFA_Tilde> <n> : "\xc3\xb1"
-+<SunFA_Tilde> <O> : "\xc3\x95"
-+<SunFA_Tilde> <o> : "\xc3\xb5"
-+<SunFA_Tilde> <space> : "\x7e"
-+END_STATE
-+
-+STATE "[ Cyrillic ]"
-+Ctrl<space> : SWITCH_STATE_TO "[ English/European ]"
-+<Multi_key> <g> <g> : SWITCH_STATE_TO "[ Greek ]"
-+<Multi_key> <t> <t> : SWITCH_STATE_TO "[ Thai ]"
-+<Multi_key> <a> <r> : SWITCH_STATE_TO "[ Arabic ]"
-+<Multi_key> <h> <i> : SWITCH_STATE_TO "[ Indic ]"
-+<Multi_key> <i> <n> : SWITCH_STATE_TO "[ Indic ]"
-+<Multi_key> <h> <h> : SWITCH_STATE_TO "[ Hebrew ]"
-+<Multi_key> <u> <h> : SWITCH_STATE_TO "[ Unicode Hex ]"
-+<Multi_key> <u> <o> : SWITCH_STATE_TO "[ Unicode Octal ]"
-+<Multi_key> <l> <l> : SWITCH_STATE_TO "[ Lookup ]"
-+<Multi_key> <j> <a> : SWITCH_STATE_TO "[ Japanese ]"
-+<Multi_key> <k> <o> : SWITCH_STATE_TO "[ Korean ]"
-+<Multi_key> <s> <c> : SWITCH_STATE_TO "[ S-Chinese ]"
-+<Multi_key> <t> <c> : SWITCH_STATE_TO "[ T-Chinese ]"
-+<Multi_key> <h> <k> : SWITCH_STATE_TO "[ T-Chinese (Hong Kong) ]"
-+
-+Ctrl<T> <g> <g> : SWITCH_STATE_TO "[ Greek ]"
-+Ctrl<T> <t> <t> : SWITCH_STATE_TO "[ Thai ]"
-+Ctrl<T> <a> <r> : SWITCH_STATE_TO "[ Arabic ]"
-+Ctrl<T> <h> <i> : SWITCH_STATE_TO "[ Indic ]"
-+Ctrl<T> <i> <n> : SWITCH_STATE_TO "[ Indic ]"
-+Ctrl<T> <h> <h> : SWITCH_STATE_TO "[ Hebrew ]"
-+Ctrl<T> <u> <h> : SWITCH_STATE_TO "[ Unicode Hex ]"
-+Ctrl<T> <u> <o> : SWITCH_STATE_TO "[ Unicode Octal ]"
-+Ctrl<T> <l> <l> : SWITCH_STATE_TO "[ Lookup ]"
-+Ctrl<T> <j> <a> : SWITCH_STATE_TO "[ Japanese ]"
-+Ctrl<T> <k> <o> : SWITCH_STATE_TO "[ Korean ]"
-+Ctrl<T> <s> <c> : SWITCH_STATE_TO "[ S-Chinese ]"
-+Ctrl<T> <t> <c> : SWITCH_STATE_TO "[ T-Chinese ]"
-+Ctrl<T> <h> <k> : SWITCH_STATE_TO "[ T-Chinese (Hong Kong) ]"
-+
-+<at> : "\x22" quotedbl
-+<numbersign> : "\xe2\x84\x96" numerosign
-+<dollar> : "\x25" percent
-+<percent> : "\x3a" colon
-+<asciicircum> : "\x2c" comma
-+<ampersand> : "\x2e" period
-+<asterisk> : "\x3b" semicolon
-+<numerosign> : "\xe2\x84\x96" numerosign
-+<q> : "\xd0\xb9" Cyrillic_shorti
-+<w> : "\xd1\x86" Cyrillic_tse
-+<e> : "\xd1\x83" Cyrillic_u
-+<r> : "\xd0\xba" Cyrillic_ka
-+<t> : "\xd0\xb5" Cyrillic_ie
-+<y> : "\xd0\xbd" Cyrillic_en
-+<u> : "\xd0\xb3" Cyrillic_ghe
-+<i> : "\xd1\x88" Cyrillic_sha
-+<o> : "\xd1\x89" Cyrillic_shcha
-+<p> : "\xd0\xb7" Cyrillic_ze
-+<bracketleft> : "\xd1\x85" Cyrillic_ha
-+<bracketright> : "\xd1\x8a" Cyrillic_hardsign
-+<Q> : "\xd0\x99" Cyrillic_SHORTI
-+<W> : "\xd0\xa6" Cyrillic_TSE
-+<E> : "\xd0\xa3" Cyrillic_U
-+<R> : "\xd0\x9a" Cyrillic_KA
-+<T> : "\xd0\x95" Cyrillic_IE
-+<Y> : "\xd0\x9d" Cyrillic_EN
-+<U> : "\xd0\x93" Cyrillic_GHE
-+<I> : "\xd0\xa8" Cyrillic_SHA
-+<O> : "\xd0\xa9" Cyrillic_SHCHA
-+<P> : "\xd0\x97" Cyrillic_ZE
-+Lock<bracketleft> : "\xd0\xa5" Cyrillic_HA
-+Lock<bracketright> : "\xd0\xaa" Cyrillic_HARDSIGN
-+<braceleft> : "\xd0\xa5" Cyrillic_HA
-+<braceright> : "\xd0\xaa" Cyrillic_HARDSIGN
-+<a> : "\xd1\x84" Cyrillic_ef
-+<s> : "\xd1\x8b" Cyrillic_yeru
-+<d> : "\xd0\xb2" Cyrillic_ve
-+<f> : "\xd0\xb0" Cyrillic_a
-+<g> : "\xd0\xbf" Cyrillic_pe
-+<h> : "\xd1\x80" Cyrillic_er
-+<j> : "\xd0\xbe" Cyrillic_o
-+<k> : "\xd0\xbb" Cyrillic_el
-+<l> : "\xd0\xb4" Cyrillic_de
-+<semicolon> : "\xd0\xb6" Cyrillic_zhe
-+<quoteright> : "\xd1\x8d" Cyrillic_e
-+<A> : "\xd0\xa4" Cyrillic_EF
-+<S> : "\xd0\xab" Cyrillic_YERU
-+<D> : "\xd0\x92" Cyrillic_VE
-+<F> : "\xd0\x90" Cyrillic_A
-+<G> : "\xd0\x9f" Cyrillic_PE
-+<H> : "\xd0\xa0" Cyrillic_ER
-+<J> : "\xd0\x9e" Cyrillic_O
-+<K> : "\xd0\x9b" Cyrillic_EL
-+<L> : "\xd0\x94" Cyrillic_DE
-+<colon> : "\xd0\x96" Cyrillic_ZHE
-+<quotedbl> : "\xd0\xad" Cyrillic_E
-+<z> : "\xd1\x8f" Cyrillic_ya
-+<x> : "\xd1\x87" Cyrillic_che
-+<c> : "\xd1\x81" Cyrillic_es
-+<v> : "\xd0\xbc" Cyrillic_em
-+<b> : "\xd0\xb8" Cyrillic_i
-+<n> : "\xd1\x82" Cyrillic_te
-+<m> : "\xd1\x8c" Cyrillic_softsign
-+<comma> : "\xd0\xb1" Cyrillic_be
-+<period> : "\xd1\x8e" Cyrillic_yu
-+<slash> : "\xd1\x91" Cyrillic_io
-+<Z> : "\xd0\xaf" Cyrillic_YA
-+<X> : "\xd0\xa7" Cyrillic_CHE
-+<C> : "\xd0\xa1" Cyrillic_ES
-+<V> : "\xd0\x9c" Cyrillic_EM
-+<B> : "\xd0\x98" Cyrillic_I
-+<N> : "\xd0\xa2" Cyrillic_TE
-+<M> : "\xd0\xac" Cyrillic_SOFTSIGN
-+<less> : "\xd0\x91" Cyrillic_BE
-+<greater> : "\xd0\xae" Cyrillic_YU
-+<question> : "\xd0\x81" Cyrillic_IO
-+END_STATE
-+
-+STATE "[ Greek ]"
-+Ctrl<space> : SWITCH_STATE_TO "[ English/European ]"
-+<Multi_key> <c> <c> : SWITCH_STATE_TO "[ Cyrillic ]"
-+<Multi_key> <t> <t> : SWITCH_STATE_TO "[ Thai ]"
-+<Multi_key> <a> <r> : SWITCH_STATE_TO "[ Arabic ]"
-+<Multi_key> <h> <i> : SWITCH_STATE_TO "[ Indic ]"
-+<Multi_key> <i> <n> : SWITCH_STATE_TO "[ Indic ]"
-+<Multi_key> <h> <h> : SWITCH_STATE_TO "[ Hebrew ]"
-+<Multi_key> <u> <h> : SWITCH_STATE_TO "[ Unicode Hex ]"
-+<Multi_key> <u> <o> : SWITCH_STATE_TO "[ Unicode Octal ]"
-+<Multi_key> <l> <l> : SWITCH_STATE_TO "[ Lookup ]"
-+<Multi_key> <j> <a> : SWITCH_STATE_TO "[ Japanese ]"
-+<Multi_key> <k> <o> : SWITCH_STATE_TO "[ Korean ]"
-+<Multi_key> <s> <c> : SWITCH_STATE_TO "[ S-Chinese ]"
-+<Multi_key> <t> <c> : SWITCH_STATE_TO "[ T-Chinese ]"
-+<Multi_key> <h> <k> : SWITCH_STATE_TO "[ T-Chinese (Hong Kong) ]"
-+
-+Ctrl<T> <c> <c> : SWITCH_STATE_TO "[ Cyrillic ]"
-+Ctrl<T> <t> <t> : SWITCH_STATE_TO "[ Thai ]"
-+Ctrl<T> <a> <r> : SWITCH_STATE_TO "[ Arabic ]"
-+Ctrl<T> <h> <i> : SWITCH_STATE_TO "[ Indic ]"
-+Ctrl<T> <i> <n> : SWITCH_STATE_TO "[ Indic ]"
-+Ctrl<T> <h> <h> : SWITCH_STATE_TO "[ Hebrew ]"
-+Ctrl<T> <u> <h> : SWITCH_STATE_TO "[ Unicode Hex ]"
-+Ctrl<T> <u> <o> : SWITCH_STATE_TO "[ Unicode Octal ]"
-+Ctrl<T> <l> <l> : SWITCH_STATE_TO "[ Lookup ]"
-+Ctrl<T> <j> <a> : SWITCH_STATE_TO "[ Japanese ]"
-+Ctrl<T> <k> <o> : SWITCH_STATE_TO "[ Korean ]"
-+Ctrl<T> <s> <c> : SWITCH_STATE_TO "[ S-Chinese ]"
-+Ctrl<T> <t> <c> : SWITCH_STATE_TO "[ T-Chinese ]"
-+Ctrl<T> <h> <k> : SWITCH_STATE_TO "[ T-Chinese (Hong Kong) ]"
-
+-
-XCOMM Part 3
- XCOMM
--XCOMM ISO 8859-7 (Greek) multi-key and dead key definitions extracted and
--XCOMM converted from the iso8859-7/Compose file.
+XCOMM Key sequences for euro sign:
+AltGraph<e> : "\xe2\x82\xac"
+AltGraph<E> : "\xe2\x82\xac"
@@ -3776,7 +3776,12 @@
+Ctrl<T> <E> <equal> : "\xe2\x82\xac"
+Ctrl<T> <equal> <E> : "\xe2\x82\xac"
+<EuroSign> : "\xe2\x82\xac"
-
++
++
+ XCOMM
+-XCOMM ISO 8859-7 (Greek) multi-key and dead key definitions extracted and
+-XCOMM converted from the iso8859-7/Compose file.
+-
-<Multi_key> <Greek_ALPHA> <apostrophe> : "Ά" Greek_ALPHAaccent
-<Multi_key> <apostrophe> <Greek_ALPHA> : "Ά" Greek_ALPHAaccent
-<Multi_key> <Greek_EPSILON> <apostrophe>: "Έ" Greek_EPSILONaccent
@@ -3859,10 +3864,8 @@
-<dead_diaeresis> <dead_acute> <Greek_iota> : "ΐ" Greek_iotaaccentdieresis
-<dead_diaeresis> <dead_acute> <Greek_upsilon> : "ΰ" Greek_upsilonaccentdieresis
-<dead_diaeresis> <dead_acute> <space> : "΅" Greek_accentdieresis
-
+-
-XCOMM Part 4
- XCOMM
--XCOMM Miscellaneous extensions.
+XCOMM The following seven mappings are not appropriate here; this kind of mappings
+XCOMM should be done at the keytable level at /usr/openwin/share/etc/keytables,
+XCOMM not in the Compose file.
@@ -3979,7 +3982,10 @@
+<Greek_NU> : "\xce\x9d" Greek_NU
+<Greek_MU> : "\xce\x9c" Greek_MU
+<periodcentered> : "\xc2\xb7" periodcentered
-
++
+ XCOMM
+-XCOMM Miscellaneous extensions.
+-
-<dead_macron> <space> : "¯" macron
-<dead_macron> <dead_macron> : "¯" macron
-<dead_breve> <space> : "˘" breve
@@ -4034,7 +4040,6 @@
-<Multi_key> <3> <8> : "⅜" U215C # VULGAR FRACTION THREE EIGHTHS
-<Multi_key> <5> <8> : "⅝" U215D # VULGAR FRACTION FIVE EIGHTHS
-<Multi_key> <7> <8> : "⅞" U215E # VULGAR FRACTION SEVEN EIGHTHS
-+XCOMM
+XCOMM XK_dead_acute and XK_dead_diaeresis defined in Greece*.kt keytable files.
+XCOMM XK_Greek_* are not defined in Greece*.kt keytable files. Nonetheless, we
+XCOMM keep them here for user-defined keytable file possibility.
@@ -4140,14 +4145,6 @@
+<ordfeminine> <bracketleft> :"\xc2\xab" guillemotleft
+<ordfeminine> <bracketright> :"\xc2\xbb" guillemotright
XCOMM
--
--<U17ff> : "ាំ"
--<U17fe> : "ោះ"
--<U17fd> : "េះ"
--<U17fc> : "ុំ"
--<U17fb> : "ុះ"
--
--XCOMM End
+XCOMM Rules for SunXK_FA_* keysyms:
+<SunFA_Acute> <A> :"\xce\x86"
+<SunFA_Acute> <E> :"\xce\x88"
@@ -4657,13 +4654,19 @@
+Ctrl<space> : SWITCH_STATE_TO "[ English/European ]"
+LANGUAGE : zh_HK
+END_STATE
-+
+
+-<U17ff> : "ាំ"
+-<U17fe> : "ោះ"
+-<U17fd> : "េះ"
+-<U17fc> : "ុំ"
+-<U17fb> : "ុះ"
+STATE "[ Thai ]"
+STATE_TYPE: REMOTE_IM
+Ctrl<space> : SWITCH_STATE_TO "[ English/European ]"
+LANGUAGE : th_TH
+END_STATE
-+
+
+-XCOMM End
+STATE "[ Indic ]"
+STATE_TYPE: REMOTE_IM
+Ctrl<space> : SWITCH_STATE_TO "[ English/European ]"
--- a/open-src/lib/libX11/compose-en_US.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-en_US.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -22,7 +22,7 @@
#
diff --git a/nls/en_US.UTF-8/Compose.pre b/nls/en_US.UTF-8/Compose.pre
-index bf6599a..2ef3b95 100644
+index a741332..cf8ed21 100644
--- a/nls/en_US.UTF-8/Compose.pre
+++ b/nls/en_US.UTF-8/Compose.pre
@@ -1,7 +1,70 @@
@@ -97,7 +97,7 @@
XCOMM Part 1 - Manual definitions
XCOMM Spacing versions of dead accents
-@@ -845,7 +908,8 @@ XCOMM Part 3
+@@ -855,7 +918,8 @@ XCOMM Part 3
<Multi_key> <period> <c> : "ċ" U010B # LATIN SMALL LETTER C WITH DOT ABOVE
<Multi_key> <c> <period> : "ċ" U010B # LATIN SMALL LETTER C WITH DOT ABOVE
<dead_caron> <C> : "Č" U010C # LATIN CAPITAL LETTER C WITH CARON
@@ -107,7 +107,7 @@
<Multi_key> <less> <C> : "Č" U010C # LATIN CAPITAL LETTER C WITH CARON
<Multi_key> <C> <less> : "Č" U010C # LATIN CAPITAL LETTER C WITH CARON
<dead_caron> <c> : "č" U010D # LATIN SMALL LETTER C WITH CARON
-@@ -5987,3 +6051,2320 @@ XCOMM Given that no extant APLs use ⍮ I will just leave the line in place.
+@@ -5999,3 +6063,2320 @@ XCOMM Given that no extant APLs use ⍮ I will just leave the line in place.
<Multi_key> <underscore> <U2373> : "⍸" U2378 # _ ⍳ APL FUNCTIONAL SYMBOL IOTA UNDERBAR
<Multi_key> <U2375> <underscore> : "⍹" U2379 # ⍵ _ APL FUNCTIONAL SYMBOL OMEGA UNDERBAR
<Multi_key> <underscore> <U2375> : "⍹" U2379 # _ ⍵ APL FUNCTIONAL SYMBOL OMEGA UNDERBAR
--- a/open-src/lib/libX11/compose-iso8859-1.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-iso8859-1.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-1/Compose.pre nls/iso8859-1/Compose.pre
---- nls/iso8859-1/Compose.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/iso8859-1/Compose.pre 2010-11-21 18:48:06.890258020 -0800
+diff --git a/nls/iso8859-1/Compose.pre b/nls/iso8859-1/Compose.pre
+index c726ecf..da43183 100644
+--- a/nls/iso8859-1/Compose.pre
++++ b/nls/iso8859-1/Compose.pre
@@ -11,6 +11,7 @@ XCOMM Special Character
<Multi_key> <apostrophe> <space> : "'" apostrophe
<Multi_key> <space> <apostrophe> : "'" apostrophe
@@ -59,7 +60,7 @@
XCOMM Ctrl<T> Means <Compose>
XCOMM Special Character
Ctrl<T> <plus> <plus> : "#" numbersign
-@@ -658,7 +659,6 @@ Ctrl<T> <A> <diaeresis> : "\304" Adiae
+@@ -658,7 +659,6 @@ Ctrl<T> <A> <diaeresis> : "\304" Adiaeresis
Ctrl<T> <diaeresis> <A> : "\304" Adiaeresis
Ctrl<T> <A> <asterisk> : "\305" Aring
Ctrl<T> <asterisk> <A> : "\305" Aring
@@ -67,7 +68,7 @@
Ctrl<T> <A> <O> : "\305" Aring
Ctrl<T> <A> <E> : "\306" AE
Ctrl<T> <a> <grave> : "\340" agrave
-@@ -839,5 +839,70 @@ Ctrl<T> <y> <quotedbl> : "\377" ydiaer
+@@ -839,5 +839,70 @@ Ctrl<T> <y> <quotedbl> : "\377" ydiaeresis
Ctrl<T> <quotedbl> <y> : "\377" ydiaeresis
Ctrl<T> <y> <diaeresis> : "\377" ydiaeresis
Ctrl<T> <diaeresis> <y> : "\377" ydiaeresis
--- a/open-src/lib/libX11/compose-iso8859-13.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-iso8859-13.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-13/Compose.pre nls/iso8859-13/Compose.pre
---- nls/iso8859-13/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/iso8859-13/Compose.pre 2010-06-07 15:49:34.269131380 -0700
+diff --git a/nls/iso8859-13/Compose.pre b/nls/iso8859-13/Compose.pre
+index 3e02ca9..c95fce0 100644
+--- a/nls/iso8859-13/Compose.pre
++++ b/nls/iso8859-13/Compose.pre
@@ -1,18 +1,106 @@
XCOMM
XCOMM ISO 8859-13 (Latin7) Compose Sequence
--- a/open-src/lib/libX11/compose-iso8859-15.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-iso8859-15.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-15/Compose.pre nls/iso8859-15/Compose.pre
---- nls/iso8859-15/Compose.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/iso8859-15/Compose.pre 2010-11-21 18:48:18.747788946 -0800
+diff --git a/nls/iso8859-15/Compose.pre b/nls/iso8859-15/Compose.pre
+index ec75cfe..75df2b3 100644
+--- a/nls/iso8859-15/Compose.pre
++++ b/nls/iso8859-15/Compose.pre
@@ -9,7 +9,7 @@ XCOMM Special Character
<Multi_key> <plus> <plus> : "#" numbersign
<Multi_key> <apostrophe> <space> : "'" apostrophe
--- a/open-src/lib/libX11/compose-iso8859-2.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-iso8859-2.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-2/Compose.pre nls/iso8859-2/Compose.pre
---- nls/iso8859-2/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/iso8859-2/Compose.pre 2010-06-07 15:49:29.948508516 -0700
+diff --git a/nls/iso8859-2/Compose.pre b/nls/iso8859-2/Compose.pre
+index 876e82c..947dace 100644
+--- a/nls/iso8859-2/Compose.pre
++++ b/nls/iso8859-2/Compose.pre
@@ -1,535 +1,719 @@
+XCOMM Compose keys configuration file for
+XCOMM Czech, Hungarian and Polish SMCC localizations[turlough]
--- a/open-src/lib/libX11/compose-iso8859-5.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-iso8859-5.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,15 +21,15 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -ru nls/iso8859-5/Compose.pre nls.new/iso8859-5/Compose.pre
-diff -urp -x '*~' -x '*.orig' nls/iso8859-5/Compose.pre nls/iso8859-5/Compose.pre
---- nls/iso8859-5/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/iso8859-5/Compose.pre 2010-06-07 15:49:30.652025458 -0700
+diff --git a/nls/iso8859-5/Compose.pre b/nls/iso8859-5/Compose.pre
+index 01ee440..8dbb2c4 100644
+--- a/nls/iso8859-5/Compose.pre
++++ b/nls/iso8859-5/Compose.pre
@@ -3,12 +3,165 @@ XCOMM ISO 8859-5 Compose Sequence
XCOMM
XCOMM Sequence Definition
XCOMM
-+XCOMM Copyright (c) 2009, 2006, Oracle and/or its affiliates. All rights reserved.
++XCOMM Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
+XCOMM
+XCOMM Copyright (C) 1994 X Consortium
+XCOMM
--- a/open-src/lib/libX11/compose-iso8859-6.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-iso8859-6.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-6/Compose.pre nls/iso8859-6/Compose.pre
---- nls/iso8859-6/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/iso8859-6/Compose.pre 2010-06-07 15:49:31.352692502 -0700
+diff --git a/nls/iso8859-6/Compose.pre b/nls/iso8859-6/Compose.pre
+index cb03315..8c4eca0 100644
+--- a/nls/iso8859-6/Compose.pre
++++ b/nls/iso8859-6/Compose.pre
@@ -1,14 +1,114 @@
+XCOMM Arabic input table (Ascii input mode)
XCOMM
--- a/open-src/lib/libX11/compose-iso8859-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-iso8859-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-8/Compose.pre nls/iso8859-8/Compose.pre
---- nls/iso8859-8/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/iso8859-8/Compose.pre 2010-06-07 15:49:32.801727080 -0700
+diff --git a/nls/iso8859-8/Compose.pre b/nls/iso8859-8/Compose.pre
+index 1ca90c7..108087e 100644
+--- a/nls/iso8859-8/Compose.pre
++++ b/nls/iso8859-8/Compose.pre
@@ -1,14 +1,57 @@
+XCOMM Arabic input table (Ascii input mode)
XCOMM
--- a/open-src/lib/libX11/compose-iso8859-9.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-iso8859-9.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-9/Compose.pre nls/iso8859-9/Compose.pre
---- nls/iso8859-9/Compose.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/iso8859-9/Compose.pre 2010-11-21 18:48:14.880056336 -0800
+diff --git a/nls/iso8859-9/Compose.pre b/nls/iso8859-9/Compose.pre
+index 83122a2..0e893a9 100644
+--- a/nls/iso8859-9/Compose.pre
++++ b/nls/iso8859-9/Compose.pre
@@ -9,6 +9,7 @@ XCOMM Special Character
<Multi_key> <plus> <plus> : "#" numbersign
<Multi_key> <apostrophe> <space> : "'" apostrophe
--- a/open-src/lib/libX11/compose-ja_JP.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-ja_JP.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, 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"),
@@ -21,10 +21,12 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/ja_JP.UTF-8/Compose.pre nls/ja_JP.UTF-8/Compose.pre
---- nls/ja_JP.UTF-8/Compose.pre 2007-05-16 08:34:44.000000000 -0700
-+++ nls/ja_JP.UTF-8/Compose.pre 2008-02-27 21:08:32.576467000 -0800
-@@ -0,0 +1,2583 @@
+diff --git a/nls/ja_JP.UTF-8/Compose.pre b/nls/ja_JP.UTF-8/Compose.pre
+index 6c2c411..c191627 100644
+--- a/nls/ja_JP.UTF-8/Compose.pre
++++ b/nls/ja_JP.UTF-8/Compose.pre
+@@ -1 +1,2583 @@
+-include "X11_LOCALEDATADIR/en_US.UTF-8/Compose"
+XCOMM
+XCOMM Copyright 1996, 2002, Oracle and/or its affiliates. All rights reserved.
+XCOMM
--- a/open-src/lib/libX11/compose-ko_KR.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-ko_KR.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,10 +21,12 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/ko_KR.UTF-8/Compose.pre nls/ko_KR.UTF-8/Compose.pre
---- nls/ko_KR.UTF-8/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/ko_KR.UTF-8/Compose.pre 2010-06-07 15:49:38.139156903 -0700
-@@ -0,0 +1,2538 @@
+diff --git a/nls/ko_KR.UTF-8/Compose.pre b/nls/ko_KR.UTF-8/Compose.pre
+index 6c2c411..2292bc8 100644
+--- a/nls/ko_KR.UTF-8/Compose.pre
++++ b/nls/ko_KR.UTF-8/Compose.pre
+@@ -1 +1,2538 @@
+-include "X11_LOCALEDATADIR/en_US.UTF-8/Compose"
+XCOMM
+XCOMM Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+XCOMM
--- a/open-src/lib/libX11/compose-pt_BR.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-pt_BR.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -22,7 +22,7 @@
#
diff --git a/nls/pt_BR.UTF-8/Compose.pre b/nls/pt_BR.UTF-8/Compose.pre
-index b6d7c8a..a69e1c4 100644
+index 9e0ca4e..a69e1c4 100644
--- a/nls/pt_BR.UTF-8/Compose.pre
+++ b/nls/pt_BR.UTF-8/Compose.pre
@@ -1,4275 +1,2729 @@
@@ -3009,30 +3009,30 @@
-<dead_acute> <Multi_key> <KP_Divide> <o> : "ǿ" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE
-<Multi_key> <acute> <KP_Divide> <o> : "ǿ" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE
-<Multi_key> <apostrophe> <KP_Divide> <o> : "ǿ" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE
--<dead_double_grave> <A> : "Ȁ" U0200 # LATIN CAPITAL LETTER A WITH DOUBLE GRAVE
--<dead_double_grave> <a> : "ȁ" U0201 # LATIN SMALL LETTER A WITH DOUBLE GRAVE
--<dead_inverted_breve> <A> : "Ȃ" U0202 # LATIN CAPITAL LETTER A WITH INVERTED BREVE
--<dead_inverted_breve> <a> : "ȃ" U0203 # LATIN SMALL LETTER A WITH INVERTED BREVE
--<dead_double_grave> <E> : "Ȅ" U0204 # LATIN CAPITAL LETTER E WITH DOUBLE GRAVE
--<dead_double_grave> <e> : "ȅ" U0205 # LATIN SMALL LETTER E WITH DOUBLE GRAVE
--<dead_inverted_breve> <E> : "Ȇ" U0206 # LATIN CAPITAL LETTER E WITH INVERTED BREVE
--<dead_inverted_breve> <e> : "ȇ" U0207 # LATIN SMALL LETTER E WITH INVERTED BREVE
--<dead_double_grave> <I> : "Ȉ" U0208 # LATIN CAPITAL LETTER I WITH DOUBLE GRAVE
--<dead_double_grave> <i> : "ȉ" U0209 # LATIN SMALL LETTER I WITH DOUBLE GRAVE
--<dead_inverted_breve> <I> : "Ȋ" U020A # LATIN CAPITAL LETTER I WITH INVERTED BREVE
--<dead_inverted_breve> <i> : "ȋ" U020B # LATIN SMALL LETTER I WITH INVERTED BREVE
--<dead_double_grave> <O> : "Ȍ" U020C # LATIN CAPITAL LETTER O WITH DOUBLE GRAVE
--<dead_double_grave> <o> : "ȍ" U020D # LATIN SMALL LETTER O WITH DOUBLE GRAVE
--<dead_inverted_breve> <O> : "Ȏ" U020E # LATIN CAPITAL LETTER O WITH INVERTED BREVE
--<dead_inverted_breve> <o> : "ȏ" U020F # LATIN SMALL LETTER O WITH INVERTED BREVE
--<dead_double_grave> <R> : "Ȑ" U0210 # LATIN CAPITAL LETTER R WITH DOUBLE GRAVE
--<dead_double_grave> <r> : "ȑ" U0211 # LATIN SMALL LETTER R WITH DOUBLE GRAVE
--<dead_inverted_breve> <R> : "Ȓ" U0212 # LATIN CAPITAL LETTER R WITH INVERTED BREVE
--<dead_inverted_breve> <r> : "ȓ" U0213 # LATIN SMALL LETTER R WITH INVERTED BREVE
--<dead_double_grave> <U> : "Ȕ" U0214 # LATIN CAPITAL LETTER U WITH DOUBLE GRAVE
--<dead_double_grave> <u> : "ȕ" U0215 # LATIN SMALL LETTER U WITH DOUBLE GRAVE
--<dead_inverted_breve> <U> : "Ȗ" U0216 # LATIN CAPITAL LETTER U WITH INVERTED BREVE
--<dead_inverted_breve> <u> : "ȗ" U0217 # LATIN SMALL LETTER U WITH INVERTED BREVE
+-<dead_doublegrave> <A> : "Ȁ" U0200 # LATIN CAPITAL LETTER A WITH DOUBLE GRAVE
+-<dead_doublegrave> <a> : "ȁ" U0201 # LATIN SMALL LETTER A WITH DOUBLE GRAVE
+-<dead_invertedbreve> <A> : "Ȃ" U0202 # LATIN CAPITAL LETTER A WITH INVERTED BREVE
+-<dead_invertedbreve> <a> : "ȃ" U0203 # LATIN SMALL LETTER A WITH INVERTED BREVE
+-<dead_doublegrave> <E> : "Ȅ" U0204 # LATIN CAPITAL LETTER E WITH DOUBLE GRAVE
+-<dead_doublegrave> <e> : "ȅ" U0205 # LATIN SMALL LETTER E WITH DOUBLE GRAVE
+-<dead_invertedbreve> <E> : "Ȇ" U0206 # LATIN CAPITAL LETTER E WITH INVERTED BREVE
+-<dead_invertedbreve> <e> : "ȇ" U0207 # LATIN SMALL LETTER E WITH INVERTED BREVE
+-<dead_doublegrave> <I> : "Ȉ" U0208 # LATIN CAPITAL LETTER I WITH DOUBLE GRAVE
+-<dead_doublegrave> <i> : "ȉ" U0209 # LATIN SMALL LETTER I WITH DOUBLE GRAVE
+-<dead_invertedbreve> <I> : "Ȋ" U020A # LATIN CAPITAL LETTER I WITH INVERTED BREVE
+-<dead_invertedbreve> <i> : "ȋ" U020B # LATIN SMALL LETTER I WITH INVERTED BREVE
+-<dead_doublegrave> <O> : "Ȍ" U020C # LATIN CAPITAL LETTER O WITH DOUBLE GRAVE
+-<dead_doublegrave> <o> : "ȍ" U020D # LATIN SMALL LETTER O WITH DOUBLE GRAVE
+-<dead_invertedbreve> <O> : "Ȏ" U020E # LATIN CAPITAL LETTER O WITH INVERTED BREVE
+-<dead_invertedbreve> <o> : "ȏ" U020F # LATIN SMALL LETTER O WITH INVERTED BREVE
+-<dead_doublegrave> <R> : "Ȑ" U0210 # LATIN CAPITAL LETTER R WITH DOUBLE GRAVE
+-<dead_doublegrave> <r> : "ȑ" U0211 # LATIN SMALL LETTER R WITH DOUBLE GRAVE
+-<dead_invertedbreve> <R> : "Ȓ" U0212 # LATIN CAPITAL LETTER R WITH INVERTED BREVE
+-<dead_invertedbreve> <r> : "ȓ" U0213 # LATIN SMALL LETTER R WITH INVERTED BREVE
+-<dead_doublegrave> <U> : "Ȕ" U0214 # LATIN CAPITAL LETTER U WITH DOUBLE GRAVE
+-<dead_doublegrave> <u> : "ȕ" U0215 # LATIN SMALL LETTER U WITH DOUBLE GRAVE
+-<dead_invertedbreve> <U> : "Ȗ" U0216 # LATIN CAPITAL LETTER U WITH INVERTED BREVE
+-<dead_invertedbreve> <u> : "ȗ" U0217 # LATIN SMALL LETTER U WITH INVERTED BREVE
-<dead_belowcomma> <S> : "Ș" U0218 # LATIN CAPITAL LETTER S WITH COMMA BELOW
-<dead_belowcomma> <s> : "ș" U0219 # LATIN SMALL LETTER S WITH COMMA BELOW
-<dead_belowcomma> <T> : "Ț" U021A # LATIN CAPITAL LETTER T WITH COMMA BELOW
@@ -3294,8 +3294,8 @@
-<dead_breve> <Cyrillic_u> : "ў" U045E # CYRILLIC SMALL LETTER SHORT U
-<Multi_key> <U> <Cyrillic_u> : "ў" U045E # CYRILLIC SMALL LETTER SHORT U
-<Multi_key> <b> <Cyrillic_u> : "ў" U045E # CYRILLIC SMALL LETTER SHORT U
--<dead_double_grave> <U0474> : "Ѷ" U0476 # CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
--<dead_double_grave> <U0475> : "ѷ" U0477 # CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
+-<dead_doublegrave> <U0474> : "Ѷ" U0476 # CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
+-<dead_doublegrave> <U0475> : "ѷ" U0477 # CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
-<Multi_key> <slash> <Cyrillic_GHE> : "Ғ" U0492 # CYRILLIC CAPITAL LETTER GHE WITH STROKE
-<Multi_key> <KP_Divide> <Cyrillic_GHE> : "Ғ" U0492 # CYRILLIC CAPITAL LETTER GHE WITH STROKE
-<Multi_key> <slash> <Cyrillic_ghe> : "ғ" U0493 # CYRILLIC SMALL LETTER GHE WITH STROKE
--- a/open-src/lib/libX11/compose-th_TH.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2009, 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 -ru nls/th_TH.UTF-8/Compose.pre nls.new/th_TH.UTF-8/Compose.pre
-diff -urp -x '*~' -x '*.orig' nls/th_TH.UTF-8/Compose.pre nls/th_TH.UTF-8/Compose.pre
---- nls/th_TH.UTF-8/Compose.pre 2009-03-24 22:23:13.000000000 -0700
-+++ nls/th_TH.UTF-8/Compose.pre 2009-03-25 18:27:27.444778000 -0700
-@@ -0,0 +1 @@
-+#include "../en_US.UTF-8/Compose.pre"
--- a/open-src/lib/libX11/compose-zh_CN.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-zh_CN.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, 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"),
@@ -21,10 +21,12 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/zh_CN.UTF-8/Compose.pre nls/zh_CN.UTF-8/Compose.pre
---- nls/zh_CN.UTF-8/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/zh_CN.UTF-8/Compose.pre 2010-06-07 15:49:40.781722582 -0700
-@@ -0,0 +1,2538 @@
+diff --git a/nls/zh_CN.UTF-8/Compose.pre b/nls/zh_CN.UTF-8/Compose.pre
+index 6c2c411..eb35680 100644
+--- a/nls/zh_CN.UTF-8/Compose.pre
++++ b/nls/zh_CN.UTF-8/Compose.pre
+@@ -1 +1,2538 @@
+-include "X11_LOCALEDATADIR/en_US.UTF-8/Compose"
+XCOMM
+XCOMM Copyright (c) 1996, 2000, Oracle and/or its affiliates. All rights reserved.
+XCOMM
--- a/open-src/lib/libX11/compose-zh_HK.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-zh_HK.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, 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"),
@@ -21,10 +21,12 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/zh_HK.UTF-8/Compose.pre nls/zh_HK.UTF-8/Compose.pre
---- nls/zh_HK.UTF-8/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/zh_HK.UTF-8/Compose.pre 2010-06-07 15:49:41.532854761 -0700
-@@ -0,0 +1,2538 @@
+diff --git a/nls/zh_HK.UTF-8/Compose.pre b/nls/zh_HK.UTF-8/Compose.pre
+index 6c2c411..65533db 100644
+--- a/nls/zh_HK.UTF-8/Compose.pre
++++ b/nls/zh_HK.UTF-8/Compose.pre
+@@ -1 +1,2538 @@
+-include "X11_LOCALEDATADIR/en_US.UTF-8/Compose"
+XCOMM
+XCOMM Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+XCOMM
--- a/open-src/lib/libX11/compose-zh_TW.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose-zh_TW.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, 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"),
@@ -21,10 +21,12 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/zh_TW.UTF-8/Compose.pre nls/zh_TW.UTF-8/Compose.pre
---- nls/zh_TW.UTF-8/Compose.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/zh_TW.UTF-8/Compose.pre 2010-06-07 15:49:42.290526710 -0700
-@@ -0,0 +1,2537 @@
+diff --git a/nls/zh_TW.UTF-8/Compose.pre b/nls/zh_TW.UTF-8/Compose.pre
+index 6c2c411..d99cd83 100644
+--- a/nls/zh_TW.UTF-8/Compose.pre
++++ b/nls/zh_TW.UTF-8/Compose.pre
+@@ -1 +1,2537 @@
+-include "X11_LOCALEDATADIR/en_US.UTF-8/Compose"
+XCOMM
+XCOMM Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+XCOMM
--- a/open-src/lib/libX11/compose.dir.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/compose.dir.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, 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"),
@@ -21,76 +21,15 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/compose.dir.pre nls/compose.dir.pre
---- nls/compose.dir.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/compose.dir.pre 2010-08-10 16:38:10.899093635 -0700
-@@ -239,6 +239,7 @@ XCOMM
- XCOMM
- en_US.UTF-8/Compose: af_ZA.UTF-8
- en_US.UTF-8/Compose: ar_AA.UTF-8
-+en_US.UTF-8/Compose: ar_AE.UTF-8
- en_US.UTF-8/Compose: ar_BH.UTF-8
- en_US.UTF-8/Compose: ar_DZ.UTF-8
- en_US.UTF-8/Compose: ar_EG.UTF-8
-@@ -254,6 +255,7 @@ en_US.UTF-8/Compose: ar_QA.UTF-8
- en_US.UTF-8/Compose: ar_SA.UTF-8
- en_US.UTF-8/Compose: ar_TN.UTF-8
- en_US.UTF-8/Compose: ar_YE.UTF-8
-+en_US.UTF-8/Compose: as_IN.UTF-8
- en_US.UTF-8/Compose: bo_IN.UTF-8
- en_US.UTF-8/Compose: bs_BA.UTF-8
- en_US.UTF-8/Compose: az_AZ.UTF-8
-@@ -279,17 +281,23 @@ en_US.UTF-8/Compose: de_LU.UTF-8
- el_GR.UTF-8/Compose: el_CY.UTF-8
- el_GR.UTF-8/Compose: el_GR.UTF-8
- en_US.UTF-8/Compose: en_AU.UTF-8
-+en_US.UTF-8/Compose: en_BW.UTF-8
- en_US.UTF-8/Compose: en_BZ.UTF-8
- en_US.UTF-8/Compose: en_CA.UTF-8
- en_US.UTF-8/Compose: en_GB.UTF-8
-+en_US.UTF-8/Compose: en_HK.UTF-8
- en_US.UTF-8/Compose: en_IE.UTF-8
-+en_US.UTF-8/Compose: en_IN.UTF-8
- en_US.UTF-8/Compose: en_JM.UTF-8
- en_US.UTF-8/Compose: en_MT.UTF-8
- en_US.UTF-8/Compose: en_NZ.UTF-8
-+en_US.UTF-8/Compose: en_PH.UTF-8
-+en_US.UTF-8/Compose: en_SG.UTF-8
- en_US.UTF-8/Compose: en_TT.UTF-8
- en_US.UTF-8/Compose: en_UK.UTF-8
- en_US.UTF-8/Compose: en_US.UTF-8
- en_US.UTF-8/Compose: en_ZA.UTF-8
-+en_US.UTF-8/Compose: en_ZW.UTF-8
- en_US.UTF-8/Compose: eo_XX.UTF-8
- en_US.UTF-8/Compose: es_AR.UTF-8
- en_US.UTF-8/Compose: es_BO.UTF-8
-@@ -337,14 +345,15 @@ en_US.UTF-8/Compose: is_IS.UTF-8
- en_US.UTF-8/Compose: it_CH.UTF-8
- en_US.UTF-8/Compose: it_IT.UTF-8
- en_US.UTF-8/Compose: iu_CA.UTF-8
--en_US.UTF-8/Compose: ja_JP.UTF-8
-+ja_JP.UTF-8/Compose: ja_JP.UTF-8
- en_US.UTF-8/Compose: ka_GE.UTF-8
- en_US.UTF-8/Compose: kl_GL.UTF-8
- en_US.UTF-8/Compose: kk_KZ.UTF-8
- en_US.UTF-8/Compose: kn_IN.UTF-8
--en_US.UTF-8/Compose: ko_KR.UTF-8
-+ko_KR.UTF-8/Compose: ko_KR.UTF-8
- en_US.UTF-8/Compose: ks_IN.UTF-8
- en_US.UTF-8/Compose: [email protected]
-+en_US.UTF-8/Compose: ku_TR.UTF-8
- en_US.UTF-8/Compose: kw_GB.UTF-8
- en_US.UTF-8/Compose: ky_KG.UTF-8
- en_US.UTF-8/Compose: lo_LA.UTF-8
-@@ -413,7 +422,10 @@ en_US.UTF-8/Compose: vi_VN.UTF-8
- en_US.UTF-8/Compose: wa_BE.UTF-8
- en_US.UTF-8/Compose: yi_US.UTF-8
+diff --git a/nls/compose.dir.pre b/nls/compose.dir.pre
+index fa267ce..ea676e4 100644
+--- a/nls/compose.dir.pre
++++ b/nls/compose.dir.pre
+@@ -468,6 +468,6 @@ en_US.UTF-8/Compose: yi_US.UTF-8
en_US.UTF-8/Compose: xh_ZA.UTF-8
--en_US.UTF-8/Compose: zh_TW.UTF-8
-+zh_CN.UTF-8/Compose: zh_CN.UTF-8
-+zh_HK.UTF-8/Compose: zh_HK.UTF-8
+ zh_CN.UTF-8/Compose: zh_CN.UTF-8
+ zh_HK.UTF-8/Compose: zh_HK.UTF-8
+zh_CN.UTF-8/Compose: zh_SG.UTF-8
-+zh_TW.UTF-8/Compose: zh_TW.UTF-8
+ zh_TW.UTF-8/Compose: zh_TW.UTF-8
en_US.UTF-8/Compose: zu_ZA.UTF-8
- en_US.UTF-8/Compose: bs_BA.UTF-8
- en_US.UTF-8/Compose: ne_NP.UTF-8
+-en_US.UTF-8/Compose: zh_SG.UTF-8
--- a/open-src/lib/libX11/im-suneu-greek.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/im-suneu-greek.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' src/imConv.c src/imConv.c
---- src/imConv.c 2010-09-21 18:25:24.000000000 -0700
-+++ src/imConv.c 2010-11-21 18:47:58.605389418 -0800
+diff --git a/src/imConv.c b/src/imConv.c
+index ec8493f..93e683f 100644
+--- a/src/imConv.c
++++ b/src/imConv.c
@@ -69,6 +69,7 @@ struct SubstRec {
};
--- a/open-src/lib/libX11/im-ximcp.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/im-ximcp.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -Nurp -x '*~' -x '*.orig' modules/im/ximcp/imImSw.c modules/im/ximcp/imImSw.c
---- modules/im/ximcp/imImSw.c 2010-09-03 22:52:38.000000000 -0700
-+++ modules/im/ximcp/imImSw.c 2011-04-06 13:52:23.090417547 -0700
+diff --git a/modules/im/ximcp/imImSw.c b/modules/im/ximcp/imImSw.c
+index 28b1725..327736e 100644
+--- a/modules/im/ximcp/imImSw.c
++++ b/modules/im/ximcp/imImSw.c
@@ -48,7 +48,9 @@ _XimCheckIfDefault(
}
@@ -34,28 +35,30 @@
{ _XimCheckIfThaiProcessing, _XimThaiOpenIM, _XimThaiIMFree },
{ _XimCheckIfDefault, _XimProtoOpenIM, _XimProtoIMFree },
{ NULL, NULL, NULL },
-diff -Nurp -x '*~' -x '*.orig' modules/im/ximcp/imThaiFlt.c modules/im/ximcp/imThaiFlt.c
---- modules/im/ximcp/imThaiFlt.c 2011-03-24 22:34:22.000000000 -0700
-+++ modules/im/ximcp/imThaiFlt.c 2011-04-06 13:52:23.091092465 -0700
+diff --git a/modules/im/ximcp/imThaiFlt.c b/modules/im/ximcp/imThaiFlt.c
+index f134e84..898fc1f 100644
+--- a/modules/im/ximcp/imThaiFlt.c
++++ b/modules/im/ximcp/imThaiFlt.c
@@ -76,6 +76,12 @@ SOFTWARE.
#include "XimThai.h"
#include "XlcPubI.h"
+#ifdef sun
-+#include "XlcGeneric.h"
-+#if !defined(macII) && !defined(Lynx_22) && !defined(X_LOCALE)
-+#define STDCVT
-+#endif
++# include "XlcGeneric.h"
++# if !defined(X_LOCALE)
++# define STDCVT
++# endif
+#endif
#define SPACE 32
-@@ -516,6 +522,45 @@ Private Bool ThaiComposeConvert(
+@@ -516,6 +522,47 @@ static Bool ThaiComposeConvert(
(wchar_t)(c) : \
((0x0A1<=(c)) ? ((wchar_t)(c)-0xA0+0x0E00) : 0))
+#ifdef sun
-+Private int wc2tis(XLCd lcd, unsigned char* ch, wchar_t wc)
++static int
++wc2tis(XLCd lcd, unsigned char* ch, wchar_t wc)
+{
+#ifdef STDCVT
+ if (XLC_GENERIC(lcd, use_stdc_env) == True)
@@ -70,7 +73,8 @@
+}
+
+
-+Private int tis2wc(XLCd lcd, wchar_t *pwc, unsigned char* ch)
++static int
++tis2wc(XLCd lcd, wchar_t *pwc, unsigned char* ch)
+{
+#ifdef STDCVT
+ if (XLC_GENERIC(lcd, use_stdc_env) == True)
@@ -96,12 +100,13 @@
/*
* Macros to save and recall last input character in XIC
*/
-@@ -1210,6 +1255,41 @@ Private void InitIscMode(Xic ic)
+@@ -1210,6 +1257,42 @@ static void InitIscMode(Xic ic)
return;
}
+#ifdef sun
-+Private Bool is_utf8_locale()
++static Bool
++is_utf8_locale(void)
+{
+ const char* locale;
+ locale = getenv("LC_ALL");
@@ -138,7 +143,7 @@
/*
* Helper functions for _XimThaiFilter()
*/
-@@ -1217,8 +1297,20 @@ Private Bool
+@@ -1217,8 +1300,20 @@ static Bool
ThaiFltAcceptInput(Xic ic, unsigned char new_char, KeySym symbol)
{
DefTreeBase *b = &ic->private.local.base;
@@ -159,7 +164,7 @@
if ((new_char <= 0x1f) || (new_char == 0x7f))
b->tree[ic->private.local.composed].keysym = symbol;
-@@ -1233,10 +1325,23 @@ ThaiFltReorderInput(Xic ic, unsigned cha
+@@ -1233,9 +1328,23 @@ ThaiFltReorderInput(Xic ic, unsigned char previous_char, unsigned char new_char)
{
DefTreeBase *b = &ic->private.local.base;
if (!IC_DeletePreviousChar(ic)) return False;
@@ -179,12 +184,11 @@
b->wc[b->tree[ic->private.local.composed].wc+0] = tis2ucs(new_char);
b->wc[b->tree[ic->private.local.composed].wc+1] = tis2ucs(previous_char);
b->wc[b->tree[ic->private.local.composed].wc+2] = '\0';
--
+#endif
+
b->tree[ic->private.local.composed].keysym = NoSymbol;
- return True;
-@@ -1247,9 +1352,20 @@ ThaiFltReplaceInput(Xic ic, unsigned cha
+@@ -1247,8 +1356,20 @@ ThaiFltReplaceInput(Xic ic, unsigned char new_char, KeySym symbol)
{
DefTreeBase *b = &ic->private.local.base;
if (!IC_DeletePreviousChar(ic)) return False;
@@ -201,12 +205,11 @@
+#else
b->wc[b->tree[ic->private.local.composed].wc+0] = tis2ucs(new_char);
b->wc[b->tree[ic->private.local.composed].wc+1] = '\0';
--
+#endif
+
if ((new_char <= 0x1f) || (new_char == 0x7f))
b->tree[ic->private.local.composed].keysym = symbol;
- else
-@@ -1374,7 +1490,15 @@ _XimThaiFilter(Display *d, Window w, XEv
+@@ -1374,7 +1495,15 @@ _XimThaiFilter(Display *d, Window w, XEvent *ev, XPointer client_data)
*/
isc_mode = IC_IscMode(ic);
if (!(previous_char = IC_GetPreviousChar(ic))) previous_char = ' ';
--- a/open-src/lib/libX11/lc-gb18030.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/lc-gb18030.patch Mon Sep 30 13:26:39 2013 -0700
@@ -22,10 +22,10 @@
#
diff --git a/configure.ac b/configure.ac
-index 2371d24..a2e2bc9 100644
+index a8ed884..95ab955 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -460,6 +460,7 @@ AC_CONFIG_FILES([Makefile
+@@ -465,6 +465,7 @@ AC_CONFIG_FILES([Makefile
modules/im/ximcp/Makefile
modules/lc/Makefile
modules/lc/def/Makefile
@@ -70,7 +70,7 @@
extern XLCd _XlcEucLoader(
const char* name
diff --git a/src/xlibi18n/lcCT.c b/src/xlibi18n/lcCT.c
-index ac07cb1..045c45d 100644
+index 624379a..bbf3ebe 100644
--- a/src/xlibi18n/lcCT.c
+++ b/src/xlibi18n/lcCT.c
@@ -126,6 +126,8 @@ static const CTDataRec default_ct_data[] =
@@ -117,7 +117,7 @@
_XlcRemoveLoader(_XlcDynamicLoader);
#endif
diff --git a/src/xlibi18n/lcUTF8.c b/src/xlibi18n/lcUTF8.c
-index 59dfe1a..32241ce 100644
+index 18af23d..3ae51b1 100644
--- a/src/xlibi18n/lcUTF8.c
+++ b/src/xlibi18n/lcUTF8.c
@@ -213,6 +213,7 @@ typedef struct {
--- a/open-src/lib/libX11/lc-jisx0208.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/lc-jisx0208.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' src/xlibi18n/lcUniConv/jisx0208.h src/xlibi18n/lcUniConv/jisx0208.h
---- src/xlibi18n/lcUniConv/jisx0208.h 2010-01-14 17:11:36.000000000 -0800
-+++ src/xlibi18n/lcUniConv/jisx0208.h 2010-06-07 15:49:24.412325193 -0700
+diff --git a/src/xlibi18n/lcUniConv/jisx0208.h b/src/xlibi18n/lcUniConv/jisx0208.h
+index 5888f6f..daf4797 100644
+--- a/src/xlibi18n/lcUniConv/jisx0208.h
++++ b/src/xlibi18n/lcUniConv/jisx0208.h
@@ -3,6 +3,451 @@
* JISX0208.1990-0
*/
@@ -476,7 +477,7 @@
static const unsigned short jisx0208_2uni_page21[690] = {
/* 0x21 */
0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b,
-@@ -1012,11 +1457,19 @@ jisx0208_mbtowc (conv_t conv, ucs4_t *pw
+@@ -1012,11 +1457,19 @@ jisx0208_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
return 2;
}
}
@@ -496,7 +497,7 @@
}
static const unsigned short jisx0208_2charset[6879] = {
-@@ -2359,7 +2812,7 @@ jisx0208_wctomb (conv_t conv, unsigned c
+@@ -2359,7 +2812,7 @@ jisx0208_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
{
if (n >= 2) {
const Summary16 *summary = NULL;
@@ -505,7 +506,7 @@
summary = &jisx0208_uni2indx_page00[(wc>>4)];
else if (wc >= 0x0300 && wc < 0x0460)
summary = &jisx0208_uni2indx_page03[(wc>>4)-0x030];
-@@ -2390,7 +2843,11 @@ jisx0208_wctomb (conv_t conv, unsigned c
+@@ -2390,7 +2843,11 @@ jisx0208_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
return 2;
}
}
--- a/open-src/lib/libX11/lc-jisx0212.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/lc-jisx0212.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' src/xlibi18n/lcUniConv/jisx0212.h src/xlibi18n/lcUniConv/jisx0212.h
---- src/xlibi18n/lcUniConv/jisx0212.h 2010-09-03 22:52:39.000000000 -0700
-+++ src/xlibi18n/lcUniConv/jisx0212.h 2010-11-21 20:00:51.399834544 -0800
+diff --git a/src/xlibi18n/lcUniConv/jisx0212.h b/src/xlibi18n/lcUniConv/jisx0212.h
+index 05cca52..1458e9c 100644
+--- a/src/xlibi18n/lcUniConv/jisx0212.h
++++ b/src/xlibi18n/lcUniConv/jisx0212.h
@@ -3,6 +3,1592 @@
* JISX0212.1990-0
*/
@@ -1617,7 +1618,7 @@
static const unsigned short jisx0212_2uni_page22[81] = {
/* 0x22 */
0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-@@ -919,11 +2505,19 @@ jisx0212_mbtowc (conv_t conv, ucs4_t *pw
+@@ -919,11 +2505,19 @@ jisx0212_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
return 2;
}
}
@@ -1637,7 +1638,7 @@
}
static const unsigned short jisx0212_2charset[6067] = {
-@@ -2134,7 +3728,7 @@ jisx0212_wctomb (conv_t conv, unsigned c
+@@ -2134,7 +3728,7 @@ jisx0212_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
{
if (n >= 2) {
const Summary16 *summary = NULL;
@@ -1646,7 +1647,7 @@
summary = &jisx0212_uni2indx_page00[(wc>>4)];
else if (wc >= 0x2100 && wc < 0x2130)
summary = &jisx0212_uni2indx_page21[(wc>>4)-0x210];
-@@ -2157,7 +3751,11 @@ jisx0212_wctomb (conv_t conv, unsigned c
+@@ -2157,7 +3751,11 @@ jisx0212_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
return 2;
}
}
--- a/open-src/lib/libX11/lc-ksc5601.1992-3.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/lc-ksc5601.1992-3.patch Mon Sep 30 13:26:39 2013 -0700
@@ -22,7 +22,7 @@
#
diff --git a/src/xlibi18n/lcCT.c b/src/xlibi18n/lcCT.c
-index 2fbe8aa..ac07cb1 100644
+index b161300..624379a 100644
--- a/src/xlibi18n/lcCT.c
+++ b/src/xlibi18n/lcCT.c
@@ -51,7 +51,7 @@
@@ -43,10 +43,10 @@
{ "CNS11643.1986-1:GR", /* CNS 11643-1992 pl.1 171 */ "\033$)G" },
{ "CNS11643.1986-2:GL", /* CNS 11643-1992 pl.2 172 */ "\033$(H" },
diff --git a/src/xlibi18n/lcGeneric.c b/src/xlibi18n/lcGeneric.c
-index 619cb47..3f6ebe7 100644
+index 20c455c..0562a71 100644
--- a/src/xlibi18n/lcGeneric.c
+++ b/src/xlibi18n/lcGeneric.c
-@@ -745,6 +745,8 @@ load_generic(
+@@ -747,6 +747,8 @@ load_generic(
/* 3.4.1 side */
if (!_XlcNCompareISOLatin1(value[0], "none", 4)) {
codeset->side = XlcNONE;
@@ -56,7 +56,7 @@
codeset->side = XlcGL;
} else {
diff --git a/src/xlibi18n/lcUTF8.c b/src/xlibi18n/lcUTF8.c
-index 3e934b7..59dfe1a 100644
+index 0f3d0d2..18af23d 100644
--- a/src/xlibi18n/lcUTF8.c
+++ b/src/xlibi18n/lcUTF8.c
@@ -208,6 +208,7 @@ typedef struct {
--- a/open-src/lib/libX11/locale-C.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-C.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,14 +21,15 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/C/XI18N_OBJS nls/C/XI18N_OBJS
---- nls/C/XI18N_OBJS 2008-10-07 10:18:17.000000000 -0700
-+++ nls/C/XI18N_OBJS 2009-04-08 00:25:03.237576000 -0700
+diff --git a/nls/C/XI18N_OBJS b/nls/C/XI18N_OBJS
+index 3a9a1bb..e23e3fe 100644
+--- a/nls/C/XI18N_OBJS
++++ b/nls/C/XI18N_OBJS
@@ -3,6 +3,7 @@
# XI18N objects table for euro locales
#
XLC common/xlibi18n _XlcGenericLoader # XLC_open
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
- XIM common/ximcp _XimOpenIM # XIM_open
+ XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
--- a/open-src/lib/libX11/locale-en_US.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-en_US.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,24 +21,21 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/en_US.UTF-8/XI18N_OBJS nls/en_US.UTF-8/XI18N_OBJS
---- nls/en_US.UTF-8/XI18N_OBJS 2010-01-14 17:11:36.000000000 -0800
-+++ nls/en_US.UTF-8/XI18N_OBJS 2010-06-07 15:49:48.410747016 -0700
-@@ -3,6 +3,10 @@
- # XI18N objects table for euro locales
- #
+diff --git a/nls/en_US.UTF-8/XI18N_OBJS b/nls/en_US.UTF-8/XI18N_OBJS
+index 97b30b9..337b362 100644
+--- a/nls/en_US.UTF-8/XI18N_OBJS
++++ b/nls/en_US.UTF-8/XI18N_OBJS
+@@ -5,3 +5,6 @@
XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open
--XOM common/xomLTRTTB _XomGenericOpenOM # XOM_open
-+#XOM common/xomLTRTTB _XomGenericOpenOM # XOM_open
-+XOM common/xomGeneric _XomGenericOpenOM # XOM_open
- XIM common/xiiimp _SwitchOpenIM # XIM_open
-+XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
- XIM common/xiiimp _XimpLocalOpenIM # XIM_open
+ XOM common/xomGeneric _XomGenericOpenOM # XOM_open
+ XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
++XIM common/xiiimp _XimpLocalOpenIM # XIM_open
+XIM common/ximll _XimpLocalOpenIM # XIM_open
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
-diff -urp -x '*~' -x '*.orig' nls/en_US.UTF-8/XLC_LOCALE.pre nls/en_US.UTF-8/XLC_LOCALE.pre
---- nls/en_US.UTF-8/XLC_LOCALE.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/en_US.UTF-8/XLC_LOCALE.pre 2010-06-07 15:49:48.411369670 -0700
+diff --git a/nls/en_US.UTF-8/XLC_LOCALE.pre b/nls/en_US.UTF-8/XLC_LOCALE.pre
+index 35d009f..949a877 100644
+--- a/nls/en_US.UTF-8/XLC_LOCALE.pre
++++ b/nls/en_US.UTF-8/XLC_LOCALE.pre
@@ -53,6 +53,7 @@ fs4 {
name ISO8859-4:GR
}
--- a/open-src/lib/libX11/locale-iso8859-1.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-iso8859-1.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,14 +21,15 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-1/XI18N_OBJS nls/iso8859-1/XI18N_OBJS
---- nls/iso8859-1/XI18N_OBJS 2008-10-07 10:18:17.000000000 -0700
-+++ nls/iso8859-1/XI18N_OBJS 2009-04-08 00:25:15.123658000 -0700
+diff --git a/nls/iso8859-1/XI18N_OBJS b/nls/iso8859-1/XI18N_OBJS
+index 3a9a1bb..e23e3fe 100644
+--- a/nls/iso8859-1/XI18N_OBJS
++++ b/nls/iso8859-1/XI18N_OBJS
@@ -3,6 +3,7 @@
# XI18N objects table for euro locales
#
XLC common/xlibi18n _XlcGenericLoader # XLC_open
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
- XIM common/ximcp _XimOpenIM # XIM_open
+ XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
--- a/open-src/lib/libX11/locale-iso8859-6.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-iso8859-6.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-6/XI18N_OBJS nls/iso8859-6/XI18N_OBJS
---- nls/iso8859-6/XI18N_OBJS 2010-09-03 22:52:38.000000000 -0700
-+++ nls/iso8859-6/XI18N_OBJS 2010-11-21 18:48:33.986029438 -0800
+diff --git a/nls/iso8859-6/XI18N_OBJS b/nls/iso8859-6/XI18N_OBJS
+index ab2d300..82adf9b 100644
+--- a/nls/iso8859-6/XI18N_OBJS
++++ b/nls/iso8859-6/XI18N_OBJS
@@ -3,5 +3,6 @@
# XI18N objects table for iso8859-6 locale
#
@@ -32,9 +33,10 @@
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
+#XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/iso8859-6/XLC_LOCALE.pre nls/iso8859-6/XLC_LOCALE.pre
---- nls/iso8859-6/XLC_LOCALE.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/iso8859-6/XLC_LOCALE.pre 2010-11-21 18:48:33.986304874 -0800
+diff --git a/nls/iso8859-6/XLC_LOCALE.pre b/nls/iso8859-6/XLC_LOCALE.pre
+index 5b0d4d4..fd3fe6d 100644
+--- a/nls/iso8859-6/XLC_LOCALE.pre
++++ b/nls/iso8859-6/XLC_LOCALE.pre
@@ -11,8 +11,7 @@ fs0 {
name ISO8859-1:GL
}
--- a/open-src/lib/libX11/locale-iso8859-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-iso8859-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/iso8859-8/XI18N_OBJS nls/iso8859-8/XI18N_OBJS
---- nls/iso8859-8/XI18N_OBJS 2008-10-07 10:18:18.000000000 -0700
-+++ nls/iso8859-8/XI18N_OBJS 2009-04-08 00:25:41.364080000 -0700
+diff --git a/nls/iso8859-8/XI18N_OBJS b/nls/iso8859-8/XI18N_OBJS
+index e85b513..b01d0c5 100644
+--- a/nls/iso8859-8/XI18N_OBJS
++++ b/nls/iso8859-8/XI18N_OBJS
@@ -3,5 +3,6 @@
# XI18N objects table for iso8859-8 locale
#
--- a/open-src/lib/libX11/locale-ja.SJIS.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-ja.SJIS.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/ja.SJIS/XI18N_OBJS nls/ja.SJIS/XI18N_OBJS
---- nls/ja.SJIS/XI18N_OBJS 2010-09-03 22:52:38.000000000 -0700
-+++ nls/ja.SJIS/XI18N_OBJS 2010-11-21 18:48:36.526767266 -0800
+diff --git a/nls/ja.SJIS/XI18N_OBJS b/nls/ja.SJIS/XI18N_OBJS
+index 29dffff..c07e623 100644
+--- a/nls/ja.SJIS/XI18N_OBJS
++++ b/nls/ja.SJIS/XI18N_OBJS
@@ -4,7 +4,7 @@
#
XLC ja_JP.PCK/xlibi18n_PCK _XlcGenericLoader # XLC_open
@@ -34,9 +35,10 @@
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
+XIM common/ximp40 _Ximp_OpenIM # XIM_open
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/ja.SJIS/XLC_LOCALE.pre nls/ja.SJIS/XLC_LOCALE.pre
---- nls/ja.SJIS/XLC_LOCALE.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/ja.SJIS/XLC_LOCALE.pre 2010-11-21 18:48:36.527360324 -0800
+diff --git a/nls/ja.SJIS/XLC_LOCALE.pre b/nls/ja.SJIS/XLC_LOCALE.pre
+index 671a985..38448db 100644
+--- a/nls/ja.SJIS/XLC_LOCALE.pre
++++ b/nls/ja.SJIS/XLC_LOCALE.pre
@@ -29,9 +29,20 @@ fs1 {
substitute JISX0208.1990-0:GL
}
@@ -76,7 +78,7 @@
END XLC_FONTSET
XCOMM
-@@ -143,30 +146,279 @@ cs1 {
+@@ -143,8 +146,273 @@ cs1 {
[\xef40,\xef7e]->\x7d21,[\xef80,\xef9e]->\x7d60,[\xef9f,\xeffc]->\x7e21
}
@@ -350,26 +352,4 @@
+cs3 {
side GR
length 1
--#if WCHAR32
- wc_encoding \x10000000
--#else
-- wc_encoding \x00000080
--#endif
- ct_encoding JISX0201.1976-0:GR
- }
-
--XCOMM cs3 class
--XCOMM cs3 {
--XCOMM side GR
--XCOMM length 2
--XCOMM #if WCHAR32
--XCOMM wc_encoding \x20000000
--XCOMM #else
--XCOMM wc_encoding \x00008000
--XCOMM #endif
--XCOMM ct_encoding JISX0212.1990-0:GL; JISX0212.1990-0:GR
--XCOMM }
--
- END XLC_XLOCALE
-
- #else /* __uxp__ */
+ #if WCHAR32
--- a/open-src/lib/libX11/locale-ja.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-ja.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/ja/XI18N_OBJS nls/ja/XI18N_OBJS
---- nls/ja/XI18N_OBJS 2010-09-03 22:52:38.000000000 -0700
-+++ nls/ja/XI18N_OBJS 2010-11-21 18:48:37.485411943 -0800
+diff --git a/nls/ja/XI18N_OBJS b/nls/ja/XI18N_OBJS
+index 50b51fe..f682a19 100644
+--- a/nls/ja/XI18N_OBJS
++++ b/nls/ja/XI18N_OBJS
@@ -4,8 +4,5 @@
#
XLC ja/xlibi18n_ja _XlcGenericLoader # XLC_open
@@ -33,9 +34,10 @@
-XIM common/ximlocal _XimpLocalOpenIM # XIM_open
XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_regiser XIM_unregister
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/ja/XLC_LOCALE.pre nls/ja/XLC_LOCALE.pre
---- nls/ja/XLC_LOCALE.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/ja/XLC_LOCALE.pre 2010-11-21 18:48:37.485721624 -0800
+diff --git a/nls/ja/XLC_LOCALE.pre b/nls/ja/XLC_LOCALE.pre
+index 99decf0..69af5a6 100644
+--- a/nls/ja/XLC_LOCALE.pre
++++ b/nls/ja/XLC_LOCALE.pre
@@ -39,16 +39,18 @@ fs2 {
vertical_rotate all
}
@@ -64,7 +66,7 @@
END XLC_FONTSET
XCOMM
-@@ -107,18 +109,16 @@ cs2 {
+@@ -107,18 +109,17 @@ cs2 {
}
XCOMM cs3 class
@@ -93,4 +95,4 @@
+}
END XLC_XLOCALE
--
+
--- a/open-src/lib/libX11/locale-ja_JP.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-ja_JP.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/ja_JP.UTF-8/XI18N_OBJS nls/ja_JP.UTF-8/XI18N_OBJS
---- nls/ja_JP.UTF-8/XI18N_OBJS 2010-01-14 17:11:36.000000000 -0800
-+++ nls/ja_JP.UTF-8/XI18N_OBJS 2010-06-07 15:49:51.158931189 -0700
+diff --git a/nls/ja_JP.UTF-8/XI18N_OBJS b/nls/ja_JP.UTF-8/XI18N_OBJS
+index 9159b67..13f8980 100644
+--- a/nls/ja_JP.UTF-8/XI18N_OBJS
++++ b/nls/ja_JP.UTF-8/XI18N_OBJS
@@ -4,5 +4,8 @@
#
#
@@ -34,9 +35,10 @@
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
+XIM common/ximp40 _Ximp_OpenIM # XIM_open
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/ja_JP.UTF-8/XLC_LOCALE.pre nls/ja_JP.UTF-8/XLC_LOCALE.pre
---- nls/ja_JP.UTF-8/XLC_LOCALE.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/ja_JP.UTF-8/XLC_LOCALE.pre 2010-06-07 15:49:51.159344368 -0700
+diff --git a/nls/ja_JP.UTF-8/XLC_LOCALE.pre b/nls/ja_JP.UTF-8/XLC_LOCALE.pre
+index 0f5ebe2..1294bdf 100644
+--- a/nls/ja_JP.UTF-8/XLC_LOCALE.pre
++++ b/nls/ja_JP.UTF-8/XLC_LOCALE.pre
@@ -17,7 +17,7 @@ fs0 {
name ISO8859-1:GL
}
@@ -92,7 +94,7 @@
charset {
name JISX0201.1976-0:GR
}
-@@ -75,12 +86,13 @@ XCOMM other fonts are picked up before i
+@@ -75,12 +86,13 @@ XCOMM other fonts are picked up before iso10646-1 fonts.
XCOMM Moreover, some iso10646-1 fonts don't have any glyph at all
XCOMM in ISO8859-X ranges.
--- a/open-src/lib/libX11/locale-ko.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-ko.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/ko/XI18N_OBJS nls/ko/XI18N_OBJS
---- nls/ko/XI18N_OBJS 2010-09-03 22:52:38.000000000 -0700
-+++ nls/ko/XI18N_OBJS 2010-11-21 18:48:40.529442909 -0800
+diff --git a/nls/ko/XI18N_OBJS b/nls/ko/XI18N_OBJS
+index 5ee5237..9a5ad42 100644
+--- a/nls/ko/XI18N_OBJS
++++ b/nls/ko/XI18N_OBJS
@@ -3,5 +3,5 @@
# XI18N objects table for ko locale
#
@@ -31,9 +32,10 @@
-XIM common/ximp40 _Ximp_OpenIM # XIM_open
+XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/ko/XLC_LOCALE.pre nls/ko/XLC_LOCALE.pre
---- nls/ko/XLC_LOCALE.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/ko/XLC_LOCALE.pre 2010-11-21 18:48:40.529726589 -0800
+diff --git a/nls/ko/XLC_LOCALE.pre b/nls/ko/XLC_LOCALE.pre
+index bda77b7..5fca6cb 100644
+--- a/nls/ko/XLC_LOCALE.pre
++++ b/nls/ko/XLC_LOCALE.pre
@@ -11,7 +11,7 @@ fs0 {
name ISO8859-1:GL
}
--- a/open-src/lib/libX11/locale-ko_KR.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-ko_KR.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/ko_KR.UTF-8/XI18N_OBJS nls/ko_KR.UTF-8/XI18N_OBJS
---- nls/ko_KR.UTF-8/XI18N_OBJS 2010-01-14 17:11:36.000000000 -0800
-+++ nls/ko_KR.UTF-8/XI18N_OBJS 2010-06-07 15:49:53.100568379 -0700
+diff --git a/nls/ko_KR.UTF-8/XI18N_OBJS b/nls/ko_KR.UTF-8/XI18N_OBJS
+index 96e753c..c548068 100644
+--- a/nls/ko_KR.UTF-8/XI18N_OBJS
++++ b/nls/ko_KR.UTF-8/XI18N_OBJS
@@ -4,5 +4,8 @@
#
#
@@ -33,9 +34,10 @@
+XIM common/ximll _XimpLocalOpenIM # XIM_open
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/ko_KR.UTF-8/XLC_LOCALE.pre nls/ko_KR.UTF-8/XLC_LOCALE.pre
---- nls/ko_KR.UTF-8/XLC_LOCALE.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/ko_KR.UTF-8/XLC_LOCALE.pre 2010-06-07 15:49:53.100967122 -0700
+diff --git a/nls/ko_KR.UTF-8/XLC_LOCALE.pre b/nls/ko_KR.UTF-8/XLC_LOCALE.pre
+index b3db89d..de28978 100644
+--- a/nls/ko_KR.UTF-8/XLC_LOCALE.pre
++++ b/nls/ko_KR.UTF-8/XLC_LOCALE.pre
@@ -33,10 +33,10 @@ fs1 {
XCOMM fs2 class (Korean Character)
fs2 {
@@ -236,8 +238,8 @@
+ side GR:Default
+ length 1
+ ct_encoding ISO8859-7:GR
- }
-
++}
++
+XCOMM cs10 class
+cs10 {
+ side GR:Default
@@ -271,7 +273,7 @@
+ side GR:Default
+ length 2
+ ct_encoding ISO8859-6:GLGR
-+}
+ }
+XCOMM cs15 class
+cs15 {
+ side GR:Default
@@ -299,5 +301,5 @@
+XCOMM side none
+XCOMM ct_encoding ISO10646-1
+XCOMM}
-+
+
END XLC_XLOCALE
--- a/open-src/lib/libX11/locale-pt_BR.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-pt_BR.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/pt_BR.UTF-8/XI18N_OBJS nls/C/XI18N_OBJS
---- nls/pt_BR.UTF-8/XI18N_OBJS 2011-06-01 12:57:53.296031365 +0200
-+++ nls/pt_BR.UTF-8/XI18N_OBJS 2011-06-01 12:58:10.788031372 +0200
+diff --git a/nls/pt_BR.UTF-8/XI18N_OBJS b/nls/pt_BR.UTF-8/XI18N_OBJS
+index 8eac6d8..8afd412 100644
+--- a/nls/pt_BR.UTF-8/XI18N_OBJS
++++ b/nls/pt_BR.UTF-8/XI18N_OBJS
@@ -4,4 +4,5 @@
#
XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open
--- a/open-src/lib/libX11/locale-ru-RU.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-ru-RU.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,7 @@
---- nls/ru_RU.UTF-8/XI18N_OBJS Mon Apr 6 09:21:25 2009
-+++ nls/ru_RU.UTF-8/XI18N_OBJS.new Tue Oct 20 19:02:28 2009
+diff --git a/nls/ru_RU.UTF-8/XI18N_OBJS b/nls/ru_RU.UTF-8/XI18N_OBJS
+index 842fc27..00c310d 100644
+--- a/nls/ru_RU.UTF-8/XI18N_OBJS
++++ b/nls/ru_RU.UTF-8/XI18N_OBJS
@@ -2,6 +2,9 @@
#
# XI18N objects table for ru_RU.UTF-8 locale
--- a/open-src/lib/libX11/locale-th_TH.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-th_TH.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/th_TH.UTF-8/XI18N_OBJS nls/th_TH.UTF-8/XI18N_OBJS
---- nls/th_TH.UTF-8/XI18N_OBJS 2010-01-14 17:11:36.000000000 -0800
-+++ nls/th_TH.UTF-8/XI18N_OBJS 2010-06-07 15:49:53.964572637 -0700
+diff --git a/nls/th_TH.UTF-8/XI18N_OBJS b/nls/th_TH.UTF-8/XI18N_OBJS
+index dec38b0..fceb448 100644
+--- a/nls/th_TH.UTF-8/XI18N_OBJS
++++ b/nls/th_TH.UTF-8/XI18N_OBJS
@@ -4,5 +4,9 @@
#
#
@@ -34,10 +35,11 @@
+XIM common/ximll _XimpLocalOpenIM # XIM_open
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/th_TH.UTF-8/XLC_LOCALE.pre nls/th_TH.UTF-8/XLC_LOCALE.pre
---- nls/th_TH.UTF-8/XLC_LOCALE.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/th_TH.UTF-8/XLC_LOCALE.pre 2010-06-07 15:49:53.964950384 -0700
-@@ -7,27 +7,171 @@ XCOMM
+diff --git a/nls/th_TH.UTF-8/XLC_LOCALE.pre b/nls/th_TH.UTF-8/XLC_LOCALE.pre
+index f79091a..ba29336 100644
+--- a/nls/th_TH.UTF-8/XLC_LOCALE.pre
++++ b/nls/th_TH.UTF-8/XLC_LOCALE.pre
+@@ -7,27 +7,171 @@ XCOMM
XCOMM XLC_FONTSET category
XCOMM
XLC_FONTSET
@@ -223,7 +225,7 @@
END XLC_FONTSET
XCOMM
-@@ -36,44 +180,138 @@ XCOMM
+@@ -36,44 +180,138 @@ XCOMM
XLC_XLOCALE
encoding_name UTF-8
--- a/open-src/lib/libX11/locale-zh_CN.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-zh_CN.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/zh_CN.UTF-8/XI18N_OBJS nls/zh_CN.UTF-8/XI18N_OBJS
---- nls/zh_CN.UTF-8/XI18N_OBJS 2010-01-14 17:11:36.000000000 -0800
-+++ nls/zh_CN.UTF-8/XI18N_OBJS 2010-06-07 15:49:55.352147612 -0700
+diff --git a/nls/zh_CN.UTF-8/XI18N_OBJS b/nls/zh_CN.UTF-8/XI18N_OBJS
+index 29dd53a..900235c 100644
+--- a/nls/zh_CN.UTF-8/XI18N_OBJS
++++ b/nls/zh_CN.UTF-8/XI18N_OBJS
@@ -4,5 +4,6 @@
#
#
@@ -31,9 +32,10 @@
+XIM common/xiiimp _SwitchOpenIM
XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/zh_CN.UTF-8/XLC_LOCALE.pre nls/zh_CN.UTF-8/XLC_LOCALE.pre
---- nls/zh_CN.UTF-8/XLC_LOCALE.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/zh_CN.UTF-8/XLC_LOCALE.pre 2010-06-07 15:49:55.352537991 -0700
+diff --git a/nls/zh_CN.UTF-8/XLC_LOCALE.pre b/nls/zh_CN.UTF-8/XLC_LOCALE.pre
+index 6f05d7a..330d134 100644
+--- a/nls/zh_CN.UTF-8/XLC_LOCALE.pre
++++ b/nls/zh_CN.UTF-8/XLC_LOCALE.pre
@@ -12,8 +12,7 @@ on_demand_loading True
object_name generic
@@ -44,22 +46,6 @@
XCOMM fs0 class (7 bit ASCII)
fs0 {
charset {
-@@ -35,6 +34,7 @@ fs1 {
- }
- }
-
-+
- XCOMM fs2 class (Chinese Han Character)
- fs2 {
- charset {
-@@ -44,7 +44,6 @@ fs2 {
- primary GB2312.1980-0:GL
- }
- }
--
- XCOMM fs3 class (Chinese Han Character GBK)
- fs3 {
- charset {
@@ -56,15 +55,145 @@ fs3 {
}
}
@@ -99,7 +85,7 @@
+ }
+}
+
-+XCOMM fs6 calss for KS C 5601-1992 Supplementary Codes 3
++XCOMM fs6 class for KS C 5601-1992 Supplementary Codes 3
+fs7 {
+ charset KSC5601.1992-3:GLGR
+ font {
@@ -123,7 +109,7 @@
+ load_option delay_nocheck
+ primary ISO8859-5:GR
+ }
- }
++}
+
+XCOMM fs9 class
+fs10 {
@@ -167,7 +153,7 @@
+ load_option delay_nocheck
+ primary ISO8859-15:GR
+ }
-+}
+ }
+XCOMM fs14 class (ISO8859-6) (Arabic)
+fs15 {
+ charset {
@@ -214,21 +200,14 @@
END XLC_FONTSET
XCOMM
-@@ -89,18 +218,117 @@ cs1 {
- length 1
- ct_encoding ISO8859-1:GR
+@@ -97,10 +226,108 @@ cs2 {
+ ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR
}
--
-+
-+
- XCOMM cs2 class
- cs2 {
- side GR
- length 2
-- ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR
-+ ct_encoding GB2312.1980-0:GL;GB2312.1980-0:GR
-+}
-+
+
+-XCOMM cs3 class
+-cs3 {
+- side none
+- ct_encoding ISO10646-1
+
+XCOMM cs11 class
+cs3 {
@@ -324,12 +303,8 @@
+ side GR:Default
+ length 2
+ ct_encoding SUN.UNICODE.INDIA-0:GLGR
- }
-
--XCOMM cs3 class
--cs3 {
-- side none
-- ct_encoding ISO10646-1
++}
++
+XCOMM Last, fallback class
+cs17 {
+ side GR:Default
--- a/open-src/lib/libX11/locale-zh_CN.gb18030.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-zh_CN.gb18030.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/zh_CN.gb18030/XI18N_OBJS nls/zh_CN.gb18030/XI18N_OBJS
---- nls/zh_CN.gb18030/XI18N_OBJS 2008-10-07 10:18:18.000000000 -0700
-+++ nls/zh_CN.gb18030/XI18N_OBJS 2009-04-08 00:27:32.563032000 -0700
+diff --git a/nls/zh_CN.gb18030/XI18N_OBJS b/nls/zh_CN.gb18030/XI18N_OBJS
+index a92b403..0a5a137 100644
+--- a/nls/zh_CN.gb18030/XI18N_OBJS
++++ b/nls/zh_CN.gb18030/XI18N_OBJS
@@ -2,6 +2,6 @@
#
# XI18N objects table for zh_CN.gb18030 locale
@@ -32,9 +33,10 @@
+XLC common/xlcGB18030 _XlcGb18030Loader # XLC_open
XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/zh_CN.gb18030/XLC_LOCALE.pre nls/zh_CN.gb18030/XLC_LOCALE.pre
---- nls/zh_CN.gb18030/XLC_LOCALE.pre 2008-10-07 10:18:18.000000000 -0700
-+++ nls/zh_CN.gb18030/XLC_LOCALE.pre 2009-04-08 00:27:32.563332000 -0700
+diff --git a/nls/zh_CN.gb18030/XLC_LOCALE.pre b/nls/zh_CN.gb18030/XLC_LOCALE.pre
+index f9544c7..8950080 100644
+--- a/nls/zh_CN.gb18030/XLC_LOCALE.pre
++++ b/nls/zh_CN.gb18030/XLC_LOCALE.pre
@@ -1,70 +1,51 @@
XCOMM XFree86 NLS for Chinese encoding GB18030
-XCOMM Modified from xc/nls/XLC_LOCALE/en_US.UTF-8
--- a/open-src/lib/libX11/locale-zh_HK.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-zh_HK.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/zh_HK.UTF-8/XI18N_OBJS nls/zh_HK.UTF-8/XI18N_OBJS
---- nls/zh_HK.UTF-8/XI18N_OBJS 2008-10-07 10:18:18.000000000 -0700
-+++ nls/zh_HK.UTF-8/XI18N_OBJS 2009-04-08 00:27:45.159198000 -0700
+diff --git a/nls/zh_HK.UTF-8/XI18N_OBJS b/nls/zh_HK.UTF-8/XI18N_OBJS
+index e9d5ef8..fff0d41 100644
+--- a/nls/zh_HK.UTF-8/XI18N_OBJS
++++ b/nls/zh_HK.UTF-8/XI18N_OBJS
@@ -3,5 +3,9 @@
# XI18N objects table for zh_HK.UTF-8 locale
#
@@ -35,9 +36,10 @@
+XIM common/xiiimp _XimpLocalOpenIM # XIM_open
+XIM common/ximll _XimpLocalOpenIM # XIM_open
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
-diff -urp -x '*~' -x '*.orig' nls/zh_HK.UTF-8/XLC_LOCALE.pre nls/zh_HK.UTF-8/XLC_LOCALE.pre
---- nls/zh_HK.UTF-8/XLC_LOCALE.pre 2008-10-07 10:18:18.000000000 -0700
-+++ nls/zh_HK.UTF-8/XLC_LOCALE.pre 2009-04-08 00:27:45.167059000 -0700
+diff --git a/nls/zh_HK.UTF-8/XLC_LOCALE.pre b/nls/zh_HK.UTF-8/XLC_LOCALE.pre
+index c088032..22b8cf4 100644
+--- a/nls/zh_HK.UTF-8/XLC_LOCALE.pre
++++ b/nls/zh_HK.UTF-8/XLC_LOCALE.pre
@@ -37,10 +37,10 @@ fs1 {
XCOMM fs2 class
fs2 {
--- a/open-src/lib/libX11/locale-zh_TW.UTF-8.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-zh_TW.UTF-8.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/zh_TW.UTF-8/XI18N_OBJS nls/zh_TW.UTF-8/XI18N_OBJS
---- nls/zh_TW.UTF-8/XI18N_OBJS 2010-09-03 22:52:38.000000000 -0700
-+++ nls/zh_TW.UTF-8/XI18N_OBJS 2010-11-21 18:48:45.802760490 -0800
+diff --git a/nls/zh_TW.UTF-8/XI18N_OBJS b/nls/zh_TW.UTF-8/XI18N_OBJS
+index a3a644b..1e48fef 100644
+--- a/nls/zh_TW.UTF-8/XI18N_OBJS
++++ b/nls/zh_TW.UTF-8/XI18N_OBJS
@@ -3,5 +3,9 @@
# XI18N objects table for zh_TW.UTF-8 locale
#
@@ -34,9 +35,10 @@
+XIM common/ximll _XimpLocalOpenIM # XIM_open
+XIM common/ximlocal _XimpLocalOpenIM # XIM_open
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/zh_TW.UTF-8/XLC_LOCALE.pre nls/zh_TW.UTF-8/XLC_LOCALE.pre
---- nls/zh_TW.UTF-8/XLC_LOCALE.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/zh_TW.UTF-8/XLC_LOCALE.pre 2010-11-21 18:48:45.803025953 -0800
+diff --git a/nls/zh_TW.UTF-8/XLC_LOCALE.pre b/nls/zh_TW.UTF-8/XLC_LOCALE.pre
+index d5b19c0..4f55b70 100644
+--- a/nls/zh_TW.UTF-8/XLC_LOCALE.pre
++++ b/nls/zh_TW.UTF-8/XLC_LOCALE.pre
@@ -47,6 +47,7 @@ fs3 {
name ISO10646-1
}
--- a/open-src/lib/libX11/locale-zh_TW.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale-zh_TW.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,9 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
-diff -urp -x '*~' -x '*.orig' nls/zh_TW/XI18N_OBJS nls/zh_TW/XI18N_OBJS
---- nls/zh_TW/XI18N_OBJS 2010-09-03 22:52:38.000000000 -0700
-+++ nls/zh_TW/XI18N_OBJS 2010-11-21 18:48:46.686739982 -0800
+diff --git a/nls/zh_TW/XI18N_OBJS b/nls/zh_TW/XI18N_OBJS
+index 0f471dd..b88ad49 100644
+--- a/nls/zh_TW/XI18N_OBJS
++++ b/nls/zh_TW/XI18N_OBJS
@@ -3,5 +3,5 @@
# XI18N objects table for zh_TW locale
#
@@ -31,9 +32,10 @@
-XIM common/ximp40 _Ximp_OpenIM # XIM_open
+XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
XOM common/xomGeneric _XomGenericOpenOM # XOM_open
-diff -urp -x '*~' -x '*.orig' nls/zh_TW/XLC_LOCALE.pre nls/zh_TW/XLC_LOCALE.pre
---- nls/zh_TW/XLC_LOCALE.pre 2010-09-03 22:52:38.000000000 -0700
-+++ nls/zh_TW/XLC_LOCALE.pre 2010-11-21 18:48:46.687115085 -0800
+diff --git a/nls/zh_TW/XLC_LOCALE.pre b/nls/zh_TW/XLC_LOCALE.pre
+index d75ece8..be84511 100644
+--- a/nls/zh_TW/XLC_LOCALE.pre
++++ b/nls/zh_TW/XLC_LOCALE.pre
@@ -20,14 +20,14 @@ fs0 {
name ISO8859-1:GL
}
--- a/open-src/lib/libX11/locale.aliases.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale.aliases.patch Mon Sep 30 13:26:39 2013 -0700
@@ -22,10 +22,10 @@
#
diff --git a/nls/locale.alias.pre b/nls/locale.alias.pre
-index 7b35460..069b011 100644
+index 11d93f2..0b590fa 100644
--- a/nls/locale.alias.pre
+++ b/nls/locale.alias.pre
-@@ -119,7 +119,7 @@ be_BY.MICROSOFT-CP1251: be_BY.CP1251
+@@ -123,7 +123,7 @@ be_BY.MICROSOFT-CP1251: be_BY.CP1251
be_BY.utf8: be_BY.UTF-8
be_BY.utf8@latin: be_BY.UTF-8@latin
bg: bg_BG.CP1251
@@ -34,7 +34,7 @@
bg_BG.cp1251: bg_BG.CP1251
bg_BG.microsoftcp1251: bg_BG.CP1251
bg_BG.microsoft-cp1251: bg_BG.CP1251
-@@ -1135,16 +1135,19 @@ yi_US.cp1255: yi_US.CP1255
+@@ -1159,16 +1159,19 @@ yi_US.cp1255: yi_US.CP1255
yi_US.microsoftcp1255: yi_US.CP1255
yi_US.microsoft-cp1255: yi_US.CP1255
yi_US.MICROSOFT-CP1255: yi_US.CP1255
@@ -55,7 +55,7 @@
zh_HK: zh_HK.big5hkscs
zh_HK.BIG5HK: zh_HK.big5hkscs
zh_HK.Big5hkscs: zh_HK.big5hkscs
-@@ -1157,7 +1160,7 @@ zh_HK.Big5: zh_HK.big5
+@@ -1185,7 +1188,7 @@ zh_HK.Big5: zh_HK.big5
zh_HK.utf8: zh_HK.UTF-8
ZH_HK.UTF-8: zh_HK.UTF-8
ZH_SG.UTF-8: zh_SG.UTF-8
--- a/open-src/lib/libX11/locale.dir.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-###############################################################################
-# Copyright (c) 2010, 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 -urp -x '*~' -x '*.orig' nls/locale.dir.pre nls/locale.dir.pre
---- nls/locale.dir.pre 2010-01-14 17:11:36.000000000 -0800
-+++ nls/locale.dir.pre 2010-08-10 16:38:37.615315910 -0700
-@@ -299,17 +299,23 @@ en_US.UTF-8/XLC_LOCALE: el_CY.UTF-8
- en_US.UTF-8/XLC_LOCALE: el_GR.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_AU.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_BE.UTF-8
-+en_US.UTF-8/XLC_LOCALE: en_BW.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_BZ.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_CA.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_GB.UTF-8
-+en_US.UTF-8/XLC_LOCALE: en_HK.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_IE.UTF-8
-+en_US.UTF-8/XLC_LOCALE: en_IN.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_JM.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_MT.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_NZ.UTF-8
-+en_US.UTF-8/XLC_LOCALE: en_PH.UTF-8
-+en_US.UTF-8/XLC_LOCALE: en_SG.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_TT.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_UK.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_US.UTF-8
- en_US.UTF-8/XLC_LOCALE: en_ZA.UTF-8
-+en_US.UTF-8/XLC_LOCALE: en_ZW.UTF-8
- en_US.UTF-8/XLC_LOCALE: eo_EO.UTF-8
- en_US.UTF-8/XLC_LOCALE: eo_XX.UTF-8
- en_US.UTF-8/XLC_LOCALE: es_AR.UTF-8
-@@ -368,6 +374,7 @@ en_US.UTF-8/XLC_LOCALE:
- ko_KR.UTF-8/XLC_LOCALE: ko_KR.UTF-8
- en_US.UTF-8/XLC_LOCALE: kw_GB.UTF-8
- en_US.UTF-8/XLC_LOCALE: ky_KG.UTF-8
-+en_US.UTF-8/XLC_LOCALE: ku_TR.UTF-8
- en_US.UTF-8/XLC_LOCALE: lo_LA.UTF-8
- en_US.UTF-8/XLC_LOCALE: lt_LT.UTF-8
- en_US.UTF-8/XLC_LOCALE: lv_LV.UTF-8
--- a/open-src/lib/libX11/locale.paths.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/locale.paths.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,10 +1,10 @@
Allow passing multi-directory paths to configure search for locale files
diff --git a/configure.ac b/configure.ac
-index a2e2bc9..6f2e43a 100644
+index 95ab955..203a8eb 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -418,11 +418,16 @@ AC_ARG_WITH(locale-lib-dir, AS_HELP_STRING([--with-locale-lib-dir=DIR],
+@@ -423,11 +423,16 @@ AC_ARG_WITH(locale-lib-dir, AS_HELP_STRING([--with-locale-lib-dir=DIR],
[Directory where locale libraries files are installed (default: $libdir/X11/locale)]),
[ X11_LOCALELIBDIR="$withval" ],
[ X11_LOCALELIBDIR="${X11_LIBDIR}/locale" ])
--- a/open-src/lib/libX11/om-generic.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/om-generic.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, 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"),
@@ -22,7 +22,7 @@
#
diff --git a/modules/om/generic/omGeneric.c b/modules/om/generic/omGeneric.c
-index c5d9416..d286165 100644
+index 64ef7b7..7b40cb1 100644
--- a/modules/om/generic/omGeneric.c
+++ b/modules/om/generic/omGeneric.c
@@ -175,6 +175,11 @@ init_fontset(
@@ -30,82 +30,29 @@
data->substitute_num)) == NULL)
goto err;
+
-+ /*Add for load_option*/
++ /* Add for load_option */
+ font_set->delay_loading = data->delay_loading;
+ font_set->no_checking = data->no_checking;
+
font_set->substitute_num = data->substitute_num;
if((font_set->vmap = init_fontdata(data->vmap,
data->vmap_num)) == NULL)
-@@ -283,33 +288,41 @@ load_font(
+@@ -283,6 +288,10 @@ load_font(
if (font_set->font_name == NULL)
continue;
-- if (load_fontset_data (oc, font_set) != True)
-- return False;
-+ /* no font structure is requeried here. don't load font now. */
-+ if (font_set->font == NULL) {
-+ if (font_set->delay_loading) {
-+ continue;
-+ }
++ /* no font structure is requeried here. don't load font now. */
++ if ((font_set->font != NULL) || (font_set->delay_loading))
++ continue;
+
-+
-+ if (load_fontset_data (oc, font_set) != True)
-+ return False;
+ if (load_fontset_data (oc, font_set) != True)
+ return False;
#ifndef TESTVERSION
-- if(load_fontdata(oc, font_set->font_data,
-- font_set->font_data_count) != True)
-- return False;
-+ if(load_fontdata(oc, font_set->font_data,
-+ font_set->font_data_count) != True)
-+ return False;
-
-- if(load_fontdata(oc, font_set->substitute,
-- font_set->substitute_num) != True)
-- return False;
-+ if(load_fontdata(oc, font_set->substitute,
-+ font_set->substitute_num) != True)
-+ return False;
- #endif
-
--/* Add 1996.05.20 */
-- if( oc->core.orientation == XOMOrientation_TTB_RTL ||
-- oc->core.orientation == XOMOrientation_TTB_LTR ){
-- if (font_set->vpart_initialize == 0) {
-- load_fontdata(oc, font_set->vmap, font_set->vmap_num);
-- load_fontdata(oc, (FontData) font_set->vrotate,
-- font_set->vrotate_num);
-- font_set->vpart_initialize = 1;
-- }
-- }
-+ /* Add 1996.05.20 */
-+ if( oc->core.orientation == XOMOrientation_TTB_RTL ||
-+ oc->core.orientation == XOMOrientation_TTB_LTR ) {
-+ if (font_set->vpart_initialize == 0) {
-+ load_fontdata(oc, font_set->vmap, font_set->vmap_num);
-+ load_fontdata(oc, (FontData) font_set->vrotate,
-+ font_set->vrotate_num);
-+ font_set->vpart_initialize = 1;
-+ }
-+ }
-
-- if (font_set->font->min_byte1 || font_set->font->max_byte1)
-- font_set->is_xchar2b = True;
-- else
-- font_set->is_xchar2b = False;
-+ if (font_set->font->min_byte1 || font_set->font->max_byte1)
-+ font_set->is_xchar2b = True;
-+ else
-+ font_set->is_xchar2b = False;
-+ }
- }
-
- return True;
-@@ -332,12 +345,24 @@ load_font_info(
+@@ -332,12 +341,24 @@ load_font_info(
continue;
if (font_set->info == NULL) {
-+ /*Handle for delay loading.*/
++ /* Handle for delay loading. */
+ if (font_set->delay_loading)
+ continue;
fn_list = XListFontsWithInfo(dpy, font_set->font_name, 1, &fn_num,
@@ -113,7 +60,7 @@
if (font_set->info == NULL)
return False;
-+#ifdef sun
++#ifdef SUNSOFT
+ if (fn_num > 0) {
+ font_set->info->fid = XLoadFont(dpy, font_set->font_name);
+ }
@@ -126,34 +73,25 @@
}
}
-@@ -453,7 +478,7 @@ init_core_part(
+@@ -453,7 +474,7 @@ init_core_part(
count = length = 0;
for ( ; font_set_num-- > 0; font_set++) {
- if (font_set->font_name == NULL)
-+ if (font_set->font_name == NULL || font_set->delay_loading)/*if delay_loading, continue*/
++ if (font_set->font_name == NULL || font_set->delay_loading) /* if delay_loading, continue */
continue;
length += strlen(font_set->font_name) + 1;
-@@ -483,7 +508,7 @@ init_core_part(
+@@ -483,7 +504,7 @@ init_core_part(
font_set_num = gen->font_set_num;
for (count = 0; font_set_num-- > 0; font_set++) {
- if (font_set->font_name == NULL)
-+ if (font_set->font_name == NULL || font_set->delay_loading) /*if delay_loading, continue*/
++ if (font_set->font_name == NULL || font_set->delay_loading) /* if delay_loading, continue */
continue;
font_set->id = count;
-@@ -1163,7 +1188,7 @@ parse_fontname(
- * a "missing_charset" will be reported to the client
- * for this CharSet.
- */
-- font_data_return. xlfd_name = NULL;
-+ font_data_return.xlfd_name = NULL;
- font_data_return.side = XlcUnknown;
-
- ret = parse_fontdata(oc, font_set, font_set->font_data,
-@@ -1258,7 +1283,7 @@ set_missing_list(
+@@ -1261,7 +1282,7 @@ set_missing_list(
count = length = 0;
for ( ; font_set_num-- > 0; font_set++) {
@@ -162,7 +100,7 @@
continue;
}
-@@ -1305,7 +1330,7 @@ set_missing_list(
+@@ -1308,7 +1329,7 @@ set_missing_list(
font_set_num = gen->font_set_num;
for ( ; font_set_num-- > 0; font_set++) {
@@ -171,7 +109,7 @@
continue;
}
-@@ -2089,6 +2114,20 @@ init_om(
+@@ -2092,6 +2113,20 @@ init_om(
}
read_vw(lcd,data,num);
length += strlen(data->font_data->name) + 1;
@@ -193,29 +131,29 @@
/* required charset list */
diff --git a/modules/om/generic/omXChar.c b/modules/om/generic/omXChar.c
-index ff517d5..0120c5b 100644
+index c9bbb8e..4f80ce0 100644
--- a/modules/om/generic/omXChar.c
+++ b/modules/om/generic/omXChar.c
-@@ -326,6 +326,12 @@ load_font(
+@@ -285,6 +285,12 @@ load_font(
XOC oc,
FontSet font_set)
{
+ /* Give up displaying any characters of this missing charset. */
-+ if (font_set->delay_loading == False && font_set->font!=NULL) {
++ if (font_set->delay_loading == False && font_set->font != NULL) {
+ return False;
+ }
+
-+ /*In case of delay loading, load font here.*/
++ /* In case of delay loading, load font here. */
font_set->font = XLoadQueryFont(oc->core.om->core.display,
oc->core.font_info.font_name_list[font_set->id]);
if (font_set->font == NULL)
-@@ -375,8 +381,10 @@ _XomConvert(
+@@ -330,8 +336,10 @@ _XomConvert(
if (font_set == NULL)
return -1;
- if (font_set->font == NULL && load_font(oc, font_set) == False)
- return -1;
-+ if (font_set->font == NULL||font_set->delay_loading){
++ if (font_set->font == NULL || font_set->delay_loading) {
+ if (load_font(oc, font_set) == False)
+ return -1;
+ }
--- a/open-src/lib/libX11/solaris-abi.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/solaris-abi.patch Mon Sep 30 13:26:39 2013 -0700
@@ -21,10 +21,10 @@
# DEALINGS IN THE SOFTWARE.
#
diff --git a/configure.ac b/configure.ac
-index 6a4878e..64c9f60 100644
+index 8ad1f00..a8ed884 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -196,7 +196,7 @@ if test x$XLIB_LOADABLE_I18N = xyes; then
+@@ -195,7 +195,7 @@ if test x$XLIB_LOADABLE_I18N = xyes; then
fi
AC_DEFINE(USE_DYNAMIC_LC,1,
[Split some i18n functions into loadable modules])
@@ -34,10 +34,10 @@
AC_MSG_RESULT($XLIB_LOADABLE_I18N)
diff --git a/src/Makefile.am b/src/Makefile.am
-index 71e02e7..a825bb9 100644
+index d46b493..ddad93c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -368,9 +368,14 @@ if XKB
+@@ -364,9 +364,14 @@ if XKB
USE_XKB_LIBS = $(XKB_LIBS)
endif
--- a/open-src/lib/libX11/solaris-kbd.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/solaris-kbd.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -23,7 +23,7 @@
diff --git a/src/KeyBind.c b/src/KeyBind.c
-index 221cedd..732c0cf 100644
+index a49de3d..86bd3b6 100644
--- a/src/KeyBind.c
+++ b/src/KeyBind.c
@@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group.
@@ -280,7 +280,7 @@
}
static void
-@@ -1076,3 +1214,290 @@ ComputeMaskFromKeytrans(
+@@ -1074,3 +1212,290 @@ ComputeMaskFromKeytrans(
}
p->state &= AllMods;
}
@@ -538,7 +538,7 @@
+static int
+DoCompose(KeySym first_keysym, KeySym second_keysym, KeySym *result_keysym)
+{
-+ ComposeTableEntry *ptr;
++ const ComposeTableEntry *ptr;
+
+ /* Note: this code presumes first_keysym rangecheck has
+ * been done in invoking routine.
@@ -572,7 +572,7 @@
+}
+#endif /* SUNSOFT_KBD */
diff --git a/src/imConv.c b/src/imConv.c
-index c3c1974..40f5328 100644
+index c3c1974..ec8493f 100644
--- a/src/imConv.c
+++ b/src/imConv.c
@@ -213,7 +213,9 @@ _XimLookupMBText(
@@ -580,7 +580,7 @@
count = 0;
} else {
- count = nbytes - to_len;
-+ if(count != 0){
++ if (count != 0){
+ count = nbytes - to_len;
+ }
}
@@ -591,7 +591,7 @@
count = 0;
} else {
- count = nbytes - to_len;
-+ if(count != 0){
++ if (count != 0){
+ count = nbytes - to_len;
+ }
}
@@ -602,19 +602,19 @@
count = 0;
} else {
- count = nbytes - to_len;
-+ if(count != 0){
++ if (count != 0){
+ count = nbytes - to_len;
+ }
}
}
/* FIXME:
diff --git a/src/xkb/XKBBind.c b/src/xkb/XKBBind.c
-index 1c16adc..3370896 100644
+index 29870b5..9e95c02 100644
--- a/src/xkb/XKBBind.c
+++ b/src/xkb/XKBBind.c
-@@ -53,6 +53,12 @@ static int _XkbLoadDpy(
- Display *dpy
- );
+@@ -51,6 +51,12 @@ from The Open Group.
+
+ static int _XkbLoadDpy(Display *dpy);
+static int XkbTranslateKeySymExt(
+ register Display * dpy, register KeySym *sym_rtrn, unsigned int mods,
@@ -623,126 +623,126 @@
+);
+
struct _XKeytrans {
- struct _XKeytrans *next;/* next on list */
- char *string; /* string to return when the time comes */
-@@ -577,6 +583,20 @@ XkbTranslateKeySym( register Display * dpy,
- int nbytes,
- int * extra_rtrn)
+ struct _XKeytrans *next; /* next on list */
+ char *string; /* string to return when the time comes */
+@@ -599,6 +605,20 @@ XkbTranslateKeySym(register Display *dpy,
+ int nbytes,
+ int *extra_rtrn)
{
-+ /* Call the new extended function but put in NULL for the extra params */
-+ return XkbTranslateKeySymExt(dpy, sym_rtrn, mods, buffer, nbytes, extra_rtrn, NULL, NULL);
++ /* Call the new extended function but put in NULL for the extra params */
++ return XkbTranslateKeySymExt(dpy, sym_rtrn, mods, buffer, nbytes, extra_rtrn, NULL, NULL);
+}
+
+static int
-+XkbTranslateKeySymExt( register Display * dpy,
-+ register KeySym * sym_rtrn,
-+ unsigned int mods,
-+ char * buffer,
-+ int nbytes,
-+ int * extra_rtrn,
-+ XKeyEvent * event,
-+ XComposeStatus * status)
++XkbTranslateKeySymExt(register Display *dpy,
++ register KeySym *sym_rtrn,
++ unsigned int mods,
++ char *buffer,
++ int nbytes,
++ int *extra_rtrn,
++ XKeyEvent *event,
++ XComposeStatus *status)
+{
- register XkbInfoPtr xkb;
+ register XkbInfoPtr xkb;
XkbKSToMBFunc cvtr;
XPointer priv;
-@@ -618,6 +638,17 @@ XkbTranslateKeySym( register Display * dpy,
+@@ -641,6 +661,17 @@ XkbTranslateKeySym(register Display *dpy,
- n = (*cvtr)(priv,*sym_rtrn,buffer,nbytes,extra_rtrn);
+ n = (*cvtr) (priv, *sym_rtrn, buffer, nbytes, extra_rtrn);
+ /* Add Suns specific compose key handler here. Be sure the special
+ * globals are set before calling this function.
+ */
+ {
-+ int return_val;
++ int return_val;
+
-+ if (event && HandleComposeSequence(*sym_rtrn, buffer, sym_rtrn,
-+ status, &return_val, event))
-+ return return_val;
++ if (event && HandleComposeSequence(*sym_rtrn, buffer, sym_rtrn,
++ status, &return_val, event))
++ return return_val;
+ }
+
- if ((!xkb->cvt.KSToUpper)&&( mods&LockMask )) {
- register int i;
- int change;
-@@ -744,9 +775,9 @@ XLookupString ( register XKeyEvent * event,
+ if ((!xkb->cvt.KSToUpper) && (mods & LockMask)) {
+ register int i;
+ int change;
+@@ -774,9 +805,9 @@ XLookupString(register XKeyEvent *event,
#endif
- for (n=len=0;rtrn.sym[n]!=XK_VoidSymbol;n++) {
- if ( nbytes-len > 0 ) {
-- len+= XkbTranslateKeySym(dpy,&rtrn.sym[n],new_mods,
-+ len+= XkbTranslateKeySymExt(dpy,&rtrn.sym[n],new_mods,
- buffer+len,nbytes-len,
-- NULL);
-+ NULL, event, status);
- }
- }
- if ( keysym!=NULL ) {
-@@ -772,16 +803,16 @@ XLookupString ( register XKeyEvent * event,
- len = (int)strlen(buffer);
- }
- else {
-- len = XkbTranslateKeySym(dpy,keysym,new_mods,
-+ len = XkbTranslateKeySymExt(dpy,keysym,new_mods,
- buffer,nbytes,
-- NULL);
-+ NULL, event, status);
- }
- for (n=0;rtrn.sym[n]!=XK_VoidSymbol;n++) {
- if ( nbytes-len > 0 ) {
-- len+= XkbTranslateKeySym(dpy,&rtrn.sym[n],
-+ len+= XkbTranslateKeySymExt(dpy,&rtrn.sym[n],
- event->state,
- buffer+len,nbytes-len,
-- NULL);
-+ NULL, event, status);
- }
- }
- return len;
-@@ -802,7 +833,8 @@ XLookupString ( register XKeyEvent * event,
- if (rtrnLen>0)
- return rtrnLen;
+ for (n = len = 0; rtrn.sym[n] != XK_VoidSymbol; n++) {
+ if (nbytes - len > 0) {
+- len += XkbTranslateKeySym(dpy, &rtrn.sym[n], new_mods,
++ len += XkbTranslateKeySymExt(dpy, &rtrn.sym[n], new_mods,
+ buffer + len, nbytes - len,
+- NULL);
++ NULL, event, status);
+ }
+ }
+ if (keysym != NULL) {
+@@ -804,15 +835,16 @@ XLookupString(register XKeyEvent *event,
+ len = (int) strlen(buffer);
+ }
+ else {
+- len = XkbTranslateKeySym(dpy, keysym, new_mods,
+- buffer, nbytes, NULL);
++ len = XkbTranslateKeySymExt(dpy, keysym, new_mods,
++ buffer, nbytes, NULL,
++ event, status);
+ }
+ for (n = 0; rtrn.sym[n] != XK_VoidSymbol; n++) {
+ if (nbytes - len > 0) {
+- len += XkbTranslateKeySym(dpy, &rtrn.sym[n],
++ len += XkbTranslateKeySymExt(dpy, &rtrn.sym[n],
+ event->state,
+ buffer + len, nbytes - len,
+- NULL);
++ NULL, event, status);
+ }
+ }
+ return len;
+@@ -833,7 +865,8 @@ XLookupString(register XKeyEvent *event,
+ if (rtrnLen > 0)
+ return rtrnLen;
-- return XkbTranslateKeySym(dpy,keysym,new_mods,buffer,nbytes,NULL);
-+ return XkbTranslateKeySymExt(dpy,keysym,new_mods,buffer,nbytes,NULL,
-+ event,status);
+- return XkbTranslateKeySym(dpy, keysym, new_mods, buffer, nbytes, NULL);
++ return XkbTranslateKeySymExt(dpy ,keysym, new_mods, buffer, nbytes, NULL,
++ event, status);
}
diff --git a/src/xkb/XKBlibint.h b/src/xkb/XKBlibint.h
-index ce14527..9945321 100644
+index ca7dc0b..70e2475 100644
--- a/src/xkb/XKBlibint.h
+++ b/src/xkb/XKBlibint.h
-@@ -175,10 +175,19 @@ extern int _XTranslateKey(
+@@ -169,10 +169,19 @@ extern int _XTranslateKey(
- extern int _XTranslateKeySym(
- Display * /* dpy */,
+ extern int _XTranslateKeySym(
+ Display * /* dpy */,
+#ifdef SUNSOFT_KBD
-+ register KeySym * /* symbol */,
++ register KeySym * /* symbol */,
+#else
- register KeySym /* symbol */,
+ register KeySym /* symbol */,
+#endif
- unsigned int /* modifiers */,
- char * /* buffer */,
- int /* nbytes */
+ unsigned int /* modifiers */,
+ char * /* buffer */,
+ int /* nbytes */
+#ifdef SUNSOFT_KBD
-+ ,
-+ XKeyEvent * /* event */,
-+ XComposeStatus * /* status */
++ ,
++ XKeyEvent * /* event */,
++ XComposeStatus * /* status */
+#endif
);
- extern int _XLookupString(
-@@ -338,6 +347,17 @@ extern Status _XkbReadGetGeometryReply(
+ extern int _XLookupString(
+@@ -332,6 +341,17 @@ extern Status _XkbReadGetGeometryReply(
#endif
+#ifdef SUNSOFT_KBD
+extern int HandleComposeSequence(
-+ KeySym symbol,
-+ char *buffer,
-+ KeySym *keysym,
-+ XComposeStatus *status,
-+ int *return_val,
-+ XKeyEvent *event);
++ KeySym symbol,
++ char *buffer,
++ KeySym *keysym,
++ XComposeStatus *status,
++ int *return_val,
++ XKeyEvent *event);
+#endif /* SUNSOFT_KBD */
+
+
@@ -750,7 +750,7 @@
#endif /* _XKBLIBINT_H_ */
diff --git a/src/xlibi18n/ICWrap.c b/src/xlibi18n/ICWrap.c
-index 1eacfa5..72f6b9d 100644
+index 2a1d0d6..8b445ef 100644
--- a/src/xlibi18n/ICWrap.c
+++ b/src/xlibi18n/ICWrap.c
@@ -67,6 +67,12 @@ from The Open Group.
--- a/open-src/lib/libX11/sun-src/src/Suncompose.h Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/sun-src/src/Suncompose.h Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright © 1986, 1994, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1986, 2013, 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"),
@@ -20,6 +20,10 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
+
+#ifndef _SUNCOMPOSE_H
+#define _SUNCOMPOSE_H
+
/*
* Suncompose.h -- Compose Key Sequence Table
*
@@ -42,7 +46,7 @@
#define ASCII_SET_SIZE 128
-char compose_map[ASCII_SET_SIZE] = {
+const char compose_map[ASCII_SET_SIZE] = {
-1, /* 000 (^@) */
-1, /* 001 (^A) */
-1, /* 002 (^B) */
@@ -189,7 +193,7 @@
/* COMPOSE + first character + second character => ISO character */
-ComposeTableEntry compose_table[] = {
+const ComposeTableEntry compose_table[] = {
{' ', ' ', 0xA0}, /* 000 */ /* NBSP (non-breaking space) */
{'!', '!', 0xA1}, /* 001 */ /* inverted ! */
@@ -307,3 +311,4 @@
{0, 0, 0}, /* end of table */
};
+#endif /* _SUNCOMPOSE_H */
--- a/open-src/lib/libX11/sun-src/src/XInteractive.c Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libX11/sun-src/src/XInteractive.c Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1993, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1993, 2013, 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"),
@@ -166,8 +166,9 @@
}
}
/* Did not find on list, add new entry */
- di = (IAExtDisplayInfo *) Xmalloc(sizeof(IAExtDisplayInfo));
- if (di == NULL) { return NULL; }
+ di = Xcalloc(1, sizeof(IAExtDisplayInfo));
+ if (di == NULL)
+ return NULL;
di->display = dpy;
di->codes = XInitExtension(dpy, ia_extension_name);
di->next = iaExtDisplayList;
@@ -261,11 +262,12 @@
return False;
}
*count = rep.count;
- *Pinfo = (unsigned char *)Xmalloc((rep.count) * sizeof(ConnectionPidRec));
+ *Pinfo = Xcalloc(rep.count, sizeof(ConnectionPidRec));
if (*Pinfo == NULL) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False; /* not Success */
+ _XEatDataWords(dpy, rep.length);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return False; /* not Success */
}
length = rep.count << 2;
_XRead32(dpy, (long *)(*Pinfo), length);
@@ -297,7 +299,7 @@
req->length += count;
req->uid = (CARD32)getuid();
if (flags & INTERACTIVE_INFO) {
- length=count << 2;
+ length = count << 2;
Data32(dpy, (long *)Pinfo, length);
}
if (flags & INTERACTIVE_SETTING) {
--- a/open-src/lib/libX11/upstream-cleanup.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3327 +0,0 @@
-From 0dc93f7e43deb102b1f8fb7c4c4844cdce7ffd1e Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 29 Jun 2012 22:57:13 -0700
-Subject: [PATCH:libX11 02/58] XCreate{Pix,Bit}map...Data: Free pixmap in
- error path if XCreateGC fails
-
-Fixes leaks in error paths found by Parfait 1.0.0:
-
-Error: X Resource Leak
- Leaked X Resource pix
- at line 62 of CrBFData.c in function 'XCreateBitmapFromData'.
- pix initialized at line 60 with XCreatePixmap
-Error: X Resource Leak
- Leaked X Resource pix
- at line 70 of CrPFBData.c in function 'XCreatePixmapFromBitmapData'.
- pix initialized at line 66 with XCreatePixmap
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Aaron Plattner <[email protected]>
----
- src/CrBFData.c | 7 +++++--
- src/CrPFBData.c | 7 +++++--
- 2 files changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/src/CrBFData.c b/src/CrBFData.c
-index 4490956..9515875 100644
---- a/src/CrBFData.c
-+++ b/src/CrBFData.c
-@@ -58,8 +58,11 @@ Pixmap XCreateBitmapFromData(
- Pixmap pix;
-
- pix = XCreatePixmap(display, d, width, height, 1);
-- if (! (gc = XCreateGC(display, pix, (unsigned long) 0, (XGCValues *) 0)))
-- return (Pixmap) None;
-+ gc = XCreateGC(display, pix, (unsigned long) 0, (XGCValues *) 0);
-+ if (gc == NULL) {
-+ XFreePixmap(display, pix);
-+ return (Pixmap) None;
-+ }
- ximage.height = height;
- ximage.width = width;
- ximage.depth = 1;
-diff --git a/src/CrPFBData.c b/src/CrPFBData.c
-index 57cd153..d343420 100644
---- a/src/CrPFBData.c
-+++ b/src/CrPFBData.c
-@@ -66,8 +66,11 @@ Pixmap XCreatePixmapFromBitmapData(
- pix = XCreatePixmap(display, d, width, height, depth);
- gcv.foreground = fg;
- gcv.background = bg;
-- if (! (gc = XCreateGC(display, pix, GCForeground|GCBackground, &gcv)))
-- return (Pixmap) NULL;
-+ gc = XCreateGC(display, pix, GCForeground|GCBackground, &gcv);
-+ if (gc == NULL) {
-+ XFreePixmap(display, pix);
-+ return (Pixmap) None;
-+ }
- ximage.height = height;
- ximage.width = width;
- ximage.depth = 1;
---
-1.7.9.2
-
-From 65358ea5079236b2508f787ac2fb2024a477e36d Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 29 Jun 2012 23:08:04 -0700
-Subject: [PATCH:libX11 03/58] Convert XCreate{Pix,Bit}map...Data to use C99
- designated initializers
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/CrBFData.c | 42 ++++++++++++++++++++----------------------
- src/CrPFBData.c | 49 ++++++++++++++++++++++++-------------------------
- 2 files changed, 44 insertions(+), 47 deletions(-)
-
-diff --git a/src/CrBFData.c b/src/CrBFData.c
-index 9515875..6708a9b 100644
---- a/src/CrBFData.c
-+++ b/src/CrBFData.c
-@@ -53,30 +53,28 @@ Pixmap XCreateBitmapFromData(
- unsigned int width,
- unsigned int height)
- {
-- XImage ximage;
-- GC gc;
-- Pixmap pix;
--
-- pix = XCreatePixmap(display, d, width, height, 1);
-- gc = XCreateGC(display, pix, (unsigned long) 0, (XGCValues *) 0);
-+ Pixmap pix = XCreatePixmap(display, d, width, height, 1);
-+ GC gc = XCreateGC(display, pix, (unsigned long) 0, (XGCValues *) 0);
- if (gc == NULL) {
- XFreePixmap(display, pix);
- return (Pixmap) None;
-+ } else {
-+ XImage ximage = {
-+ .height = height,
-+ .width = width,
-+ .depth = 1,
-+ .bits_per_pixel = 1,
-+ .xoffset = 0,
-+ .format = XYPixmap,
-+ .data = (char *) data,
-+ .byte_order = LSBFirst,
-+ .bitmap_unit = 8,
-+ .bitmap_bit_order = LSBFirst,
-+ .bitmap_pad = 8,
-+ .bytes_per_line = (width + 7) / 8,
-+ };
-+ XPutImage(display, pix, gc, &ximage, 0, 0, 0, 0, width, height);
-+ XFreeGC(display, gc);
-+ return(pix);
- }
-- ximage.height = height;
-- ximage.width = width;
-- ximage.depth = 1;
-- ximage.bits_per_pixel = 1;
-- ximage.xoffset = 0;
-- ximage.format = XYPixmap;
-- ximage.data = (char *)data;
-- ximage.byte_order = LSBFirst;
-- ximage.bitmap_unit = 8;
-- ximage.bitmap_bit_order = LSBFirst;
-- ximage.bitmap_pad = 8;
-- ximage.bytes_per_line = (width+7)/8;
--
-- XPutImage(display, pix, gc, &ximage, 0, 0, 0, 0, width, height);
-- XFreeGC(display, gc);
-- return(pix);
- }
-diff --git a/src/CrPFBData.c b/src/CrPFBData.c
-index d343420..17d551b 100644
---- a/src/CrPFBData.c
-+++ b/src/CrPFBData.c
-@@ -58,33 +58,32 @@ Pixmap XCreatePixmapFromBitmapData(
- unsigned long bg,
- unsigned int depth)
- {
-- XImage ximage;
-- GC gc;
-- XGCValues gcv;
-- Pixmap pix;
--
-- pix = XCreatePixmap(display, d, width, height, depth);
-- gcv.foreground = fg;
-- gcv.background = bg;
-- gc = XCreateGC(display, pix, GCForeground|GCBackground, &gcv);
-+ Pixmap pix = XCreatePixmap(display, d, width, height, depth);
-+ XGCValues gcv = {
-+ .foreground = fg,
-+ .background = bg
-+ };
-+ GC gc = XCreateGC(display, pix, GCForeground|GCBackground, &gcv);
- if (gc == NULL) {
- XFreePixmap(display, pix);
- return (Pixmap) None;
-+ } else {
-+ XImage ximage = {
-+ .height = height,
-+ .width = width,
-+ .depth = 1,
-+ .bits_per_pixel = 1,
-+ .xoffset = 0,
-+ .format = XYBitmap,
-+ .data = data,
-+ .byte_order = LSBFirst,
-+ .bitmap_unit = 8,
-+ .bitmap_bit_order = LSBFirst,
-+ .bitmap_pad = 8,
-+ .bytes_per_line = (width + 7) / 8
-+ };
-+ XPutImage(display, pix, gc, &ximage, 0, 0, 0, 0, width, height);
-+ XFreeGC(display, gc);
-+ return(pix);
- }
-- ximage.height = height;
-- ximage.width = width;
-- ximage.depth = 1;
-- ximage.bits_per_pixel = 1;
-- ximage.xoffset = 0;
-- ximage.format = XYBitmap;
-- ximage.data = data;
-- ximage.byte_order = LSBFirst;
-- ximage.bitmap_unit = 8;
-- ximage.bitmap_bit_order = LSBFirst;
-- ximage.bitmap_pad = 8;
-- ximage.bytes_per_line = (width+7)/8;
--
-- XPutImage(display, pix, gc, &ximage, 0, 0, 0, 0, width, height);
-- XFreeGC(display, gc);
-- return(pix);
- }
---
-1.7.9.2
-
-From 59c9ee8cd58857c5769b643611cbe526005a9e45 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sun, 16 Dec 2012 17:44:42 -0800
-Subject: [PATCH:libX11 31/58] Tell clang not to report -Wpadded warnings on
- public headers we can't fix
-
-Better to silence the compiler warning than break ABI.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- include/X11/Xcms.h | 12 ++++++++++++
- include/X11/Xlib.h | 12 ++++++++++++
- include/X11/Xlibint.h | 12 ++++++++++++
- include/X11/Xutil.h | 12 ++++++++++++
- 4 files changed, 48 insertions(+)
-
-diff --git a/include/X11/Xcms.h b/include/X11/Xcms.h
-index 8151fd1..6631854 100644
---- a/include/X11/Xcms.h
-+++ b/include/X11/Xcms.h
-@@ -31,6 +31,14 @@
-
- #include <X11/Xlib.h>
-
-+/* The Xcms structs are full of implicit padding to properly align members.
-+ We can't clean that up without breaking ABI, so tell clang not to bother
-+ complaining about it. */
-+#ifdef __clang__
-+#pragma clang diagnostic push
-+#pragma clang diagnostic ignored "-Wpadded"
-+#endif
-+
- /*
- * XCMS Status Values
- */
-@@ -798,6 +806,10 @@ extern Visual *XcmsVisualOfCCC (
- XcmsCCC /* ccc */
- );
-
-+#ifdef __clang__
-+#pragma clang diagnostic pop
-+#endif
-+
- _XFUNCPROTOEND
-
- #endif /* _X11_XCMS_H_ */
-diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h
-index dd4c7c4..9618081 100644
---- a/include/X11/Xlib.h
-+++ b/include/X11/Xlib.h
-@@ -81,6 +81,14 @@ _Xmblen(
- November 2000. Its presence is indicated through the following macro. */
- #define X_HAVE_UTF8_STRING 1
-
-+/* The Xlib structs are full of implicit padding to properly align members.
-+ We can't clean that up without breaking ABI, so tell clang not to bother
-+ complaining about it. */
-+#ifdef __clang__
-+#pragma clang diagnostic push
-+#pragma clang diagnostic ignored "-Wpadded"
-+#endif
-+
- typedef char *XPointer;
-
- #define Bool int
-@@ -4019,6 +4027,10 @@ extern void XFreeEventData(
- XGenericEventCookie* /* cookie*/
- );
-
-+#ifdef __clang__
-+#pragma clang diagnostic pop
-+#endif
-+
- _XFUNCPROTOEND
-
- #endif /* _X11_XLIB_H_ */
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index 80edeec..23e751b 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -42,6 +42,14 @@ from The Open Group.
- #include <X11/Xproto.h> /* to declare xEvent */
- #include <X11/XlibConf.h> /* for configured options like XTHREADS */
-
-+/* The Xlib structs are full of implicit padding to properly align members.
-+ We can't clean that up without breaking ABI, so tell clang not to bother
-+ complaining about it. */
-+#ifdef __clang__
-+#pragma clang diagnostic push
-+#pragma clang diagnostic ignored "-Wpadded"
-+#endif
-+
- #ifdef WIN32
- #define _XFlush _XFlushIt
- #endif
-@@ -1364,6 +1372,10 @@ extern void xlocaledir(
- int buf_len
- );
-
-+#ifdef __clang__
-+#pragma clang diagnostic pop
-+#endif
-+
- _XFUNCPROTOEND
-
- #endif /* _X11_XLIBINT_H_ */
-diff --git a/include/X11/Xutil.h b/include/X11/Xutil.h
-index 8cab50e..62cdf55 100644
---- a/include/X11/Xutil.h
-+++ b/include/X11/Xutil.h
-@@ -53,6 +53,14 @@ SOFTWARE.
- #include <X11/Xlib.h>
- #include <X11/keysym.h>
-
-+/* The Xlib structs are full of implicit padding to properly align members.
-+ We can't clean that up without breaking ABI, so tell clang not to bother
-+ complaining about it. */
-+#ifdef __clang__
-+#pragma clang diagnostic push
-+#pragma clang diagnostic ignored "-Wpadded"
-+#endif
-+
- /*
- * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
- * value (x, y, width, height) was found in the parsed string.
-@@ -821,6 +829,10 @@ extern int XXorRegion(
- Region /* dr_return */
- );
-
-+#ifdef __clang__
-+#pragma clang diagnostic pop
-+#endif
-+
- _XFUNCPROTOEND
-
- #endif /* _X11_XUTIL_H_ */
---
-1.7.9.2
-
-From a6e5b36a3e6d4a7a9fb4bad905ed127e67b1957e Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Wed, 26 Dec 2012 22:56:38 -0800
-Subject: [PATCH:libX11 32/58] Remove unused TLI ("STREAMSCONN") code from
- Xlib
-
-Has never been converted to build in modular builds, so has been unusable
-since X11R7.0 release in 2005. All known platforms with TLI/XTI support
-that X11R7 & later releases run on also have (and mostly prefer) BSD
-socket support for their networking API.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- modules/im/ximcp/imTransR.c | 3 --
- src/globals.c | 121 -------------------------------------------
- src/xlibi18n/XimTrInt.h | 2 +-
- 3 files changed, 1 insertion(+), 125 deletions(-)
-
-diff --git a/modules/im/ximcp/imTransR.c b/modules/im/ximcp/imTransR.c
-index 1fd0088..4f843a0 100644
---- a/modules/im/ximcp/imTransR.c
-+++ b/modules/im/ximcp/imTransR.c
-@@ -69,9 +69,6 @@ TransportSW _XimTransportRec[] = {
- #ifdef DNETCONN
- { "dnet", _XimTransConf }, /* use X transport lib */
- #endif /* DNETCONN */
--#ifdef STREAMSCONN
-- { "streams", _XimTransConf }, /* use X transport lib */
--#endif /* STREAMSCONN */
- { (char *)NULL, (Bool (*)(Xim, char *))NULL },
- };
-
-diff --git a/src/globals.c b/src/globals.c
-index 89e38a7..b7e49dd 100644
---- a/src/globals.c
-+++ b/src/globals.c
-@@ -87,127 +87,6 @@ ZEROINIT (int, _Xdebug, 0);
- ZEROINIT (Display *, _XHeadOfDisplayList, NULL);
-
-
--
--#if 0
--#ifdef STREAMSCONN
--
--
--/* The following are how the Xstream connections are used: */
--/* 1) Local connections over pseudo-tty ports. */
--/* 2) SVR4 local connections using named streams or SVR3.2 */
--/* local connections using streams. */
--/* 3) SVR4 stream pipe code. This code is proprietary and */
--/* the actual code is not included in the XC distribution. */
--/* 4) remote connections using tcp */
--/* 5) remote connections using StarLan */
--
--/*
-- * descriptor block for streams connections
-- */
--
--#include "Xstreams.h"
--
--char _XsTypeOfStream[100] = { 0 };
--
--extern int write();
--extern int close();
--#ifdef SVR4
--extern int _XsSetupSpStream();
--extern int _XsSetupNamedStream();
--#endif
--extern int _XsSetupLocalStream();
--extern int _XsConnectLocalClient();
--extern int _XsCallLocalServer();
--extern int _XsReadLocalStream();
--extern int _XsErrorCall();
--extern int _XsWriteLocalStream();
--extern int _XsCloseLocalStream();
--extern int _XsSetupTliStream();
--extern int _XsConnectTliClient();
--extern int _XsCallTliServer();
--extern int _XsReadTliStream();
--extern int _XsWriteTliStream();
--extern int _XsCloseTliStream();
--
--
--Xstream _XsStream[] = {
--
-- {
-- /* local connections using pseudo-ttys */
--
-- _XsSetupLocalStream,
-- _XsConnectLocalClient,
-- _XsCallLocalServer,
-- _XsReadLocalStream,
-- _XsErrorCall,
-- write,
-- close,
-- NULL
-- },
-- {
--#ifdef SVR4
-- /* local connections using named streams */
--
-- _XsSetupNamedStream,
--#else
-- /* local connections using streams */
-- _XsSetupLocalStream,
--#endif
-- _XsConnectLocalClient,
-- _XsCallLocalServer,
-- _XsReadLocalStream,
-- _XsErrorCall,
-- write,
-- close,
-- NULL
-- },
-- /* Enhanced Application Compatibility Support */
-- {
--#ifdef SVR4
-- /* SVR4 stream pipe code */
-- _XsSetupSpStream,
--#else
-- _XsSetupLocalStream,
--#endif
-- _XsConnectLocalClient,
-- _XsCallLocalServer,
-- _XsReadLocalStream,
-- _XsErrorCall,
-- write,
-- close,
-- NULL
-- },
-- /* End Enhanced Application Compatibility Support */
--
-- {
-- /* remote connections using tcp */
-- _XsSetupTliStream,
-- _XsConnectTliClient,
-- _XsCallTliServer,
-- _XsReadLocalStream,
-- _XsErrorCall,
-- write,
-- close,
-- NULL
-- },
-- {
-- /* remote connections using StarLan */
-- _XsSetupTliStream,
-- _XsConnectTliClient,
-- _XsCallTliServer,
-- _XsReadLocalStream,
-- _XsErrorCall,
-- write,
-- close,
-- NULL
-- }
--};
--
--
--#endif /* STREAMSCONN */
--#endif
--
--
- #ifdef XTEST1
- /*
- * Stuff for input synthesis extension:
-diff --git a/src/xlibi18n/XimTrInt.h b/src/xlibi18n/XimTrInt.h
-index a08ac03..7cc9f85 100644
---- a/src/xlibi18n/XimTrInt.h
-+++ b/src/xlibi18n/XimTrInt.h
-@@ -73,7 +73,7 @@ extern Bool _XimXConf(
- char *address
- );
-
--#if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN) || defined(STREAMSCONN)
-+#if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN)
-
- extern Bool _XimTransConf(
- Xim im,
---
-1.7.9.2
-
-From 3cd974b1d4d1fa6389d3695fa9fcc0c22a51d50c Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Wed, 26 Dec 2012 22:57:39 -0800
-Subject: [PATCH:libX11 33/58] Remove unused DECnet ("DNETCONN") code from
- Xlib
-
-Has never been converted to build in modular builds, so has been unusable
-since X11R7.0 release in 2005. DNETCONN support was removed from xtrans
-back in 2008.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- modules/im/ximcp/imTransR.c | 3 ---
- src/xlibi18n/XimTrInt.h | 2 +-
- 2 files changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/modules/im/ximcp/imTransR.c b/modules/im/ximcp/imTransR.c
-index 4f843a0..caa5309 100644
---- a/modules/im/ximcp/imTransR.c
-+++ b/modules/im/ximcp/imTransR.c
-@@ -66,9 +66,6 @@ TransportSW _XimTransportRec[] = {
- #if defined(UNIXCONN) || defined(LOCALCONN)
- { "local", _XimTransConf }, /* use X transport lib */
- #endif /* UNIXCONN */
--#ifdef DNETCONN
-- { "dnet", _XimTransConf }, /* use X transport lib */
--#endif /* DNETCONN */
- { (char *)NULL, (Bool (*)(Xim, char *))NULL },
- };
-
-diff --git a/src/xlibi18n/XimTrInt.h b/src/xlibi18n/XimTrInt.h
-index 7cc9f85..bceab98 100644
---- a/src/xlibi18n/XimTrInt.h
-+++ b/src/xlibi18n/XimTrInt.h
-@@ -73,7 +73,7 @@ extern Bool _XimXConf(
- char *address
- );
-
--#if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN)
-+#if defined(TCPCONN) || defined(UNIXCONN)
-
- extern Bool _XimTransConf(
- Xim im,
---
-1.7.9.2
-
-From deedeada53676ee529d700bf96fde0b29a3a1def Mon Sep 17 00:00:00 2001
-From: Nickolai Zeldovich <[email protected]>
-Date: Tue, 22 Jan 2013 10:03:00 -0500
-Subject: [PATCH:libX11 36/58] XListFontsWithInfo: avoid accessing realloc'ed
- memory
-
-If exactly one of the two reallocs in XListFontsWithInfo() fails, the
-subsequent code accesses memory freed by the other realloc.
-
-Signed-off-by: Nickolai Zeldovich <[email protected]>
-Reviewed-by: Alan Coopersmith <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/FontInfo.c | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/src/FontInfo.c b/src/FontInfo.c
-index a3ab65b..97de40e 100644
---- a/src/FontInfo.c
-+++ b/src/FontInfo.c
-@@ -90,6 +90,11 @@ XFontStruct **info) /* RETURN */
- Xrealloc ((char *) flist,
- (unsigned) (sizeof(char *) * (size+1)));
-
-+ if (tmp_finfo)
-+ finfo = tmp_finfo;
-+ if (tmp_flist)
-+ flist = tmp_flist;
-+
- if ((! tmp_finfo) || (! tmp_flist)) {
- /* free all the memory that we allocated */
- for (j=(i-1); (j >= 0); j--) {
-@@ -97,14 +102,10 @@ XFontStruct **info) /* RETURN */
- if (finfo[j].properties)
- Xfree((char *) finfo[j].properties);
- }
-- if (tmp_flist) Xfree((char *) tmp_flist);
-- else Xfree((char *) flist);
-- if (tmp_finfo) Xfree((char *) tmp_finfo);
-- else Xfree((char *) finfo);
-+ Xfree((char *) flist);
-+ Xfree((char *) finfo);
- goto clearwire;
- }
-- finfo = tmp_finfo;
-- flist = tmp_flist;
- }
- else {
- if (! (finfo = (XFontStruct *)
---
-1.7.9.2
-
-From 54527eab93d46055cf11eb6c18abb353a03ae544 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 15 Feb 2013 22:45:19 -0800
-Subject: [PATCH:libX11 37/58] cmsColNm.c: maintain constness of arguments to
- qsort helper function
-
-Fixes gcc warning:
-
-cmsColNm.c: In function 'FirstCmp':
-cmsColNm.c:257:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-cmsColNm.c:257:45: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/xcms/cmsColNm.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/xcms/cmsColNm.c b/src/xcms/cmsColNm.c
-index 73977e5..a6749c0 100644
---- a/src/xcms/cmsColNm.c
-+++ b/src/xcms/cmsColNm.c
-@@ -254,7 +254,7 @@ FirstCmp(const void *p1, const void *p2)
- *
- */
- {
-- return(strcmp(((XcmsPair *)p1)->first, ((XcmsPair *)p2)->first));
-+ return(strcmp(((const XcmsPair *)p1)->first, ((const XcmsPair *)p2)->first));
- }
-
-
---
-1.7.9.2
-
-From 7e3bf4dd83fec22bd568146de75e6d59eff74e21 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 15 Feb 2013 23:14:40 -0800
-Subject: [PATCH:libX11 38/58] XRebindKeysym: Drop unnecessary const-removing
- cast
-
-C89 defines memcpy as taking a const void *, so casting from
-const unsigned char * to char * simply angers gcc for no benefit:
-
-KeyBind.c:1017:24: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/KeyBind.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/KeyBind.c b/src/KeyBind.c
-index 221cedd..f22feca 100644
---- a/src/KeyBind.c
-+++ b/src/KeyBind.c
-@@ -1014,7 +1014,7 @@ XRebindKeysym (
- dpy->key_bindings = p;
- dpy->free_funcs->key_bindings = _XFreeKeyBindings;
- p->next = tmp; /* chain onto list */
-- memcpy (p->string, (char *) str, nbytes);
-+ memcpy (p->string, str, nbytes);
- p->len = nbytes;
- memcpy ((char *) p->modifiers, (char *) mlist, nb);
- p->key = keysym;
---
-1.7.9.2
-
-From afd6593da90e51234d59f8921c411317f91ab48b Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 15 Feb 2013 23:25:38 -0800
-Subject: [PATCH:libX11 39/58] XStringToKeysym: preserve constness when
- casting off unsignedness for strcmp
-
-Fixes gcc warning:
-StrKeysym.c:97:17: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/StrKeysym.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/StrKeysym.c b/src/StrKeysym.c
-index 4394e0c..12fce68 100644
---- a/src/StrKeysym.c
-+++ b/src/StrKeysym.c
-@@ -94,7 +94,7 @@ XStringToKeysym(_Xconst char *s)
- {
- entry = &_XkeyTable[idx];
- if ((entry[0] == sig1) && (entry[1] == sig2) &&
-- !strcmp(s, (char *)entry + 6))
-+ !strcmp(s, (const char *)entry + 6))
- {
- val = (entry[2] << 24) | (entry[3] << 16) |
- (entry[4] << 8) | entry[5];
---
-1.7.9.2
-
-From 6c558ee357292dd9dfc6d9006f4525f625327c52 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 15 Feb 2013 22:58:54 -0800
-Subject: [PATCH:libX11 40/58] Fix comment typo & confusing indentation levels
- in Data() macro definition
-
-The final } matches the one on the #define line, not one that doesn't
-appear after the else statement it was lined up with
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- include/X11/Xlibint.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index 23e751b..7911fd7 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -574,7 +574,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
- * 32 bit word alignment. Transmit if the buffer fills.
- *
- * "dpy" is a pointer to a Display.
-- * "data" is a pinter to a data buffer.
-+ * "data" is a pointer to a data buffer.
- * "len" is the length of the data buffer.
- */
- #ifndef DataRoutineIsProcedure
-@@ -584,7 +584,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
- dpy->bufptr += ((len) + 3) & ~3;\
- } else\
- _XSend(dpy, data, len);\
-- }
-+}
- #endif /* DataRoutineIsProcedure */
-
-
---
-1.7.9.2
-
-From f0b171c8ea7b055ba520272ea9a2604e18841ac7 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 15 Feb 2013 23:34:40 -0800
-Subject: [PATCH:libX11 41/58] Preserve constness in casting arguments through
- the Data*() routines
-
-Casts were annoying gcc by dropping constness when changing types,
-when routines simply either copy data into the request buffer or
-send it directly to the X server, and never modify the input.
-
-Fixes gcc warnings including:
-ChProp.c: In function 'XChangeProperty':
-ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-ChProp.c:83:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-SetHints.c: In function 'XSetStandardProperties':
-SetHints.c:262:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-SetPntMap.c: In function 'XSetPointerMapping':
-SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-StBytes.c: In function 'XStoreBuffer':
-StBytes.c:97:33: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-StName.c: In function 'XStoreName':
-StName.c:40:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-StName.c: In function 'XSetIconName':
-StName.c:51:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- include/X11/Xlibint.h | 12 ++++++------
- src/ChProp.c | 6 +++---
- src/SetHints.c | 4 +++-
- src/SetPntMap.c | 2 +-
- src/StBytes.c | 2 +-
- src/StName.c | 6 +++---
- src/XlibInt.c | 12 ++++++------
- 7 files changed, 23 insertions(+), 21 deletions(-)
-
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index 7911fd7..c2232de 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -610,17 +610,17 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
- dpy->bufptr += (n);
-
- #ifdef WORD64
--#define Data16(dpy, data, len) _XData16(dpy, (short *)data, len)
--#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
-+#define Data16(dpy, data, len) _XData16(dpy, (_Xconst short *)data, len)
-+#define Data32(dpy, data, len) _XData32(dpy, (_Xconst long *)data, len)
- #else
--#define Data16(dpy, data, len) Data((dpy), (char *)(data), (len))
-+#define Data16(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len))
- #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
- #define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
- #ifdef LONG64
--#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
-+#define Data32(dpy, data, len) _XData32(dpy, (_Xconst long *)data, len)
- extern int _XData32(
- Display *dpy,
-- register long *data,
-+ register _Xconst long *data,
- unsigned len
- );
- extern void _XRead32(
-@@ -629,7 +629,7 @@ extern void _XRead32(
- long len
- );
- #else
--#define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
-+#define Data32(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len))
- #define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
- #endif
- #endif /* not WORD64 */
-diff --git a/src/ChProp.c b/src/ChProp.c
-index b957751..190a224 100644
---- a/src/ChProp.c
-+++ b/src/ChProp.c
-@@ -62,7 +62,7 @@ XChangeProperty (
- len = ((long)nelements + 3)>>2;
- if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
- SetReqLen(req, len, len);
-- Data (dpy, (char *)data, nelements);
-+ Data (dpy, (_Xconst char *)data, nelements);
- } /* else force BadLength */
- break;
-
-@@ -71,7 +71,7 @@ XChangeProperty (
- if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
- SetReqLen(req, len, len);
- len = (long)nelements << 1;
-- Data16 (dpy, (short *) data, len);
-+ Data16 (dpy, (_Xconst short *) data, len);
- } /* else force BadLength */
- break;
-
-@@ -80,7 +80,7 @@ XChangeProperty (
- if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
- SetReqLen(req, len, len);
- len = (long)nelements << 2;
-- Data32 (dpy, (long *) data, len);
-+ Data32 (dpy, (_Xconst long *) data, len);
- } /* else force BadLength */
- break;
-
-diff --git a/src/SetHints.c b/src/SetHints.c
-index 0c33f59..1cde48f 100644
---- a/src/SetHints.c
-+++ b/src/SetHints.c
-@@ -259,7 +259,9 @@ XSetStandardProperties (
-
- if (icon_string != NULL) {
- XChangeProperty (dpy, w, XA_WM_ICON_NAME, XA_STRING, 8,
-- PropModeReplace, (unsigned char *)icon_string, safestrlen(icon_string));
-+ PropModeReplace,
-+ (_Xconst unsigned char *)icon_string,
-+ safestrlen(icon_string));
- }
-
- if (icon_pixmap != None) {
-diff --git a/src/SetPntMap.c b/src/SetPntMap.c
-index 2e29201..14e104d 100644
---- a/src/SetPntMap.c
-+++ b/src/SetPntMap.c
-@@ -43,7 +43,7 @@ XSetPointerMapping (
- GetReq (SetPointerMapping, req);
- req->nElts = nmaps;
- req->length += (nmaps + 3)>>2;
-- Data (dpy, (char *)map, (long) nmaps);
-+ Data (dpy, (_Xconst char *)map, (long) nmaps);
- if (_XReply (dpy, (xReply *)&rep, 0, xFalse) == 0)
- rep.success = MappingSuccess;
- UnlockDisplay(dpy);
-diff --git a/src/StBytes.c b/src/StBytes.c
-index 13ac879..07ee441 100644
---- a/src/StBytes.c
-+++ b/src/StBytes.c
-@@ -94,7 +94,7 @@ XStoreBuffer (
- {
- if ((buffer < 0) || (buffer > 7)) return 0;
- return XChangeProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer],
-- XA_STRING, 8, PropModeReplace, (unsigned char *) bytes, nbytes);
-+ XA_STRING, 8, PropModeReplace, (_Xconst unsigned char *) bytes, nbytes);
- }
-
- int
-diff --git a/src/StName.c b/src/StName.c
-index fb1e6f5..b4048bf 100644
---- a/src/StName.c
-+++ b/src/StName.c
-@@ -37,7 +37,7 @@ XStoreName (
- _Xconst char *name)
- {
- return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING,
-- 8, PropModeReplace, (unsigned char *)name,
-+ 8, PropModeReplace, (_Xconst unsigned char *)name,
- name ? strlen(name) : 0);
- }
-
-@@ -47,7 +47,7 @@ XSetIconName (
- Window w,
- _Xconst char *icon_name)
- {
-- return XChangeProperty(dpy, w, XA_WM_ICON_NAME, XA_STRING,
-- 8, PropModeReplace, (unsigned char *)icon_name,
-+ return XChangeProperty(dpy, w, XA_WM_ICON_NAME, XA_STRING, 8,
-+ PropModeReplace, (_Xconst unsigned char *)icon_name,
- icon_name ? strlen(icon_name) : 0);
- }
-diff --git a/src/XlibInt.c b/src/XlibInt.c
-index 2827c10..e4d35fd 100644
---- a/src/XlibInt.c
-+++ b/src/XlibInt.c
-@@ -1722,7 +1722,7 @@ void _Xbcopy(b1, b2, length)
- #ifdef DataRoutineIsProcedure
- void Data(
- Display *dpy,
-- char *data,
-+ _Xconst char *data,
- long len)
- {
- if (dpy->bufptr + (len) <= dpy->bufmax) {
-@@ -1739,7 +1739,7 @@ void Data(
- int
- _XData32(
- Display *dpy,
-- register long *data,
-+ register _Xconst long *data,
- unsigned len)
- {
- register int *buf;
-@@ -1781,7 +1781,7 @@ _XData32(
-
- static doData16(
- register Display *dpy,
-- short *data,
-+ _Xconst short *data,
- unsigned len,
- char *packbuffer)
- {
-@@ -1814,7 +1814,7 @@ static doData16(
-
- _XData16 (
- Display *dpy,
-- short *data,
-+ _Xconst short *data,
- unsigned len)
- {
- char packbuffer[PACKBUFFERSIZE];
-@@ -1836,7 +1836,7 @@ _XData16 (
-
- static doData32(
- register Display *dpy
-- long *data,
-+ _Xconst long *data,
- unsigned len,
- char *packbuffer)
- {
-@@ -1867,7 +1867,7 @@ static doData32(
-
- void _XData32(
- Display *dpy,
-- long *data,
-+ _Xconst long *data,
- unsigned len)
- {
- char packbuffer[PACKBUFFERSIZE];
---
-1.7.9.2
-
-From b092dabbd712d7b656abcf572d253b9b206c0237 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 15 Feb 2013 23:43:12 -0800
-Subject: [PATCH:libX11 42/58] XKeysymToString: move variable declarations to
- the scope of their usage
-
-Makes it easier for readers to understand scope of variable usage, and
-clears up gcc warning:
-
-KeysymStr.c: In function 'XKeysymToString':
-KeysymStr.c:128:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
-KeysymStr.c:73:18: warning: shadowed declaration is here [-Wshadow]
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/KeysymStr.c | 24 ++++++++++--------------
- 1 file changed, 10 insertions(+), 14 deletions(-)
-
-diff --git a/src/KeysymStr.c b/src/KeysymStr.c
-index 101f297..f24f3b1 100644
---- a/src/KeysymStr.c
-+++ b/src/KeysymStr.c
-@@ -70,11 +70,6 @@ SameValue(
-
- char *XKeysymToString(KeySym ks)
- {
-- register int i, n;
-- int h;
-- register int idx;
-- const unsigned char *entry;
-- unsigned char val1, val2, val3, val4;
- XrmDatabase keysymdb;
-
- if (!ks || (ks & ((unsigned long) ~0x1fffffff)) != 0)
-@@ -83,16 +78,17 @@ char *XKeysymToString(KeySym ks)
- ks = 0;
- if (ks <= 0x1fffffff)
- {
-- val1 = ks >> 24;
-- val2 = (ks >> 16) & 0xff;
-- val3 = (ks >> 8) & 0xff;
-- val4 = ks & 0xff;
-- i = ks % VTABLESIZE;
-- h = i + 1;
-- n = VMAXHASH;
-+ unsigned char val1 = ks >> 24;
-+ unsigned char val2 = (ks >> 16) & 0xff;
-+ unsigned char val3 = (ks >> 8) & 0xff;
-+ unsigned char val4 = ks & 0xff;
-+ int i = ks % VTABLESIZE;
-+ int h = i + 1;
-+ int n = VMAXHASH;
-+ int idx;
- while ((idx = hashKeysym[i]))
- {
-- entry = &_XkeyTable[idx];
-+ const unsigned char *entry = &_XkeyTable[idx];
- if ((entry[0] == val1) && (entry[1] == val2) &&
- (entry[2] == val3) && (entry[3] == val4))
- return ((char *)entry + 4);
-@@ -136,7 +132,7 @@ char *XKeysymToString(KeySym ks)
- i--;
- s[i--] = '\0';
- for (; i; i--){
-- val1 = val & 0xf;
-+ unsigned char val1 = val & 0xf;
- val >>= 4;
- if (val1 < 10)
- s[i] = '0'+ val1;
---
-1.7.9.2
-
-From b687440c28c7da6ee0ae44514d20248db5161606 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 16 Feb 2013 10:42:23 -0800
-Subject: [PATCH:libX11 43/58] Convert more sprintf calls to snprintf
-
-You could analyze most of these and quickly recognize that there was no
-chance of buffer overflow already, but why make everyone spend time doing
-that when we can just make it obviously safe?
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/ErrDes.c | 9 +++++----
- src/GetDflt.c | 2 +-
- src/KeysymStr.c | 2 +-
- src/XlibInt.c | 8 ++++----
- 4 files changed, 11 insertions(+), 10 deletions(-)
-
-diff --git a/src/ErrDes.c b/src/ErrDes.c
-index 9a5b180..ef5edad 100644
---- a/src/ErrDes.c
-+++ b/src/ErrDes.c
-@@ -109,7 +109,7 @@ XGetErrorText(
-
- if (nbytes == 0) return 0;
- if (code <= BadImplementation && code > 0) {
-- sprintf(buf, "%d", code);
-+ snprintf(buf, sizeof(buf), "%d", code);
- (void) XGetErrorDatabaseText(dpy, "XProtoError", buf,
- _XErrorList + _XErrorOffsets[code],
- buffer, nbytes);
-@@ -125,11 +125,12 @@ XGetErrorText(
- bext = ext;
- }
- if (!buffer[0] && bext) {
-- sprintf(buf, "%s.%d", bext->name, code - bext->codes.first_error);
-+ snprintf(buf, sizeof(buf), "%s.%d",
-+ bext->name, code - bext->codes.first_error);
- (void) XGetErrorDatabaseText(dpy, "XProtoError", buf, "", buffer, nbytes);
- }
- if (!buffer[0])
-- sprintf(buffer, "%d", code);
-+ snprintf(buffer, nbytes, "%d", code);
- return 0;
- }
-
-@@ -190,7 +191,7 @@ XGetErrorDatabaseText(
- else
- tptr = Xmalloc (tlen);
- if (tptr) {
-- sprintf(tptr, "%s.%s", name, type);
-+ snprintf(tptr, tlen, "%s.%s", name, type);
- XrmGetResource(db, tptr, "ErrorType.ErrorNumber",
- &type_str, &result);
- if (tptr != temp)
-diff --git a/src/GetDflt.c b/src/GetDflt.c
-index dfda1c6..6f62cd8 100644
---- a/src/GetDflt.c
-+++ b/src/GetDflt.c
-@@ -110,7 +110,7 @@ GetHomeDir(
- len2 = strlen (ptr2);
- }
- if ((len1 + len2 + 1) < len)
-- sprintf (dest, "%s%s", ptr1, (ptr2) ? ptr2 : "");
-+ snprintf (dest, len, "%s%s", ptr1, (ptr2) ? ptr2 : "");
- else
- *dest = '\0';
- #else
-diff --git a/src/KeysymStr.c b/src/KeysymStr.c
-index f24f3b1..c7c4704 100644
---- a/src/KeysymStr.c
-+++ b/src/KeysymStr.c
-@@ -107,7 +107,7 @@ char *XKeysymToString(KeySym ks)
- XrmQuark empty = NULLQUARK;
- GRNData data;
-
-- sprintf(buf, "%lX", ks);
-+ snprintf(buf, sizeof(buf), "%lX", ks);
- resval.addr = (XPointer)buf;
- resval.size = strlen(buf) + 1;
- data.name = (char *)NULL;
-diff --git a/src/XlibInt.c b/src/XlibInt.c
-index e4d35fd..c436842 100644
---- a/src/XlibInt.c
-+++ b/src/XlibInt.c
-@@ -1432,7 +1432,7 @@ static int _XPrintDefaultError(
- mesg, BUFSIZ);
- (void) fprintf(fp, mesg, event->request_code);
- if (event->request_code < 128) {
-- sprintf(number, "%d", event->request_code);
-+ snprintf(number, sizeof(number), "%d", event->request_code);
- XGetErrorDatabaseText(dpy, "XRequest", number, "", buffer, BUFSIZ);
- } else {
- for (ext = dpy->ext_procs;
-@@ -1452,7 +1452,7 @@ static int _XPrintDefaultError(
- fputs(" ", fp);
- (void) fprintf(fp, mesg, event->minor_code);
- if (ext) {
-- sprintf(mesg, "%s.%d", ext->name, event->minor_code);
-+ snprintf(mesg, sizeof(mesg), "%s.%d", ext->name, event->minor_code);
- XGetErrorDatabaseText(dpy, "XRequest", mesg, "", buffer, BUFSIZ);
- (void) fprintf(fp, " (%s)", buffer);
- }
-@@ -1475,8 +1475,8 @@ static int _XPrintDefaultError(
- bext = ext;
- }
- if (bext)
-- sprintf(buffer, "%s.%d", bext->name,
-- event->error_code - bext->codes.first_error);
-+ snprintf(buffer, sizeof(buffer), "%s.%d", bext->name,
-+ event->error_code - bext->codes.first_error);
- else
- strcpy(buffer, "Value");
- XGetErrorDatabaseText(dpy, mtype, buffer, "", mesg, BUFSIZ);
---
-1.7.9.2
-
-From 9399caf2c12cbe1ed56f4f6b368c5811cb5d0458 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Thu, 28 Feb 2013 20:04:25 -0800
-Subject: [PATCH:libX11 44/58] unifdef MUSTCOPY
-
-MUSTCOPY seems to have only been defined in <X11/Xmd.h> when building for
-CRAY, to handle missing some sizes of integer type.
-
-(mostly performed with unifdef, followed by some manual cleanup of
- spacing/indenting in the remaining code)
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- include/X11/Xlibint.h | 9 -----
- modules/om/generic/omXChar.c | 91 +++++-------------------------------------
- src/ChWindow.c | 9 -----
- src/ConfWind.c | 13 ------
- src/CrWindow.c | 9 -----
- src/DrArc.c | 12 ------
- src/DrLine.c | 16 --------
- src/DrPoint.c | 15 -------
- src/DrRect.c | 16 --------
- src/FillArc.c | 16 --------
- src/FillRct.c | 15 -------
- src/Font.c | 44 +-------------------
- src/FontInfo.c | 24 +----------
- src/MoveWin.c | 9 -----
- src/PolyTxt16.c | 23 -----------
- src/RestackWs.c | 9 -----
- src/StColor.c | 12 ------
- src/Text16.c | 23 -----------
- src/XlibAsync.c | 5 ---
- 19 files changed, 11 insertions(+), 359 deletions(-)
-
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index c2232de..5a7c0ed 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -701,19 +701,10 @@ extern void _XRead32(
- }
-
-
--#ifdef MUSTCOPY
--
--/* for when 32-bit alignment is not good enough */
--#define OneDataCard32(dpy,dstaddr,srcvar) \
-- { dpy->bufptr -= 4; Data32 (dpy, (char *) &(srcvar), 4); }
--
--#else
--
- /* srcvar must be a variable for large architecture version */
- #define OneDataCard32(dpy,dstaddr,srcvar) \
- { *(CARD32 *)(dstaddr) = (srcvar); }
-
--#endif /* MUSTCOPY */
-
- typedef struct _XInternalAsync {
- struct _XInternalAsync *next;
-diff --git a/modules/om/generic/omXChar.c b/modules/om/generic/omXChar.c
-index ff517d5..c9bbb8e 100644
---- a/modules/om/generic/omXChar.c
-+++ b/modules/om/generic/omXChar.c
-@@ -262,47 +262,6 @@ _XomGetFontSetFromCharSet(
- return (FontSet) NULL;
- }
-
--#ifdef MUSTCOPY
--static void
--cs_to_xchar2b(
-- register char *from,
-- register XChar2b *to,
-- register length)
--{
-- while (length-- > 0) {
-- to->byte1 = *from++;
-- to->byte2 = *from++;
-- to++;
-- }
--}
--
--static void
--cs_to_xchar2b_gl(
-- register char *from,
-- register XChar2b *to,
-- register length)
--{
-- while (length-- > 0) {
-- to->byte1 = *from++ & 0x7f;
-- to->byte2 = *from++ & 0x7f;
-- to++;
-- }
--}
--
--static void
--cs_to_xchar2b_gr(
-- register char *from,
-- register XChar2b *to,
-- register length)
--{
-- while (length-- > 0) {
-- to->byte1 = *from++ | 0x80;
-- to->byte2 = *from++ | 0x80;
-- to++;
-- }
--}
--#endif
--
- static void
- shift_to_gl(
- register char *text,
-@@ -358,10 +317,6 @@ _XomConvert(
- XlcCharSet charset;
- int length, cs_left, ret;
- FontSet font_set;
--#ifdef MUSTCOPY
-- XChar2b *xchar2b;
-- char *buf, buf_local[BUFSIZ];
--#endif
-
- cs = *to;
- cs_left = *to_left;
-@@ -380,46 +335,18 @@ _XomConvert(
-
- length = *to_left - cs_left;
-
--#ifdef MUSTCOPY
-- if (font_set->is_xchar2b) {
-- buf = (length > BUFSIZ) ? Xmalloc(length) : buf_local;
-- if (buf == NULL)
-- return -1;
-- memcpy(buf, (char *) *to, length);
--
-- xchar2b = (XChar2b *) *to;
-- length >>= 1;
--
-- if (font_set->side == charset->side)
-- cs_to_xchar2b(buf, xchar2b, length);
-- else if (font_set->side == XlcGL)
-- cs_to_xchar2b_gl(buf, xchar2b, length);
-+ if (font_set->side != charset->side) {
-+ if (font_set->side == XlcGL)
-+ shift_to_gl(*to, length);
- else if (font_set->side == XlcGR)
-- cs_to_xchar2b_gr(buf, xchar2b, length);
-- else
-- cs_to_xchar2b(buf, xchar2b, length);
--
-- if (buf != buf_local)
-- Xfree(buf);
--
-- *to = (XPointer) (xchar2b + length);
-- *to_left -= length;
-- } else
--#endif
-- {
-- if (font_set->side != charset->side) {
-- if (font_set->side == XlcGL)
-- shift_to_gl(*to, length);
-- else if (font_set->side == XlcGR)
-- shift_to_gr(*to, length);
-- }
--
-- if (font_set->is_xchar2b)
-- length >>= 1;
-- *to = cs;
-- *to_left -= length;
-+ shift_to_gr(*to, length);
- }
-
-+ if (font_set->is_xchar2b)
-+ length >>= 1;
-+ *to = cs;
-+ *to_left -= length;
-+
- *((XFontStruct **) args[0]) = font_set->font;
- *((Bool *) args[1]) = font_set->is_xchar2b;
- if(num_args >= 3){
-diff --git a/src/ChWindow.c b/src/ChWindow.c
-index fbd6e88..89a81e1 100644
---- a/src/ChWindow.c
-+++ b/src/ChWindow.c
-@@ -43,20 +43,11 @@ XResizeWindow(
-
- req->window = w;
- req->mask = CWWidth | CWHeight;
--#ifdef MUSTCOPY
-- {
-- unsigned long lwidth = width, lheight = height;
-- dpy->bufptr -= 8;
-- Data32 (dpy, (long *) &lwidth, 4); /* order dictated by values of */
-- Data32 (dpy, (long *) &lheight, 4); /* CWWidth and CWHeight */
-- }
--#else
- {
- CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xConfigureWindowReq);
- *valuePtr++ = width;
- *valuePtr = height;
- }
--#endif /* MUSTCOPY */
- UnlockDisplay(dpy);
- SyncHandle();
- return 1;
-diff --git a/src/ConfWind.c b/src/ConfWind.c
-index dd55b44..eefce4d 100644
---- a/src/ConfWind.c
-+++ b/src/ConfWind.c
-@@ -44,18 +44,6 @@ XMoveResizeWindow(
- GetReqExtra(ConfigureWindow, 16, req);
- req->window = w;
- req->mask = CWX | CWY | CWWidth | CWHeight;
--#ifdef MUSTCOPY
-- {
-- long lx = x, ly = y;
-- unsigned long lwidth = width, lheight = height;
--
-- dpy->bufptr -= 16;
-- Data32 (dpy, (long *) &lx, 4); /* order must match values of */
-- Data32 (dpy, (long *) &ly, 4); /* CWX, CWY, CWWidth, and CWHeight */
-- Data32 (dpy, (long *) &lwidth, 4);
-- Data32 (dpy, (long *) &lheight, 4);
-- }
--#else
- {
- register CARD32 *valuePtr =
- (CARD32 *) NEXTPTR(req,xConfigureWindowReq);
-@@ -64,7 +52,6 @@ XMoveResizeWindow(
- *valuePtr++ = width;
- *valuePtr = height;
- }
--#endif /* MUSTCOPY */
- UnlockDisplay(dpy);
- SyncHandle();
- return 1;
-diff --git a/src/CrWindow.c b/src/CrWindow.c
-index 23f7ddc..7b54601 100644
---- a/src/CrWindow.c
-+++ b/src/CrWindow.c
-@@ -57,20 +57,11 @@ Window XCreateSimpleWindow(
- wid = req->wid = XAllocID(dpy);
- req->mask = CWBackPixel | CWBorderPixel;
-
--#ifdef MUSTCOPY
-- {
-- unsigned long lbackground = background, lborder = border;
-- dpy->bufptr -= 8;
-- Data32 (dpy, (long *) &lbackground, 4);
-- Data32 (dpy, (long *) &lborder, 4);
-- }
--#else
- {
- register CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xCreateWindowReq);
- *valuePtr++ = background;
- *valuePtr = border;
- }
--#endif /* MUSTCOPY */
-
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/DrArc.c b/src/DrArc.c
-index 1dc4a07..d72fac9 100644
---- a/src/DrArc.c
-+++ b/src/DrArc.c
-@@ -49,12 +49,6 @@ XDrawArc(
- {
- register xPolyArcReq *req;
- register xArc *arc;
--#ifdef MUSTCOPY
-- xArc arcdata;
-- long len = SIZEOF(xArc);
--
-- arc = &arcdata;
--#endif /* MUSTCOPY */
-
- LockDisplay(dpy);
- FlushGC(dpy, gc);
-@@ -63,9 +57,7 @@ XDrawArc(
- req->drawable = d;
- req->gc = gc->gid;
-
--#ifndef MUSTCOPY
- arc = (xArc *) NEXTPTR(req,xPolyArcReq);
--#endif /* MUSTCOPY */
-
- arc->x = x;
- arc->y = y;
-@@ -74,10 +66,6 @@ XDrawArc(
- arc->angle1 = angle1;
- arc->angle2 = angle2;
-
--#ifdef MUSTCOPY
-- dpy->bufptr -= SIZEOF(xArc);
-- Data (dpy, (char *) arc, len);
--#endif /* MUSTCOPY */
-
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/DrLine.c b/src/DrLine.c
-index 3786f59..dc82d5a 100644
---- a/src/DrLine.c
-+++ b/src/DrLine.c
-@@ -45,12 +45,6 @@ XDrawLine (
- int y2)
- {
- register xSegment *segment;
--#ifdef MUSTCOPY
-- xSegment segmentdata;
-- long len = SIZEOF(xSegment);
--
-- segment = &segmentdata;
--#endif /* not MUSTCOPY */
-
- LockDisplay(dpy);
- FlushGC(dpy, gc);
-@@ -67,21 +61,15 @@ XDrawLine (
- && (((char *)dpy->bufptr - (char *)req) < (gc->values.line_width ?
- wsize : zsize)) ) {
- req->length += SIZEOF(xSegment) >> 2;
--#ifndef MUSTCOPY
- segment = (xSegment *) dpy->bufptr;
- dpy->bufptr += SIZEOF(xSegment);
--#endif /* not MUSTCOPY */
- }
-
- else {
- GetReqExtra (PolySegment, SIZEOF(xSegment), req);
- req->drawable = d;
- req->gc = gc->gid;
--#ifdef MUSTCOPY
-- dpy->bufptr -= SIZEOF(xSegment);
--#else
- segment = (xSegment *) NEXTPTR(req,xPolySegmentReq);
--#endif /* MUSTCOPY */
- }
-
- segment->x1 = x1;
-@@ -89,10 +77,6 @@ XDrawLine (
- segment->x2 = x2;
- segment->y2 = y2;
-
--#ifdef MUSTCOPY
-- Data (dpy, (char *) &segmentdata, len);
--#endif /* MUSTCOPY */
--
- UnlockDisplay(dpy);
- SyncHandle();
- }
-diff --git a/src/DrPoint.c b/src/DrPoint.c
-index 5c89b5c..f0332e8 100644
---- a/src/DrPoint.c
-+++ b/src/DrPoint.c
-@@ -42,12 +42,6 @@ XDrawPoint(
- int y) /* INT16 */
- {
- xPoint *point;
--#ifdef MUSTCOPY
-- xPoint pointdata;
-- long len = SIZEOF(xPoint);
--
-- point = &pointdata;
--#endif /* MUSTCOPY */
-
- LockDisplay(dpy);
- FlushGC(dpy, gc);
-@@ -65,10 +59,8 @@ XDrawPoint(
- && ((dpy->bufptr + SIZEOF(xPoint)) <= dpy->bufmax)
- && (((char *)dpy->bufptr - (char *)req) < size) ) {
- req->length += SIZEOF(xPoint) >> 2;
--#ifndef MUSTCOPY
- point = (xPoint *) dpy->bufptr;
- dpy->bufptr += SIZEOF(xPoint);
--#endif /* not MUSTCOPY */
- }
-
- else {
-@@ -76,19 +68,12 @@ XDrawPoint(
- req->drawable = d;
- req->gc = gc->gid;
- req->coordMode = CoordModeOrigin;
--#ifdef MUSTCOPY
-- dpy->bufptr -= SIZEOF(xPoint);
--#else
- point = (xPoint *) NEXTPTR(req,xPolyPointReq);
--#endif /* MUSTCOPY */
- }
-
- point->x = x;
- point->y = y;
-
--#ifdef MUSTCOPY
-- Data (dpy, (char *) point, len);
--#endif /* MUSTCOPY */
- }
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/DrRect.c b/src/DrRect.c
-index dadd55e..d9141ee 100644
---- a/src/DrRect.c
-+++ b/src/DrRect.c
-@@ -45,12 +45,6 @@ XDrawRectangle(
- unsigned int height) /* CARD16 */
- {
- xRectangle *rect;
--#ifdef MUSTCOPY
-- xRectangle rectdata;
-- long len = SIZEOF(xRectangle);
--
-- rect = &rectdata;
--#endif /* MUSTCOPY */
-
- LockDisplay(dpy);
- FlushGC(dpy, gc);
-@@ -67,21 +61,15 @@ XDrawRectangle(
- && (((char *)dpy->bufptr - (char *)req) < (gc->values.line_width ?
- wsize : zsize)) ) {
- req->length += SIZEOF(xRectangle) >> 2;
--#ifndef MUSTCOPY
- rect = (xRectangle *) dpy->bufptr;
- dpy->bufptr += SIZEOF(xRectangle);
--#endif /* not MUSTCOPY */
- }
-
- else {
- GetReqExtra(PolyRectangle, SIZEOF(xRectangle), req);
- req->drawable = d;
- req->gc = gc->gid;
--#ifdef MUSTCOPY
-- dpy->bufptr -= SIZEOF(xRectangle);
--#else
- rect = (xRectangle *) NEXTPTR(req,xPolyRectangleReq);
--#endif /* MUSTCOPY */
- }
-
- rect->x = x;
-@@ -89,10 +77,6 @@ XDrawRectangle(
- rect->width = width;
- rect->height = height;
-
--#ifdef MUSTCOPY
-- Data (dpy, (char *) rect, len); /* subtracted bufptr up above */
--#endif /* MUSTCOPY */
--
- }
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/FillArc.c b/src/FillArc.c
-index 0f1ad02..c67f977 100644
---- a/src/FillArc.c
-+++ b/src/FillArc.c
-@@ -46,12 +46,6 @@ XFillArc(
- int angle2) /* INT16 */
- {
- xArc *arc;
--#ifdef MUSTCOPY
-- xArc arcdata;
-- long len = SIZEOF(xArc);
--
-- arc = &arcdata;
--#endif /* MUSTCOPY */
-
- LockDisplay(dpy);
- FlushGC(dpy, gc);
-@@ -67,10 +61,8 @@ XFillArc(
- && ((dpy->bufptr + SIZEOF(xArc)) <= dpy->bufmax)
- && (((char *)dpy->bufptr - (char *)req) < size) ) {
- req->length += SIZEOF(xArc) >> 2;
--#ifndef MUSTCOPY
- arc = (xArc *) dpy->bufptr;
- dpy->bufptr += SIZEOF(xArc);
--#endif /* not MUSTCOPY */
- }
-
- else {
-@@ -78,11 +70,7 @@ XFillArc(
-
- req->drawable = d;
- req->gc = gc->gid;
--#ifdef MUSTCOPY
-- dpy->bufptr -= SIZEOF(xArc);
--#else
- arc = (xArc *) NEXTPTR(req,xPolyFillArcReq);
--#endif /* MUSTCOPY */
- }
- arc->x = x;
- arc->y = y;
-@@ -91,10 +79,6 @@ XFillArc(
- arc->angle1 = angle1;
- arc->angle2 = angle2;
-
--#ifdef MUSTCOPY
-- Data (dpy, (char *) arc, len);
--#endif /* MUSTCOPY */
--
- }
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/FillRct.c b/src/FillRct.c
-index 4cd104c..3ca9afe 100644
---- a/src/FillRct.c
-+++ b/src/FillRct.c
-@@ -44,12 +44,6 @@ XFillRectangle(
- unsigned int height) /* CARD16 */
- {
- xRectangle *rect;
--#ifdef MUSTCOPY
-- xRectangle rectdata;
-- long len = SIZEOF(xRectangle);
--
-- rect = &rectdata;
--#endif /* MUSTCOPY */
-
- LockDisplay(dpy);
- FlushGC(dpy, gc);
-@@ -66,30 +60,21 @@ XFillRectangle(
- && ((dpy->bufptr + SIZEOF(xRectangle)) <= dpy->bufmax)
- && (((char *)dpy->bufptr - (char *)req) < size) ) {
- req->length += SIZEOF(xRectangle) >> 2;
--#ifndef MUSTCOPY
- rect = (xRectangle *) dpy->bufptr;
- dpy->bufptr += SIZEOF(xRectangle);
--#endif /* not MUSTCOPY */
- }
-
- else {
- GetReqExtra(PolyFillRectangle, SIZEOF(xRectangle), req);
- req->drawable = d;
- req->gc = gc->gid;
--#ifdef MUSTCOPY
-- dpy->bufptr -= SIZEOF(xRectangle);
--#else
- rect = (xRectangle *) NEXTPTR(req,xPolyFillRectangleReq);
--#endif /* MUSTCOPY */
- }
- rect->x = x;
- rect->y = y;
- rect->width = width;
- rect->height = height;
-
--#ifdef MUSTCOPY
-- Data (dpy, (char *) rect, len);
--#endif /* MUSTCOPY */
- }
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/Font.c b/src/Font.c
-index 7f56f68..25e1790 100644
---- a/src/Font.c
-+++ b/src/Font.c
-@@ -32,7 +32,7 @@ authorization from the X Consortium and the XFree86 Project.
- #endif
- #include "Xlibint.h"
-
--#if defined(XF86BIGFONT) && !defined(MUSTCOPY)
-+#if defined(XF86BIGFONT)
- #define USE_XF86BIGFONT
- #endif
- #ifdef USE_XF86BIGFONT
-@@ -228,31 +228,9 @@ _XQueryFont (
- fs->ascent = cvtINT16toInt (reply.fontAscent);
- fs->descent = cvtINT16toInt (reply.fontDescent);
-
--#ifdef MUSTCOPY
-- {
-- xCharInfo *xcip;
--
-- xcip = (xCharInfo *) &reply.minBounds;
-- fs->min_bounds.lbearing = cvtINT16toShort(xcip->leftSideBearing);
-- fs->min_bounds.rbearing = cvtINT16toShort(xcip->rightSideBearing);
-- fs->min_bounds.width = cvtINT16toShort(xcip->characterWidth);
-- fs->min_bounds.ascent = cvtINT16toShort(xcip->ascent);
-- fs->min_bounds.descent = cvtINT16toShort(xcip->descent);
-- fs->min_bounds.attributes = xcip->attributes;
--
-- xcip = (xCharInfo *) &reply.maxBounds;
-- fs->max_bounds.lbearing = cvtINT16toShort(xcip->leftSideBearing);
-- fs->max_bounds.rbearing = cvtINT16toShort(xcip->rightSideBearing);
-- fs->max_bounds.width = cvtINT16toShort(xcip->characterWidth);
-- fs->max_bounds.ascent = cvtINT16toShort(xcip->ascent);
-- fs->max_bounds.descent = cvtINT16toShort(xcip->descent);
-- fs->max_bounds.attributes = xcip->attributes;
-- }
--#else
- /* XXX the next two statements won't work if short isn't 16 bits */
- fs->min_bounds = * (XCharStruct *) &reply.minBounds;
- fs->max_bounds = * (XCharStruct *) &reply.maxBounds;
--#endif /* MUSTCOPY */
-
- fs->n_properties = reply.nFontProps;
- /*
-@@ -276,7 +254,6 @@ _XQueryFont (
- * If no characters in font, then it is a bad font, but
- * shouldn't try to read nothing.
- */
-- /* have to unpack charinfos on some machines (CRAY) */
- fs->per_char = NULL;
- if (reply.nCharInfos > 0){
- nbytes = reply.nCharInfos * sizeof(XCharStruct);
-@@ -288,27 +265,8 @@ _XQueryFont (
- return (XFontStruct *)NULL;
- }
-
--#ifdef MUSTCOPY
-- {
-- register XCharStruct *cs = fs->per_char;
-- register int i;
--
-- for (i = 0; i < reply.nCharInfos; i++, cs++) {
-- xCharInfo xcip;
--
-- _XRead(dpy, (char *)&xcip, SIZEOF(xCharInfo));
-- cs->lbearing = cvtINT16toShort(xcip.leftSideBearing);
-- cs->rbearing = cvtINT16toShort(xcip.rightSideBearing);
-- cs->width = cvtINT16toShort(xcip.characterWidth);
-- cs->ascent = cvtINT16toShort(xcip.ascent);
-- cs->descent = cvtINT16toShort(xcip.descent);
-- cs->attributes = xcip.attributes;
-- }
-- }
--#else
- nbytes = reply.nCharInfos * SIZEOF(xCharInfo);
- _XRead16 (dpy, (char *)fs->per_char, nbytes);
--#endif
- }
-
- /* call out to any extensions interested */
-diff --git a/src/FontInfo.c b/src/FontInfo.c
-index 97de40e..fb296b8 100644
---- a/src/FontInfo.c
-+++ b/src/FontInfo.c
-@@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group.
- #endif
- #include "Xlibint.h"
-
--#if defined(XF86BIGFONT) && !defined(MUSTCOPY)
-+#if defined(XF86BIGFONT)
- #define USE_XF86BIGFONT
- #endif
- #ifdef USE_XF86BIGFONT
-@@ -133,31 +133,9 @@ XFontStruct **info) /* RETURN */
- fs->ascent = cvtINT16toInt (reply.fontAscent);
- fs->descent = cvtINT16toInt (reply.fontDescent);
-
--#ifdef MUSTCOPY
-- {
-- xCharInfo *xcip;
--
-- xcip = (xCharInfo *) &reply.minBounds;
-- fs->min_bounds.lbearing = xcip->leftSideBearing;
-- fs->min_bounds.rbearing = xcip->rightSideBearing;
-- fs->min_bounds.width = xcip->characterWidth;
-- fs->min_bounds.ascent = xcip->ascent;
-- fs->min_bounds.descent = xcip->descent;
-- fs->min_bounds.attributes = xcip->attributes;
--
-- xcip = (xCharInfo *) &reply.maxBounds;
-- fs->max_bounds.lbearing = xcip->leftSideBearing;
-- fs->max_bounds.rbearing = xcip->rightSideBearing;
-- fs->max_bounds.width = xcip->characterWidth;
-- fs->max_bounds.ascent = xcip->ascent;
-- fs->max_bounds.descent = xcip->descent;
-- fs->max_bounds.attributes = xcip->attributes;
-- }
--#else
- /* XXX the next two statements won't work if short isn't 16 bits */
- fs->min_bounds = * (XCharStruct *) &reply.minBounds;
- fs->max_bounds = * (XCharStruct *) &reply.maxBounds;
--#endif /* MUSTCOPY */
-
- fs->n_properties = reply.nFontProps;
- if (fs->n_properties > 0) {
-diff --git a/src/MoveWin.c b/src/MoveWin.c
-index 3cd75e1..2eb2283 100644
---- a/src/MoveWin.c
-+++ b/src/MoveWin.c
-@@ -44,20 +44,11 @@ XMoveWindow (
- req->window = w;
- req->mask = CWX | CWY;
-
--#ifdef MUSTCOPY
-- {
-- long lx = (long) x, ly = (long) y;
-- dpy->bufptr -= 8;
-- Data32 (dpy, (long *) &lx, 4); /* order dictated by CWX and CWY */
-- Data32 (dpy, (long *) &ly, 4);
-- }
--#else
- {
- CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xConfigureWindowReq);
- *valuePtr++ = x;
- *valuePtr = y;
- }
--#endif /* MUSTCOPY */
- UnlockDisplay(dpy);
- SyncHandle();
- return 1;
-diff --git a/src/PolyTxt16.c b/src/PolyTxt16.c
-index dd65818..2e4be16 100644
---- a/src/PolyTxt16.c
-+++ b/src/PolyTxt16.c
-@@ -168,18 +168,7 @@ XDrawText16(
- }
- elt->len = 254;
-
--#if defined(MUSTCOPY) || defined(MUSTCOPY2B)
-- {
-- register int i;
-- register unsigned char *cp;
-- for (i = 0, cp = ((unsigned char *)elt) + 2; i < 254; i++) {
-- *cp++ = CharacterOffset[i].byte1;
-- *cp++ = CharacterOffset[i].byte2;
-- }
-- }
--#else
- memcpy ((char *) (elt + 1), (char *)CharacterOffset, 254 * 2);
--#endif
- PartialNChars = PartialNChars - 254;
- CharacterOffset += 254;
-
-@@ -213,21 +202,9 @@ XDrawText16(
- }
- elt->len = PartialNChars;
-
--#if defined(MUSTCOPY) || defined(MUSTCOPY2B)
-- {
-- register int i;
-- register unsigned char *cp;
-- for (i = 0, cp = ((unsigned char *)elt) + 2; i < PartialNChars;
-- i++) {
-- *cp++ = CharacterOffset[i].byte1;
-- *cp++ = CharacterOffset[i].byte2;
-- }
-- }
--#else
- memcpy ((char *) (elt + 1), (char *)CharacterOffset,
- PartialNChars *
- 2);
--#endif
- }
- }
- item++;
-diff --git a/src/RestackWs.c b/src/RestackWs.c
-index 1dba3c8..52391ec 100644
---- a/src/RestackWs.c
-+++ b/src/RestackWs.c
-@@ -36,9 +36,6 @@ XRestackWindows (
- int n)
- {
- int i = 0;
--#ifdef MUSTCOPY
-- unsigned long val = Below; /* needed for macro below */
--#endif
-
- LockDisplay(dpy);
- while (windows++, ++i < n) {
-@@ -47,18 +44,12 @@ XRestackWindows (
- GetReqExtra (ConfigureWindow, 8, req);
- req->window = *windows;
- req->mask = CWSibling | CWStackMode;
--#ifdef MUSTCOPY
-- dpy->bufptr -= 8;
-- Data32 (dpy, (long *)(windows-1), 4);
-- Data32 (dpy, (long *)&val, 4);
--#else
- {
- register CARD32 *values = (CARD32 *)
- NEXTPTR(req,xConfigureWindowReq);
- *values++ = *(windows-1);
- *values = Below;
- }
--#endif /* MUSTCOPY */
- }
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/StColor.c b/src/StColor.c
-index 19f2a4b..d5a217f 100644
---- a/src/StColor.c
-+++ b/src/StColor.c
-@@ -37,21 +37,13 @@ XStoreColor(
- {
- xColorItem *citem;
- register xStoreColorsReq *req;
--#ifdef MUSTCOPY
-- xColorItem citemdata;
-- long len = SIZEOF(xColorItem);
--
-- citem = &citemdata;
--#endif /* MUSTCOPY */
-
- LockDisplay(dpy);
- GetReqExtra(StoreColors, SIZEOF(xColorItem), req); /* assume size is 4*n */
-
- req->cmap = cmap;
-
--#ifndef MUSTCOPY
- citem = (xColorItem *) NEXTPTR(req,xStoreColorsReq);
--#endif /* not MUSTCOPY */
-
- citem->pixel = def->pixel;
- citem->red = def->red;
-@@ -59,10 +51,6 @@ XStoreColor(
- citem->blue = def->blue;
- citem->flags = def->flags; /* do_red, do_green, do_blue */
-
--#ifdef MUSTCOPY
-- dpy->bufptr -= SIZEOF(xColorItem); /* adjust for GetReqExtra */
-- Data (dpy, (char *) citem, len);
--#endif /* MUSTCOPY */
-
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/Text16.c b/src/Text16.c
-index 5a66a2b..008a3f7 100644
---- a/src/Text16.c
-+++ b/src/Text16.c
-@@ -82,18 +82,7 @@ XDrawString16(
- BufAlloc (xTextElt *, elt, nbytes);
- elt->delta = 0;
- elt->len = 254;
--#if defined(MUSTCOPY) || defined(MUSTCOPY2B)
-- {
-- register int i;
-- register unsigned char *cp;
-- for (i = 0, cp = ((unsigned char *)elt) + 2; i < 254; i++) {
-- *cp++ = CharacterOffset[i].byte1;
-- *cp++ = CharacterOffset[i].byte2;
-- }
-- }
--#else
- memcpy (((char *) elt) + 2, (char *)CharacterOffset, 254 * 2);
--#endif
- PartialNChars = PartialNChars - 254;
- CharacterOffset += 254;
- }
-@@ -104,19 +93,7 @@ XDrawString16(
- BufAlloc (xTextElt *, elt, nbytes);
- elt->delta = 0;
- elt->len = PartialNChars;
--#if defined(MUSTCOPY) || defined(MUSTCOPY2B)
-- {
-- register int i;
-- register unsigned char *cp;
-- for (i = 0, cp = ((unsigned char *)elt) + 2; i < PartialNChars;
-- i++) {
-- *cp++ = CharacterOffset[i].byte1;
-- *cp++ = CharacterOffset[i].byte2;
-- }
-- }
--#else
- memcpy(((char *)elt) + 2, (char *)CharacterOffset, PartialNChars * 2);
--#endif
- }
- }
-
-diff --git a/src/XlibAsync.c b/src/XlibAsync.c
-index b17135c..eb2b819 100644
---- a/src/XlibAsync.c
-+++ b/src/XlibAsync.c
-@@ -100,11 +100,6 @@ _XGetAsyncReply(
- _XRead(dpy, replbuf + len, size - len);
- buf = replbuf;
- len = size;
--#ifdef MUSTCOPY
-- } else {
-- memcpy(replbuf, buf, size);
-- buf = replbuf;
--#endif
- }
-
- if (discard && rep->generic.length > extra &&
---
-1.7.9.2
-
-From ca106eb03e5f5468df8033300c5caae3d3c6936b Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Thu, 28 Feb 2013 20:04:25 -0800
-Subject: [PATCH:libX11 45/58] unifdef WORD64
-
-WORD64 seems to have only been defined in <X11/Xmd.h> when building for
-CRAY, to handle int being a 64-bit value (ILP64, not LP64) and having
-64-bit alignment requirements.
-
-It hadn't been fully supported even before autotooling, as can be
-seen by removed code such as:
-
- #ifdef WORD64
- _XkbWriteCopyData32 Not Implemented Yet for sizeof(int)==8
- #endif
-
-(mostly performed with unifdef, followed by some manual cleanup of
- the remaining code)
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- include/X11/Xlibint.h | 37 +-------
- src/ImUtil.c | 14 +--
- src/LiHosts.c | 7 --
- src/Macros.c | 5 --
- src/Quarks.c | 4 -
- src/SendEvent.c | 5 --
- src/XlibInt.c | 236 -------------------------------------------------
- src/xkb/XKBNames.c | 56 ------------
- src/xkb/XKBRdBuf.c | 28 ------
- src/xkb/XKBlibint.h | 2 +-
- 10 files changed, 4 insertions(+), 390 deletions(-)
-
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index 5a7c0ed..48323f7 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -408,25 +408,8 @@ extern LockInfoPtr _Xglobal_lock;
- * X Protocol packetizing macros.
- */
-
--/* Need to start requests on 64 bit word boundaries
-- * on a CRAY computer so add a NoOp (127) if needed.
-- * A character pointer on a CRAY computer will be non-zero
-- * after shifting right 61 bits of it is not pointing to
-- * a word boundary.
-- */
--#ifdef WORD64
--#define WORD64ALIGN if ((long)dpy->bufptr >> 61) {\
-- dpy->last_req = dpy->bufptr;\
-- *(dpy->bufptr) = X_NoOperation;\
-- *(dpy->bufptr+1) = 0;\
-- *(dpy->bufptr+2) = 0;\
-- *(dpy->bufptr+3) = 1;\
-- dpy->request++;\
-- dpy->bufptr += 4;\
-- }
--#else /* else does not require alignment on 64-bit boundaries */
-+/* Leftover from CRAY support - was defined empty on all non-Cray systems */
- #define WORD64ALIGN
--#endif /* WORD64 */
-
- /**
- * Return a len-sized request buffer for the request type. This function may
-@@ -510,18 +493,6 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
- req = (xReq *) _XGetRequest(dpy, X_/**/name, SIZEOF(xReq))
- #endif
-
--#ifdef WORD64
--#define MakeBigReq(req,n) \
-- { \
-- char _BRdat[4]; \
-- unsigned long _BRlen = req->length - 1; \
-- req->length = 0; \
-- memcpy(_BRdat, ((char *)req) + (_BRlen << 2), 4); \
-- memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
-- memcpy(((char *)req) + 4, _BRdat, 4); \
-- Data32(dpy, (long *)&_BRdat, 4); \
-- }
--#else
- #ifdef LONG64
- #define MakeBigReq(req,n) \
- { \
-@@ -545,7 +516,6 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
- Data32(dpy, &_BRdat, 4); \
- }
- #endif
--#endif
-
- #ifndef __clang_analyzer__
- #define SetReqLen(req,n,badlen) \
-@@ -609,10 +579,6 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
- memset(ptr, '\0', n); \
- dpy->bufptr += (n);
-
--#ifdef WORD64
--#define Data16(dpy, data, len) _XData16(dpy, (_Xconst short *)data, len)
--#define Data32(dpy, data, len) _XData32(dpy, (_Xconst long *)data, len)
--#else
- #define Data16(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len))
- #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
- #define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
-@@ -632,7 +598,6 @@ extern void _XRead32(
- #define Data32(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len))
- #define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
- #endif
--#endif /* not WORD64 */
-
- #define PackData16(dpy,data,len) Data16 (dpy, data, len)
- #define PackData32(dpy,data,len) Data32 (dpy, data, len)
-diff --git a/src/ImUtil.c b/src/ImUtil.c
-index 3164d43..fa8d464 100644
---- a/src/ImUtil.c
-+++ b/src/ImUtil.c
-@@ -528,9 +528,7 @@ static unsigned long _XGetPixel (
- return (pixel & low_bits_table[ximage->depth]);
- }
-
--#ifndef WORD64
- static CARD32 const byteorderpixel = MSBFirst << 24;
--#endif
-
- static unsigned long _XGetPixel32 (
- register XImage *ximage,
-@@ -543,12 +541,9 @@ static unsigned long _XGetPixel32 (
- if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32)) {
- addr = &((unsigned char *)ximage->data)
- [y * ximage->bytes_per_line + (x << 2)];
--#ifndef WORD64
- if (*((const char *)&byteorderpixel) == ximage->byte_order)
- pixel = *((CARD32 *)addr);
-- else
--#endif
-- if (ximage->byte_order == MSBFirst)
-+ else if (ximage->byte_order == MSBFirst)
- pixel = ((unsigned long)addr[0] << 24 |
- (unsigned long)addr[1] << 16 |
- (unsigned long)addr[2] << 8 |
-@@ -734,12 +729,9 @@ static int _XPutPixel32 (
- if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32)) {
- addr = &((unsigned char *)ximage->data)
- [y * ximage->bytes_per_line + (x << 2)];
--#ifndef WORD64
- if (*((const char *)&byteorderpixel) == ximage->byte_order)
- *((CARD32 *)addr) = pixel;
-- else
--#endif
-- if (ximage->byte_order == MSBFirst) {
-+ else if (ximage->byte_order == MSBFirst) {
- addr[0] = pixel >> 24;
- addr[1] = pixel >> 16;
- addr[2] = pixel >> 8;
-@@ -997,7 +989,6 @@ _XAddPixel (
- x = ximage->bytes_per_line * ximage->height;
- while (--x >= 0)
- *dp++ += value;
--#ifndef WORD64
- } else if ((ximage->format == ZPixmap) &&
- (ximage->bits_per_pixel == 16) &&
- (*((const char *)&byteorderpixel) == ximage->byte_order)) {
-@@ -1012,7 +1003,6 @@ _XAddPixel (
- x = (ximage->bytes_per_line >> 2) * ximage->height;
- while (--x >= 0)
- *dp++ += value;
--#endif
- } else {
- for (y = ximage->height; --y >= 0; ) {
- for (x = ximage->width; --x >= 0; ) {
-diff --git a/src/LiHosts.c b/src/LiHosts.c
-index 5ae70d5..0f5e837 100644
---- a/src/LiHosts.c
-+++ b/src/LiHosts.c
-@@ -111,15 +111,8 @@ XHostAddress *XListHosts (
- _XRead (dpy, (char *) buf, nbytes);
-
- for (i = 0; i < reply.nHosts; i++) {
--#ifdef WORD64
-- xHostEntry xhe;
-- memcpy((char *)&xhe, bp, SIZEOF(xHostEntry));
-- op->family = xhe.family;
-- op->length = xhe.length;
--#else
- op->family = ((xHostEntry *) bp)->family;
- op->length =((xHostEntry *) bp)->length;
--#endif
- if (op->family == FamilyServerInterpreted) {
- char *tp = (char *) (bp + SIZEOF(xHostEntry));
- char *vp = memchr(tp, 0, op->length);
-diff --git a/src/Macros.c b/src/Macros.c
-index 42d4cf1..cfc083a 100644
---- a/src/Macros.c
-+++ b/src/Macros.c
-@@ -137,12 +137,7 @@ int XImageByteOrder(Display *dpy) { return (ImageByteOrder(dpy)); }
-
- unsigned long XNextRequest(Display *dpy)
- {
--#ifdef WORD64
-- WORD64ALIGN
-- return dpy->request + 1;
--#else
- return (NextRequest(dpy));
--#endif
- }
-
- unsigned long XLastKnownRequestProcessed(Display *dpy)
-diff --git a/src/Quarks.c b/src/Quarks.c
-index 7a704b1..4eb90c5 100644
---- a/src/Quarks.c
-+++ b/src/Quarks.c
-@@ -131,10 +131,8 @@ static char *permalloc(unsigned int length)
- return(ret);
- }
-
--#ifndef WORD64
- typedef struct {char a; double b;} TestType1;
- typedef struct {char a; unsigned long b;} TestType2;
--#endif
-
- #ifdef XTHREADS
- static char *_Xpermalloc(unsigned int length);
-@@ -157,7 +155,6 @@ char *Xpermalloc(unsigned int length)
- int i;
-
- if (neverFreeTableSize && length < NEVERFREETABLESIZE) {
--#ifndef WORD64
- if ((sizeof(TestType1) !=
- (sizeof(TestType2) - sizeof(unsigned long) + sizeof(double))) &&
- !(length & (DALIGN-1)) &&
-@@ -165,7 +162,6 @@ char *Xpermalloc(unsigned int length)
- neverFreeTableSize -= DALIGN - i;
- neverFreeTable += DALIGN - i;
- } else
--#endif
- if ((i = (NEVERFREETABLESIZE - neverFreeTableSize) & (WALIGN-1))) {
- neverFreeTableSize -= WALIGN - i;
- neverFreeTable += WALIGN - i;
-diff --git a/src/SendEvent.c b/src/SendEvent.c
-index cc8bd5a..1de9860 100644
---- a/src/SendEvent.c
-+++ b/src/SendEvent.c
-@@ -67,12 +67,7 @@ XSendEvent(
- req->destination = w;
- req->propagate = propagate;
- req->eventMask = event_mask;
--#ifdef WORD64
-- /* avoid quad-alignment problems */
-- memcpy ((char *) req->eventdata, (char *) &ev, SIZEOF(xEvent));
--#else
- req->event = ev;
--#endif /* WORD64 */
- }
-
- UnlockDisplay(dpy);
-diff --git a/src/XlibInt.c b/src/XlibInt.c
-index c436842..1c964fd 100644
---- a/src/XlibInt.c
-+++ b/src/XlibInt.c
-@@ -293,124 +293,6 @@ void _XRead32(
- }
- #endif /* LONG64 */
-
--#ifdef WORD64
--
--/*
-- * XXX This is a *really* stupid way of doing this....
-- * PACKBUFFERSIZE must be a multiple of 4.
-- */
--
--#define PACKBUFFERSIZE 4096
--
--
--/*
-- * _XRead32 - Read bytes from the socket unpacking each 32 bits
-- * into a long (64 bits on a CRAY computer).
-- *
-- */
--static void _doXRead32(
-- register Display *dpy,
-- register long *data
-- register long size,
-- register char *packbuffer)
--{
-- long *lpack,*lp;
-- long mask32 = 0x00000000ffffffff;
-- long maskw, nwords, i, bits;
--
-- _XReadPad (dpy, packbuffer, size);
--
-- lp = data;
-- lpack = (long *) packbuffer;
-- nwords = size >> 2;
-- bits = 32;
--
-- for(i=0;i<nwords;i++){
-- maskw = mask32 << bits;
-- *lp++ = ( *lpack & maskw ) >> bits;
-- bits = bits ^32;
-- if(bits){
-- lpack++;
-- }
-- }
--}
--
--void _XRead32(
-- Display *dpy,
-- long *data,
-- long len)
--{
-- char packbuffer[PACKBUFFERSIZE];
-- unsigned nunits = PACKBUFFERSIZE >> 2;
--
-- for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) {
-- _doXRead32 (dpy, data, PACKBUFFERSIZE, packbuffer);
-- }
-- if (len) _doXRead32 (dpy, data, len, packbuffer);
--}
--
--
--
--/*
-- * _XRead16 - Read bytes from the socket unpacking each 16 bits
-- * into a long (64 bits on a CRAY computer).
-- *
-- */
--static _doXRead16(
-- register Display *dpy,
-- register short *data,
-- register long size,
-- char *packbuffer)
--{
-- long *lpack,*lp;
-- long mask16 = 0x000000000000ffff;
-- long maskw, nwords, i, bits;
--
-- (void) _XRead(dpy,packbuffer,size); /* don't do a padded read... */
--
-- lp = (long *) data;
-- lpack = (long *) packbuffer;
-- nwords = size >> 1; /* number of 16 bit words to be unpacked */
-- bits = 48;
-- for(i=0;i<nwords;i++){
-- maskw = mask16 << bits;
-- *lp++ = ( *lpack & maskw ) >> bits;
-- bits -= 16;
-- if(bits < 0){
-- lpack++;
-- bits = 48;
-- }
-- }
--}
--
--void _XRead16(
-- Display *dpy,
-- short *data,
-- long len)
--{
-- char packbuffer[PACKBUFFERSIZE];
-- unsigned nunits = PACKBUFFERSIZE >> 1;
--
-- for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) {
-- _doXRead16 (dpy, data, PACKBUFFERSIZE, packbuffer);
-- }
-- if (len) _doXRead16 (dpy, data, len, packbuffer);
--}
--
--void _XRead16Pad(
-- Display *dpy,
-- short *data,
-- long size)
--{
-- int slop = (size & 3);
-- short slopbuf[3];
--
-- _XRead16 (dpy, data, size);
-- if (slop > 0) {
-- _XRead16 (dpy, slopbuf, 4 - slop);
-- }
--}
--#endif /* WORD64 */
-
- /*
- * The hard part about this is that we only get 16 bits from a reply.
-@@ -1764,122 +1646,6 @@ _XData32(
- }
- #endif /* LONG64 */
-
--#ifdef WORD64
--
--/*
-- * XXX This is a *really* stupid way of doing this. It should just use
-- * dpy->bufptr directly, taking into account where in the word it is.
-- */
--
--/*
-- * Data16 - Place 16 bit data in the buffer.
-- *
-- * "dpy" is a pointer to a Display.
-- * "data" is a pointer to the data.
-- * "len" is the length in bytes of the data.
-- */
--
--static doData16(
-- register Display *dpy,
-- _Xconst short *data,
-- unsigned len,
-- char *packbuffer)
--{
-- long *lp,*lpack;
-- long i, nwords,bits;
-- long mask16 = 0x000000000000ffff;
--
-- lp = (long *)data;
-- lpack = (long *)packbuffer;
--
--/* nwords is the number of 16 bit values to be packed,
-- * the low order 16 bits of each word will be packed
-- * into 64 bit words
-- */
-- nwords = len >> 1;
-- bits = 48;
--
-- for(i=0;i<nwords;i++){
-- if (bits == 48) *lpack = 0;
-- *lpack ^= (*lp & mask16) << bits;
-- bits -= 16 ;
-- lp++;
-- if(bits < 0){
-- lpack++;
-- bits = 48;
-- }
-- }
-- Data(dpy, packbuffer, len);
--}
--
--_XData16 (
-- Display *dpy,
-- _Xconst short *data,
-- unsigned len)
--{
-- char packbuffer[PACKBUFFERSIZE];
-- unsigned nunits = PACKBUFFERSIZE >> 1;
--
-- for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) {
-- doData16 (dpy, data, PACKBUFFERSIZE, packbuffer);
-- }
-- if (len) doData16 (dpy, data, len, packbuffer);
--}
--
--/*
-- * Data32 - Place 32 bit data in the buffer.
-- *
-- * "dpy" is a pointer to a Display.
-- * "data" is a pointer to the data.
-- * "len" is the length in bytes of the data.
-- */
--
--static doData32(
-- register Display *dpy
-- _Xconst long *data,
-- unsigned len,
-- char *packbuffer)
--{
-- long *lp,*lpack;
-- long i,bits,nwords;
-- long mask32 = 0x00000000ffffffff;
--
-- lpack = (long *) packbuffer;
-- lp = data;
--
--/* nwords is the number of 32 bit values to be packed
-- * the low order 32 bits of each word will be packed
-- * into 64 bit words
-- */
-- nwords = len >> 2;
-- bits = 32;
--
-- for(i=0;i<nwords;i++){
-- if (bits == 32) *lpack = 0;
-- *lpack ^= (*lp & mask32) << bits;
-- bits = bits ^32;
-- lp++;
-- if(bits)
-- lpack++;
-- }
-- Data(dpy, packbuffer, len);
--}
--
--void _XData32(
-- Display *dpy,
-- _Xconst long *data,
-- unsigned len)
--{
-- char packbuffer[PACKBUFFERSIZE];
-- unsigned nunits = PACKBUFFERSIZE >> 2;
--
-- for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) {
-- doData32 (dpy, data, PACKBUFFERSIZE, packbuffer);
-- }
-- if (len) doData32 (dpy, data, len, packbuffer);
--}
--
--#endif /* WORD64 */
-
-
- /* Make sure this produces the same string as DefineLocal/DefineSelf in xdm.
-@@ -1967,8 +1733,6 @@ void *_XGetRequest(Display *dpy, CARD8 type, size_t len)
- {
- xReq *req;
-
-- WORD64ALIGN
--
- if (dpy->bufptr + len > dpy->bufmax)
- _XFlush(dpy);
-
-diff --git a/src/xkb/XKBNames.c b/src/xkb/XKBNames.c
-index cf2382c..0276c05 100644
---- a/src/xkb/XKBNames.c
-+++ b/src/xkb/XKBNames.c
-@@ -494,38 +494,10 @@ XkbSetNames( Display * dpy,
- if (which&XkbGroupNamesMask)
- _XkbCopyAtoms(dpy,names->groups,groups,XkbNumKbdGroups);
- if (which&XkbKeyNamesMask) {
--#ifdef WORD64
-- char *tmp;
-- register int i;
-- BufAlloc(char *,tmp,nKeys*XkbKeyNameLength);
-- for (i=0;i<nKeys;i++,tmp+= XkbKeyNameLength) {
-- tmp[0]= names->keys[firstKey+i].name[0];
-- tmp[1]= names->keys[firstKey+i].name[1];
-- tmp[2]= names->keys[firstKey+i].name[2];
-- tmp[3]= names->keys[firstKey+i].name[3];
-- }
--#else
- Data(dpy,(char *)&names->keys[firstKey],nKeys*XkbKeyNameLength);
--#endif
- }
- if (which&XkbKeyAliasesMask) {
--#ifdef WORD64
-- char *tmp;
-- register int i;
-- BufAlloc(char *,tmp,nKA*XkbKeyNameLength*2);
-- for (i=0;i<nKeys;i++,tmp+= 2*XkbKeyNameLength) {
-- tmp[0]= names->key_aliases[i].real[0];
-- tmp[1]= names->key_aliases[i].real[1];
-- tmp[2]= names->key_aliases[i].real[2];
-- tmp[3]= names->key_aliases[i].real[3];
-- tmp[4]= names->key_aliases[i].alias[0];
-- tmp[5]= names->key_aliases[i].alias[1];
-- tmp[6]= names->key_aliases[i].alias[2];
-- tmp[7]= names->key_aliases[i].alias[3];
-- }
--#else
- Data(dpy,(char *)names->key_aliases,nKA*XkbKeyNameLength*2);
--#endif
- }
- if (which&XkbRGNamesMask) {
- Data32(dpy,(long *)names->radio_groups,nRG*4);
-@@ -750,38 +722,10 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes)
- if (which&XkbGroupNamesMask)
- _XkbCopyAtoms(dpy,names->groups,groups,XkbNumKbdGroups);
- if (which&XkbKeyNamesMask) {
--#ifdef WORD64
-- char *tmp;
-- register int i;
-- BufAlloc(char *,tmp,nKeys*4);
-- for (i=0;i<nKeys;i++,tmp+= 4) {
-- tmp[0]= names->keys[firstKey+i].name[0];
-- tmp[1]= names->keys[firstKey+i].name[1];
-- tmp[2]= names->keys[firstKey+i].name[2];
-- tmp[3]= names->keys[firstKey+i].name[3];
-- }
--#else
- Data(dpy,(char *)&names->keys[firstKey],nKeys*XkbKeyNameLength);
--#endif
- }
- if (which&XkbKeyAliasesMask) {
--#ifdef WORD64
-- char *tmp;
-- register int i;
-- BufAlloc(char *,tmp,nKA*XkbKeyNameLength*2);
-- for (i=0;i<nKeys;i++,tmp+= 2*XkbKeyNameLength) {
-- tmp[0]= names->key_aliases[i].real[0];
-- tmp[1]= names->key_aliases[i].real[1];
-- tmp[2]= names->key_aliases[i].real[2];
-- tmp[3]= names->key_aliases[i].real[3];
-- tmp[4]= names->key_aliases[i].alias[0];
-- tmp[5]= names->key_aliases[i].alias[1];
-- tmp[6]= names->key_aliases[i].alias[2];
-- tmp[7]= names->key_aliases[i].alias[3];
-- }
--#else
- Data(dpy,(char *)names->key_aliases,nKA*XkbKeyNameLength*2);
--#endif
- }
- if (which&XkbRGNamesMask) {
- Data32(dpy,(long *)names->radio_groups,nRG*4);
-diff --git a/src/xkb/XKBRdBuf.c b/src/xkb/XKBRdBuf.c
-index 3023a32..bf2883a 100644
---- a/src/xkb/XKBRdBuf.c
-+++ b/src/xkb/XKBRdBuf.c
-@@ -116,30 +116,7 @@ _XkbReadCopyData32(int *wire,long *to,int num_words)
- }
- return 1;
- }
--#endif
--#ifdef WORD64
--int
--_XkbReadCopyData32(int *from,long *lp,int num_words)
--{
--long *lpack;
--long mask32 = 0x00000000ffffffff;
--long maskw, i, bits;
--
-- lpack = (long *)from;
-- bits = 32;
--
-- for (i=0;i<num_words;i++) {
-- maskw = mask32 << bits;
-- *lp++ = (*lpack & maskw) >> bits;
-- bits = bits ^ 32;
-- if (bits)
-- lpack++;
-- }
-- return 1;
--}
--#endif
-
--#if defined(LONG64) || defined(WORD64)
- int
- _XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words)
- {
-@@ -149,9 +126,7 @@ _XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words)
- from->data+= (4*num_words);
- return True;
- }
--#endif
-
--#ifdef LONG64
- int
- _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len)
- {
-@@ -163,9 +138,6 @@ _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len)
- }
- #endif /* LONG64 */
-
--#ifdef WORD64
--_XkbWriteCopyData32 Not Implemented Yet for sizeof(int)==8
--#endif
-
- char *
- _XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size)
-diff --git a/src/xkb/XKBlibint.h b/src/xkb/XKBlibint.h
-index ce14527..7b41c3b 100644
---- a/src/xkb/XKBlibint.h
-+++ b/src/xkb/XKBlibint.h
-@@ -213,7 +213,7 @@ extern int _XkbCopyFromReadBuffer(
- );
-
-
--#if defined(WORD64) || defined(LONG64)
-+#ifdef LONG64
- extern int _XkbReadCopyData32(
- int * /* from */,
- long * /* to */,
---
-1.7.9.2
-
-From 769a0efa2298040fe8316a89fc9e75fb61e288e5 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Thu, 28 Feb 2013 20:04:25 -0800
-Subject: [PATCH:libX11 46/58] unifdef CRAY & _CRAY
-
-(mostly performed with unifdef, followed by some manual cleanup of
- the remaining code)
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- include/X11/Xlib.h | 4 ----
- include/X11/Xlibint.h | 7 -------
- src/xcms/cmsTrig.c | 4 ----
- 3 files changed, 15 deletions(-)
-
-diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h
-index 9618081..65f253c 100644
---- a/include/X11/Xlib.h
-+++ b/include/X11/Xlib.h
-@@ -128,11 +128,7 @@ typedef char *XPointer;
- #define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order)
- #define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad)
- #define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order)
--#ifdef CRAY /* unable to get WORD64 without pulling in other symbols */
--#define NextRequest(dpy) XNextRequest(dpy)
--#else
- #define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1)
--#endif
- #define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read)
-
- /* macros for screen oriented applications (toolkit) */
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index 48323f7..40965c4 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -209,13 +209,6 @@ struct _XDisplay
-
- #define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
-
--/*
-- * define the following if you want the Data macro to be a procedure instead
-- */
--#ifdef CRAY
--#define DataRoutineIsProcedure
--#endif /* CRAY */
--
- #ifndef _XEVENT_
- /*
- * _QEvent datatype for use in input queueing.
-diff --git a/src/xcms/cmsTrig.c b/src/xcms/cmsTrig.c
-index 5a01a56..a917b78 100644
---- a/src/xcms/cmsTrig.c
-+++ b/src/xcms/cmsTrig.c
-@@ -80,12 +80,8 @@ _XcmsModuloF(
- #define XCMS_FABS(x) ((x) < 0.0 ? -(x) : (x))
-
- /* XCMS_DMAXPOWTWO - largest power of two exactly representable as a double */
--#ifdef _CRAY
--#define XCMS_DMAXPOWTWO ((double)(1 < 47))
--#else
- #define XCMS_DMAXPOWTWO ((double)(XCMS_LONG_MAX) * \
- (1L << ((XCMS_NBITS(double)-XCMS_DEXPLEN) - XCMS_NBITS(int) + 1)))
--#endif
-
- /*
- * LOCAL VARIABLES
---
-1.7.9.2
-
-From 9bcfd84aa1410387bc8cf002a5f90f44705aa0d1 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 18:09:07 -0800
-Subject: [PATCH:libX11 47/58] unifdef XKB_IN_SERVER
-
-Leftovers from XKB files that were previously shared between the client
-and server code, but aren't any more.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/xkb/XKBAlloc.c | 12 ------------
- src/xkb/XKBGAlloc.c | 12 ------------
- src/xkb/XKBMAlloc.c | 13 -------------
- src/xkb/XKBMisc.c | 13 -------------
- 4 files changed, 50 deletions(-)
-
-diff --git a/src/xkb/XKBAlloc.c b/src/xkb/XKBAlloc.c
-index 05e9f73..034539b 100644
---- a/src/xkb/XKBAlloc.c
-+++ b/src/xkb/XKBAlloc.c
-@@ -30,7 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <config.h>
- #endif
-
--#ifndef XKB_IN_SERVER
-
- #include <stdio.h>
- #include "Xlibint.h"
-@@ -39,17 +38,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <X11/extensions/XKBproto.h>
- #include "XKBlibint.h"
-
--#else
--
--#include <stdio.h>
--#include <X11/X.h>
--#include <X11/Xproto.h>
--#include "misc.h"
--#include "inputstr.h"
--#include <X11/extensions/XKBsrv.h>
--#include <X11/extensions/XKBgeom.h>
--
--#endif /* XKB_IN_SERVER */
-
- /***===================================================================***/
-
-diff --git a/src/xkb/XKBGAlloc.c b/src/xkb/XKBGAlloc.c
-index 7679496..e55f5e8 100644
---- a/src/xkb/XKBGAlloc.c
-+++ b/src/xkb/XKBGAlloc.c
-@@ -30,7 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <config.h>
- #endif
-
--#ifndef XKB_IN_SERVER
-
- #include <stdio.h>
- #include "Xlibint.h"
-@@ -38,17 +37,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <X11/extensions/XKBgeom.h>
- #include <X11/extensions/XKBproto.h>
-
--#else
--
--#include <stdio.h>
--#include <X11/X.h>
--#include <X11/Xproto.h>
--#include "misc.h"
--#include "inputstr.h"
--#include <X11/extensions/XKBsrv.h>
--#include <X11/extensions/XKBgeom.h>
--
--#endif /* XKB_IN_SERVER */
-
- #ifdef X_NOT_POSIX
- #define Size_t unsigned int
-diff --git a/src/xkb/XKBMAlloc.c b/src/xkb/XKBMAlloc.c
-index a6b3921..fd75f0c 100644
---- a/src/xkb/XKBMAlloc.c
-+++ b/src/xkb/XKBMAlloc.c
-@@ -30,7 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <config.h>
- #endif
-
--#ifndef XKB_IN_SERVER
-
- #include <stdio.h>
- #include "Xlibint.h"
-@@ -38,18 +37,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <X11/keysym.h>
- #include "XKBlibint.h"
-
--#else
--
--#include <stdio.h>
--#include <X11/X.h>
--#include <X11/Xproto.h>
--#include "misc.h"
--#include "inputstr.h"
--#include <X11/keysym.h>
--#define XKBSRV_NEED_FILE_FUNCS
--#include <X11/extensions/XKBsrv.h>
--
--#endif /* XKB_IN_SERVER */
-
- /***====================================================================***/
-
-diff --git a/src/xkb/XKBMisc.c b/src/xkb/XKBMisc.c
-index 4aa1f73..cd90da7 100644
---- a/src/xkb/XKBMisc.c
-+++ b/src/xkb/XKBMisc.c
-@@ -30,7 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <config.h>
- #endif
-
--#ifndef XKB_IN_SERVER
-
- #include <stdio.h>
- #include "Xlibint.h"
-@@ -38,18 +37,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <X11/keysym.h>
- #include "XKBlibint.h"
-
--#else
--
--#include <stdio.h>
--#include <X11/X.h>
--#include <X11/Xproto.h>
--#include "misc.h"
--#include "inputstr.h"
--#include <X11/keysym.h>
--#define XKBSRV_NEED_FILE_FUNCS
--#include <X11/extensions/XKBsrv.h>
--
--#endif /* XKB_IN_SERVER */
-
- /***====================================================================***/
-
---
-1.7.9.2
-
-From c23d61d1b84dca3740bf4786978c7908d0065fb9 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 1 Mar 2013 18:10:27 -0800
-Subject: [PATCH:libX11 48/58] Assume size_t is always available, since it was
- defined in C89
-
-Don't provide a fallback definition #ifdef X_NOT_POSIX anymore.
-We already use size_t throughout the rest of Xlib, just had this
-one instance left in XKBGAlloc.c of a fallback definition.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/xkb/XKBGAlloc.c | 9 +--------
- 1 file changed, 1 insertion(+), 8 deletions(-)
-
-diff --git a/src/xkb/XKBGAlloc.c b/src/xkb/XKBGAlloc.c
-index e55f5e8..6d4c676 100644
---- a/src/xkb/XKBGAlloc.c
-+++ b/src/xkb/XKBGAlloc.c
-@@ -37,13 +37,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <X11/extensions/XKBgeom.h>
- #include <X11/extensions/XKBproto.h>
-
--
--#ifdef X_NOT_POSIX
--#define Size_t unsigned int
--#else
--#define Size_t size_t
--#endif
--
- /***====================================================================***/
-
- static void
-@@ -464,7 +457,7 @@ _XkbGeomAlloc( XPointer * old,
- unsigned short * num,
- unsigned short * total,
- int num_new,
-- Size_t sz_elem)
-+ size_t sz_elem)
- {
- if (num_new<1)
- return Success;
---
-1.7.9.2
-
-From 466404007f2c8f7166e4faddfea1454c5bfe1e9a Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 8 Mar 2013 17:13:09 -0800
-Subject: [PATCH:libX11 50/58] _xudc_code_to_glyph: check for NULL pointer
- *before* writing to it, not after
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/udcInf.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/udcInf.c b/src/udcInf.c
-index db7ad10..b7577ac 100644
---- a/src/udcInf.c
-+++ b/src/udcInf.c
-@@ -702,14 +702,14 @@ int *num_gi;
- _XlcCloseConverter(conv);
- _XlcDestroyLC(lcd);
-
-- *gi = (_XUDCGIInf *)Xmalloc(sizeof(_XUDCGIInf));
-- (*gi)->charset_str = (char *)Xmalloc(strlen(charsetname)+1);
-- strcpy((*gi)->charset_str,charsetname);
-- (*gi)->glyph_index = glyph;
-+ *gi = Xmalloc(sizeof(_XUDCGIInf));
- if(*gi == NULL){
- _xudc_utyerrno = 0x03 ;
- return(_XUDC_ERROR);
- }
-+ (*gi)->charset_str = Xmalloc(strlen(charsetname)+1);
-+ strcpy((*gi)->charset_str,charsetname);
-+ (*gi)->glyph_index = glyph;
- *num_gi = 1;
- return(0);
- }
---
-1.7.9.2
-
-From 3facbe5c0df1b5597571b7b00d5f7bdbc92fb278 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 2 Mar 2013 12:01:39 -0800
-Subject: [PATCH:libX11 51/58] Add <X11/Xresource.h> hint to all Xrm* man
- pages
-
-Help users figure out which header file they need to #include
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- man/XrmEnumerateDatabase.man | 2 ++
- man/XrmGetFileDatabase.man | 2 ++
- man/XrmGetResource.man | 2 ++
- man/XrmInitialize.man | 2 ++
- man/XrmMergeDatabases.man | 2 ++
- man/XrmPutResource.man | 2 ++
- man/XrmUniqueQuark.man | 2 ++
- 7 files changed, 14 insertions(+)
-
-diff --git a/man/XrmEnumerateDatabase.man b/man/XrmEnumerateDatabase.man
-index 8431006..03c0f30 100644
---- a/man/XrmEnumerateDatabase.man
-+++ b/man/XrmEnumerateDatabase.man
-@@ -84,6 +84,8 @@
- .SH NAME
- XrmEnumerateDatabase \- enumerate resource database entries
- .SH SYNTAX
-+.HP
-+#include <X11/Xresource.h>
- .TS
- lw(.5i) lw(2i) lw(2.5i).
- T{
-diff --git a/man/XrmGetFileDatabase.man b/man/XrmGetFileDatabase.man
-index 3a8a6fa..71ddd9f 100644
---- a/man/XrmGetFileDatabase.man
-+++ b/man/XrmGetFileDatabase.man
-@@ -93,6 +93,8 @@
- XrmGetFileDatabase, XrmPutFileDatabase, XrmGetStringDatabase, XrmLocaleOfDatabase, XrmGetDatabase, XrmSetDatabase, XrmDestroyDatabase \- retrieve and store resource databases
- .SH SYNTAX
- .HP
-+#include <X11/Xresource.h>
-+.HP
- XrmDatabase XrmGetFileDatabase\^(\^char *\fIfilename\fP\^);
- .HP
- void XrmPutFileDatabase\^(\^XrmDatabase \fIdatabase\fP\^, char
-diff --git a/man/XrmGetResource.man b/man/XrmGetResource.man
-index 76ca921..ef2cf9a 100644
---- a/man/XrmGetResource.man
-+++ b/man/XrmGetResource.man
-@@ -85,6 +85,8 @@
- XrmGetResource, XrmQGetResource, XrmQGetSearchList, XrmQGetSearchResource \- retrieve database resources and search lists
- .SH SYNTAX
- .HP
-+#include <X11/Xresource.h>
-+.HP
- Bool XrmGetResource\^(\^XrmDatabase \fIdatabase\fP\^, char *\fIstr_name\fP\^,
- char *\fIstr_class\fP\^, char **\fIstr_type_return\fP\^, XrmValue
- *\fIvalue_return\fP\^);
-diff --git a/man/XrmInitialize.man b/man/XrmInitialize.man
-index b8b549d..3b3ddd7 100644
---- a/man/XrmInitialize.man
-+++ b/man/XrmInitialize.man
-@@ -83,6 +83,8 @@
- XrmInitialize, XrmParseCommand, XrmValue, XrmOptionKind, XrmOptionDescRec \- initialize the Resource Manager, Resource Manager structures, and parse the command line
- .SH SYNTAX
- .HP
-+#include <X11/Xresource.h>
-+.HP
- void XrmInitialize\^(void\^);
- .HP
- void XrmParseCommand\^(\^XrmDatabase *\fIdatabase\fP\^, XrmOptionDescList
-diff --git a/man/XrmMergeDatabases.man b/man/XrmMergeDatabases.man
-index 57a6578..41b27bb 100644
---- a/man/XrmMergeDatabases.man
-+++ b/man/XrmMergeDatabases.man
-@@ -83,6 +83,8 @@
- XrmMergeDatabases, XrmCombineDatabase, XrmCombineFileDatabase \- merge resource databases
- .SH SYNTAX
- .HP
-+#include <X11/Xresource.h>
-+.HP
- void XrmMergeDatabases(\^XrmDatabase \fIsource_db\fP, XrmDatabase
- *\fItarget_db\fP\^);
- .HP
-diff --git a/man/XrmPutResource.man b/man/XrmPutResource.man
-index 9f9d088..fd64463 100644
---- a/man/XrmPutResource.man
-+++ b/man/XrmPutResource.man
-@@ -83,6 +83,8 @@
- XrmPutResource, XrmQPutResource, XrmPutStringResource, XrmQPutStringResource, XrmPutLineResource \- store database resources
- .SH SYNTAX
- .HP
-+#include <X11/Xresource.h>
-+.HP
- void XrmPutResource\^(\^XrmDatabase *\fIdatabase\fP\^, char
- *\fIspecifier\fP\^, char *\fItype\fP\^, XrmValue *\fIvalue\fP\^);
- .HP
-diff --git a/man/XrmUniqueQuark.man b/man/XrmUniqueQuark.man
-index 383d26c..93755f7 100644
---- a/man/XrmUniqueQuark.man
-+++ b/man/XrmUniqueQuark.man
-@@ -83,6 +83,8 @@
- XrmUniqueQuark, XrmStringToQuark, XrmPermStringToQuark, XrmQuarkToString, XrmStringToQuarkList, XrmStringToBindingQuarkList \- manipulate resource quarks
- .SH SYNOPSIS
- .HP
-+#include <X11/Xresource.h>
-+.HP
- XrmQuark XrmUniqueQuark\^(void);
- .LP
- \&#define XrmStringToName(string) XrmStringToQuark(string)
---
-1.7.9.2
-
-From 39547d600a13713e15429f49768e54c3173c828d Mon Sep 17 00:00:00 2001
-From: Karl Tomlinson <[email protected]>
-Date: Mon, 18 Feb 2013 01:25:34 +0000
-Subject: [PATCH:libX11 54/58] MakeBigReq: don't move the last word, already
- handled by Data32
-
-MakeBigReq inserts a length field after the first 4 bytes of the request
-(after req->length), pushing everything else back by 4 bytes.
-
-The current memmove moves everything but the first 4 bytes back.
-If a request aligns to the end of the buffer pointer when MakeBigReq is
-invoked for that request, this runs over the buffer.
-Instead, we need to memmove minus the first 4 bytes (which aren't moved),
-minus the last 4 bytes (so we still align to the previous tail).
-
-The 4 bytes that fell out are already handled with Data32, which will
-handle the buffermax correctly.
-
-The case where req->length = 1 was already not functional.
-
-Reported by Abhishek Arya <[email protected]>.
-
-https://bugzilla.mozilla.org/show_bug.cgi?id=803762
-
-Reviewed-by: Jeff Muizelaar <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- include/X11/Xlibint.h | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
-index 40965c4..06395b3 100644
---- a/include/X11/Xlibint.h
-+++ b/include/X11/Xlibint.h
-@@ -486,6 +486,14 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
- req = (xReq *) _XGetRequest(dpy, X_/**/name, SIZEOF(xReq))
- #endif
-
-+/*
-+ * MakeBigReq sets the CARD16 "req->length" to 0 and inserts a new CARD32
-+ * length, after req->length, before the data in the request. The new length
-+ * includes the "n" extra 32-bit words.
-+ *
-+ * Do not use MakeBigReq if there is no data already in the request.
-+ * req->length must already be >= 2.
-+ */
- #ifdef LONG64
- #define MakeBigReq(req,n) \
- { \
-@@ -493,7 +501,7 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
- CARD32 _BRlen = req->length - 1; \
- req->length = 0; \
- _BRdat = ((CARD32 *)req)[_BRlen]; \
-- memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
-+ memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) << 2); \
- ((CARD32 *)req)[1] = _BRlen + n + 2; \
- Data32(dpy, &_BRdat, 4); \
- }
-@@ -504,12 +512,19 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
- CARD32 _BRlen = req->length - 1; \
- req->length = 0; \
- _BRdat = ((CARD32 *)req)[_BRlen]; \
-- memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
-+ memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) << 2); \
- ((CARD32 *)req)[1] = _BRlen + n + 2; \
- Data32(dpy, &_BRdat, 4); \
- }
- #endif
-
-+/*
-+ * SetReqLen increases the count of 32-bit words in the request by "n",
-+ * or by "badlen" if "n" is too large.
-+ *
-+ * Do not use SetReqLen if "req" does not already have data after the
-+ * xReq header. req->length must already be >= 2.
-+ */
- #ifndef __clang_analyzer__
- #define SetReqLen(req,n,badlen) \
- if ((req->length + n) > (unsigned)65535) { \
---
-1.7.9.2
-
-From e9bd757630368afb374c5d1bcc5d4d85ad3c6c4c Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 8 Mar 2013 15:37:33 -0800
-Subject: [PATCH:libX11 55/58] XAllocClassHint: Assume calloc sets pointers in
- allocated memory to NULL
-
-While the C standard technically allows for the compiler to translate
-pointer = 0 or pointer = NULL into something other than filling the
-pointer address with 0 bytes, the rest of the Xlib code already assumes
-that calloc initializes any pointers in the struct to NULL, and there
-are no known systems supported by X.Org where this is not true.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/PropAlloc.c | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/src/PropAlloc.c b/src/PropAlloc.c
-index bad7681..5162830 100644
---- a/src/PropAlloc.c
-+++ b/src/PropAlloc.c
-@@ -58,12 +58,7 @@ XWMHints *XAllocWMHints (void)
-
- XClassHint *XAllocClassHint (void)
- {
-- register XClassHint *h;
--
-- if ((h = (XClassHint *) Xcalloc (1, (unsigned) sizeof (XClassHint))))
-- h->res_name = h->res_class = NULL;
--
-- return h;
-+ return Xcalloc (1, sizeof (XClassHint));
- }
-
-
---
-1.7.9.2
-
-From f9cd175a471116a616e681fb0ca1a61b3d84a6a0 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 8 Mar 2013 22:33:28 -0800
-Subject: [PATCH:libX11 56/58] Fix very weird indenting in src/GetFProp.c
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/GetFProp.c | 27 ++++++++++++---------------
- 1 file changed, 12 insertions(+), 15 deletions(-)
-
-diff --git a/src/GetFProp.c b/src/GetFProp.c
-index 27ec98b..1e0cd32 100644
---- a/src/GetFProp.c
-+++ b/src/GetFProp.c
-@@ -29,27 +29,24 @@ in this Software without prior written authorization from The Open Group.
- #endif
- #include "Xlibint.h"
-
--Bool XGetFontProperty (
-+Bool
-+XGetFontProperty(
- XFontStruct *fs,
- register Atom name,
- unsigned long *valuePtr)
- {
- /* XXX this is a simple linear search for now. If the
-- protocol is changed to sort the property list, this should
-- become a binary search. */
-+ protocol is changed to sort the property list, this should
-+ become a binary search. */
- register XFontProp *prop = fs->properties;
- register XFontProp *last = prop + fs->n_properties;
-+
- while (prop != last) {
-- if (prop->name == name) {
-- *valuePtr = prop->card32;
-- return (1);
-- }
-- prop++;
-- }
-- return (0);
-+ if (prop->name == name) {
-+ *valuePtr = prop->card32;
-+ return (1);
-+ }
-+ prop++;
- }
--
--
--
--
--
-+ return (0);
-+}
---
-1.7.9.2
-
-From f49bb2dd6d4ea45c55bd21acc0efe2b764441020 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 16 Mar 2013 18:30:56 -0700
-Subject: [PATCH:libX11 58/58] Move big request comment in XOpenDisplay to the
- right place
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/OpenDis.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/OpenDis.c b/src/OpenDis.c
-index 9379fec..f6d8c70 100644
---- a/src/OpenDis.c
-+++ b/src/OpenDis.c
-@@ -499,6 +499,9 @@ XOpenDisplay (
- return(NULL);
- }
-
-+/*
-+ * get availability of large requests
-+ */
- dpy->bigreq_size = xcb_get_maximum_request_length(dpy->xcb->connection);
- if(dpy->bigreq_size <= dpy->max_request_size)
- dpy->bigreq_size = 0;
-@@ -525,7 +528,6 @@ XOpenDisplay (
- (void) XSynchronize(dpy, _Xdebug);
-
- /*
-- * get availability of large requests, and
- * get the resource manager database off the root window.
- */
- LockDisplay(dpy);
---
-1.7.9.2
-
--- a/open-src/lib/libXau/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXau/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# libXau - library for manipulating .Xauthority files
#
-# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2013, 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"),
@@ -29,12 +29,12 @@
MODULE_NAME=libXau
# Version number (used in path names)
-MODULE_VERSION=1.0.7
+MODULE_VERSION=1.0.8
# Checksums for upstream tarball
-TARBALL_MD5 = 2d241521df40d27034413436d1a1465c
-TARBALL_SHA1 = 29c47207fd246425b906f525b2220235ce4cd0f6
-TARBALL_SHA256= 7153ba503e2362d552612d9dc2e7d7ad3106d5055e310a26ecf28addf471a489
+TARBALL_MD5 = 685f8abbffa6d145c0f930f00703b21b
+TARBALL_SHA1 = d9512d6869e022d4e9c9d33f6d6199eda4ad096b
+TARBALL_SHA256= fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/lib/libXaw/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXaw/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# libXaw - Athena Widgets toolkit, based on libXt intrinsics
#
-# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2013, 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"),
@@ -29,12 +29,12 @@
MODULE_NAME=libXaw
# Version number (used in path names)
-MODULE_VERSION=1.0.11
+MODULE_VERSION=1.0.12
# Checksums for upstream tarball
-TARBALL_MD5 = f39942f2cab379fc9b4c3731bf191b84
-TARBALL_SHA1 = a27556b14e2b4c250afcb98b6e99eebd7623816f
-TARBALL_SHA256= 87a874acbb71d1ee59b8047312fc91d89dcb373e2970f121184cdae29a3d9492
+TARBALL_MD5 = 7446f5fba888672aad068b29c0928ba3
+TARBALL_SHA1 = 6919476379accaf21f2331004e5cfa7939a6786b
+TARBALL_SHA256= 96fc314874fce9979556321d1d6ee00b5baf32fb333b7278853b4983bc3cdbf6
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES=
--- a/open-src/lib/libXcursor/CVE-2013-2003.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-From 8f677eaea05290531d007d1fec2768119926088d Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 12 Apr 2013 21:17:28 -0700
-Subject: [PATCH:libXcursor] signedness bug & integer overflow in
- _XcursorFileHeaderCreate() [CVE-2013-2003]
-
-When parsing cursor files, a user defined (e.g. through environment
-variables) cursor file is opened and parsed.
-
-The header is read in _XcursorReadFileHeader(), which reads an unsigned
-int for the number of toc structures in the header, but it was being
-passed to _XcursorFileHeaderCreate() as a signed int to allocate those
-structures. If the number was negative, it would pass the bounds check
-and could overflow the calculation for how much memory to allocate to
-store the data being read, leading to overflowing the buffer with the
-data read from the user controlled file.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/file.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/file.c b/src/file.c
-index efe6d4b..ce9de78 100644
---- a/src/file.c
-+++ b/src/file.c
-@@ -205,7 +205,7 @@ _XcursorFileHeaderDestroy (XcursorFileHeader *fileHeader)
- }
-
- static XcursorFileHeader *
--_XcursorFileHeaderCreate (int ntoc)
-+_XcursorFileHeaderCreate (XcursorUInt ntoc)
- {
- XcursorFileHeader *fileHeader;
-
---
-1.7.9.2
-
--- a/open-src/lib/libXcursor/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXcursor/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,15 @@
MODULE_NAME=libXcursor
# Version number (used in path names)
-MODULE_VERSION=1.1.13
+MODULE_VERSION=1.1.14
# Checksums for upstream tarball
-TARBALL_MD5 = 52efa81b7f26c8eda13510a2fba98eea
-TARBALL_SHA1 = 4e461d9e4324689ca8a84706926a8c0fe9470e47
-TARBALL_SHA256= f78827de4a1b7ce8cceca24a9ab9d1b1d2f6a61362f505166ffc19b07c0bad8f
+TARBALL_MD5 = 1e7c17afbbce83e2215917047c57d1b3
+TARBALL_SHA1 = 89870756758439f9216ddf5f2d3dca56570fc6b7
+TARBALL_SHA256= 9bc6acb21ca14da51bda5bc912c8955bc6e5e433f0ab00c5e8bef842596c33df
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = CVE-2013-2003.patch,-p1
+SOURCE_PATCHES =
# Library name
LIBNAME=Xcursor
--- a/open-src/lib/libXext/CVE-2013-1982.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,700 +0,0 @@
-From ca84a813716f9de691dc3f60390d83af4b5ae534 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 09:32:12 -0700
-Subject: [PATCH:libXext 1/7] Use _XEatDataWords to avoid overflow of
- rep.length bit shifting
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- COPYING | 3 ++-
- configure.ac | 6 ++++++
- src/Makefile.am | 1 +
- src/XEVI.c | 4 +++-
- src/XMultibuf.c | 3 ++-
- src/XSecurity.c | 3 ++-
- src/XShape.c | 3 ++-
- src/XSync.c | 3 ++-
- src/Xcup.c | 7 ++++---
- src/eat.h | 40 ++++++++++++++++++++++++++++++++++++++++
- 10 files changed, 64 insertions(+), 9 deletions(-)
- create mode 100644 src/eat.h
-
-diff --git a/COPYING b/COPYING
-index 80622a0..e3a63ef 100644
---- a/COPYING
-+++ b/COPYING
-@@ -160,7 +160,8 @@ makes no representations about the suitability for any purpose
- of the information in this document. This documentation is
- provided ``as is'' without express or implied warranty.
-
--Copyright (c) 1999, 2005, 2006, Oracle and/or its affiliates. All rights reserved.
-+Copyright (c) 1999, 2005, 2006, 2013, 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"),
-diff --git a/configure.ac b/configure.ac
-index 63775de..fb9888d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -38,6 +38,12 @@ AC_SUBST(XEXT_SOREV)
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(XEXT, [xproto >= 7.0.13] [x11 >= 1.1.99.1] [xextproto >= 7.1.99])
-
-+# Check for _XEatDataWords function that may be patched into older Xlib releases
-+SAVE_LIBS="$LIBS"
-+LIBS="$XEXT_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- # Allow checking code with lint, sparse, etc.
- XORG_WITH_LINT
- XORG_LINT_LIBRARY([Xext])
-diff --git a/src/Makefile.am b/src/Makefile.am
-index e236c33..b828547 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -12,6 +12,7 @@ libXext_la_LDFLAGS = -version-number $(XEXT_SOREV) -no-undefined
- libXext_la_LIBADD = $(XEXT_LIBS)
-
- libXext_la_SOURCES = \
-+ eat.h \
- DPMS.c \
- MITMisc.c \
- XAppgroup.c \
-diff --git a/src/XEVI.c b/src/XEVI.c
-index eb09daa..0125c51 100644
---- a/src/XEVI.c
-+++ b/src/XEVI.c
-@@ -30,6 +30,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <X11/extensions/Xext.h>
- #include <X11/extensions/extutil.h>
- #include <X11/Xutil.h>
-+#include "eat.h"
-+
- static XExtensionInfo *xevi_info;/* needs to move to globals.c */
- static const char *xevi_extension_name = EVINAME;
- #define XeviCheckExtension(dpy,i,val) \
-@@ -171,7 +173,7 @@ Status XeviGetVisualInfo(
- xInfoPtr = temp_xInfo = (xExtendedVisualInfo *)Xmalloc(sz_xInfo);
- xConflictPtr = temp_conflict = (VisualID32 *)Xmalloc(sz_xConflict);
- if (!*evi_return || !temp_xInfo || !temp_conflict) {
-- _XEatData(dpy, (sz_xInfo + sz_xConflict + 3) & ~3);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- if (evi_return)
-diff --git a/src/XMultibuf.c b/src/XMultibuf.c
-index 7a746ba..43d56d3 100644
---- a/src/XMultibuf.c
-+++ b/src/XMultibuf.c
-@@ -34,6 +34,7 @@ in this Software without prior written authorization from The Open Group.
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/multibufproto.h>
- #include <X11/extensions/multibuf.h>
-+#include "eat.h"
-
- static XExtensionInfo _multibuf_info_data;
- static XExtensionInfo *multibuf_info = &_multibuf_info_data;
-@@ -408,7 +409,7 @@ Status XmbufGetWindowAttributes (
- attr->buffers = (Multibuffer *) Xmalloc((unsigned) nbytes);
- nbytes = rep.length << 2;
- if (! attr->buffers) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (0);
-diff --git a/src/XSecurity.c b/src/XSecurity.c
-index f8c7da1..ab17755 100644
---- a/src/XSecurity.c
-+++ b/src/XSecurity.c
-@@ -33,6 +33,7 @@ in this Software without prior written authorization from The Open Group.
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/securproto.h>
- #include <X11/extensions/security.h>
-+#include "eat.h"
-
- static XExtensionInfo _Security_info_data;
- static XExtensionInfo *Security_info = &_Security_info_data;
-@@ -282,7 +283,7 @@ XSecurityGenerateAuthorization(
- }
- else
- {
-- _XEatData(dpy, (unsigned long) (rep.dataLength + 3) & ~3);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay (dpy);
-diff --git a/src/XShape.c b/src/XShape.c
-index 6e8fbae..3987876 100644
---- a/src/XShape.c
-+++ b/src/XShape.c
-@@ -35,6 +35,7 @@ in this Software without prior written authorization from The Open Group.
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/shape.h>
- #include <X11/extensions/shapeproto.h>
-+#include "eat.h"
-
- static XExtensionInfo _shape_info_data;
- static XExtensionInfo *shape_info = &_shape_info_data;
-@@ -468,7 +469,7 @@ XRectangle *XShapeGetRectangles (
- Xfree (xrects);
- if (rects)
- Xfree (rects);
-- _XEatData (dpy, *count * sizeof (xRectangle));
-+ _XEatDataWords (dpy, rep.length);
- rects = NULL;
- *count = 0;
- } else {
-diff --git a/src/XSync.c b/src/XSync.c
-index 5775293..3ca1308 100644
---- a/src/XSync.c
-+++ b/src/XSync.c
-@@ -59,6 +59,7 @@ PERFORMANCE OF THIS SOFTWARE.
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/sync.h>
- #include <X11/extensions/syncproto.h>
-+#include "eat.h"
-
- static XExtensionInfo _sync_info_data;
- static XExtensionInfo *sync_info = &_sync_info_data;
-@@ -364,7 +365,7 @@ XSyncListSystemCounters(Display *dpy, int *n_counters_return)
- {
- if (list) Xfree((char *) list);
- if (pWireSysCounter) Xfree((char *) pWireSysCounter);
-- _XEatData(dpy, (unsigned long) replylen);
-+ _XEatDataWords(dpy, rep.length);
- list = NULL;
- goto bail;
- }
-diff --git a/src/Xcup.c b/src/Xcup.c
-index bb9e90f..1f1d625 100644
---- a/src/Xcup.c
-+++ b/src/Xcup.c
-@@ -36,6 +36,7 @@ in this Software without prior written authorization from The Open Group.
- #include <X11/extensions/cupproto.h>
- #include <X11/extensions/Xext.h>
- #include <X11/extensions/extutil.h>
-+#include "eat.h"
-
- static XExtensionInfo _xcup_info_data;
- static XExtensionInfo *xcup_info = &_xcup_info_data;
-@@ -144,7 +145,7 @@ XcupGetReservedColormapEntries(
- rbufp = rbuf;
-
- if (rbufp == NULL) {
-- _XEatData (dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return False;
-@@ -221,7 +222,7 @@ XcupStoreColors(
- nbytes = nentries * SIZEOF (xColorItem);
-
- if (nentries != ncolors) {
-- _XEatData (dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return False;
-@@ -233,7 +234,7 @@ XcupStoreColors(
- rbufp = rbuf;
-
- if (rbufp == NULL) {
-- _XEatData (dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return False;
-diff --git a/src/eat.h b/src/eat.h
-new file mode 100644
-index 0000000..239532b
---- /dev/null
-+++ b/src/eat.h
-@@ -0,0 +1,40 @@
-+/*
-+ * Copyright (c) 2013, 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.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
-+#ifndef HAVE__XEATDATAWORDS
-+#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */
-+#include <limits.h>
-+
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
---
-1.7.9.2
-
-From d05f27a6f74cb419ad5a437f2e4690b17e7faee5 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 14:40:33 -0800
-Subject: [PATCH:libXext 2/7] integer overflow in
- XcupGetReservedColormapEntries() [CVE-2013-1982
- 1/6]
-
-If the computed number of entries is large enough that it overflows when
-multiplied by the size of a xColorItem struct, or is treated as negative
-when compared to the size of the stack allocated buffer, then memory
-corruption can occur when more bytes are read from the X server than the
-size of the buffer we allocated to hold them.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xcup.c | 19 ++++++++++++-------
- 1 file changed, 12 insertions(+), 7 deletions(-)
-
-diff --git a/src/Xcup.c b/src/Xcup.c
-index 1f1d625..670f356 100644
---- a/src/Xcup.c
-+++ b/src/Xcup.c
-@@ -36,6 +36,7 @@ in this Software without prior written authorization from The Open Group.
- #include <X11/extensions/cupproto.h>
- #include <X11/extensions/Xext.h>
- #include <X11/extensions/extutil.h>
-+#include <limits.h>
- #include "eat.h"
-
- static XExtensionInfo _xcup_info_data;
-@@ -134,15 +135,19 @@ XcupGetReservedColormapEntries(
- req->xcupReqType = X_XcupGetReservedColormapEntries;
- req->screen = screen;
- if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
-- long nbytes;
-+ unsigned long nbytes;
- xColorItem* rbufp;
-- int nentries = rep.length / 3;
-+ unsigned int nentries = rep.length / 3;
-
-- nbytes = nentries * SIZEOF (xColorItem);
-- if (nentries > TYP_RESERVED_ENTRIES)
-- rbufp = (xColorItem*) Xmalloc (nbytes);
-- else
-- rbufp = rbuf;
-+ if (nentries < (INT_MAX / SIZEOF (xColorItem))) {
-+ nbytes = nentries * SIZEOF (xColorItem);
-+
-+ if (nentries > TYP_RESERVED_ENTRIES)
-+ rbufp = Xmalloc (nbytes);
-+ else
-+ rbufp = rbuf;
-+ } else
-+ rbufp = NULL;
-
- if (rbufp == NULL) {
- _XEatDataWords(dpy, rep.length);
---
-1.7.9.2
-
-From 082d70b19848059ba78c9d1c315114fb07e8c0ef Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 14:40:33 -0800
-Subject: [PATCH:libXext 3/7] integer overflow in XcupStoreColors()
- [CVE-2013-1982 2/6]
-
-If the computed number of entries is large enough that it overflows when
-multiplied by the size of a xColorItem struct, or is treated as negative
-when compared to the size of the stack allocated buffer, then memory
-corruption can occur when more bytes are read from the X server than the
-size of the buffer we allocated to hold them.
-
-The requirement to match the number of colors specified by the caller makes
-this much harder to hit than the one in XcupGetReservedColormapEntries()
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xcup.c | 25 +++++++++++--------------
- 1 file changed, 11 insertions(+), 14 deletions(-)
-
-diff --git a/src/Xcup.c b/src/Xcup.c
-index 670f356..cdc64c2 100644
---- a/src/Xcup.c
-+++ b/src/Xcup.c
-@@ -219,24 +219,21 @@ XcupStoreColors(
- }
-
- if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
-- long nbytes;
-+ unsigned long nbytes;
- xColorItem* rbufp;
- xColorItem* cs;
-- int nentries = rep.length / 3;
--
-- nbytes = nentries * SIZEOF (xColorItem);
-+ unsigned int nentries = rep.length / 3;
-
-- if (nentries != ncolors) {
-- _XEatDataWords(dpy, rep.length);
-- UnlockDisplay (dpy);
-- SyncHandle ();
-- return False;
-- }
-+ if ((nentries == ncolors) &&
-+ (nentries < (INT_MAX / SIZEOF (xColorItem)))) {
-+ nbytes = nentries * SIZEOF (xColorItem);
-
-- if (ncolors > 256)
-- rbufp = (xColorItem*) Xmalloc (nbytes);
-- else
-- rbufp = rbuf;
-+ if (ncolors > 256)
-+ rbufp = Xmalloc (nbytes);
-+ else
-+ rbufp = rbuf;
-+ } else
-+ rbufp = NULL;
-
- if (rbufp == NULL) {
- _XEatDataWords(dpy, rep.length);
---
-1.7.9.2
-
-From 96d1da55a08c4cd52b763cb07bdce5cdcbec4da8 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 14:40:33 -0800
-Subject: [PATCH:libXext 4/7] several integer overflows in XdbeGetVisualInfo()
- [CVE-2013-1982 3/6]
-
-If the number of screens or visuals reported by the server is large enough
-that it overflows when multiplied by the size of the appropriate struct,
-then memory corruption can occur when more bytes are read from the X server
-than the size of the buffer we allocated to hold them.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xdbe.c | 27 +++++++++++++++++----------
- 1 file changed, 17 insertions(+), 10 deletions(-)
-
-diff --git a/src/Xdbe.c b/src/Xdbe.c
-index 4b5fa18..016886c 100644
---- a/src/Xdbe.c
-+++ b/src/Xdbe.c
-@@ -39,6 +39,8 @@
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/Xdbe.h>
- #include <X11/extensions/dbeproto.h>
-+#include <limits.h>
-+#include "eat.h"
-
- static XExtensionInfo _dbe_info_data;
- static XExtensionInfo *dbe_info = &_dbe_info_data;
-@@ -352,9 +354,12 @@ XdbeScreenVisualInfo *XdbeGetVisualInfo (
- *num_screens = rep.m;
-
- /* allocate list of visual information to be returned */
-- if (!(scrVisInfo =
-- (XdbeScreenVisualInfo *)Xmalloc(
-- (unsigned)(*num_screens * sizeof(XdbeScreenVisualInfo))))) {
-+ if ((*num_screens > 0) && (*num_screens < 65536))
-+ scrVisInfo = Xmalloc(*num_screens * sizeof(XdbeScreenVisualInfo));
-+ else
-+ scrVisInfo = NULL;
-+ if (scrVisInfo == NULL) {
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
-@@ -362,25 +367,27 @@ XdbeScreenVisualInfo *XdbeGetVisualInfo (
-
- for (i = 0; i < *num_screens; i++)
- {
-- int nbytes;
- int j;
-- long c;
-+ unsigned long c;
-
-- _XRead32 (dpy, &c, sizeof(CARD32));
-- scrVisInfo[i].count = c;
-+ _XRead32 (dpy, (long *) &c, sizeof(CARD32));
-
-- nbytes = scrVisInfo[i].count * sizeof(XdbeVisualInfo);
-+ if (c < 65536) {
-+ scrVisInfo[i].count = c;
-+ scrVisInfo[i].visinfo = Xmalloc(c * sizeof(XdbeVisualInfo));
-+ } else
-+ scrVisInfo[i].visinfo = NULL;
-
- /* if we can not allocate the list of visual/depth info
- * then free the lists that we already allocate as well
- * as the visual info list itself
- */
-- if (!(scrVisInfo[i].visinfo = (XdbeVisualInfo *)Xmalloc(
-- (unsigned)nbytes))) {
-+ if (scrVisInfo[i].visinfo == NULL) {
- for (j = 0; j < i; j++) {
- Xfree ((char *)scrVisInfo[j].visinfo);
- }
- Xfree ((char *)scrVisInfo);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
---
-1.7.9.2
-
-From 67ecdcf7e29de9fa78b421122620525ed2c7db88 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 14:40:33 -0800
-Subject: [PATCH:libXext 5/7] integer overflow in XeviGetVisualInfo()
- [CVE-2013-1982 4/6]
-
-If the number of visuals or conflicts reported by the server is large
-enough that it overflows when multiplied by the size of the appropriate
-struct, then memory corruption can occur when more bytes are read from
-the X server than the size of the buffer we allocated to hold them.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XEVI.c | 25 ++++++++++++++++++-------
- 1 file changed, 18 insertions(+), 7 deletions(-)
-
-diff --git a/src/XEVI.c b/src/XEVI.c
-index 0125c51..5a95583 100644
---- a/src/XEVI.c
-+++ b/src/XEVI.c
-@@ -30,6 +30,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
- #include <X11/extensions/Xext.h>
- #include <X11/extensions/extutil.h>
- #include <X11/Xutil.h>
-+#include <limits.h>
- #include "eat.h"
-
- static XExtensionInfo *xevi_info;/* needs to move to globals.c */
-@@ -165,13 +166,20 @@ Status XeviGetVisualInfo(
- return BadAccess;
- }
- Xfree(temp_visual);
-- sz_info = rep.n_info * sizeof(ExtendedVisualInfo);
-- sz_xInfo = rep.n_info * sz_xExtendedVisualInfo;
-- sz_conflict = rep.n_conflicts * sizeof(VisualID);
-- sz_xConflict = rep.n_conflicts * sz_VisualID32;
-- infoPtr = *evi_return = (ExtendedVisualInfo *)Xmalloc(sz_info + sz_conflict);
-- xInfoPtr = temp_xInfo = (xExtendedVisualInfo *)Xmalloc(sz_xInfo);
-- xConflictPtr = temp_conflict = (VisualID32 *)Xmalloc(sz_xConflict);
-+ if ((rep.n_info < 65536) && (rep.n_conflicts < 65536)) {
-+ sz_info = rep.n_info * sizeof(ExtendedVisualInfo);
-+ sz_xInfo = rep.n_info * sz_xExtendedVisualInfo;
-+ sz_conflict = rep.n_conflicts * sizeof(VisualID);
-+ sz_xConflict = rep.n_conflicts * sz_VisualID32;
-+ *evi_return = Xmalloc(sz_info + sz_conflict);
-+ temp_xInfo = Xmalloc(sz_xInfo);
-+ temp_conflict = Xmalloc(sz_xConflict);
-+ } else {
-+ sz_xInfo = sz_xConflict = 0;
-+ *evi_return = NULL;
-+ temp_xInfo = NULL;
-+ temp_conflict = NULL;
-+ }
- if (!*evi_return || !temp_xInfo || !temp_conflict) {
- _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
-@@ -188,6 +196,9 @@ Status XeviGetVisualInfo(
- _XRead(dpy, (char *)temp_conflict, sz_xConflict);
- UnlockDisplay(dpy);
- SyncHandle();
-+ infoPtr = *evi_return;
-+ xInfoPtr = temp_xInfo;
-+ xConflictPtr = temp_conflict;
- n_data = rep.n_info;
- conflict = (VisualID *)(infoPtr + n_data);
- while (n_data-- > 0) {
---
-1.7.9.2
-
-From 6ecd96e8be3c33e2ffad6631cea4aa0a030d93c2 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 14:40:33 -0800
-Subject: [PATCH:libXext 6/7] integer overflow in XShapeGetRectangles()
- [CVE-2013-1982 5/6]
-
-If the number of rectangles reported by the server is large enough that
-it overflows when multiplied by the size of the appropriate struct, then
-memory corruption can occur when more bytes are read from the X server
-than the size of the buffer we allocated to hold them.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XShape.c | 24 ++++++++++++++----------
- 1 file changed, 14 insertions(+), 10 deletions(-)
-
-diff --git a/src/XShape.c b/src/XShape.c
-index 3987876..d025020 100644
---- a/src/XShape.c
-+++ b/src/XShape.c
-@@ -35,6 +35,7 @@ in this Software without prior written authorization from The Open Group.
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/shape.h>
- #include <X11/extensions/shapeproto.h>
-+#include <limits.h>
- #include "eat.h"
-
- static XExtensionInfo _shape_info_data;
-@@ -443,7 +444,7 @@ XRectangle *XShapeGetRectangles (
- xShapeGetRectanglesReply rep;
- XRectangle *rects;
- xRectangle *xrects;
-- int i;
-+ unsigned int i;
-
- ShapeCheckExtension (dpy, info, (XRectangle *)NULL);
-
-@@ -461,20 +462,23 @@ XRectangle *XShapeGetRectangles (
- *count = rep.nrects;
- *ordering = rep.ordering;
- rects = NULL;
-- if (*count) {
-- xrects = (xRectangle *) Xmalloc (*count * sizeof (xRectangle));
-- rects = (XRectangle *) Xmalloc (*count * sizeof (XRectangle));
-+ if (rep.nrects) {
-+ if (rep.nrects < (INT_MAX / sizeof (XRectangle))) {
-+ xrects = Xmalloc (rep.nrects * sizeof (xRectangle));
-+ rects = Xmalloc (rep.nrects * sizeof (XRectangle));
-+ } else {
-+ xrects = NULL;
-+ rects = NULL;
-+ }
- if (!xrects || !rects) {
-- if (xrects)
-- Xfree (xrects);
-- if (rects)
-- Xfree (rects);
-+ Xfree (xrects);
-+ Xfree (rects);
- _XEatDataWords (dpy, rep.length);
- rects = NULL;
- *count = 0;
- } else {
-- _XRead (dpy, (char *) xrects, *count * sizeof (xRectangle));
-- for (i = 0; i < *count; i++) {
-+ _XRead (dpy, (char *) xrects, rep.nrects * sizeof (xRectangle));
-+ for (i = 0; i < rep.nrects; i++) {
- rects[i].x = (short) cvtINT16toInt (xrects[i].x);
- rects[i].y = (short) cvtINT16toInt (xrects[i].y);
- rects[i].width = xrects[i].width;
---
-1.7.9.2
-
-From dfe6e1f3b8ede3d0bab7a5fa57f73513a09ec649 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 14:40:33 -0800
-Subject: [PATCH:libXext 7/7] integer overflow in XSyncListSystemCounters()
- [CVE-2013-1982 6/6]
-
-If the number of counters or amount of data reported by the server is
-large enough that it overflows when multiplied by the size of the
-appropriate struct, then memory corruption can occur when more bytes
-are read from the X server than the size of the buffers we allocated
-to hold them.
-
-V2: Make sure we don't walk past the end of the reply when converting
-data from wire format to the structures returned to the caller.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XSync.c | 32 +++++++++++++++++++++++++-------
- 1 file changed, 25 insertions(+), 7 deletions(-)
-
-diff --git a/src/XSync.c b/src/XSync.c
-index 3ca1308..ce4ab44 100644
---- a/src/XSync.c
-+++ b/src/XSync.c
-@@ -59,6 +59,7 @@ PERFORMANCE OF THIS SOFTWARE.
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/sync.h>
- #include <X11/extensions/syncproto.h>
-+#include <limits.h>
- #include "eat.h"
-
- static XExtensionInfo _sync_info_data;
-@@ -352,19 +353,28 @@ XSyncListSystemCounters(Display *dpy, int *n_counters_return)
- if (rep.nCounters > 0)
- {
- xSyncSystemCounter *pWireSysCounter, *pNextWireSysCounter;
-+ xSyncSystemCounter *pLastWireSysCounter;
- XSyncCounter counter;
-- int replylen;
-+ unsigned int replylen;
- int i;
-
-- list = Xmalloc(rep.nCounters * sizeof(XSyncSystemCounter));
-- replylen = rep.length << 2;
-- pWireSysCounter = Xmalloc ((unsigned) replylen + sizeof(XSyncCounter));
-- /* +1 to leave room for last counter read-ahead */
-+ if (rep.nCounters < (INT_MAX / sizeof(XSyncSystemCounter)))
-+ list = Xmalloc(rep.nCounters * sizeof(XSyncSystemCounter));
-+ if (rep.length < (INT_MAX >> 2)) {
-+ replylen = rep.length << 2;
-+ pWireSysCounter = Xmalloc (replylen + sizeof(XSyncCounter));
-+ /* +1 to leave room for last counter read-ahead */
-+ pLastWireSysCounter = (xSyncSystemCounter *)
-+ ((char *)pWireSysCounter) + replylen;
-+ } else {
-+ replylen = 0;
-+ pWireSysCounter = NULL;
-+ }
-
- if ((!list) || (!pWireSysCounter))
- {
-- if (list) Xfree((char *) list);
-- if (pWireSysCounter) Xfree((char *) pWireSysCounter);
-+ Xfree(list);
-+ Xfree(pWireSysCounter);
- _XEatDataWords(dpy, rep.length);
- list = NULL;
- goto bail;
-@@ -388,6 +398,14 @@ XSyncListSystemCounters(Display *dpy, int *n_counters_return)
- pNextWireSysCounter = (xSyncSystemCounter *)
- (((char *)pWireSysCounter) + ((SIZEOF(xSyncSystemCounter) +
- pWireSysCounter->name_length + 3) & ~3));
-+ /* Make sure we haven't gone too far */
-+ if (pNextWireSysCounter > pLastWireSysCounter) {
-+ Xfree(list);
-+ Xfree(pWireSysCounter);
-+ list = NULL;
-+ goto bail;
-+ }
-+
- counter = pNextWireSysCounter->counter;
-
- list[i].name = ((char *)pWireSysCounter) +
---
-1.7.9.2
-
--- a/open-src/lib/libXext/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXext/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,14 @@
MODULE_NAME=libXext
# Version number (used in path names)
-MODULE_VERSION=1.3.1
+MODULE_VERSION=1.3.2
# Checksums for upstream tarball
-TARBALL_MD5 = 71251a22bc47068d60a95f50ed2ec3cf
-TARBALL_SHA1 = 764ac472ae19a0faade193717a9e0938d3430aaa
-TARBALL_SHA256= 56229c617eb7bfd6dec40d2805bc4dfb883dfe80f130d99b9a2beb632165e859
+TARBALL_MD5 = 4376101e51bb2c6c44d9ab14344e85ad
+TARBALL_SHA1 = 49b6f026b0555d020014dbc24b49afc2986a30e0
+TARBALL_SHA256= f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES += CVE-2013-1982.patch,-p1
SOURCE_PATCHES += shm.patch,-p1
SOURCE_PATCHES += sun-exts.patch,-p1
--- a/open-src/lib/libXext/sun-exts.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXext/sun-exts.patch Mon Sep 30 13:26:39 2013 -0700
@@ -20,10 +20,10 @@
DBE.man \
DPMSCapable.man \
diff --git a/src/Makefile.am b/src/Makefile.am
-index e236c33..53b04ed 100644
+index b828547..fc57d28 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -63,3 +63,13 @@ lintlib_DATA = $(LINTLIB)
+@@ -64,3 +64,13 @@ lintlib_DATA = $(LINTLIB)
$(LINTLIB): $(libXext_la_SOURCES)
$(LINT) -y -oXext -x $(ALL_LINT_FLAGS) $(libXext_la_SOURCES)
endif MAKE_LINT_LIB
--- a/open-src/lib/libXfixes/CVE-2013-1983.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-From b031e3b60fa1af9e49449f23d4a84395868be3ab Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 10:20:59 -0700
-Subject: [PATCH:libXfixes 1/2] Use _XEatDataWords to avoid overflow of
- _XEatData calculations
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 7 +++++++
- src/Cursor.c | 4 ++--
- src/Region.c | 2 +-
- src/Xfixesint.h | 14 ++++++++++++++
- 4 files changed, 24 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b942ffa..bb8e976 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -57,6 +57,13 @@ AC_SUBST(FIXESEXT_VERSION)
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(FIXESEXT, xproto [fixesproto >= $FIXESEXT_VERSION] xextproto x11)
-
-+# Check for _XEatDataWords function that may be patched into older Xlib releases
-+SAVE_LIBS="$LIBS"
-+LIBS="$FIXESEXT_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
-+
- AC_CONFIG_FILES([Makefile
- src/Makefile
- man/Makefile
-diff --git a/src/Cursor.c b/src/Cursor.c
-index b3dfed1..641b747 100644
---- a/src/Cursor.c
-+++ b/src/Cursor.c
-@@ -113,7 +113,7 @@ XFixesGetCursorImage (Display *dpy)
- image = (XFixesCursorImage *) Xmalloc (rlength);
- if (!image)
- {
-- _XEatData (dpy, nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
-@@ -191,7 +191,7 @@ XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom)
- _XReadPad(dpy, name, (long)rep.nbytes);
- name[rep.nbytes] = '\0';
- } else {
-- _XEatData(dpy, (unsigned long) (rep.nbytes + 3) & ~3);
-+ _XEatDataWords(dpy, rep.length);
- name = (char *) NULL;
- }
- UnlockDisplay(dpy);
-diff --git a/src/Region.c b/src/Region.c
-index 042f966..cb0cf6e 100644
---- a/src/Region.c
-+++ b/src/Region.c
-@@ -338,7 +338,7 @@ XFixesFetchRegionAndBounds (Display *dpy,
- rects = Xmalloc (nrects * sizeof (XRectangle));
- if (!rects)
- {
-- _XEatData (dpy, nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
-diff --git a/src/Xfixesint.h b/src/Xfixesint.h
-index 8a4d5fd..7bf5bfd 100644
---- a/src/Xfixesint.h
-+++ b/src/Xfixesint.h
-@@ -60,4 +60,18 @@ XFixesFindDisplay (Display *dpy);
- #define XFixesSimpleCheckExtension(dpy,i) \
- if (!XFixesHasExtension(i)) { return; }
-
-+#ifndef HAVE__XEATDATAWORDS
-+#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */
-+#include <limits.h>
-+
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-+
- #endif /* _XFIXESINT_H_ */
---
-1.7.9.2
-
-From c480fe3271873ec7471b0cbd680f4dac18ca8904 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 10:24:08 -0700
-Subject: [PATCH:libXfixes 2/2] integer overflow in XFixesGetCursorImage()
- [CVE-2013-1983]
-
-If the reported cursor dimensions or name length are too large, the
-calculations to allocate memory for them may overflow, leaving us
-writing beyond the bounds of the allocation.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Cursor.c | 30 ++++++++++++++++++------------
- 1 file changed, 18 insertions(+), 12 deletions(-)
-
-diff --git a/src/Cursor.c b/src/Cursor.c
-index 641b747..33590b7 100644
---- a/src/Cursor.c
-+++ b/src/Cursor.c
-@@ -47,6 +47,7 @@
- #include <config.h>
- #endif
- #include "Xfixesint.h"
-+#include <limits.h>
-
- void
- XFixesSelectCursorInput (Display *dpy,
-@@ -74,9 +75,9 @@ XFixesGetCursorImage (Display *dpy)
- XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy);
- xXFixesGetCursorImageAndNameReq *req;
- xXFixesGetCursorImageAndNameReply rep;
-- int npixels;
-- int nbytes_name;
-- int nbytes, nread, rlength;
-+ size_t npixels;
-+ size_t nbytes_name;
-+ size_t nbytes, nread, rlength;
- XFixesCursorImage *image;
- char *name;
-
-@@ -101,16 +102,21 @@ XFixesGetCursorImage (Display *dpy)
- }
- npixels = rep.width * rep.height;
- nbytes_name = rep.nbytes;
-- /* reply data length */
-- nbytes = (long) rep.length << 2;
-- /* bytes of actual data in the reply */
-- nread = (npixels << 2) + nbytes_name;
-- /* size of data returned to application */
-- rlength = (sizeof (XFixesCursorImage) +
-- npixels * sizeof (unsigned long) +
-- nbytes_name + 1);
-+ if ((rep.length < (INT_MAX >> 2)) &&
-+ npixels < (((INT_MAX >> 3) - sizeof (XFixesCursorImage) - 1)
-+ - nbytes_name)) {
-+ /* reply data length */
-+ nbytes = (size_t) rep.length << 2;
-+ /* bytes of actual data in the reply */
-+ nread = (npixels << 2) + nbytes_name;
-+ /* size of data returned to application */
-+ rlength = (sizeof (XFixesCursorImage) +
-+ npixels * sizeof (unsigned long) +
-+ nbytes_name + 1);
-
-- image = (XFixesCursorImage *) Xmalloc (rlength);
-+ image = Xmalloc (rlength);
-+ } else
-+ image = NULL;
- if (!image)
- {
- _XEatDataWords(dpy, rep.length);
-
-
--- a/open-src/lib/libXfixes/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXfixes/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,15 @@
MODULE_NAME=libXfixes
# Version number (used in path names)
-MODULE_VERSION=5.0
+MODULE_VERSION=5.0.1
# Checksums for upstream tarball
-TARBALL_MD5 = 678071bd7f9f7467e2fc712d81022318
-TARBALL_SHA1 = 3e4d374e9026111a04cd669d4b3434273fc34fe0
+TARBALL_MD5 = b985b85f8b9386c85ddcfe1073906b4d
+TARBALL_SHA1 = e14fa072bd70b30eef47391cac637bdb4de9e8a3
+TARBALL_SHA256= 63bec085084fa3caaee5180490dd871f1eb2020ba9e9b39a30f93693ffc34767
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = soversion.patch,-p1
-SOURCE_PATCHES += CVE-2013-1983.patch,-p1
# Need to autoreconf since soversion.patch changes Makefile.am's
AUTORECONF=yes
--- a/open-src/lib/libXfixes/soversion.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXfixes/soversion.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, 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"),
@@ -27,28 +27,28 @@
compatibility with the existing Solaris binaries.
diff --git a/src/Makefile.am b/src/Makefile.am
-index 544230f..93b58ff 100644
+index 4e3f542..6c8842c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -13,7 +13,7 @@ AM_CFLAGS = $(CWARNFLAGS) @FIXESEXT_CFLAGS@
+@@ -12,7 +12,7 @@ AM_CFLAGS = $(CWARNFLAGS) @FIXESEXT_CFLAGS@
+ AM_CPPFLAGS = -I$(top_srcdir)/include/X11/extensions
- INCLUDES = -I$(top_srcdir)/include/X11/extensions
-
+ libXfixes_la_LIBADD = @FIXESEXT_LIBS@
-libXfixes_la_LDFLAGS = -version-number 3:1:0 -no-undefined
+libXfixes_la_LDFLAGS = -version-number 1 -no-undefined
libXfixesincludedir = $(includedir)/X11/extensions
- libXfixesinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xfixes.h
+ libXfixesinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xfixes.h
diff --git a/src/Makefile.in b/src/Makefile.in
-index 904f023..17f3d3b 100644
+index fbf8351..2077f2c 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
-@@ -259,7 +259,7 @@ libXfixes_la_SOURCES = \
+@@ -342,7 +342,7 @@ libXfixes_la_SOURCES = \
+ AM_CFLAGS = $(CWARNFLAGS) @FIXESEXT_CFLAGS@
+ AM_CPPFLAGS = -I$(top_srcdir)/include/X11/extensions
libXfixes_la_LIBADD = @FIXESEXT_LIBS@
- AM_CFLAGS = $(CWARNFLAGS) @FIXESEXT_CFLAGS@
- INCLUDES = -I$(top_srcdir)/include/X11/extensions
-libXfixes_la_LDFLAGS = -version-number 3:1:0 -no-undefined
+libXfixes_la_LDFLAGS = -version-number 1 -no-undefined
libXfixesincludedir = $(includedir)/X11/extensions
- libXfixesinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xfixes.h
+ libXfixesinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xfixes.h
all: all-am
--- a/open-src/lib/libXfont/7162172.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-From 9a383bbf7195c1256a9e92ee251691c7a4a37732 Mon Sep 17 00:00:00 2001
-From: Arvind Umrao <[email protected]>
-Date: Tue, 8 May 2012 10:49:40 +0530
-Subject: [PATCH] 7162172.patch
-
----
- src/fc/fsio.c | 7 +++++--
- 1 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git src/fc/fsio.c src/fc/fsio.c
---- src/fc/fsio.c
-+++ src/fc/fsio.c
-@@ -184,8 +184,11 @@ _fs_fill (FSFpePtr conn)
- continue;
- }
- }
-- _fs_connection_died (conn);
-- return FSIO_ERROR;
-+ if (!ECHECK(EINTR))
-+ {
-+ _fs_connection_died(conn);
-+ return FSIO_ERROR;
-+ }
- }
- }
- return FSIO_READY;
-1.7.3.2
-
--- a/open-src/lib/libXfont/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXfont/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# Xfont Makefile
#
-# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2013, 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"),
@@ -29,17 +29,15 @@
MODULE_NAME=libXfont
# Version number (used in path names)
-MODULE_VERSION=1.4.5
+MODULE_VERSION=1.4.6
# Checksums for upstream tarball
-TARBALL_MD5 = 6851da5dae0a6cf5f7c9b9e2b05dd3b4
-TARBALL_SHA1 = 0bf3cb8aa192ab96bbaf384d1a4a00d15a40171e
-TARBALL_SHA256= bbf96fb80b6b95cdb1dc968085082a6e668193a54cd9d6e2af669909c0cb7170
+TARBALL_MD5 = 351a9b7348d165029bda52c9fdcb5c7a
+TARBALL_SHA1 = 356512420fa8573a541450b957526dfd151b4870
+TARBALL_SHA256= d0cbfe4554dc17ceea413cdad5601d35ed8d05d5b880e60931a8775fd1157e9f
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES= \
- ps-fonts.patch \
- 7162172.patch
+SOURCE_PATCHES= ps-fonts.patch
# Library name
LIBNAME=Xfont
--- a/open-src/lib/libXi/CVE-2013-19XX.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1247 +0,0 @@
-From bb82c72a1d69eaf60b7586570faf797df967f661 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Mon, 29 Apr 2013 18:39:34 -0700
-Subject: [PATCH:libXi] Expand comment on the memory vs. reply ordering in
- XIGetSelectedEvents()
-
-Unpacking from the wire involves un-interleaving the structs & masks,
-which wasn't obvious to me the first time I read it, so make notes
-before I forget again.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Signed-off-by: Peter Hutterer <[email protected]>
----
- src/XISelEv.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/XISelEv.c b/src/XISelEv.c
-index fa7eb54..f871222 100644
---- a/src/XISelEv.c
-+++ b/src/XISelEv.c
-@@ -135,8 +135,14 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
-
- _XRead(dpy, (char*)mask_in, reply.length * 4);
-
-- /* Memory layout of the XIEventMask for a 3 mask reply:
-- * [struct a][struct b][struct c][masks a][masks b][masks c]
-+ /*
-+ * This function takes interleaved xXIEventMask structs & masks off
-+ * the wire, such as this 3 mask reply:
-+ * [struct a][masks a][struct b][masks b][struct c][masks c]
-+ * And generates a memory buffer to be returned to callers in which
-+ * they are not interleaved, so that callers can treat the returned
-+ * pointer as a simple array of XIEventMask structs, such as:
-+ * [struct a][struct b][struct c][masks a][masks b][masks c]
- */
- len = reply.num_masks * sizeof(XIEventMask);
-
---
-1.7.9.2
-
-From 63841a81a340f1979cf5b0ffa1f7047dca988994 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Wed, 1 May 2013 23:58:39 -0700
-Subject: [PATCH:libXi 01/13] Use _XEatDataWords to avoid overflow of
- rep.length bit shifting
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- configure.ac | 6 ++++++
- src/XGMotion.c | 2 +-
- src/XGetDCtl.c | 2 +-
- src/XGetDProp.c | 5 ++---
- src/XGetFCtl.c | 2 +-
- src/XGetKMap.c | 2 +-
- src/XGetMMap.c | 2 +-
- src/XGetProp.c | 4 +---
- src/XGtSelect.c | 2 +-
- src/XIProperties.c | 7 +++----
- src/XIint.h | 14 ++++++++++++++
- src/XListDProp.c | 2 +-
- src/XListDev.c | 2 +-
- src/XOpenDev.c | 2 +-
- src/XQueryDv.c | 2 +-
- 15 files changed, 36 insertions(+), 20 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8dbca38..f5ef1e2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -31,6 +31,12 @@ PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.4.99.1] [xextproto >= 7.0.3]
- # CFLAGS only for PointerBarrier typedef
- PKG_CHECK_MODULES(XFIXES, [xfixes >= 5])
-
-+# Check for _XEatDataWords function that may be patched into older Xlib releases
-+SAVE_LIBS="$LIBS"
-+LIBS="$XI_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- # Check for xmlto and asciidoc for man page conversion
- # (only needed by people building tarballs)
- if test "$have_xmlto" = yes && test "$have_asciidoc" = yes; then
-diff --git a/src/XGMotion.c b/src/XGMotion.c
-index 99b1c44..5feac85 100644
---- a/src/XGMotion.c
-+++ b/src/XGMotion.c
-@@ -112,7 +112,7 @@ XGetDeviceMotionEvents(
- Xfree(bufp);
- Xfree(savp);
- *nEvents = 0;
-- _XEatData(dpy, (unsigned long)size);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (NULL);
-diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
-index c66212d..f73a4e8 100644
---- a/src/XGetDCtl.c
-+++ b/src/XGetDCtl.c
-@@ -95,7 +95,7 @@ XGetDeviceControl(
- nbytes = (long)rep.length << 2;
- d = (xDeviceState *) Xmalloc((unsigned)nbytes);
- if (!d) {
-- _XEatData(dpy, (unsigned long)nbytes);
-+ _XEatDataWords(dpy, rep.length);
- goto out;
- }
- sav = d;
-diff --git a/src/XGetDProp.c b/src/XGetDProp.c
-index 5d44f91..f9e8f0c 100644
---- a/src/XGetDProp.c
-+++ b/src/XGetDProp.c
-@@ -112,14 +112,13 @@ XGetDeviceProperty(Display* dpy, XDevice* dev,
- * This part of the code should never be reached. If it is,
- * the server sent back a property with an invalid format.
- */
-- nbytes = rep.length << 2;
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return(BadImplementation);
- }
- if (! *prop) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return(BadAlloc);
-diff --git a/src/XGetFCtl.c b/src/XGetFCtl.c
-index 43afa00..28fab4d 100644
---- a/src/XGetFCtl.c
-+++ b/src/XGetFCtl.c
-@@ -95,7 +95,7 @@ XGetFeedbackControl(
- nbytes = (long)rep.length << 2;
- f = (xFeedbackState *) Xmalloc((unsigned)nbytes);
- if (!f) {
-- _XEatData(dpy, (unsigned long)nbytes);
-+ _XEatDataWords(dpy, rep.length);
- goto out;
- }
- sav = f;
-diff --git a/src/XGetKMap.c b/src/XGetKMap.c
-index 9431fbb..00dde06 100644
---- a/src/XGetKMap.c
-+++ b/src/XGetKMap.c
-@@ -99,7 +99,7 @@ XGetDeviceKeyMapping(register Display * dpy, XDevice * dev,
- if (mapping)
- _XRead(dpy, (char *)mapping, nbytes);
- else
-- _XEatData(dpy, (unsigned long)nbytes);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay(dpy);
-diff --git a/src/XGetMMap.c b/src/XGetMMap.c
-index 8a1cdb2..ce10c2d 100644
---- a/src/XGetMMap.c
-+++ b/src/XGetMMap.c
-@@ -92,7 +92,7 @@ XGetDeviceModifierMapping(
- if (res->modifiermap)
- _XReadPad(dpy, (char *)res->modifiermap, nbytes);
- else
-- _XEatData(dpy, (unsigned long)nbytes);
-+ _XEatDataWords(dpy, rep.length);
- res->max_keypermod = rep.numKeyPerModifier;
- }
-
-diff --git a/src/XGetProp.c b/src/XGetProp.c
-index c5d088b..34bc581 100644
---- a/src/XGetProp.c
-+++ b/src/XGetProp.c
-@@ -68,7 +68,6 @@ XGetDeviceDontPropagateList(
- int *count)
- {
- XEventClass *list = NULL;
-- int rlen;
- xGetDeviceDontPropagateListReq *req;
- xGetDeviceDontPropagateListReply rep;
- XExtDisplayInfo *info = XInput_find_display(dpy);
-@@ -90,7 +89,6 @@ XGetDeviceDontPropagateList(
- *count = rep.count;
-
- if (*count) {
-- rlen = rep.length << 2;
- list = (XEventClass *) Xmalloc(rep.length * sizeof(XEventClass));
- if (list) {
- int i;
-@@ -105,7 +103,7 @@ XGetDeviceDontPropagateList(
- list[i] = (XEventClass) ec;
- }
- } else
-- _XEatData(dpy, (unsigned long)rlen);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay(dpy);
-diff --git a/src/XGtSelect.c b/src/XGtSelect.c
-index f890db7..5c0f812 100644
---- a/src/XGtSelect.c
-+++ b/src/XGtSelect.c
-@@ -104,7 +104,7 @@ XGetSelectedExtensionEvents(
- (XEventClass *) Xmalloc(*this_client_count *
- sizeof(XEventClass));
- if (!*this_client_list) {
-- _XEatData(dpy, (unsigned long)tlen + alen);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (Success);
-diff --git a/src/XIProperties.c b/src/XIProperties.c
-index 83a7a68..5e58fb6 100644
---- a/src/XIProperties.c
-+++ b/src/XIProperties.c
-@@ -64,7 +64,7 @@ XIListProperties(Display* dpy, int deviceid, int *num_props_return)
- props = (Atom*)Xmalloc(rep.num_properties * sizeof(Atom));
- if (!props)
- {
-- _XEatData(dpy, rep.num_properties << 2);
-+ _XEatDataWords(dpy, rep.length);
- goto cleanup;
- }
-
-@@ -203,8 +203,7 @@ XIGetProperty(Display* dpy, int deviceid, Atom property, long offset,
- * This part of the code should never be reached. If it is,
- * the server sent back a property with an invalid format.
- */
-- nbytes = rep.length << 2;
-- _XEatData(dpy, nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return(BadImplementation);
-@@ -222,7 +221,7 @@ XIGetProperty(Display* dpy, int deviceid, Atom property, long offset,
- *data = Xmalloc(rbytes);
-
- if (!(*data)) {
-- _XEatData(dpy, nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return(BadAlloc);
-diff --git a/src/XIint.h b/src/XIint.h
-index 571bb23..3ddc3c5 100644
---- a/src/XIint.h
-+++ b/src/XIint.h
-@@ -83,4 +83,18 @@ next_block(void **ptr, int size) {
- return ret;
- }
-
-+#ifndef HAVE__XEATDATAWORDS
-+#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */
-+#include <limits.h>
-+
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-+
- #endif
-diff --git a/src/XListDProp.c b/src/XListDProp.c
-index 8667350..bde6cb5 100644
---- a/src/XListDProp.c
-+++ b/src/XListDProp.c
-@@ -65,7 +65,7 @@ XListDeviceProperties(Display* dpy, XDevice* dev, int *nprops_return)
- props = (Atom*)Xmalloc(rep.nAtoms * sizeof(Atom));
- if (!props)
- {
-- _XEatData(dpy, rep.nAtoms << 2);
-+ _XEatDataWords(dpy, rep.length);
- goto cleanup;
- }
-
-diff --git a/src/XListDev.c b/src/XListDev.c
-index bd6e70a..1fa4747 100644
---- a/src/XListDev.c
-+++ b/src/XListDev.c
-@@ -202,7 +202,7 @@ XListInputDevices(
- list = (xDeviceInfo *) Xmalloc(rlen);
- slist = list;
- if (!slist) {
-- _XEatData(dpy, (unsigned long)rlen);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return (XDeviceInfo *) NULL;
-diff --git a/src/XOpenDev.c b/src/XOpenDev.c
-index 74f18ac..e784f8b 100644
---- a/src/XOpenDev.c
-+++ b/src/XOpenDev.c
-@@ -101,7 +101,7 @@ XOpenDevice(
- if (rlen - dlen > 0)
- _XEatData(dpy, (unsigned long)rlen - dlen);
- } else
-- _XEatData(dpy, (unsigned long)rlen);
-+ _XEatDataWords(dpy, rep.length);
-
- UnlockDisplay(dpy);
- SyncHandle();
-diff --git a/src/XQueryDv.c b/src/XQueryDv.c
-index 24d4e4e..69c285b 100644
---- a/src/XQueryDv.c
-+++ b/src/XQueryDv.c
-@@ -91,7 +91,7 @@ XQueryDeviceState(
- if (rlen > 0) {
- data = Xmalloc(rlen);
- if (!data) {
-- _XEatData(dpy, (unsigned long)rlen);
-+ _XEatDataWords(dpy, rep.length);
- goto out;
- }
- _XRead(dpy, data, rlen);
---
-1.7.9.2
-
-From 0acd07e1c9583e2e7c26c13f8628bde992d9bce5 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 22:26:52 -0800
-Subject: [PATCH:libXi 02/13] Stack buffer overflow in
- XGetDeviceButtonMapping() [CVE-2013-1998 1/3]
-
-We copy the entire reply sent by the server into the fixed size
-mapping[] array on the stack, even if the server says it's a larger
-size than the mapping array can hold. HULK SMASH STACK!
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XGetBMap.c | 21 +++++++++++++--------
- 1 file changed, 13 insertions(+), 8 deletions(-)
-
-diff --git a/src/XGetBMap.c b/src/XGetBMap.c
-index 211c9ca..002daba 100644
---- a/src/XGetBMap.c
-+++ b/src/XGetBMap.c
-@@ -60,6 +60,7 @@ SOFTWARE.
- #include <X11/extensions/XInput.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- #ifdef MIN /* some systems define this in <sys/param.h> */
- #undef MIN
-@@ -75,7 +76,6 @@ XGetDeviceButtonMapping(
- {
- int status = 0;
- unsigned char mapping[256]; /* known fixed size */
-- long nbytes;
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
- register xGetDeviceButtonMappingReq *req;
-@@ -92,13 +92,18 @@ XGetDeviceButtonMapping(
-
- status = _XReply(dpy, (xReply *) & rep, 0, xFalse);
- if (status == 1) {
-- nbytes = (long)rep.length << 2;
-- _XRead(dpy, (char *)mapping, nbytes);
--
-- /* don't return more data than the user asked for. */
-- if (rep.nElts)
-- memcpy((char *)map, (char *)mapping, MIN((int)rep.nElts, nmap));
-- status = rep.nElts;
-+ if (rep.length <= (sizeof(mapping) >> 2)) {
-+ unsigned long nbytes = rep.length << 2;
-+ _XRead(dpy, (char *)mapping, nbytes);
-+
-+ /* don't return more data than the user asked for. */
-+ if (rep.nElts)
-+ memcpy(map, mapping, MIN((int)rep.nElts, nmap));
-+ status = rep.nElts;
-+ } else {
-+ _XEatDataWords(dpy, rep.length);
-+ status = 0;
-+ }
- } else
- status = 0;
- UnlockDisplay(dpy);
---
-1.7.9.2
-
-From 18855aa8c261863c00690b7df1e5ce4660687fb6 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 23:37:23 -0800
-Subject: [PATCH:libXi 03/13] memory corruption in _XIPassiveGrabDevice()
- [CVE-2013-1998 2/3]
-
-If the server returned more modifiers than the caller asked for,
-we'd just keep copying past the end of the array provided by the
-caller, writing over who-knows-what happened to be there.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XIPassiveGrab.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c
-index ac17c01..53b4084 100644
---- a/src/XIPassiveGrab.c
-+++ b/src/XIPassiveGrab.c
-@@ -88,7 +88,7 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int grabtype, int detail,
- return -1;
- _XRead(dpy, (char*)failed_mods, reply.num_modifiers * sizeof(xXIGrabModifierInfo));
-
-- for (i = 0; i < reply.num_modifiers; i++)
-+ for (i = 0; i < reply.num_modifiers && i < num_modifiers; i++)
- {
- modifiers_inout[i].status = failed_mods[i].status;
- modifiers_inout[i].modifiers = failed_mods[i].modifiers;
---
-1.7.9.2
-
-From a74690ba880036e01fc39f522b7567daf3746a31 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 26 Apr 2013 22:48:36 -0700
-Subject: [PATCH:libXi 04/13] unvalidated lengths in XQueryDeviceState()
- [CVE-2013-1998 3/3]
-
-If the lengths given for each class state in the reply add up to more
-than the rep.length, we could read past the end of the buffer allocated
-to hold the data read from the server.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XQueryDv.c | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/src/XQueryDv.c b/src/XQueryDv.c
-index 69c285b..3836777 100644
---- a/src/XQueryDv.c
-+++ b/src/XQueryDv.c
-@@ -59,6 +59,7 @@ SOFTWARE.
- #include <X11/extensions/XInput.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- XDeviceState *
- XQueryDeviceState(
-@@ -66,8 +67,8 @@ XQueryDeviceState(
- XDevice *dev)
- {
- int i, j;
-- int rlen;
-- int size = 0;
-+ unsigned long rlen;
-+ size_t size = 0;
- xQueryDeviceStateReq *req;
- xQueryDeviceStateReply rep;
- XDeviceState *state = NULL;
-@@ -87,9 +88,11 @@ XQueryDeviceState(
- if (!_XReply(dpy, (xReply *) & rep, 0, xFalse))
- goto out;
-
-- rlen = rep.length << 2;
-- if (rlen > 0) {
-- data = Xmalloc(rlen);
-+ if (rep.length > 0) {
-+ if (rep.length < (INT_MAX >> 2)) {
-+ rlen = (unsigned long) rep.length << 2;
-+ data = Xmalloc(rlen);
-+ }
- if (!data) {
- _XEatDataWords(dpy, rep.length);
- goto out;
-@@ -97,6 +100,10 @@ XQueryDeviceState(
- _XRead(dpy, data, rlen);
-
- for (i = 0, any = (XInputClass *) data; i < (int)rep.num_classes; i++) {
-+ if (any->length > rlen)
-+ goto out;
-+ rlen -= any->length;
-+
- switch (any->class) {
- case KeyClass:
- size += sizeof(XKeyState);
---
-1.7.9.2
-
-From 38b563078ee050086526294f42f9f162be4bf97d Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 22:55:23 -0800
-Subject: [PATCH:libXi 05/13] integer overflow in XGetDeviceControl()
- [CVE-2013-1984 1/8]
-
-If the number of valuators reported by the server is large enough that
-it overflows when multiplied by the size of the appropriate struct, then
-memory corruption can occur when more bytes are copied from the X server
-reply than the size of the buffer we allocated to hold them.
-
-v2: check that reply size fits inside the data read from the server, so
-we don't read out of bounds either
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XGetDCtl.c | 31 ++++++++++++++++++++++++-------
- 1 file changed, 24 insertions(+), 7 deletions(-)
-
-diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
-index f73a4e8..51ed0ae 100644
---- a/src/XGetDCtl.c
-+++ b/src/XGetDCtl.c
-@@ -61,6 +61,7 @@ SOFTWARE.
- #include <X11/extensions/XInput.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- XDeviceControl *
- XGetDeviceControl(
-@@ -68,8 +69,6 @@ XGetDeviceControl(
- XDevice *dev,
- int control)
- {
-- int size = 0;
-- int nbytes, i;
- XDeviceControl *Device = NULL;
- XDeviceControl *Sav = NULL;
- xDeviceState *d = NULL;
-@@ -92,8 +91,12 @@ XGetDeviceControl(
- goto out;
-
- if (rep.length > 0) {
-- nbytes = (long)rep.length << 2;
-- d = (xDeviceState *) Xmalloc((unsigned)nbytes);
-+ unsigned long nbytes;
-+ size_t size = 0;
-+ if (rep.length < (INT_MAX >> 2)) {
-+ nbytes = (unsigned long) rep.length << 2;
-+ d = Xmalloc(nbytes);
-+ }
- if (!d) {
- _XEatDataWords(dpy, rep.length);
- goto out;
-@@ -111,33 +114,46 @@ XGetDeviceControl(
- case DEVICE_RESOLUTION:
- {
- xDeviceResolutionState *r;
-+ size_t val_size;
-
- r = (xDeviceResolutionState *) d;
-- size += sizeof(XDeviceResolutionState) +
-- (3 * sizeof(int) * r->num_valuators);
-+ if (r->num_valuators >= (INT_MAX / (3 * sizeof(int))))
-+ goto out;
-+ val_size = 3 * sizeof(int) * r->num_valuators;
-+ if ((sizeof(xDeviceResolutionState) + val_size) > nbytes)
-+ goto out;
-+ size += sizeof(XDeviceResolutionState) + val_size;
- break;
- }
- case DEVICE_ABS_CALIB:
- {
-+ if (sizeof(xDeviceAbsCalibState) > nbytes)
-+ goto out;
- size += sizeof(XDeviceAbsCalibState);
- break;
- }
- case DEVICE_ABS_AREA:
- {
-+ if (sizeof(xDeviceAbsAreaState) > nbytes)
-+ goto out;
- size += sizeof(XDeviceAbsAreaState);
- break;
- }
- case DEVICE_CORE:
- {
-+ if (sizeof(xDeviceCoreState) > nbytes)
-+ goto out;
- size += sizeof(XDeviceCoreState);
- break;
- }
- default:
-+ if (d->length > nbytes)
-+ goto out;
- size += d->length;
- break;
- }
-
-- Device = (XDeviceControl *) Xmalloc((unsigned)size);
-+ Device = Xmalloc(size);
- if (!Device)
- goto out;
-
-@@ -150,6 +166,7 @@ XGetDeviceControl(
- int *iptr, *iptr2;
- xDeviceResolutionState *r;
- XDeviceResolutionState *R;
-+ unsigned int i;
-
- r = (xDeviceResolutionState *) d;
- R = (XDeviceResolutionState *) Device;
---
-1.7.9.2
-
-From 9e39ad6e66a517c2324426c3aa32f4cfcc1cd4f5 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 22:55:23 -0800
-Subject: [PATCH:libXi 06/13] integer overflow in XGetFeedbackControl()
- [CVE-2013-1984 2/8]
-
-If the number of feedbacks reported by the server is large enough that
-it overflows when multiplied by the size of the appropriate struct, or
-if the total size of all the feedback structures overflows when added
-together, then memory corruption can occur when more bytes are copied from
-the X server reply than the size of the buffer we allocated to hold them.
-
-v2: check that reply size fits inside the data read from the server, so
- we don't read out of bounds either
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XGetFCtl.c | 24 +++++++++++++++++++-----
- 1 file changed, 19 insertions(+), 5 deletions(-)
-
-diff --git a/src/XGetFCtl.c b/src/XGetFCtl.c
-index 28fab4d..bb50bf3 100644
---- a/src/XGetFCtl.c
-+++ b/src/XGetFCtl.c
-@@ -61,6 +61,7 @@ SOFTWARE.
- #include <X11/extensions/XInput.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- XFeedbackState *
- XGetFeedbackControl(
-@@ -68,8 +69,6 @@ XGetFeedbackControl(
- XDevice *dev,
- int *num_feedbacks)
- {
-- int size = 0;
-- int nbytes, i;
- XFeedbackState *Feedback = NULL;
- XFeedbackState *Sav = NULL;
- xFeedbackState *f = NULL;
-@@ -91,9 +90,16 @@ XGetFeedbackControl(
- goto out;
-
- if (rep.length > 0) {
-+ unsigned long nbytes;
-+ size_t size = 0;
-+ int i;
-+
- *num_feedbacks = rep.num_feedbacks;
-- nbytes = (long)rep.length << 2;
-- f = (xFeedbackState *) Xmalloc((unsigned)nbytes);
-+
-+ if (rep.length < (INT_MAX >> 2)) {
-+ nbytes = rep.length << 2;
-+ f = Xmalloc(nbytes);
-+ }
- if (!f) {
- _XEatDataWords(dpy, rep.length);
- goto out;
-@@ -102,6 +108,10 @@ XGetFeedbackControl(
- _XRead(dpy, (char *)f, nbytes);
-
- for (i = 0; i < *num_feedbacks; i++) {
-+ if (f->length > nbytes)
-+ goto out;
-+ nbytes -= f->length;
-+
- switch (f->class) {
- case KbdFeedbackClass:
- size += sizeof(XKbdFeedbackState);
-@@ -116,6 +126,8 @@ XGetFeedbackControl(
- {
- xStringFeedbackState *strf = (xStringFeedbackState *) f;
-
-+ if (strf->num_syms_supported >= (INT_MAX / sizeof(KeySym)))
-+ goto out;
- size += sizeof(XStringFeedbackState) +
- (strf->num_syms_supported * sizeof(KeySym));
- }
-@@ -130,10 +142,12 @@ XGetFeedbackControl(
- size += f->length;
- break;
- }
-+ if (size > INT_MAX)
-+ goto out;
- f = (xFeedbackState *) ((char *)f + f->length);
- }
-
-- Feedback = (XFeedbackState *) Xmalloc((unsigned)size);
-+ Feedback = Xmalloc(size);
- if (!Feedback)
- goto out;
-
---
-1.7.9.2
-
-From 0bb14773ba37dfa8098b3e1784c80658019f9f21 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 22:55:23 -0800
-Subject: [PATCH:libXi 07/13] integer overflow in
- XGetDeviceDontPropagateList() [CVE-2013-1984
- 3/8]
-
-If the number of event classes reported by the server is large enough
-that it overflows when multiplied by the size of the appropriate struct,
-then memory corruption can occur when more bytes are copied from the
-X server reply than the size of the buffer we allocated to hold them.
-
-V2: EatData if count is 0 but length is > 0 to avoid XIOErrors
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XGetProp.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/XGetProp.c b/src/XGetProp.c
-index 34bc581..b49328c 100644
---- a/src/XGetProp.c
-+++ b/src/XGetProp.c
-@@ -60,6 +60,7 @@ SOFTWARE.
- #include <X11/extensions/XInput.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- XEventClass *
- XGetDeviceDontPropagateList(
-@@ -88,10 +89,11 @@ XGetDeviceDontPropagateList(
- }
- *count = rep.count;
-
-- if (*count) {
-- list = (XEventClass *) Xmalloc(rep.length * sizeof(XEventClass));
-+ if (rep.length != 0) {
-+ if ((rep.count != 0) && (rep.length < (INT_MAX / sizeof(XEventClass))))
-+ list = Xmalloc(rep.length * sizeof(XEventClass));
- if (list) {
-- int i;
-+ unsigned int i;
- CARD32 ec;
-
- /* read and assign each XEventClass separately because
---
-1.7.9.2
-
-From 3d1fc7cd03e9a41b86cd83a8922df551a1b87179 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 22:55:23 -0800
-Subject: [PATCH:libXi 08/13] integer overflow in XGetDeviceMotionEvents()
- [CVE-2013-1984 4/8]
-
-If the number of events or axes reported by the server is large enough
-that it overflows when multiplied by the size of the appropriate struct,
-then memory corruption can occur when more bytes are copied from the
-X server reply than the size of the buffer we allocated to hold them.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XGMotion.c | 22 +++++++++++++++++-----
- 1 file changed, 17 insertions(+), 5 deletions(-)
-
-diff --git a/src/XGMotion.c b/src/XGMotion.c
-index 5feac85..a4c75b6 100644
---- a/src/XGMotion.c
-+++ b/src/XGMotion.c
-@@ -59,6 +59,7 @@ SOFTWARE.
- #include <X11/extensions/XInput.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- XDeviceTimeCoord *
- XGetDeviceMotionEvents(
-@@ -74,7 +75,7 @@ XGetDeviceMotionEvents(
- xGetDeviceMotionEventsReply rep;
- XDeviceTimeCoord *tc;
- int *data, *bufp, *readp, *savp;
-- long size, size2;
-+ unsigned long size;
- int i, j;
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
-@@ -104,10 +105,21 @@ XGetDeviceMotionEvents(
- SyncHandle();
- return (NULL);
- }
-- size = rep.length << 2;
-- size2 = rep.nEvents * (sizeof(XDeviceTimeCoord) + (rep.axes * sizeof(int)));
-- savp = readp = (int *)Xmalloc(size);
-- bufp = (int *)Xmalloc(size2);
-+ if (rep.length < (INT_MAX >> 2)) {
-+ size = rep.length << 2;
-+ savp = readp = Xmalloc(size);
-+ } else {
-+ size = 0;
-+ savp = readp = NULL;
-+ }
-+ /* rep.axes is a CARD8, so assume max number of axes for bounds check */
-+ if (rep.nEvents <
-+ (INT_MAX / (sizeof(XDeviceTimeCoord) + (UCHAR_MAX * sizeof(int))))) {
-+ size_t bsize = rep.nEvents *
-+ (sizeof(XDeviceTimeCoord) + (rep.axes * sizeof(int)));
-+ bufp = Xmalloc(bsize);
-+ } else
-+ bufp = NULL;
- if (!bufp || !savp) {
- Xfree(bufp);
- Xfree(savp);
---
-1.7.9.2
-
-From 1202a8fc208581e184d327118a8a8ac3a27bbe64 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 22:55:23 -0800
-Subject: [PATCH:libXi 09/13] integer overflow in XIGetProperty()
- [CVE-2013-1984 5/8]
-
-If the number of items reported by the server is large enough that
-it overflows when multiplied by the size of the appropriate item type,
-then memory corruption can occur when more bytes are copied from the
-X server reply than the size of the buffer we allocated to hold them.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XIProperties.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/src/XIProperties.c b/src/XIProperties.c
-index 5e58fb6..32436d1 100644
---- a/src/XIProperties.c
-+++ b/src/XIProperties.c
-@@ -38,6 +38,7 @@
- #include <X11/extensions/XInput2.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- Atom*
- XIListProperties(Display* dpy, int deviceid, int *num_props_return)
-@@ -170,7 +171,7 @@ XIGetProperty(Display* dpy, int deviceid, Atom property, long offset,
- {
- xXIGetPropertyReq *req;
- xXIGetPropertyReply rep;
-- long nbytes, rbytes;
-+ unsigned long nbytes, rbytes;
-
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
-@@ -216,9 +217,11 @@ XIGetProperty(Display* dpy, int deviceid, Atom property, long offset,
- * recopy the string to make it null terminated.
- */
-
-- nbytes = rep.num_items * rep.format/8;
-- rbytes = nbytes + 1;
-- *data = Xmalloc(rbytes);
-+ if (rep.num_items < (INT_MAX / (rep.format/8))) {
-+ nbytes = rep.num_items * rep.format/8;
-+ rbytes = nbytes + 1;
-+ *data = Xmalloc(rbytes);
-+ }
-
- if (!(*data)) {
- _XEatDataWords(dpy, rep.length);
---
-1.7.9.2
-
-From a3e76afd699b7afa590c8d3567663460c9870924 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 22:55:23 -0800
-Subject: [PATCH:libXi 10/13] integer overflow in XIGetSelectedEvents()
- [CVE-2013-1984 6/8]
-
-If the number of events or masks reported by the server is large enough
-that it overflows when multiplied by the size of the appropriate struct,
-or the sizes overflow as they are totaled up, then memory corruption can
-occur when more bytes are copied from the X server reply than the size
-of the buffer we allocated to hold them.
-
-v2: check that reply size fits inside the data read from the server,
- so that we don't read out of bounds either
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XISelEv.c | 25 +++++++++++++++++++------
- 1 file changed, 19 insertions(+), 6 deletions(-)
-
-diff --git a/src/XISelEv.c b/src/XISelEv.c
-index f871222..0471bef 100644
---- a/src/XISelEv.c
-+++ b/src/XISelEv.c
-@@ -42,6 +42,7 @@ in this Software without prior written authorization from the author.
- #include <X11/extensions/ge.h>
- #include <X11/extensions/geproto.h>
- #include "XIint.h"
-+#include <limits.h>
-
- int
- XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks)
-@@ -101,13 +102,14 @@ out:
- XIEventMask*
- XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
- {
-- int i, len = 0;
-+ unsigned int i, len = 0;
- unsigned char *mask;
- XIEventMask *mask_out = NULL;
- xXIEventMask *mask_in = NULL, *mi;
- xXIGetSelectedEventsReq *req;
- xXIGetSelectedEventsReply reply;
- XExtDisplayInfo *info = XInput_find_display(dpy);
-+ size_t rbytes;
-
- *num_masks_return = -1;
- LockDisplay(dpy);
-@@ -129,11 +131,16 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
- goto out;
- }
-
-- mask_in = Xmalloc(reply.length * 4);
-- if (!mask_in)
-+ if (reply.length < (INT_MAX >> 2)) {
-+ rbytes = (unsigned long) reply.length << 2;
-+ mask_in = Xmalloc(rbytes);
-+ }
-+ if (!mask_in) {
-+ _XEatDataWords(dpy, reply.length);
- goto out;
-+ }
-
-- _XRead(dpy, (char*)mask_in, reply.length * 4);
-+ _XRead(dpy, (char*)mask_in, rbytes);
-
- /*
- * This function takes interleaved xXIEventMask structs & masks off
-@@ -148,8 +155,14 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
-
- for (i = 0, mi = mask_in; i < reply.num_masks; i++)
- {
-- len += mi->mask_len * 4;
-- mi = (xXIEventMask*)((char*)mi + mi->mask_len * 4);
-+ unsigned int mask_bytes = mi->mask_len * 4;
-+ len += mask_bytes;
-+ if (len > INT_MAX)
-+ goto out;
-+ if ((sizeof(xXIEventMask) + mask_bytes) > rbytes)
-+ goto out;
-+ rbytes -= (sizeof(xXIEventMask) + mask_bytes);
-+ mi = (xXIEventMask*)((char*)mi + mask_bytes);
- mi++;
- }
-
---
-1.7.9.2
-
-From b6246afd838842d28ac94d901507390624f31c7d Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sun, 10 Mar 2013 13:30:55 -0700
-Subject: [PATCH:libXi 11/13] Avoid integer overflow in XGetDeviceProperties()
- [CVE-2013-1984 7/8]
-
-If the number of items as reported by the Xserver is too large, it
-could overflow the calculation for the size of the buffer to copy the
-reply into, causing memory corruption.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XGetDProp.c | 61 +++++++++++++++++++++++++++++++++----------------------
- 1 file changed, 37 insertions(+), 24 deletions(-)
-
-diff --git a/src/XGetDProp.c b/src/XGetDProp.c
-index f9e8f0c..3691122 100644
---- a/src/XGetDProp.c
-+++ b/src/XGetDProp.c
-@@ -38,6 +38,7 @@ in this Software without prior written authorization from the author.
- #include <X11/extensions/XInput.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- int
- XGetDeviceProperty(Display* dpy, XDevice* dev,
-@@ -48,7 +49,8 @@ XGetDeviceProperty(Display* dpy, XDevice* dev,
- {
- xGetDevicePropertyReq *req;
- xGetDevicePropertyReply rep;
-- long nbytes, rbytes;
-+ unsigned long nbytes, rbytes;
-+ int ret = Success;
-
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
-@@ -81,30 +83,43 @@ XGetDeviceProperty(Display* dpy, XDevice* dev,
- * data, but this last byte is null terminated and convenient for
- * returning string properties, so the client doesn't then have to
- * recopy the string to make it null terminated.
-+ *
-+ * Maximum item limits are set to both prevent integer overflow when
-+ * calculating the amount of memory to malloc, and to limit how much
-+ * memory will be used if a server provides an insanely high count.
- */
- switch (rep.format) {
- case 8:
-- nbytes = rep.nItems;
-- rbytes = rep.nItems + 1;
-- if (rbytes > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
-- _XReadPad (dpy, (char *) *prop, nbytes);
-+ if (rep.nItems < INT_MAX) {
-+ nbytes = rep.nItems;
-+ rbytes = rep.nItems + 1;
-+ if ((*prop = Xmalloc (rbytes)))
-+ _XReadPad (dpy, (char *) *prop, nbytes);
-+ else
-+ ret = BadAlloc;
-+ }
- break;
-
- case 16:
-- nbytes = rep.nItems << 1;
-- rbytes = rep.nItems * sizeof (short) + 1;
-- if (rbytes > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
-- _XRead16Pad (dpy, (short *) *prop, nbytes);
-+ if (rep.nItems < (INT_MAX / sizeof (short))) {
-+ nbytes = rep.nItems << 1;
-+ rbytes = rep.nItems * sizeof (short) + 1;
-+ if ((*prop = Xmalloc (rbytes)))
-+ _XRead16Pad (dpy, (short *) *prop, nbytes);
-+ else
-+ ret = BadAlloc;
-+ }
- break;
-
- case 32:
-- nbytes = rep.nItems << 2;
-- rbytes = rep.nItems * sizeof (long) + 1;
-- if (rbytes > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
-- _XRead32 (dpy, (long *) *prop, nbytes);
-+ if (rep.nItems < (INT_MAX / sizeof (long))) {
-+ nbytes = rep.nItems << 2;
-+ rbytes = rep.nItems * sizeof (long) + 1;
-+ if ((*prop = Xmalloc (rbytes)))
-+ _XRead32 (dpy, (long *) *prop, nbytes);
-+ else
-+ ret = BadAlloc;
-+ }
- break;
-
- default:
-@@ -112,16 +127,13 @@ XGetDeviceProperty(Display* dpy, XDevice* dev,
- * This part of the code should never be reached. If it is,
- * the server sent back a property with an invalid format.
- */
-- _XEatDataWords(dpy, rep.length);
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return(BadImplementation);
-+ ret = BadImplementation;
- }
- if (! *prop) {
- _XEatDataWords(dpy, rep.length);
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return(BadAlloc);
-+ if (ret == Success)
-+ ret = BadAlloc;
-+ goto out;
- }
- (*prop)[rbytes - 1] = '\0';
- }
-@@ -130,9 +142,10 @@ XGetDeviceProperty(Display* dpy, XDevice* dev,
- *actual_format = rep.format;
- *nitems = rep.nItems;
- *bytes_after = rep.bytesAfter;
-+ out:
- UnlockDisplay (dpy);
- SyncHandle ();
-
-- return Success;
-+ return ret;
- }
-
---
-1.7.9.2
-
-From 03f9746651d8d67c6d449737bd1681eb394b094c Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sun, 10 Mar 2013 00:22:14 -0800
-Subject: [PATCH:libXi 12/13] Avoid integer overflow in XListInputDevices()
- [CVE-2013-1984 8/8]
-
-If the length of the reply as reported by the Xserver is too long, it
-could overflow the calculation for the size of the buffer to copy the
-reply into, causing memory corruption.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XListDev.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/src/XListDev.c b/src/XListDev.c
-index 1fa4747..1c14b96 100644
---- a/src/XListDev.c
-+++ b/src/XListDev.c
-@@ -60,6 +60,7 @@ SOFTWARE.
- #include <X11/extensions/XInput.h>
- #include <X11/extensions/extutil.h>
- #include "XIint.h"
-+#include <limits.h>
-
- /* Calculate length field to a multiples of sizeof(XID). XIDs are typedefs
- * to ulong and thus may be 8 bytes on some platforms. This can trigger a
-@@ -179,7 +180,7 @@ XListInputDevices(
- XAnyClassPtr Any;
- char *nptr, *Nptr;
- int i;
-- long rlen;
-+ unsigned long rlen;
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
- LockDisplay(dpy);
-@@ -198,9 +199,10 @@ XListInputDevices(
-
- if ((*ndevices = rep.ndevices)) { /* at least 1 input device */
- size = *ndevices * sizeof(XDeviceInfo);
-- rlen = rep.length << 2; /* multiply length by 4 */
-- list = (xDeviceInfo *) Xmalloc(rlen);
-- slist = list;
-+ if (rep.length < (INT_MAX >> 2)) {
-+ rlen = rep.length << 2; /* multiply length by 4 */
-+ slist = list = Xmalloc(rlen);
-+ }
- if (!slist) {
- _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
---
-1.7.9.2
-
-From 5019f7a8f06b6826cd197d8def6feb841f1490ec Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sun, 10 Mar 2013 00:16:22 -0800
-Subject: [PATCH:libXi 13/13] sign extension issue in XListInputDevices()
- [CVE-2013-1995]
-
-nptr is (signed) char, which can be negative, and will sign extend
-when added to the int size, which means size can be subtracted from,
-leading to allocating too small a buffer to hold the data being copied
-from the X server's reply.
-
-v2: check that string size fits inside the data read from the server,
- so that we don't read out of bounds either
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XListDev.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/src/XListDev.c b/src/XListDev.c
-index 1c14b96..b85ff3c 100644
---- a/src/XListDev.c
-+++ b/src/XListDev.c
-@@ -73,7 +73,7 @@ static int pad_to_xid(int base_size)
- return ((base_size + padsize - 1)/padsize) * padsize;
- }
-
--static int
-+static size_t
- SizeClassInfo(xAnyClassPtr *any, int num_classes)
- {
- int size = 0;
-@@ -170,7 +170,7 @@ XListInputDevices(
- register Display *dpy,
- int *ndevices)
- {
-- int size;
-+ size_t size;
- xListInputDevicesReq *req;
- xListInputDevicesReply rep;
- xDeviceInfo *list, *slist = NULL;
-@@ -178,7 +178,7 @@ XListInputDevices(
- XDeviceInfo *clist = NULL;
- xAnyClassPtr any, sav_any;
- XAnyClassPtr Any;
-- char *nptr, *Nptr;
-+ unsigned char *nptr, *Nptr;
- int i;
- unsigned long rlen;
- XExtDisplayInfo *info = XInput_find_display(dpy);
-@@ -217,9 +217,12 @@ XListInputDevices(
- size += SizeClassInfo(&any, (int)list->num_classes);
- }
-
-- for (i = 0, nptr = (char *)any; i < *ndevices; i++) {
-+ Nptr = ((unsigned char *)list) + rlen + 1;
-+ for (i = 0, nptr = (unsigned char *)any; i < *ndevices; i++) {
- size += *nptr + 1;
- nptr += (*nptr + 1);
-+ if (nptr > Nptr)
-+ goto out;
- }
-
- clist = (XDeviceInfoPtr) Xmalloc(size);
-@@ -245,8 +248,8 @@ XListInputDevices(
- }
-
- clist = sclist;
-- nptr = (char *)any;
-- Nptr = (char *)Any;
-+ nptr = (unsigned char *)any;
-+ Nptr = (unsigned char *)Any;
- for (i = 0; i < *ndevices; i++, clist++) {
- clist->name = (char *)Nptr;
- memcpy(Nptr, nptr + 1, *nptr);
-@@ -256,6 +259,7 @@ XListInputDevices(
- }
- }
-
-+ out:
- XFree((char *)slist);
- UnlockDisplay(dpy);
- SyncHandle();
---
-1.7.9.2
-
--- a/open-src/lib/libXi/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXi/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,17 +29,15 @@
MODULE_NAME=libXi
# Version number (used in path names)
-MODULE_VERSION=1.7.1
+MODULE_VERSION=1.7.2
# Checksums for upstream tarball
-TARBALL_MD5 = 24d71afed1b86c60d4eb361628d7f47b
-TARBALL_SHA1 = 0737f2344c661523bd5903a727c3371cebb2b0f3
-TARBALL_SHA256= e92adb6b69c53c51e05c1e65db97e23751b935a693000fb0606c11b88c0066c5
+TARBALL_MD5 = f4df3532b1af1dcc905d804f55b30b4a
+TARBALL_SHA1 = 53c90cd52e40065e04886f046383c1e5c507e0c4
+TARBALL_SHA256= df24781dc63645e2b561cd0b20bd8a0e7aff02e426a8d2a7641159004d4cb20e
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = solaris-abi.patch,-p1
-SOURCE_PATCHES += man-fixme.patch,-p1 shadow-man-pages.patch,-p1
-SOURCE_PATCHES += CVE-2013-19XX.patch,-p1
# Need to regen Makefile.in after man-fixme.patch changes Makefile.am
AUTORECONF=yes
--- a/open-src/lib/libXi/man-fixme.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-From 2c97ff2264fbced5f6506c288fc5f83c04c48aa1 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Mon, 1 Aug 2011 16:10:03 -0700
-Subject: [PATCH:libXi] Fix the FIXME output in man page .TH macros generated by asciidoc
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- man/Makefile.am | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/man/Makefile.am b/man/Makefile.am
-index 28211a1..7e328a5 100644
---- a/man/Makefile.am
-+++ b/man/Makefile.am
-@@ -162,6 +162,10 @@ MAN_SUBSTS += -e 's/\[FIXME: manual\]/XINPUT FUNCTIONS/'
- # asciidoc generates shadow page references without the man section directory
- MAN_SUBSTS += -e 's/^\.so X/.so man$(LIB_MAN_SUFFIX)\/X/'
-
-+# asciidoc is generating [FIXME...] values in the .TH line we should fix.
-+MAN_SUBSTS += -e 's/\[FIXME: source\]/$(XORG_MAN_PAGE)/'
-+MAN_SUBSTS += -e 's/\[FIXME: manual\]/XINPUT FUNCTIONS/'
-+
- SUFFIXES = .man .$(LIB_MAN_SUFFIX)
- .man.$(LIB_MAN_SUFFIX):
- $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
--- a/open-src/lib/libXi/shadow-man-pages.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-From 194e09bd80c96bd3826b455e8c38371770889217 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 16 Sep 2011 18:51:21 -0700
-Subject: [PATCH:libXi] Make shadow man pages generated by asciidoc work with Solaris man
-
-Solaris man requires .so entries in man pages include the man section
-directory, not just the man page filename, even when it's in the same
-directory, so use sed to add it in.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- man/Makefile.am | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git a/man/Makefile.am b/man/Makefile.am
-index 7e328a5..0af2c5f 100644
---- a/man/Makefile.am
-+++ b/man/Makefile.am
-@@ -166,6 +166,9 @@ MAN_SUBSTS += -e 's/^\.so X/.so man$(LIB_MAN_SUFFIX)\/X/'
- MAN_SUBSTS += -e 's/\[FIXME: source\]/$(XORG_MAN_PAGE)/'
- MAN_SUBSTS += -e 's/\[FIXME: manual\]/XINPUT FUNCTIONS/'
-
-+# asciidoc generates shadow page references without the man section directory
-+MAN_SUBSTS += -e 's/^\.so X/.so man$(LIB_MAN_SUFFIX)\/X/'
-+
- SUFFIXES = .man .$(LIB_MAN_SUFFIX)
- .man.$(LIB_MAN_SUFFIX):
- $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
--- a/open-src/lib/libXi/solaris-abi.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXi/solaris-abi.patch Mon Sep 30 13:26:39 2013 -0700
@@ -1,8 +1,8 @@
diff --git a/src/Makefile.am b/src/Makefile.am
-index 806265c..ad41371 100644
+index fbbca45..eb24a4d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -73,7 +73,7 @@ AM_CFLAGS = $(XI_CFLAGS) \
+@@ -75,7 +75,7 @@ AM_CFLAGS = $(XI_CFLAGS) \
$(CWARNFLAGS)
@@ -12,10 +12,10 @@
libXiincludedir = $(includedir)/X11/extensions
libXiinclude_HEADERS = $(top_srcdir)/include/X11/extensions/XInput.h \
diff --git a/src/Makefile.in b/src/Makefile.in
-index b3c9830..776ba0c 100644
+index 2f58bbb..6c0f927 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
-@@ -343,7 +343,7 @@ AM_CFLAGS = $(XI_CFLAGS) \
+@@ -430,7 +430,7 @@ AM_CFLAGS = $(XI_CFLAGS) \
$(MALLOC_ZERO_CFLAGS) \
$(CWARNFLAGS)
--- a/open-src/lib/libXinerama/CVE-2013-1985.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-From 7ce3ce4be46087f9cc57cb415875abaaa961f734 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 4 May 2013 09:21:14 -0700
-Subject: [PATCH:libXinerama 1/2] Use _XEatDataWords to avoid overflow of
- _XEatData calculations
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 6 ++++++
- src/Xinerama.c | 19 ++++++++++++++++++-
- 2 files changed, 24 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index e335508..046a1aa 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -42,6 +42,12 @@ XORG_CHECK_MALLOC_ZERO
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(XINERAMA, x11 xext xextproto [xineramaproto >= 1.1.99.1])
-
-+# Check for _XEatDataWords function that may be patched into older Xlib releases
-+SAVE_LIBS="$LIBS"
-+LIBS="$XINERAMA_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- # Allow checking code with lint, sparse, etc.
- XORG_WITH_LINT
- LINT_FLAGS="${LINT_FLAGS} ${XINERAMA_CFLAGS}"
-diff --git a/src/Xinerama.c b/src/Xinerama.c
-index 7d7e4d8..04189b6 100644
---- a/src/Xinerama.c
-+++ b/src/Xinerama.c
-@@ -23,6 +23,10 @@ dealings in this Software without prior written authorization from Digital
- Equipment Corporation.
- ******************************************************************/
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
- #include <X11/Xlibint.h>
- #include <X11/Xutil.h>
- #include <X11/extensions/Xext.h>
-@@ -31,6 +35,19 @@ Equipment Corporation.
- #include <X11/extensions/panoramiXproto.h>
- #include <X11/extensions/Xinerama.h>
-
-+#ifndef HAVE__XEATDATAWORDS
-+#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */
-+#include <limits.h>
-+
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-
- static XExtensionInfo _panoramiX_ext_info_data;
- static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data;
-@@ -302,7 +319,7 @@ XineramaQueryScreens(
-
- *number = rep.number;
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- } else {
- *number = 0;
- }
---
-1.7.9.2
-
-From 99c644fc8488657bdd106717df7446d606f9ef22 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 8 Mar 2013 19:55:55 -0800
-Subject: [PATCH:libXinerama 2/2] integer overflow in XineramaQueryScreens()
- [CVE-2013-1985]
-
-If the reported number of screens is too large, the calculations to
-allocate memory for them may overflow, leaving us writing beyond the
-bounds of the allocation.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xinerama.c | 44 ++++++++++++++++++++++++++++----------------
- 1 file changed, 28 insertions(+), 16 deletions(-)
-
-diff --git a/src/Xinerama.c b/src/Xinerama.c
-index 04189b6..67a35b5 100644
---- a/src/Xinerama.c
-+++ b/src/Xinerama.c
-@@ -303,24 +303,36 @@ XineramaQueryScreens(
- return NULL;
- }
-
-- if(rep.number) {
-- if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) {
-+ /*
-+ * rep.number is a CARD32 so could be as large as 2^32
-+ * The X11 protocol limits the total screen size to 64k x 64k,
-+ * and no screen can be smaller than a pixel. While technically
-+ * that means we could theoretically reach 2^32 screens, and that's
-+ * not even taking overlap into account, Xorg is currently limited
-+ * to 16 screens, and few known servers have a much higher limit,
-+ * so 1024 seems more than enough to prevent both integer overflow
-+ * and insane X server responses causing massive memory allocation.
-+ */
-+ if ((rep.number > 0) && (rep.number <= 1024))
-+ scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number);
-+ if (scrnInfo != NULL) {
-+ int i;
-+
-+ for (i = 0; i < rep.number; i++) {
- xXineramaScreenInfo scratch;
-- int i;
--
-- for(i = 0; i < rep.number; i++) {
-- _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo);
-- scrnInfo[i].screen_number = i;
-- scrnInfo[i].x_org = scratch.x_org;
-- scrnInfo[i].y_org = scratch.y_org;
-- scrnInfo[i].width = scratch.width;
-- scrnInfo[i].height = scratch.height;
-- }
--
-- *number = rep.number;
-- } else
-- _XEatDataWords(dpy, rep.length);
-+
-+ _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo);
-+
-+ scrnInfo[i].screen_number = i;
-+ scrnInfo[i].x_org = scratch.x_org;
-+ scrnInfo[i].y_org = scratch.y_org;
-+ scrnInfo[i].width = scratch.width;
-+ scrnInfo[i].height = scratch.height;
-+ }
-+
-+ *number = rep.number;
- } else {
-+ _XEatDataWords(dpy, rep.length);
- *number = 0;
- }
-
---
-1.7.9.2
-
--- a/open-src/lib/libXinerama/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXinerama/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,16 +29,15 @@
MODULE_NAME=libXinerama
# Version number (used in path names)
-MODULE_VERSION=1.1.2
+MODULE_VERSION=1.1.3
# Checksums for upstream tarball
-TARBALL_MD5 = cb45d6672c93a608f003b6404f1dd462
-TARBALL_SHA1 = 06a5b636305725ce09f6c3a4d5a15f2f188b5afd
-TARBALL_SHA256= a4e77c2fd88372e4ae365f3ca0434a23613da96c5b359b1a64bf43614ec06aac
+TARBALL_MD5 = 9336dc46ae3bf5f81c247f7131461efd
+TARBALL_SHA1 = 6a3956d73f7457ef0b4db12806d99c6918e328e3
+TARBALL_SHA256= 7a45699f1773095a3f821e491cbd5e10c887c5a5fce5d8d3fced15c2ff7698e2
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = sun-abi.patch
-SOURCE_PATCHES += CVE-2013-1985.patch,-p1
+SOURCE_PATCHES = sun-abi.patch,-p1
# Library name
LIBNAME=Xinerama
--- a/open-src/lib/libXinerama/sun-abi.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXinerama/sun-abi.patch Mon Sep 30 13:26:39 2013 -0700
@@ -26,10 +26,11 @@
Solaris already has the old XPanoramiX* API in libXext, so we don't export
it from libXinerama to avoid symbol clashes.
-diff -urp -x '*~' -x '*.orig' src/Xinerama.c src/Xinerama.c
---- src/Xinerama.c 2010-10-06 21:13:01.000000000 -0700
-+++ src/Xinerama.c 2011-02-11 16:43:46.565053733 -0800
-@@ -72,6 +72,9 @@ static XEXT_GENERATE_CLOSE_DISPLAY (clos
+diff --git a/src/Xinerama.c b/src/Xinerama.c
+index 67a35b5..e0e5c5d 100644
+--- a/src/Xinerama.c
++++ b/src/Xinerama.c
+@@ -89,6 +89,9 @@ static XEXT_GENERATE_CLOSE_DISPLAY (close_display, panoramiX_ext_info)
* *
****************************************************************************/
@@ -39,7 +40,7 @@
Bool XPanoramiXQueryExtension (
Display *dpy,
int *event_base_return,
-@@ -90,6 +93,9 @@ Bool XPanoramiXQueryExtension (
+@@ -107,6 +110,9 @@ Bool XPanoramiXQueryExtension (
}
@@ -49,7 +50,7 @@
Status XPanoramiXQueryVersion(
Display *dpy,
int *major_version_return,
-@@ -120,6 +126,7 @@ Status XPanoramiXQueryVersion(
+@@ -137,6 +143,7 @@ Status XPanoramiXQueryVersion(
return 1;
}
@@ -57,7 +58,7 @@
XPanoramiXInfo *XPanoramiXAllocInfo(void)
{
return (XPanoramiXInfo *) Xmalloc (sizeof (XPanoramiXInfo));
-@@ -215,6 +222,7 @@ Status XPanoramiXGetScreenSize (
+@@ -232,6 +239,7 @@ Status XPanoramiXGetScreenSize (
panoramiX_info->height = rep.height;
return 1;
}
--- a/open-src/lib/libXmu/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXmu/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# libXmu - miscellaneous utility functions based on libX11 & libXt
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, 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"),
@@ -29,15 +29,14 @@
MODULE_NAME=libXmu
# Version number (used in path names)
-MODULE_VERSION=1.1.1
+MODULE_VERSION=1.1.2
# Checksums for upstream tarball
-TARBALL_MD5 = a4efff8de85bd45dd3da124285d10c00
-TARBALL_SHA1 = 3e280aa927d78c05f94db6c7ae606f7ad132b495
-TARBALL_SHA256= 709081c550cc3a866d7c760a3f97384a1fe16e27fc38fe8169b8db9f33aa7edd
+TARBALL_MD5 = 41d92ab627dfa06568076043f3e089e4
+TARBALL_SHA1 = 7e6aeef726743d21aa272c424e7d7996e92599eb
+TARBALL_SHA256= 756edc7c383254eef8b4e1b733c3bf1dc061b523c9f9833ac7058378b8349d0b
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES += bitmap-path.patch
SOURCE_PATCHES += solaris-abi.patch
# Library name (used for specfiles/mapfiles)
--- a/open-src/lib/libXmu/bitmap-path.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 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.
-#
-
-Search /usr/include/X11/bitmaps, then /usr/X11/include/X11/bitmaps, for
-bitmaps in XmuLocatePixmapFile(), as specified in PSARC/2005/192.
-
-diff -urp -x '*~' -x '*.orig' src/LocBitmap.c src/LocBitmap.c
---- src/LocBitmap.c 2010-10-06 21:13:41.000000000 -0700
-+++ src/LocBitmap.c 2011-02-11 16:42:33.783488948 -0800
-@@ -96,10 +96,15 @@ XmuLocatePixmapFile(Screen *screen, _Xco
- int *widthp, int *heightp, int *xhotp, int *yhotp)
- {
-
-+#undef BITMAPDIR
- #ifndef BITMAPDIR
- #define BITMAPDIR "/usr/include/X11/bitmaps"
- #endif
-
-+#ifndef BITMAPX11DIR
-+#define BITMAPX11DIR "/usr/X11/include/X11/bitmaps"
-+#endif
-+
- Display *dpy = DisplayOfScreen (screen);
- Window root = RootWindowOfScreen (screen);
- Bool try_plain_name = True;
-@@ -146,7 +151,8 @@ XmuLocatePixmapFile(Screen *screen, _Xco
- * 1. name if it begins with / or ./
- * 2. "each prefix in file_paths"/name
- * 3. BITMAPDIR/name
-- * 4. name if didn't begin with / or .
-+ * 4. BITMAPX11DIR/name
-+ * 5. name if didn't begin with / or .
- */
-
- for (i = 1; i <= 4; i++) {
-@@ -179,6 +185,9 @@ XmuLocatePixmapFile(Screen *screen, _Xco
- XmuSnprintf(filename, sizeof(filename), "%s/%s", BITMAPDIR, name);
- break;
- case 4:
-+ XmuSnprintf(filename, sizeof(filename), "%s/%s", BITMAPX11DIR, name);
-+ break;
-+ case 5:
- if (!try_plain_name) continue;
- fn = (char *) name;
- break;
--- a/open-src/lib/libXp/6724993.patch Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXp/6724993.patch Mon Sep 30 13:26:39 2013 -0700
@@ -10,7 +10,7 @@
--- src/XpDpi.c 1969-12-31 16:00:00.000000000 -0800
+++ src/XpDpi.c.new 2008-08-26 13:44:31.473701000 -0700
-@@ -0,0 +1,98 @@
+@@ -0,0 +1,101 @@
+/* $XConsortium: XpDpi.c /main/4 1996/12/04 10:24:31 lehors $ */
+/******************************************************************************
+ ******************************************************************************
@@ -47,6 +47,9 @@
+ **
+ ******************************************************************************
+ *****************************************************************************/
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
+#include <X11/extensions/Printstr.h>
+#include "XpExtUtil.h"
+#include <X11/Xlibint.h>
--- a/open-src/lib/libXp/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-Copyright 1996 Hewlett-Packard Company
-Copyright 1996 International Business Machines Corp.
-Copyright 1996, 1999, 2004, Oracle and/or its affiliates. All rights reserved.
-Copyright 1996 Novell, Inc.
-Copyright 1996 Digital Equipment Corp.
-Copyright 1996 Fujitsu Limited
-Copyright 1996 Hitachi, Ltd.
-Copyright 1996 X Consortium, Inc.
-
-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 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 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.
-
-Except as contained in this notice, the names of the copyright holders
-shall not be used in advertising or otherwise to promote the sale, use
-or other dealings in this Software without prior written authorization
-from said copyright holders.
-
-Copyright (C) 2000 The XFree86 Project, Inc. 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 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
-XFREE86 PROJECT 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.
-
-Except as contained in this notice, the name of the XFree86 Project shall
-not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from the
-XFree86 Project.
-
--- a/open-src/lib/libXp/CVE-2013-2062.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
-From babb1fc823ab3be192c48fe115feeb0d57f74d05 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 26 Apr 2013 23:59:25 -0700
-Subject: [PATCH:libXp 2/4] integer overflow in XpGetAttributes &
- XpGetOneAttribute [CVE-2013-2062 1/3]
-
-stringLen & valueLen are CARD32s and need to be bounds checked before adding
-one to them to come up with the total size to allocate, to avoid integer
-overflow leading to underallocation and writing data from the network past
-the end of the allocated buffer.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XpAttr.c | 36 +++++++++++++++++++-----------------
- 1 file changed, 19 insertions(+), 17 deletions(-)
-
-diff --git a/src/XpAttr.c b/src/XpAttr.c
-index 6818daf..665e2e8 100644
---- a/src/XpAttr.c
-+++ b/src/XpAttr.c
-@@ -48,6 +48,7 @@
-
- #include <stdio.h>
- #include <sys/stat.h>
-+#include <limits.h>
-
- char *
- XpGetAttributes (
-@@ -83,17 +84,18 @@ XpGetAttributes (
- /*
- * Read pool and return to caller.
- */
-- buf = Xmalloc( (unsigned) rep.stringLen + 1 );
-+ if (rep.stringLen < INT_MAX)
-+ buf = Xmalloc(rep.stringLen + 1);
-+ else
-+ buf = NULL;
-
- if (!buf) {
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return( (char *) NULL ); /* malloc error */
-+ _XEatDataWords(dpy, rep.length);
-+ }
-+ else {
-+ _XReadPad (dpy, (char *) buf, rep.stringLen );
-+ buf[rep.stringLen] = 0;
- }
--
-- _XReadPad (dpy, (char *) buf, (long) rep.stringLen );
--
-- buf[rep.stringLen] = 0;
-
- UnlockDisplay(dpy);
- SyncHandle();
-@@ -144,18 +146,18 @@ XpGetOneAttribute (
- /*
- * Read variable answer.
- */
-- buf = Xmalloc( (unsigned) rep.valueLen + 1 );
-+ if (rep.valueLen < INT_MAX)
-+ buf = Xmalloc(rep.valueLen + 1);
-+ else
-+ buf = NULL;
-
- if (!buf) {
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return( (char *) NULL ); /* malloc error */
-+ _XEatDataWords(dpy, rep.length);
-+ }
-+ else {
-+ _XReadPad (dpy, (char *) buf, rep.valueLen);
-+ buf[rep.valueLen] = 0;
- }
--
-- buf[rep.valueLen] = 0;
--
-- _XReadPad (dpy, (char *) buf, (long) rep.valueLen );
-- buf[rep.valueLen] = 0;
-
- UnlockDisplay(dpy);
- SyncHandle();
---
-1.7.9.2
-
-From cc90f6be64bfd6973ae270b9bff494f577e1bda7 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 26 Apr 2013 23:59:25 -0700
-Subject: [PATCH:libXp 3/4] integer overflows in XpGetPrinterList()
- [CVE-2013-2062 2/3]
-
-listCount is a CARD32 that needs to be bounds checked before it is
-multiplied by the size of the structs to allocate, and the string
-lengths are CARD32s and need to be bounds checked before adding one
-to them to come up with the total size to allocate, to avoid integer
-overflow leading to underallocation and writing data from the network
-past the end of the allocated buffer.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XpPrinter.c | 43 +++++++++++++++++++++++--------------------
- 1 file changed, 23 insertions(+), 20 deletions(-)
-
-diff --git a/src/XpPrinter.c b/src/XpPrinter.c
-index bdc96e6..03b18c4 100644
---- a/src/XpPrinter.c
-+++ b/src/XpPrinter.c
-@@ -42,6 +42,7 @@
- #include <X11/extensions/Printstr.h>
- #include <X11/Xlibint.h>
- #include "XpExtUtil.h"
-+#include <limits.h>
-
- #define _XpPadOut(len) (((len) + 3) & ~3)
-
-@@ -62,7 +63,7 @@ XpGetPrinterList (
- long dataLenVR;
- CARD8 *dataVR; /* aka STRING8 */
-
-- XPPrinterList ptr_list;
-+ XPPrinterList ptr_list = NULL;
-
- XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy);
-
-@@ -128,13 +129,12 @@ XpGetPrinterList (
- *list_count = rep.listCount;
-
- if (*list_count) {
-- ptr_list = (XPPrinterList)
-- Xmalloc( (unsigned) (sizeof(XPPrinterRec) * (*list_count + 1)));
-+ if (rep.listCount < (INT_MAX / sizeof(XPPrinterRec)))
-+ ptr_list = Xmalloc(sizeof(XPPrinterRec) * (*list_count + 1));
-
- if (!ptr_list) {
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return ( (XPPrinterList) NULL ); /* malloc error */
-+ _XEatDataWords(dpy, rep.length);
-+ goto out;
- }
-
- /*
-@@ -150,16 +150,17 @@ XpGetPrinterList (
- _XRead32 (dpy, &dataLenVR, (long) sizeof(CARD32) );
-
- if (dataLenVR) {
-- dataVR = (CARD8 *) Xmalloc( (unsigned) dataLenVR + 1 );
-+ if (dataLenVR < INT_MAX)
-+ dataVR = Xmalloc(dataLenVR + 1);
-+ else
-+ dataVR = NULL;
-
- if (!dataVR) {
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return ( (XPPrinterList) NULL ); /* malloc error */
-+ _XEatData(dpy, dataLenVR);
-+ } else {
-+ _XReadPad (dpy, (char *) dataVR, (long) dataLenVR);
-+ dataVR[dataLenVR] = 0;
- }
--
-- _XReadPad (dpy, (char *) dataVR, (long) dataLenVR);
-- dataVR[dataLenVR] = 0;
- ptr_list[i].name = (char *) dataVR;
- }
- else {
-@@ -172,16 +173,17 @@ XpGetPrinterList (
- _XRead32 (dpy, &dataLenVR, (long) sizeof(CARD32) );
-
- if (dataLenVR) {
-- dataVR = (CARD8 *) Xmalloc( (unsigned) dataLenVR + 1 );
-+ if (dataLenVR < INT_MAX)
-+ dataVR = Xmalloc(dataLenVR + 1);
-+ else
-+ dataVR = NULL;
-
- if (!dataVR) {
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return ( (XPPrinterList) NULL ); /* malloc error */
-+ _XEatData(dpy, dataLenVR);
-+ } else {
-+ _XReadPad (dpy, (char *) dataVR, (long) dataLenVR);
-+ dataVR[dataLenVR] = 0;
- }
--
-- _XReadPad (dpy, (char *) dataVR, (long) dataLenVR);
-- dataVR[dataLenVR] = 0;
- ptr_list[i].desc = (char *) dataVR;
- }
- else {
-@@ -193,6 +195,7 @@ XpGetPrinterList (
- ptr_list = (XPPrinterList) NULL;
- }
-
-+ out:
- UnlockDisplay(dpy);
- SyncHandle();
-
---
-1.7.9.2
-
-From e111065f6dd790c820fa67ea31055b18c68481e3 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 26 Apr 2013 23:59:25 -0700
-Subject: [PATCH:libXp 4/4] integer overflows in XpQueryScreens()
- [CVE-2013-2062 3/3]
-
-listCount is a CARD32 that needs to be bounds checked before it is
-multiplied by the size of the pointers to allocate, to avoid integer
-overflow leading to underallocation and writing data from the network
-past the end of the allocated buffer.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XpScreens.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/src/XpScreens.c b/src/XpScreens.c
-index 815dfbf..b31e554 100644
---- a/src/XpScreens.c
-+++ b/src/XpScreens.c
-@@ -42,6 +42,7 @@
- #include <X11/extensions/Printstr.h>
- #include <X11/Xlibint.h>
- #include "XpExtUtil.h"
-+#include <limits.h>
-
-
- Screen **
-@@ -82,19 +83,17 @@ XpQueryScreens (
- *list_count = rep.listCount;
-
- if (*list_count) {
-- scr_list = (Screen **)
-- Xmalloc( (unsigned) (sizeof(Screen *) * *list_count) );
-+ if (rep.listCount < (INT_MAX / sizeof(Screen *)))
-+ scr_list = Xmalloc(sizeof(Screen *) * *list_count);
-+ else
-+ scr_list = NULL;
-
- if (!scr_list) {
-- UnlockDisplay(dpy);
-- SyncHandle();
-- return ( (Screen **) NULL ); /* malloc error */
-+ _XEatDataWords(dpy, rep.length);
-+ goto out;
- }
- i = 0;
- while(i < *list_count){
-- /*
-- * Pull printer length and then name.
-- */
- _XRead32 (dpy, &rootWindow, (long) sizeof(CARD32) );
- scr_list[i] = NULL;
- for ( j = 0; j < XScreenCount(dpy); j++ ) {
-@@ -118,6 +117,7 @@ XpQueryScreens (
- scr_list = (Screen **) NULL;
- }
-
-+ out:
- UnlockDisplay(dpy);
- SyncHandle();
-
---
-1.7.9.2
-
--- a/open-src/lib/libXp/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXp/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,15 @@
MODULE_NAME=libXp
# Version number (used in path names)
-MODULE_VERSION=1.0.1
+MODULE_VERSION=1.0.2
# Checksums for upstream tarball
-TARBALL_MD5 = 7ae1d63748e79086bd51a633da1ff1a9
-TARBALL_SHA1 = 9c76823c7cfcb43f097963d0c930dcc4e38807a8
+TARBALL_MD5 = bb038577c7f4e42a1b675fa6451bc4aa
+TARBALL_SHA1 = bac586283c089536e526529de21b13778a428c07
+TARBALL_SHA256= 952fe5b5e90abd2cf04739aef3a9b63a253cd9309ed066a82bab7ca9112fd0b5
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = solaris-abi.patch 6724993.patch
-SOURCE_PATCHES += CVE-2013-2062.patch,-p1
# Since we're patching src/Makefile.am in solaris-abi.patch,
# we need to autoreconf
--- a/open-src/lib/libXpm/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXpm/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -2,7 +2,7 @@
#
# libXpm - library for handling XPM format images
#
-# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2013, 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"),
@@ -29,12 +29,12 @@
MODULE_NAME=libXpm
# Version number (used in path names)
-MODULE_VERSION=3.5.10
+MODULE_VERSION=3.5.11
# Checksums for upstream tarball
-TARBALL_MD5 = 7ae7eff7a14d411e84a67bd166bcec1a
-TARBALL_SHA1 = eca9dbfa6253f7d6cc7d593dc83110c6c4876d7c
-TARBALL_SHA256= a6db7e234750e7d60330017972e31d8e1f29f0a8c1391e4ac82f6102d919a735
+TARBALL_MD5 = 769ee12a43611cdebd38094eaf83f3f0
+TARBALL_SHA1 = 77b95dd1c8cd9bc00b3b834b53d824409202acbb
+TARBALL_SHA256= c5bdafa51d1ae30086fac01ab83be8d47fe117b238d3437f8e965434090e041c
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = setuid.patch
--- a/open-src/lib/libXrandr/CVE-2013-1986.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,349 +0,0 @@
-From 1c7ad6773ce6be00dcd6e51e9be08f203abe5071 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 3 May 2013 23:29:22 -0700
-Subject: [PATCH:libXrandr 1/6] Use _XEatDataWords to avoid overflow of
- rep.length bit shifting
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 6 ++++++
- src/Xrandrint.h | 13 +++++++++++++
- src/XrrCrtc.c | 6 +++---
- src/XrrOutput.c | 2 +-
- src/XrrProperty.c | 9 ++++-----
- src/XrrProvider.c | 4 ++--
- src/XrrProviderProperty.c | 9 ++++-----
- src/XrrScreen.c | 2 +-
- 8 files changed, 34 insertions(+), 17 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3f28bef..8466999 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -55,6 +55,12 @@ AC_SUBST(RANDR_VERSION)
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(RANDR, x11 randrproto >= $RANDR_VERSION xext xextproto xrender renderproto)
-
-+# Check for _XEatDataWords function that may be patched into older Xlib release
-+SAVE_LIBS="$LIBS"
-+LIBS="$RANDR_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- AC_CONFIG_FILES([Makefile
- src/Makefile
- man/Makefile
-diff --git a/src/Xrandrint.h b/src/Xrandrint.h
-index aed10e4..1687c29 100644
---- a/src/Xrandrint.h
-+++ b/src/Xrandrint.h
-@@ -42,6 +42,19 @@ extern char XRRExtensionName[];
-
- XExtDisplayInfo *XRRFindDisplay (Display *dpy);
-
-+#ifndef HAVE__XEATDATAWORDS
-+#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */
-+#include <limits.h>
-+
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-
- /* deliberately opaque internal data structure; can be extended,
- but not reordered */
-diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
-index 04087c5..a704a52 100644
---- a/src/XrrCrtc.c
-+++ b/src/XrrCrtc.c
-@@ -74,7 +74,7 @@ XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc)
-
- xci = (XRRCrtcInfo *) Xmalloc(rbytes);
- if (xci == NULL) {
-- _XEatData (dpy, (unsigned long) nbytes);
-+ _XEatDataWords (dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
-@@ -203,7 +203,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
-
- if (!crtc_gamma)
- {
-- _XEatData (dpy, (unsigned long) nbytes);
-+ _XEatDataWords (dpy, rep.length);
- goto out;
- }
- _XRead16 (dpy, crtc_gamma->red, rep.size * 2);
-@@ -397,7 +397,7 @@ XRRGetCrtcTransform (Display *dpy,
- int extraBytes = rep.length * 4 - CrtcTransformExtra;
- extra = Xmalloc (extraBytes);
- if (!extra) {
-- _XEatData (dpy, extraBytes);
-+ _XEatDataWords (dpy, rep.length - (CrtcTransformExtra >> 2));
- UnlockDisplay (dpy);
- SyncHandle ();
- return False;
-diff --git a/src/XrrOutput.c b/src/XrrOutput.c
-index f13a932..4df894e 100644
---- a/src/XrrOutput.c
-+++ b/src/XrrOutput.c
-@@ -81,7 +81,7 @@ XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output)
-
- xoi = (XRROutputInfo *) Xmalloc(rbytes);
- if (xoi == NULL) {
-- _XEatData (dpy, (unsigned long) nbytes);
-+ _XEatDataWords (dpy, rep.length - (OutputInfoExtra >> 2));
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
-diff --git a/src/XrrProperty.c b/src/XrrProperty.c
-index 4c3fdb0..2b065b2 100644
---- a/src/XrrProperty.c
-+++ b/src/XrrProperty.c
-@@ -62,7 +62,7 @@ XRRListOutputProperties (Display *dpy, RROutput output, int *nprop)
-
- props = (Atom *) Xmalloc (rbytes);
- if (props == NULL) {
-- _XEatData (dpy, nbytes);
-+ _XEatDataWords (dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- *nprop = 0;
-@@ -107,7 +107,7 @@ XRRQueryOutputProperty (Display *dpy, RROutput output, Atom property)
-
- prop_info = (XRRPropertyInfo *) Xmalloc (rbytes);
- if (prop_info == NULL) {
-- _XEatData (dpy, nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
-@@ -313,14 +313,13 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
- * This part of the code should never be reached. If it is,
- * the server sent back a property with an invalid format.
- */
-- nbytes = rep.length << 2;
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return(BadImplementation);
- }
- if (! *prop) {
-- _XEatData(dpy, (unsigned long) nbytes);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return(BadAlloc);
-diff --git a/src/XrrScreen.c b/src/XrrScreen.c
-index f830913..08710b6 100644
---- a/src/XrrScreen.c
-+++ b/src/XrrScreen.c
-@@ -129,7 +129,7 @@ doGetScreenResources (Display *dpy, Window window, int poll)
- if (xrsr == NULL || wire_names == NULL) {
- if (xrsr) Xfree (xrsr);
- if (wire_names) Xfree (wire_names);
-- _XEatData (dpy, (unsigned long) nbytes);
-+ _XEatDataWords (dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
---
-1.7.9.2
-
-From 0e79d96c36aef5889ae2e2a3fc2e96e93f30dc21 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 12 Apr 2013 21:44:59 -0700
-Subject: [PATCH:libXrandr 2/6] integer overflow in XRRQueryOutputProperty()
- [CVE-2013-1986 1/4]
-
-rep.length is a CARD32, while rbytes was a signed int, so
- rbytes = sizeof (XRRPropertyInfo) + rep.length * sizeof (long);
-could result in integer overflow, leading to an undersized malloc
-and reading data off the connection and writing it past the end of
-the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XrrProperty.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/src/XrrProperty.c b/src/XrrProperty.c
-index 2b065b2..50382bf 100644
---- a/src/XrrProperty.c
-+++ b/src/XrrProperty.c
-@@ -31,6 +31,7 @@
- #include <X11/extensions/render.h>
- #include <X11/extensions/Xrender.h>
- #include "Xrandrint.h"
-+#include <limits.h>
-
- Atom *
- XRRListOutputProperties (Display *dpy, RROutput output, int *nprop)
-@@ -84,7 +85,7 @@ XRRQueryOutputProperty (Display *dpy, RROutput output, Atom property)
- XExtDisplayInfo *info = XRRFindDisplay(dpy);
- xRRQueryOutputPropertyReply rep;
- xRRQueryOutputPropertyReq *req;
-- int rbytes, nbytes;
-+ unsigned int rbytes, nbytes;
- XRRPropertyInfo *prop_info;
-
- RRCheckExtension (dpy, info, NULL);
-@@ -102,10 +103,14 @@ XRRQueryOutputProperty (Display *dpy, RROutput output, Atom property)
- return NULL;
- }
-
-- rbytes = sizeof (XRRPropertyInfo) + rep.length * sizeof (long);
-- nbytes = rep.length << 2;
-+ if (rep.length < ((INT_MAX / sizeof(long)) - sizeof (XRRPropertyInfo))) {
-+ rbytes = sizeof (XRRPropertyInfo) + (rep.length * sizeof (long));
-+ nbytes = rep.length << 2;
-+
-+ prop_info = Xmalloc (rbytes);
-+ } else
-+ prop_info = NULL;
-
-- prop_info = (XRRPropertyInfo *) Xmalloc (rbytes);
- if (prop_info == NULL) {
- _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
---
-1.7.9.2
-
-
-From 289a1927949e6f278c18d115772e454837702e35 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 4 May 2013 21:37:49 -0700
-Subject: [PATCH:libXrandr 4/6] integer overflow in XRRGetOutputProperty()
- [CVE-2013-1986 3/4]
-
-If the reported number of properties is too large, the calculations
-to allocate memory for them may overflow, leaving us returning less
-memory to the caller than implied by the value written to *nitems.
-
-(Same as reported against libX11 XGetWindowProperty by Ilja Van Sprundel)
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XrrProperty.c | 22 ++++++++++++++--------
- 1 file changed, 14 insertions(+), 8 deletions(-)
-
-diff --git a/src/XrrProperty.c b/src/XrrProperty.c
-index 50382bf..707a28d 100644
---- a/src/XrrProperty.c
-+++ b/src/XrrProperty.c
-@@ -257,7 +257,7 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
- XExtDisplayInfo *info = XRRFindDisplay(dpy);
- xRRGetOutputPropertyReply rep;
- xRRGetOutputPropertyReq *req;
-- long nbytes, rbytes;
-+ unsigned long nbytes, rbytes;
-
- RRCheckExtension (dpy, info, 1);
-
-@@ -282,34 +282,40 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
-
- *prop = (unsigned char *) NULL;
- if (rep.propertyType != None) {
-+ int format = rep.format;
-+
-+ /*
-+ * Protect against both integer overflow and just plain oversized
-+ * memory allocation - no server should ever return this many props.
-+ */
-+ if (rep.nItems >= (INT_MAX >> 4))
-+ format = -1; /* fall through to default error case */
-+
- /*
- * One extra byte is malloced than is needed to contain the property
- * data, but this last byte is null terminated and convenient for
- * returning string properties, so the client doesn't then have to
- * recopy the string to make it null terminated.
- */
-- switch (rep.format) {
-+ switch (format) {
- case 8:
- nbytes = rep.nItems;
- rbytes = rep.nItems + 1;
-- if (rbytes > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
-+ if (rbytes > 0 && (*prop = Xmalloc (rbytes)))
- _XReadPad (dpy, (char *) *prop, nbytes);
- break;
-
- case 16:
- nbytes = rep.nItems << 1;
- rbytes = rep.nItems * sizeof (short) + 1;
-- if (rbytes > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
-+ if (rbytes > 0 && (*prop = Xmalloc (rbytes)))
- _XRead16Pad (dpy, (short *) *prop, nbytes);
- break;
-
- case 32:
- nbytes = rep.nItems << 2;
- rbytes = rep.nItems * sizeof (long) + 1;
-- if (rbytes > 0 &&
-- (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
-+ if (rbytes > 0 && (*prop = Xmalloc (rbytes)))
- _XRead32 (dpy, (long *) *prop, nbytes);
- break;
-
---
-1.7.9.2
-
-
-From c90f74497dbcb96854346435349c6e2207b530c5 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 4 May 2013 21:47:50 -0700
-Subject: [PATCH:libXrandr 6/6] Make XRRGet*Property() always initialize
- returned values
-
-Avoids memory corruption and other errors when callers access them
-without checking to see if the calls returned an error value.
-
-Callers are still required to check for errors, this just reduces the
-damage when they don't.
-
-(Same as reported against libX11 XGetWindowProperty by Ilja Van Sprundel)
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XrrProperty.c | 8 +++++++-
- src/XrrProviderProperty.c | 8 +++++++-
- 2 files changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/src/XrrProperty.c b/src/XrrProperty.c
-index 707a28d..2096c56 100644
---- a/src/XrrProperty.c
-+++ b/src/XrrProperty.c
-@@ -259,6 +259,13 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
- xRRGetOutputPropertyReq *req;
- unsigned long nbytes, rbytes;
-
-+ /* Always initialize return values, in case callers fail to initialize
-+ them and fail to check the return code for an error. */
-+ *actual_type = None;
-+ *actual_format = 0;
-+ *nitems = *bytes_after = 0L;
-+ *prop = (unsigned char *) NULL;
-+
- RRCheckExtension (dpy, info, 1);
-
- LockDisplay (dpy);
-@@ -280,7 +287,6 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
- return ((xError *)&rep)->errorCode;
- }
-
-- *prop = (unsigned char *) NULL;
- if (rep.propertyType != None) {
- int format = rep.format;
-
--- a/open-src/lib/libXrandr/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXrandr/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,14 +29,15 @@
MODULE_NAME=libXrandr
# Version number (used in path names)
-MODULE_VERSION=1.4.0
+MODULE_VERSION=1.4.2
# Checksums for upstream tarball
-TARBALL_MD5 = 0c843636124cc1494e3d87df16957672
-TARBALL_SHA1 = 2353d16635a20521a64838f568bb4c8a10823316
+TARBALL_MD5 = 210ed9499a3d9c96e3a221629b7d39b0
+TARBALL_SHA1 = 00865ccefe1040e4d9866d878556710cdc4b2ae6
+TARBALL_SHA256= caa7b31ac769be51a532343c65376f1d4df3f307afaed58e34fb5e82e8b825ad
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = CVE-2013-1986.patch,-p1
+SOURCE_PATCHES =
# Library name
LIBNAME=Xrandr
--- a/open-src/lib/libXrender/CVE-2013-1987.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-From 73e77eb21d649edc1ce1746739f9358e337b2935 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 3 May 2013 22:48:11 -0700
-Subject: [PATCH:libXrender 1/4] Use _XEatDataWords to avoid overflow of
- rep.length bit shifting
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 6 ++++++
- src/Filter.c | 2 +-
- src/Xrender.c | 4 ++--
- src/Xrenderint.h | 14 ++++++++++++++
- 4 files changed, 23 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 19dce7a..7c2496c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -58,6 +58,12 @@ AC_SUBST(RENDER_VERSION)
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(RENDER, x11 renderproto >= $RENDER_VERSION)
-
-+# Check for _XEatDataWords function that may be patched into older Xlib release
-+SAVE_LIBS="$LIBS"
-+LIBS="$RENDER_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- AC_CONFIG_FILES([Makefile
- src/Makefile
- xrender.pc])
-diff --git a/src/Filter.c b/src/Filter.c
-index 5fe9df9..924b2a3 100644
---- a/src/Filter.c
-+++ b/src/Filter.c
-@@ -79,7 +79,7 @@ XRenderQueryFilters (Display *dpy, Drawable drawable)
-
- if (!filters)
- {
-- _XEatData (dpy, (unsigned long) rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
-diff --git a/src/Xrender.c b/src/Xrender.c
-index 769503a..5c8e5f5 100644
---- a/src/Xrender.c
-+++ b/src/Xrender.c
-@@ -475,7 +475,7 @@ XRenderQueryFormats (Display *dpy)
- {
- if (xri) Xfree (xri);
- if (xData) Xfree (xData);
-- _XEatData (dpy, nbytes);
-+ _XEatDataWords (dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return 0;
-@@ -859,7 +859,7 @@ XRenderQueryPictIndexValues(Display *dpy,
- values = (XIndexValue *)Xmalloc (rlength);
- if (!values)
- {
-- _XEatData (dpy, nbytes);
-+ _XEatDataWords (dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
-diff --git a/src/Xrenderint.h b/src/Xrenderint.h
-index 57b13da..daaa6fe 100644
---- a/src/Xrenderint.h
-+++ b/src/Xrenderint.h
-@@ -109,4 +109,18 @@ XRenderFindDisplay (Display *dpy);
- #define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len)
- #endif
-
-+#ifndef HAVE__XEATDATAWORDS
-+#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */
-+#include <limits.h>
-+
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-+
- #endif /* _XRENDERINT_H_ */
---
-1.7.9.2
-
-From e52853974664289fe42a92909667ed77cfa1cec5 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 12 Apr 2013 22:45:20 -0700
-Subject: [PATCH:libXrender 2/4] integer overflow in XRenderQueryFilters()
- [CVE-2013-1987 1/3]
-
-The length, numFilters & numAliases members of the reply are all CARD32
-and need to be bounds checked before multiplying & adding them together
-to come up with the total size to allocate, to avoid integer overflow
-leading to underallocation and writing data from the network past the
-end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Filter.c | 39 +++++++++++++++++++++++++--------------
- 1 file changed, 25 insertions(+), 14 deletions(-)
-
-diff --git a/src/Filter.c b/src/Filter.c
-index 924b2a3..edfa572 100644
---- a/src/Filter.c
-+++ b/src/Filter.c
-@@ -25,6 +25,7 @@
- #include <config.h>
- #endif
- #include "Xrenderint.h"
-+#include <limits.h>
-
- XFilters *
- XRenderQueryFilters (Display *dpy, Drawable drawable)
-@@ -37,7 +38,7 @@ XRenderQueryFilters (Display *dpy, Drawable drawable)
- char *name;
- char len;
- int i;
-- long nbytes, nbytesAlias, nbytesName;
-+ unsigned long nbytes, nbytesAlias, nbytesName;
-
- if (!RenderHasExtension (info))
- return NULL;
-@@ -60,22 +61,32 @@ XRenderQueryFilters (Display *dpy, Drawable drawable)
- SyncHandle ();
- return NULL;
- }
-- /*
-- * Compute total number of bytes for filter names
-- */
-- nbytes = (long)rep.length << 2;
-- nbytesAlias = rep.numAliases * 2;
-- if (rep.numAliases & 1)
-- nbytesAlias += 2;
-- nbytesName = nbytes - nbytesAlias;
-
- /*
-- * Allocate one giant block for the whole data structure
-+ * Limit each component of combined size to 1/4 the max, which is far
-+ * more than they should ever possibly need.
- */
-- filters = Xmalloc (sizeof (XFilters) +
-- rep.numFilters * sizeof (char *) +
-- rep.numAliases * sizeof (short) +
-- nbytesName);
-+ if ((rep.length < (INT_MAX >> 2)) &&
-+ (rep.numFilters < ((INT_MAX / 4) / sizeof (char *))) &&
-+ (rep.numAliases < ((INT_MAX / 4) / sizeof (short)))) {
-+ /*
-+ * Compute total number of bytes for filter names
-+ */
-+ nbytes = (unsigned long)rep.length << 2;
-+ nbytesAlias = rep.numAliases * 2;
-+ if (rep.numAliases & 1)
-+ nbytesAlias += 2;
-+ nbytesName = nbytes - nbytesAlias;
-+
-+ /*
-+ * Allocate one giant block for the whole data structure
-+ */
-+ filters = Xmalloc (sizeof (XFilters) +
-+ (rep.numFilters * sizeof (char *)) +
-+ (rep.numAliases * sizeof (short)) +
-+ nbytesName);
-+ } else
-+ filters = NULL;
-
- if (!filters)
- {
---
-1.7.9.2
-
-From 9e577d40322b9e3d8bdefec0eefa44d8ead451a4 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 12 Apr 2013 23:02:11 -0700
-Subject: [PATCH:libXrender 3/4] integer overflow in XRenderQueryFormats()
- [CVE-2013-1987 2/3]
-
-The length, numFormats, numScreens, numDepths, and numVisuals members of
-the reply are all CARD32 and need to be bounds checked before multiplying
-and adding them together to come up with the total size to allocate, to
-avoid integer overflow leading to underallocation and writing data from
-the network past the end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xrender.c | 40 ++++++++++++++++++++++++++--------------
- 1 file changed, 26 insertions(+), 14 deletions(-)
-
-diff --git a/src/Xrender.c b/src/Xrender.c
-index 5c8e5f5..a62c753 100644
---- a/src/Xrender.c
-+++ b/src/Xrender.c
-@@ -26,6 +26,7 @@
- #include <config.h>
- #endif
- #include "Xrenderint.h"
-+#include <limits.h>
-
- XRenderExtInfo XRenderExtensionInfo;
- char XRenderExtensionName[] = RENDER_NAME;
-@@ -411,8 +412,8 @@ XRenderQueryFormats (Display *dpy)
- CARD32 *xSubpixel;
- void *xData;
- int nf, ns, nd, nv;
-- int rlength;
-- int nbytes;
-+ unsigned long rlength;
-+ unsigned long nbytes;
-
- RenderCheckExtension (dpy, info, 0);
- LockDisplay (dpy);
-@@ -458,18 +459,29 @@ XRenderQueryFormats (Display *dpy)
- if (async_state.major_version == 0 && async_state.minor_version < 6)
- rep.numSubpixel = 0;
-
-- xri = (XRenderInfo *) Xmalloc (sizeof (XRenderInfo) +
-- rep.numFormats * sizeof (XRenderPictFormat) +
-- rep.numScreens * sizeof (XRenderScreen) +
-- rep.numDepths * sizeof (XRenderDepth) +
-- rep.numVisuals * sizeof (XRenderVisual));
-- rlength = (rep.numFormats * sizeof (xPictFormInfo) +
-- rep.numScreens * sizeof (xPictScreen) +
-- rep.numDepths * sizeof (xPictDepth) +
-- rep.numVisuals * sizeof (xPictVisual) +
-- rep.numSubpixel * 4);
-- xData = (void *) Xmalloc (rlength);
-- nbytes = (int) rep.length << 2;
-+ if ((rep.numFormats < ((INT_MAX / 4) / sizeof (XRenderPictFormat))) &&
-+ (rep.numScreens < ((INT_MAX / 4) / sizeof (XRenderScreen))) &&
-+ (rep.numDepths < ((INT_MAX / 4) / sizeof (XRenderDepth))) &&
-+ (rep.numVisuals < ((INT_MAX / 4) / sizeof (XRenderVisual))) &&
-+ (rep.numSubpixel < ((INT_MAX / 4) / 4)) &&
-+ (rep.length < (INT_MAX >> 2)) ) {
-+ xri = Xmalloc (sizeof (XRenderInfo) +
-+ (rep.numFormats * sizeof (XRenderPictFormat)) +
-+ (rep.numScreens * sizeof (XRenderScreen)) +
-+ (rep.numDepths * sizeof (XRenderDepth)) +
-+ (rep.numVisuals * sizeof (XRenderVisual)));
-+ rlength = ((rep.numFormats * sizeof (xPictFormInfo)) +
-+ (rep.numScreens * sizeof (xPictScreen)) +
-+ (rep.numDepths * sizeof (xPictDepth)) +
-+ (rep.numVisuals * sizeof (xPictVisual)) +
-+ (rep.numSubpixel * 4));
-+ xData = Xmalloc (rlength);
-+ nbytes = (unsigned long) rep.length << 2;
-+ } else {
-+ xri = NULL;
-+ xData = NULL;
-+ rlength = nbytes = 0;
-+ }
-
- if (!xri || !xData || nbytes < rlength)
- {
---
-1.7.9.2
-
-From 786f78fd8df6d165ccbc81f306fd9f22b5c1551c Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 12 Apr 2013 23:02:11 -0700
-Subject: [PATCH:libXrender 4/4] integer overflow in
- XRenderQueryPictIndexValues() [CVE-2013-1987
- 3/3]
-
-The length and numIndexValues members of the reply are both CARD32 and
-need to be bounds checked before multiplying by sizeof (XIndexValue) to
-avoid integer overflow leading to underallocation and writing data from
-the network past the end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xrender.c | 25 ++++++++++++++++---------
- 1 file changed, 16 insertions(+), 9 deletions(-)
-
-diff --git a/src/Xrender.c b/src/Xrender.c
-index a62c753..3102eb2 100644
---- a/src/Xrender.c
-+++ b/src/Xrender.c
-@@ -844,7 +844,7 @@ XRenderQueryPictIndexValues(Display *dpy,
- xRenderQueryPictIndexValuesReq *req;
- xRenderQueryPictIndexValuesReply rep;
- XIndexValue *values;
-- int nbytes, nread, rlength, i;
-+ unsigned int nbytes, nread, rlength, i;
-
- RenderCheckExtension (dpy, info, NULL);
-
-@@ -860,15 +860,22 @@ XRenderQueryPictIndexValues(Display *dpy,
- return NULL;
- }
-
-- /* request data length */
-- nbytes = (long)rep.length << 2;
-- /* bytes of actual data in the request */
-- nread = rep.numIndexValues * SIZEOF (xIndexValue);
-- /* size of array returned to application */
-- rlength = rep.numIndexValues * sizeof (XIndexValue);
-+ if ((rep.length < (INT_MAX >> 2)) &&
-+ (rep.numIndexValues < (INT_MAX / sizeof (XIndexValue)))) {
-+ /* request data length */
-+ nbytes = rep.length << 2;
-+ /* bytes of actual data in the request */
-+ nread = rep.numIndexValues * SIZEOF (xIndexValue);
-+ /* size of array returned to application */
-+ rlength = rep.numIndexValues * sizeof (XIndexValue);
-+
-+ /* allocate returned data */
-+ values = Xmalloc (rlength);
-+ } else {
-+ nbytes = nread = rlength = 0;
-+ values = NULL;
-+ }
-
-- /* allocate returned data */
-- values = (XIndexValue *)Xmalloc (rlength);
- if (!values)
- {
- _XEatDataWords (dpy, rep.length);
---
-1.7.9.2
-
--- a/open-src/lib/libXrender/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXrender/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,15 @@
MODULE_NAME=libXrender
# Version number (used in path names)
-MODULE_VERSION=0.9.7
+MODULE_VERSION=0.9.8
# Checksums for upstream tarball
-TARBALL_MD5 = ee62f4c7f0f16ced4da63308963ccad2
-TARBALL_SHA1 = 6e4d75d8316d5217324258f555eba3a5d383feb2
-TARBALL_SHA256= f9b46b93c9bc15d5745d193835ac9ba2a2b411878fad60c504bbb8f98492bbe6
+TARBALL_MD5 = 2bd9a15fcf64d216e63b8d129e4f1f1c
+TARBALL_SHA1 = 0f5c843410029944bd06e19366db4932cf5944fa
+TARBALL_SHA256= 1d14b02f0060aec5d90dfdcf16a996f17002e515292906ed26e3dcbba0f4fc62
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = CVE-2013-1987.patch,-p1
+SOURCE_PATCHES =
# Library name
LIBNAME=Xrender
--- a/open-src/lib/libXres/CVE-2013-1988.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-From 95b352b0f4a1ab1bc254e78adbc73cd65223ded4 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 10:34:22 -0700
-Subject: [PATCH:libXRes 1/3] Use _XEatDataWords to avoid overflow of
- rep.length shifting
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 6 ++++++
- src/XRes.c | 15 +++++++++++++--
- 2 files changed, 19 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index bc4e8a6..10e47d2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -55,6 +55,12 @@ RES_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(XRES, x11 xext xextproto [resourceproto >= $RES_VERSION])
-
-+# Check for _XEatDataWords function that may be patched into older Xlib release
-+SAVE_LIBS="$LIBS"
-+LIBS="$XRES_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- AC_CONFIG_FILES([Makefile
- src/Makefile
- man/Makefile
-diff --git a/src/XRes.c b/src/XRes.c
-index 6091c96..ae86206 100644
---- a/src/XRes.c
-+++ b/src/XRes.c
-@@ -12,7 +12,18 @@
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/XResproto.h>
- #include <X11/extensions/XRes.h>
-+#include <limits.h>
-
-+#ifndef HAVE__XEATDATAWORDS
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-
- static XExtensionInfo _xres_ext_info_data;
- static XExtensionInfo *xres_ext_info = &_xres_ext_info_data;
-@@ -131,7 +142,7 @@ Status XResQueryClients (
- *num_clients = rep.num_clients;
- result = 1;
- } else {
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
- }
-
-@@ -183,7 +194,7 @@ Status XResQueryClientResources (
- *num_types = rep.num_types;
- result = 1;
- } else {
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
- }
-
---
-1.7.9.2
-
-From 3ec2db9eeb9ba8fb561802b0c4b8bf79e321b7a2 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 12 Apr 2013 23:36:13 -0700
-Subject: [PATCH:libXRes 2/3] integer overflow in XResQueryClients()
- [CVE-2013-1988 1/2]
-
-The CARD32 rep.num_clients needs to be bounds checked before multiplying
-by sizeof(XResClient) to avoid integer overflow leading to underallocation
-and writing data from the network past the end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XRes.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/XRes.c b/src/XRes.c
-index ae86206..5117321 100644
---- a/src/XRes.c
-+++ b/src/XRes.c
-@@ -129,7 +129,12 @@ Status XResQueryClients (
- }
-
- if(rep.num_clients) {
-- if((clnts = Xmalloc(sizeof(XResClient) * rep.num_clients))) {
-+ if (rep.num_clients < (INT_MAX / sizeof(XResClient)))
-+ clnts = Xmalloc(sizeof(XResClient) * rep.num_clients);
-+ else
-+ clnts = NULL;
-+
-+ if (clnts != NULL) {
- xXResClient scratch;
- int i;
-
---
-1.7.9.2
-
-From ad156a716a324ee60362c8ba66a5ed8c835c219b Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 12 Apr 2013 23:36:13 -0700
-Subject: [PATCH:libXRes 3/3] integer overflow in XResQueryClientResources()
- [CVE-2013-1988 2/2]
-
-The CARD32 rep.num_types needs to be bounds checked before multiplying
-by sizeof(XResType) to avoid integer overflow leading to underallocation
-and writing data from the network past the end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XRes.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/XRes.c b/src/XRes.c
-index 5117321..ff21dd4 100644
---- a/src/XRes.c
-+++ b/src/XRes.c
-@@ -186,7 +186,12 @@ Status XResQueryClientResources (
- }
-
- if(rep.num_types) {
-- if((typs = Xmalloc(sizeof(XResType) * rep.num_types))) {
-+ if (rep.num_types < (INT_MAX / sizeof(XResType)))
-+ typs = Xmalloc(sizeof(XResType) * rep.num_types);
-+ else
-+ typs = NULL;
-+
-+ if (typs != NULL) {
- xXResType scratch;
- int i;
-
---
-1.7.9.2
-
--- a/open-src/lib/libXres/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXres/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,18 +29,18 @@
MODULE_NAME=libXres
# Version number (used in path names)
-MODULE_VERSION=1.0.6
+MODULE_VERSION=1.0.7
# Checksums for upstream tarball
-TARBALL_MD5 = 80d0c6d8522fa7a645e4f522e9a9cd20
-TARBALL_SHA1 = 31a9b7d4f7a978de36c6f1c867dced29bfe7ef0f
-TARBALL_SHA256= ff8661c925e8b182f98ae98f02bbd93c55259ef7f34a92c1a126b6074ebde890
+TARBALL_MD5 = 45ef29206a6b58254c81bea28ec6c95f
+TARBALL_SHA1 = 45e09c6b771af5d8c448ce31de65d15bf83b7579
+TARBALL_SHA256= 26899054aa87f81b17becc68e8645b240f140464cf90c42616ebb263ec5fa0e5
# Link with version mapfile
MODULE_LD_OPTIONS = -M $(PWD)/mapfile-vers
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = CVE-2013-1988.patch,-p1
+SOURCE_PATCHES =
# Library name (used for specfiles/mapfiles)
LIBNAME=XRes
--- a/open-src/lib/libXt/CVE-2013-2002.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-From 9264a21b688891dbdcee630ff72cf39aa75fc4e1 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 11:44:14 -0800
-Subject: [PATCH:libXt 2/3] unvalidated length in _XtResourceConfigurationEH
- [CVE-2013-2002]
-
-The RCM_DATA property is expected to be in the format:
- resource_length, resource, value
-
-If the property contains a resource_length thats results in a pointer
-outside the property string, memory corruption can occur.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/ResConfig.c | 41 ++++++++++++++++++++++++++---------------
- 1 file changed, 26 insertions(+), 15 deletions(-)
-
-diff --git a/src/ResConfig.c b/src/ResConfig.c
-index 68da536..1f3edbe 100644
---- a/src/ResConfig.c
-+++ b/src/ResConfig.c
-@@ -971,26 +971,37 @@ _XtResourceConfigurationEH (
- * resource and value fields.
- */
- if (data) {
-+ char *data_end = data + nitems;
-+ char *data_value;
-+
- resource_len = Strtoul ((void *)data, &data_ptr, 10);
-- data_ptr++;
-
-- data_ptr[resource_len] = '\0';
-+ if (data_ptr != (char *) data) {
-+ data_ptr++;
-+ data_value = data_ptr + resource_len;
-+ } else /* strtoul failed to convert a number */
-+ data_ptr = data_value = NULL;
-+
-+ if (data_value > data_ptr && data_value < data_end) {
-+ *data_value++ = '\0';
-
-- resource = XtNewString (data_ptr);
-- value = XtNewString (&data_ptr[resource_len + 1]);
-+ resource = XtNewString (data_ptr);
-+ value = XtNewString (data_value);
- #ifdef DEBUG
-- fprintf (stderr, "resource_len=%d\n",resource_len);
-- fprintf (stderr, "resource = %s\t value = %s\n",
-- resource, value);
-+ fprintf (stderr, "resource_len=%d\n"
-+ resource_len);
-+ fprintf (stderr, "resource = %s\t value = %s\n",
-+ resource, value);
- #endif
-- /*
-- * descend the application widget tree and
-- * apply the value to the appropriate widgets
-- */
-- _search_widget_tree (w, resource, value);
--
-- XtFree (resource);
-- XtFree (value);
-+ /*
-+ * descend the application widget tree and
-+ * apply the value to the appropriate widgets
-+ */
-+ _search_widget_tree (w, resource, value);
-+
-+ XtFree (resource);
-+ XtFree (value);
-+ }
- }
- }
-
---
-1.7.9.2
-
--- a/open-src/lib/libXt/CVE-2013-2005.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-From eae57493feec958bcf733ad0d334715107029f8b Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 11:29:21 -0800
-Subject: [PATCH:libXt 1/3] Unchecked return values of XGetWindowProperty
- [CVE-2013-2005]
-
-Multiple functions in Selection.c assumed that XGetWindowProperty() would
-always set the pointer to the property, but before libX11 1.6, it could
-fail to do so in some cases, leading to libXt freeing or operating on an
-uninitialized pointer value, so libXt should always initialize the pointers
-and check for failure itself.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Selection.c | 84 +++++++++++++++++++++++++++++++------------------------
- 1 file changed, 47 insertions(+), 37 deletions(-)
-
-diff --git a/src/Selection.c b/src/Selection.c
-index f35cb44..4f59d70 100644
---- a/src/Selection.c
-+++ b/src/Selection.c
-@@ -839,14 +839,16 @@ static void HandleSelectionEvents(
- IndirectPair *p;
- int format;
- unsigned long bytesafter, length;
-- unsigned char *value;
-+ unsigned char *value = NULL;
- ev.property = event->xselectionrequest.property;
- StartProtectedSection(ev.display, ev.requestor);
-- (void) XGetWindowProperty(ev.display, ev.requestor,
-+ if (XGetWindowProperty(ev.display, ev.requestor,
- event->xselectionrequest.property, 0L, 1000000,
- False,(Atom)AnyPropertyType, &target, &format, &length,
-- &bytesafter, &value);
-- count = BYTELENGTH(length, format) / sizeof(IndirectPair);
-+ &bytesafter, &value) == Success)
-+ count = BYTELENGTH(length, format) / sizeof(IndirectPair);
-+ else
-+ count = 0;
- for (p = (IndirectPair *)value; count; p++, count--) {
- EndProtectedSection(ctx->dpy);
- if (!GetConversion(ctx, (XSelectionRequestEvent*)event,
-@@ -1053,9 +1055,10 @@ static Boolean IsINCRtype(
-
- if (prop == None) return False;
-
-- (void)XGetWindowProperty(XtDisplay(info->widget), window, prop, 0L, 0L,
-- False, info->ctx->prop_list->incr_atom,
-- &type, &format, &length, &bytesafter, &value);
-+ if (XGetWindowProperty(XtDisplay(info->widget), window, prop, 0L, 0L,
-+ False, info->ctx->prop_list->incr_atom, &type,
-+ &format, &length, &bytesafter, &value) != Success)
-+ return False;
-
- return (type == info->ctx->prop_list->incr_atom);
- }
-@@ -1069,7 +1072,6 @@ static void ReqCleanup(
- {
- CallBackInfo info = (CallBackInfo)closure;
- unsigned long bytesafter, length;
-- char *value;
- int format;
- Atom target;
-
-@@ -1093,17 +1095,19 @@ static void ReqCleanup(
- (ev->xproperty.state == PropertyNewValue) &&
- (ev->xproperty.atom == info->property)) {
- XPropertyEvent *event = (XPropertyEvent *) ev;
-- (void) XGetWindowProperty(event->display, XtWindow(widget),
-- event->atom, 0L, 1000000, True, AnyPropertyType,
-- &target, &format, &length, &bytesafter,
-- (unsigned char **) &value);
-- XFree(value);
-- if (length == 0) {
-- XtRemoveEventHandler(widget, (EventMask) PropertyChangeMask, FALSE,
-- ReqCleanup, (XtPointer) info );
-- FreeSelectionProperty(XtDisplay(widget), info->property);
-- XtFree(info->value); /* requestor never got this, so free now */
-- FreeInfo(info);
-+ char *value = NULL;
-+ if (XGetWindowProperty(event->display, XtWindow(widget),
-+ event->atom, 0L, 1000000, True, AnyPropertyType,
-+ &target, &format, &length, &bytesafter,
-+ (unsigned char **) &value) == Success) {
-+ XFree(value);
-+ if (length == 0) {
-+ XtRemoveEventHandler(widget, (EventMask) PropertyChangeMask,
-+ FALSE, ReqCleanup, (XtPointer) info );
-+ FreeSelectionProperty(XtDisplay(widget), info->property);
-+ XtFree(info->value); /* requestor never got this, so free now */
-+ FreeInfo(info);
-+ }
- }
- }
- }
-@@ -1121,20 +1125,23 @@ static void ReqTimedOut(
- unsigned long bytesafter;
- unsigned long proplength;
- Atom type;
-- IndirectPair *pairs;
- XtPointer *c;
- int i;
-
- if (*info->target == info->ctx->prop_list->indirect_atom) {
-- (void) XGetWindowProperty(XtDisplay(info->widget),
-- XtWindow(info->widget), info->property, 0L,
-- 10000000, True, AnyPropertyType, &type, &format,
-- &proplength, &bytesafter, (unsigned char **) &pairs);
-- XFree((char*)pairs);
-- for (proplength = proplength / IndirectPairWordSize, i = 0, c = info->req_closure;
-- proplength; proplength--, c++, i++)
-- (*info->callbacks[i])(info->widget, *c,
-- &info->ctx->selection, &resulttype, value, &length, &format);
-+ IndirectPair *pairs = NULL;
-+ if (XGetWindowProperty(XtDisplay(info->widget), XtWindow(info->widget),
-+ info->property, 0L, 10000000, True,
-+ AnyPropertyType, &type, &format, &proplength,
-+ &bytesafter, (unsigned char **) &pairs)
-+ == Success) {
-+ XFree(pairs);
-+ for (proplength = proplength / IndirectPairWordSize, i = 0,
-+ c = info->req_closure;
-+ proplength; proplength--, c++, i++)
-+ (*info->callbacks[i])(info->widget, *c, &info->ctx->selection,
-+ &resulttype, value, &length, &format);
-+ }
- } else {
- (*info->callbacks[0])(info->widget, *info->req_closure,
- &info->ctx->selection, &resulttype, value, &length, &format);
-@@ -1280,12 +1287,13 @@ Boolean HandleNormal(
- unsigned long length;
- int format;
- Atom type;
-- unsigned char *value;
-+ unsigned char *value = NULL;
- int number = info->current;
-
-- (void) XGetWindowProperty(dpy, XtWindow(widget), property, 0L,
-- 10000000, False, AnyPropertyType,
-- &type, &format, &length, &bytesafter, &value);
-+ if (XGetWindowProperty(dpy, XtWindow(widget), property, 0L, 10000000,
-+ False, AnyPropertyType, &type, &format, &length,
-+ &bytesafter, &value) != Success)
-+ return FALSE;
-
- if (type == info->ctx->prop_list->incr_atom) {
- unsigned long size = IncrPropSize(widget, value, format, length);
-@@ -1370,7 +1378,6 @@ static void HandleSelectionReplies(
- Display *dpy = event->display;
- CallBackInfo info = (CallBackInfo) closure;
- Select ctx = info->ctx;
-- IndirectPair *pairs, *p;
- unsigned long bytesafter;
- unsigned long length;
- int format;
-@@ -1385,9 +1392,12 @@ static void HandleSelectionReplies(
- XtRemoveEventHandler(widget, (EventMask)0, TRUE,
- HandleSelectionReplies, (XtPointer) info );
- if (event->target == ctx->prop_list->indirect_atom) {
-- (void) XGetWindowProperty(dpy, XtWindow(widget), info->property, 0L,
-- 10000000, True, AnyPropertyType, &type, &format,
-- &length, &bytesafter, (unsigned char **) &pairs);
-+ IndirectPair *pairs = NULL, *p;
-+ if (XGetWindowProperty(dpy, XtWindow(widget), info->property, 0L,
-+ 10000000, True, AnyPropertyType, &type, &format,
-+ &length, &bytesafter, (unsigned char **) &pairs)
-+ != Success)
-+ length = 0;
- for (length = length / IndirectPairWordSize, p = pairs,
- c = info->req_closure;
- length; length--, p++, c++, info->current++) {
---
-1.7.9.2
-
--- a/open-src/lib/libXt/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXt/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -33,18 +33,17 @@
MODULE_PKGNAME_SET=yes
# Version number (used in path names)
-MODULE_VERSION=1.1.3
+MODULE_VERSION=1.1.4
# Checksums for upstream tarball
-TARBALL_MD5 = a6f137ae100e74ebe3b71eb4a38c40b3
-TARBALL_SHA1 = 2cef068bc4d7170e31b89b5c06aeaf4451a7699a
-TARBALL_SHA256= 8db593c3fc5ffc4e9cd854ba50af1eac9b90d66521ba17802b8f1e0d2d7f05bd
+TARBALL_MD5 = 03149823ae57bb02d0cec90d5b97d56c
+TARBALL_SHA1 = 0111c316d83fb7e830c517128150094cb0a48ae7
+TARBALL_SHA256= 843a97a988f5654872682a4120486d987d853a71651515472f55519ffae2dd57
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = 6671721.patch,-p1
-SOURCE_PATCHES += CVE-2013-2002.patch,-p1 CVE-2013-2005.patch,-p1
-# Regenerate configure script & Makefile.in's after applying patches
+# Regenerate configure script & Makefile.in's after patching in 6671721.patch
AUTORECONF=yes
# Work around libtool's interference
--- a/open-src/lib/libXtst/CVE-2013-2063.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-From 46ed6283034b5b7d14584009453f5d974cfacf1e Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 11:05:27 -0700
-Subject: [PATCH:libXtst 1/2] Use _XEatDataWords to eat data in error cases
-
-Avoids having to do calculcations based on response contents
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 6 ++++++
- src/XRecord.c | 23 +++++++++++++++++------
- 2 files changed, 23 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 7ef0153..d83d4d8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -47,6 +47,12 @@ XORG_CHECK_SGML_DOCTOOLS(1.8)
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(XTST, x11 [xext >= 1.0.99.4] xi [recordproto >= 1.13.99.1] [xextproto >= 7.0.99.3] inputproto)
-
-+# Check for _XEatDataWords function that may be patched into older Xlib release
-+SAVE_LIBS="$LIBS"
-+LIBS="$XTST_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- # Determine if the source for man pages is available
- # It may already be present (tarball) or can be generated using xmlto
- AM_CONDITIONAL([INSTALL_MANPAGES],
-diff --git a/src/XRecord.c b/src/XRecord.c
-index b65451c..ba628b6 100644
---- a/src/XRecord.c
-+++ b/src/XRecord.c
-@@ -49,6 +49,9 @@ from The Open Group.
- * By Stephen Gildea, X Consortium, and Martha Zimet, NCD.
- */
-
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
- #include <stdio.h>
- #include <assert.h>
- #include <X11/Xlibint.h>
-@@ -56,6 +59,18 @@ from The Open Group.
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/recordproto.h>
- #include <X11/extensions/record.h>
-+#include <limits.h>
-+
-+#ifndef HAVE__XEATDATAWORDS
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-
- static XExtensionInfo _xrecord_info_data;
- static XExtensionInfo *xrecord_info = &_xrecord_info_data;
-@@ -427,7 +442,7 @@ XRecordGetContext(Display *dpy, XRecordContext context,
-
- ret = (XRecordState*)Xmalloc(sizeof(XRecordState));
- if (!ret) {
-- /* XXX - eat data */
-+ _XEatDataWords (dpy, rep.length);
- UnlockDisplay(dpy);
- SyncHandle();
- return 0;
-@@ -446,11 +461,7 @@ XRecordGetContext(Display *dpy, XRecordContext context,
- }
- if (!client_inf || !client_inf_str)
- {
-- for(i = 0; i < count; i++)
-- {
-- _XEatData (dpy, sizeof(xRecordClientInfo));
-- _XEatData (dpy, SIZEOF(xRecordRange)); /* XXX - don't know how many */
-- }
-+ _XEatDataWords (dpy, rep.length);
- UnlockDisplay(dpy);
- XRecordFreeState(ret);
- SyncHandle();
---
-1.7.9.2
-
-From e7e04b7be3f018ad636aba3a36bfc1cd80b9906d Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 11:27:26 -0700
-Subject: [PATCH:libXtst 2/2] integer overflow in XRecordGetContext()
- [CVE-2013-2063]
-
-The nclients and nranges members of the reply are both CARD32 and need
-to be bounds checked before multiplying by the size of the structs to
-avoid integer overflow leading to underallocation and writing data from
-the network past the end of the allocated buffer.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XRecord.c | 32 +++++++++++++++++++++-----------
- 1 file changed, 21 insertions(+), 11 deletions(-)
-
-diff --git a/src/XRecord.c b/src/XRecord.c
-index ba628b6..5bbd5ac 100644
---- a/src/XRecord.c
-+++ b/src/XRecord.c
-@@ -420,11 +420,9 @@ XRecordGetContext(Display *dpy, XRecordContext context,
- XExtDisplayInfo *info = find_display (dpy);
- register xRecordGetContextReq *req;
- xRecordGetContextReply rep;
-- int count, i, rn;
-+ unsigned int count, i, rn;
- xRecordRange xrange;
-- XRecordRange *ranges = NULL;
- xRecordClientInfo xclient_inf;
-- XRecordClientInfo **client_inf, *client_inf_str = NULL;
- XRecordState *ret;
-
- XRecordCheckExtension (dpy, info, 0);
-@@ -454,13 +452,18 @@ XRecordGetContext(Display *dpy, XRecordContext context,
-
- if (count)
- {
-- client_inf = (XRecordClientInfo **) Xcalloc(count, sizeof(XRecordClientInfo*));
-- ret->client_info = client_inf;
-- if (client_inf != NULL) {
-- client_inf_str = (XRecordClientInfo *) Xmalloc(count*sizeof(XRecordClientInfo));
-+ XRecordClientInfo **client_inf = NULL;
-+ XRecordClientInfo *client_inf_str = NULL;
-+
-+ if (count < (INT_MAX / sizeof(XRecordClientInfo))) {
-+ client_inf = Xcalloc(count, sizeof(XRecordClientInfo *));
-+ if (client_inf != NULL)
-+ client_inf_str = Xmalloc(count * sizeof(XRecordClientInfo));
- }
-+ ret->client_info = client_inf;
- if (!client_inf || !client_inf_str)
- {
-+ free(client_inf);
- _XEatDataWords (dpy, rep.length);
- UnlockDisplay(dpy);
- XRecordFreeState(ret);
-@@ -476,11 +479,18 @@ XRecordGetContext(Display *dpy, XRecordContext context,
-
- if (xclient_inf.nRanges)
- {
-- client_inf_str[i].ranges = (XRecordRange**) Xcalloc(xclient_inf.nRanges, sizeof(XRecordRange*));
-- if (client_inf_str[i].ranges != NULL) {
-- ranges = (XRecordRange*)
-- Xmalloc(xclient_inf.nRanges * sizeof(XRecordRange));
-+ XRecordRange *ranges = NULL;
-+
-+ if (xclient_inf.nRanges < (INT_MAX / sizeof(XRecordRange))) {
-+ client_inf_str[i].ranges =
-+ Xcalloc(xclient_inf.nRanges, sizeof(XRecordRange *));
-+ if (client_inf_str[i].ranges != NULL)
-+ ranges =
-+ Xmalloc(xclient_inf.nRanges * sizeof(XRecordRange));
- }
-+ else
-+ client_inf_str[i].ranges = NULL;
-+
- if (!client_inf_str[i].ranges || !ranges) {
- /* XXX eat data */
- UnlockDisplay(dpy);
---
-1.7.9.2
-
--- a/open-src/lib/libXtst/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXtst/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,16 +29,15 @@
MODULE_NAME=libXtst
# Version number (used in path names)
-MODULE_VERSION=1.2.1
+MODULE_VERSION=1.2.2
# Checksums for upstream tarball
-TARBALL_MD5 = e8abc5c00c666f551cf26aa53819d592
-TARBALL_SHA1 = 44e19899f9938d3db5546e51c338d6f86d88cfe2
-TARBALL_SHA256= 7eea3e66e392aca3f9dad6238198753c28e1c32fa4903cbb7739607a2504e5e0
+TARBALL_MD5 = 25c6b366ac3dc7a12c5d79816ce96a59
+TARBALL_SHA1 = 7fd92a3c865c3c5e1cc724646babc3e1cdc799bc
+TARBALL_SHA256= ef0a7ffd577e5f1a25b1663b375679529663a1880151beaa73e9186c8309f6d9
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = solaris-abi.patch
-SOURCE_PATCHES += CVE-2013-2063.patch,-p1
# Need to regenerate automake files after solaris-abi.patch
AUTORECONF=yes
--- a/open-src/lib/libXv/CVE-2013-1989.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-From 79362c764a6df7e7fbe5247756bdbf60f3a58baf Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:28:34 -0700
-Subject: [PATCH:libXv 1/5] Use _XEatDataWords to avoid overflow of rep.length
- shifting
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 6 ++++++
- src/Xv.c | 22 +++++++++++++++++++---
- 2 files changed, 25 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5494b5d..6a335db 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -43,6 +43,12 @@ XORG_CHECK_MALLOC_ZERO
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(XV, x11 xext xextproto videoproto)
-
-+# Check for _XEatDataWords function that may be patched into older Xlib release
-+SAVE_LIBS="$LIBS"
-+LIBS="$XV_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- # Allow checking code with lint, sparse, etc.
- XORG_WITH_LINT
- XORG_LINT_LIBRARY([Xv])
-diff --git a/src/Xv.c b/src/Xv.c
-index b081e8a..5be1d95 100644
---- a/src/Xv.c
-+++ b/src/Xv.c
-@@ -49,11 +49,27 @@ SOFTWARE.
- **
- */
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
- #include <stdio.h>
- #include "Xvlibint.h"
- #include <X11/extensions/Xext.h>
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/XShm.h>
-+#include <limits.h>
-+
-+#ifndef HAVE__XEATDATAWORDS
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-
- static XExtensionInfo _xv_info_data;
- static XExtensionInfo *xv_info = &_xv_info_data;
-@@ -853,7 +869,7 @@ XvQueryPortAttributes(Display *dpy, XvPortID port, int *num)
- (*num)++;
- }
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay(dpy);
-@@ -923,7 +939,7 @@ XvImageFormatValues * XvListImageFormats (
- (*num)++;
- }
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay(dpy);
-@@ -976,7 +992,7 @@ XvImage * XvCreateImage (
- _XRead(dpy, (char*)(ret->pitches), rep.num_planes << 2);
- _XRead(dpy, (char*)(ret->offsets), rep.num_planes << 2);
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
-
- UnlockDisplay(dpy);
- SyncHandle();
---
-1.7.9.2
-
-From 6e1b743a276651195be3cd68dff41e38426bf3ab Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:03:03 -0700
-Subject: [PATCH:libXv 2/5] integer overflow in XvQueryPortAttributes()
- [CVE-2013-1989 1/3]
-
-The num_attributes & text_size members of the reply are both CARD32s
-and need to be bounds checked before multiplying & adding them together
-to come up with the total size to allocate, to avoid integer overflow
-leading to underallocation and writing data from the network past the
-end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xv.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/Xv.c b/src/Xv.c
-index 5be1d95..3cbad35 100644
---- a/src/Xv.c
-+++ b/src/Xv.c
-@@ -851,9 +851,15 @@ XvQueryPortAttributes(Display *dpy, XvPortID port, int *num)
- }
-
- if(rep.num_attributes) {
-- int size = (rep.num_attributes * sizeof(XvAttribute)) + rep.text_size;
-+ unsigned long size;
-+ /* limit each part to no more than one half the max size */
-+ if ((rep.num_attributes < ((INT_MAX / 2) / sizeof(XvAttribute))) &&
-+ (rep.text_size < (INT_MAX / 2))) {
-+ size = (rep.num_attributes * sizeof(XvAttribute)) + rep.text_size;
-+ ret = Xmalloc(size);
-+ }
-
-- if((ret = Xmalloc(size))) {
-+ if (ret != NULL) {
- char* marker = (char*)(&ret[rep.num_attributes]);
- xvAttributeInfo Info;
- int i;
---
-1.7.9.2
-
-From 15ab7dec17d686c38f2c82ac23a17cac5622322a Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:16:14 -0700
-Subject: [PATCH:libXv 3/5] buffer overflow in XvQueryPortAttributes()
- [CVE-2013-2066]
-
-Each attribute returned in the reply includes the number of bytes
-to read for its marker. We had been always trusting it, and never
-validating that it wouldn't cause us to write past the end of the
-buffer we allocated based on the reported text_size.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xv.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/Xv.c b/src/Xv.c
-index 3cbad35..f9813eb 100644
---- a/src/Xv.c
-+++ b/src/Xv.c
-@@ -864,14 +864,20 @@ XvQueryPortAttributes(Display *dpy, XvPortID port, int *num)
- xvAttributeInfo Info;
- int i;
-
-+ /* keep track of remaining room for text strings */
-+ size = rep.text_size;
-+
- for(i = 0; i < rep.num_attributes; i++) {
- _XRead(dpy, (char*)(&Info), sz_xvAttributeInfo);
- ret[i].flags = (int)Info.flags;
- ret[i].min_value = Info.min;
- ret[i].max_value = Info.max;
- ret[i].name = marker;
-- _XRead(dpy, marker, Info.size);
-- marker += Info.size;
-+ if (Info.size <= size) {
-+ _XRead(dpy, marker, Info.size);
-+ marker += Info.size;
-+ size -= Info.size;
-+ }
- (*num)++;
- }
- } else
---
-1.7.9.2
-
-From 59301c1b5095f7dc6359d5b396dbbcdee7038270 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:03:03 -0700
-Subject: [PATCH:libXv 4/5] integer overflow in XvListImageFormats()
- [CVE-2013-1989 2/3]
-
-num_formats is a CARD32 and needs to be bounds checked before multiplying
-by sizeof(XvImageFormatValues) to come up with the total size to allocate,
-to avoid integer overflow leading to underallocation and writing data from
-the network past the end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xv.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/Xv.c b/src/Xv.c
-index f9813eb..0a07d9d 100644
---- a/src/Xv.c
-+++ b/src/Xv.c
-@@ -918,9 +918,10 @@ XvImageFormatValues * XvListImageFormats (
- }
-
- if(rep.num_formats) {
-- int size = (rep.num_formats * sizeof(XvImageFormatValues));
-+ if (rep.num_formats < (INT_MAX / sizeof(XvImageFormatValues)))
-+ ret = Xmalloc(rep.num_formats * sizeof(XvImageFormatValues));
-
-- if((ret = Xmalloc(size))) {
-+ if (ret != NULL) {
- xvImageFormatInfo Info;
- int i;
-
---
-1.7.9.2
-
-From 50fc4cb18069cb9450a02c13f80223ef23511409 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:03:03 -0700
-Subject: [PATCH:libXv 5/5] integer overflow in XvCreateImage() [CVE-2013-1989
- 3/3]
-
-num_planes is a CARD32 and needs to be bounds checked before bit shifting
-and adding to sizeof(XvImage) to come up with the total size to allocate,
-to avoid integer overflow leading to underallocation and writing data from
-the network past the end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Xv.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/Xv.c b/src/Xv.c
-index 0a07d9d..f268f8e 100644
---- a/src/Xv.c
-+++ b/src/Xv.c
-@@ -992,7 +992,10 @@ XvImage * XvCreateImage (
- return NULL;
- }
-
-- if((ret = (XvImage*)Xmalloc(sizeof(XvImage) + (rep.num_planes << 3)))) {
-+ if (rep.num_planes < ((INT_MAX >> 3) - sizeof(XvImage)))
-+ ret = Xmalloc(sizeof(XvImage) + (rep.num_planes << 3));
-+
-+ if (ret != NULL) {
- ret->id = id;
- ret->width = rep.width;
- ret->height = rep.height;
---
-1.7.9.2
-
--- a/open-src/lib/libXv/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXv/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,15 @@
MODULE_NAME=libXv
# Version number (used in path names)
-MODULE_VERSION=1.0.7
+MODULE_VERSION=1.0.10
# Checksums for upstream tarball
-TARBALL_MD5 = 5e1ac203ccd3ce3e89755ed1fbe75b0b
-TARBALL_SHA1 = 49c87e0ccb999966b7b1b4e72cb927f05e0835bd
-TARBALL_SHA256= 5d664aeb641f8c867331a0c6b4574a5e7e420f00bf5fcefd874e8d003ea59010
+TARBALL_MD5 = e0af49d7d758b990e6fef629722d4aca
+TARBALL_SHA1 = 1e93df036bb2bb01e85b7c8886760affb33b8e88
+TARBALL_SHA256= 55fe92f8686ce8612e2c1bfaf58c057715534419da700bda8d517b1d97914525
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = CVE-2013-1989.patch,-p1
+SOURCE_PATCHES =
# Library name
LIBNAME=Xv
--- a/open-src/lib/libXvMC/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-Copyright (c) 2004 The Unichrome project. 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 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
-AUTHOR(S) OR COPYRIGHT HOLDER(S) 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.
-
-Author: Thomas Hellström (2004)
--- a/open-src/lib/libXvMC/CVE-2013-1990.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,368 +0,0 @@
-From cf1a1dc1b9ca34a29d0471da9389f8eae70ddbd9 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:47:57 -0700
-Subject: [PATCH:libXvMC 1/5] Use _XEatDataWords to avoid overflow of
- rep.length shifting
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 6 ++++++
- src/XvMC.c | 24 ++++++++++++++++++------
- 2 files changed, 24 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b44f80d..f9d59a1 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -42,6 +42,12 @@ XORG_CHECK_MALLOC_ZERO
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(XVMC, x11 xext xv xextproto videoproto)
-
-+# Check for _XEatDataWords function that may be patched into older Xlib release
-+SAVE_LIBS="$LIBS"
-+LIBS="$XVMC_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- # Checks for library functions.
- AC_CHECK_FUNCS([shmat])
-
-diff --git a/src/XvMC.c b/src/XvMC.c
-index 5a4cf0d..b3e97ec 100644
---- a/src/XvMC.c
-+++ b/src/XvMC.c
-@@ -16,6 +16,18 @@
- #include <sys/time.h>
- #include <X11/extensions/Xext.h>
- #include <X11/extensions/extutil.h>
-+#include <limits.h>
-+
-+#ifndef HAVE__XEATDATAWORDS
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-
- static XExtensionInfo _xvmc_info_data;
- static XExtensionInfo *xvmc_info = &_xvmc_info_data;
-@@ -134,7 +146,7 @@ XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num)
- surface_info[i].flags = sinfo.flags;
- }
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay (dpy);
-@@ -207,7 +219,7 @@ XvImageFormatValues * XvMCListSubpictureTypes (
- ret[i].scanline_order = Info.scanline_order;
- }
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay (dpy);
-@@ -278,7 +290,7 @@ Status _xvmc_create_context (
- _XRead(dpy, (char*)(*priv_data), rep.length << 2);
- *priv_count = rep.length;
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay (dpy);
-@@ -359,7 +371,7 @@ Status _xvmc_create_surface (
- _XRead(dpy, (char*)(*priv_data), rep.length << 2);
- *priv_count = rep.length;
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay (dpy);
-@@ -449,7 +461,7 @@ Status _xvmc_create_subpicture (
- _XRead(dpy, (char*)(*priv_data), rep.length << 2);
- *priv_count = rep.length;
- } else
-- _XEatData(dpy, rep.length << 2);
-+ _XEatDataWords(dpy, rep.length);
- }
-
- UnlockDisplay (dpy);
-@@ -579,7 +591,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
-
- } else {
-
-- _XEatData(dpy, realSize);
-+ _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
- SyncHandle ();
- return -1;
---
-1.7.9.2
-
-From 2712383813b26475dc6713888414d842be57f8ca Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:50:02 -0700
-Subject: [PATCH:libXvMC 2/5] integer overflow in XvMCListSurfaceTypes()
- [CVE-2013-1990 1/2]
-
-rep.num is a CARD32 and needs to be bounds checked before multiplying
-by sizeof(XvMCSurfaceInfo) to come up with the total size to allocate,
-to avoid integer overflow leading to underallocation and writing data from
-the network past the end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XvMC.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/XvMC.c b/src/XvMC.c
-index b3e97ec..5d8c2cf 100644
---- a/src/XvMC.c
-+++ b/src/XvMC.c
-@@ -123,8 +123,8 @@ XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num)
- }
-
- if(rep.num > 0) {
-- surface_info =
-- (XvMCSurfaceInfo*)Xmalloc(rep.num * sizeof(XvMCSurfaceInfo));
-+ if (rep.num < (INT_MAX / sizeof(XvMCSurfaceInfo)))
-+ surface_info = Xmalloc(rep.num * sizeof(XvMCSurfaceInfo));
-
- if(surface_info) {
- xvmcSurfaceInfo sinfo;
---
-1.7.9.2
-
-From 478d4e5873eeee2ebdce6673e4e3469816ab63b8 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:50:02 -0700
-Subject: [PATCH:libXvMC 3/5] integer overflow in XvMCListSubpictureTypes()
- [CVE-2013-1990 2/2]
-
-rep.num is a CARD32 and needs to be bounds checked before multiplying by
-sizeof(XvImageFormatValues) to come up with the total size to allocate,
-to avoid integer overflow leading to underallocation and writing data from
-the network past the end of the allocated buffer.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XvMC.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/XvMC.c b/src/XvMC.c
-index 5d8c2cf..8d602ec 100644
---- a/src/XvMC.c
-+++ b/src/XvMC.c
-@@ -184,8 +184,8 @@ XvImageFormatValues * XvMCListSubpictureTypes (
- }
-
- if(rep.num > 0) {
-- ret =
-- (XvImageFormatValues*)Xmalloc(rep.num * sizeof(XvImageFormatValues));
-+ if (rep.num < (INT_MAX / sizeof(XvImageFormatValues)))
-+ ret = Xmalloc(rep.num * sizeof(XvImageFormatValues));
-
- if(ret) {
- xvImageFormatInfo Info;
---
-1.7.9.2
-
-From 5fd871e5f878810f8f8837725d548e07e89577ab Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 00:50:02 -0700
-Subject: [PATCH:libXvMC 4/5] integer overflow in _xvmc_create_*()
-
-rep.length is a CARD32 and should be bounds checked before left-shifting
-by 2 bits to come up with the total size to allocate, though in these
-cases, no buffer overflow should occur here, since the XRead call is passed
-the same rep.length << 2 length argument, but the *priv_count returned to
-the caller could be interpreted or used to calculate a larger buffer size
-than was actually allocated, leading them to go out of bounds.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XvMC.c | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/src/XvMC.c b/src/XvMC.c
-index 8d602ec..d8bc59d 100644
---- a/src/XvMC.c
-+++ b/src/XvMC.c
-@@ -285,7 +285,8 @@ Status _xvmc_create_context (
- context->flags = rep.flags_return;
-
- if(rep.length) {
-- *priv_data = Xmalloc(rep.length << 2);
-+ if (rep.length < (INT_MAX >> 2))
-+ *priv_data = Xmalloc(rep.length << 2);
- if(*priv_data) {
- _XRead(dpy, (char*)(*priv_data), rep.length << 2);
- *priv_count = rep.length;
-@@ -366,7 +367,8 @@ Status _xvmc_create_surface (
- }
-
- if(rep.length) {
-- *priv_data = Xmalloc(rep.length << 2);
-+ if (rep.length < (INT_MAX >> 2))
-+ *priv_data = Xmalloc(rep.length << 2);
- if(*priv_data) {
- _XRead(dpy, (char*)(*priv_data), rep.length << 2);
- *priv_count = rep.length;
-@@ -456,7 +458,8 @@ Status _xvmc_create_subpicture (
- subpicture->component_order[3] = rep.component_order[3];
-
- if(rep.length) {
-- *priv_data = Xmalloc(rep.length << 2);
-+ if (rep.length < (INT_MAX >> 2))
-+ *priv_data = Xmalloc(rep.length << 2);
- if(*priv_data) {
- _XRead(dpy, (char*)(*priv_data), rep.length << 2);
- *priv_count = rep.length;
---
-1.7.9.2
-
-From e9415ddef2ac81d4139bd32d5e9cda9394a60051 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 01:20:08 -0700
-Subject: [PATCH:libXvMC 5/5] Multiple unvalidated assumptions in
- XvMCGetDRInfo() [CVE-2013-1999]
-
-The individual string sizes is assumed to not be more than the amount of
-data read from the network, and could cause buffer overflow if they are.
-
-The strings returned from the X server are assumed to be null terminated,
-and could cause callers to read past the end of the buffer if they are not.
-
-Also be sure to set the returned pointers to NULL, so callers don't try
-accessing bad pointers on failure cases.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XvMC.c | 36 +++++++++++++++++++-----------------
- 1 file changed, 19 insertions(+), 17 deletions(-)
-
-diff --git a/src/XvMC.c b/src/XvMC.c
-index d8bc59d..cb42487 100644
---- a/src/XvMC.c
-+++ b/src/XvMC.c
-@@ -499,7 +499,6 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
- XExtDisplayInfo *info = xvmc_find_display(dpy);
- xvmcGetDRInfoReply rep;
- xvmcGetDRInfoReq *req;
-- char *tmpBuf = NULL;
- CARD32 magic;
-
- #ifdef HAVE_SHMAT
-@@ -510,6 +509,9 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
- here.tz_dsttime = 0;
- #endif
-
-+ *name = NULL;
-+ *busID = NULL;
-+
- XvMCCheckExtension (dpy, info, BadImplementation);
-
- LockDisplay (dpy);
-@@ -568,31 +570,31 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
- #endif
-
- if (rep.length > 0) {
--
-- int realSize = rep.length << 2;
--
-- tmpBuf = (char *) Xmalloc(realSize);
-- if (tmpBuf) {
-- *name = (char *) Xmalloc(rep.nameLen);
-- if (*name) {
-- *busID = (char *) Xmalloc(rep.busIDLen);
-- if (! *busID) {
-- XFree(*name);
-- XFree(tmpBuf);
-- }
-- } else {
-- XFree(tmpBuf);
-+ unsigned long realSize = 0;
-+ char *tmpBuf = NULL;
-+
-+ if (rep.length < (INT_MAX >> 2)) {
-+ realSize = rep.length << 2;
-+ if (realSize >= (rep.nameLen + rep.busIDLen)) {
-+ tmpBuf = Xmalloc(realSize);
-+ *name = Xmalloc(rep.nameLen);
-+ *busID = Xmalloc(rep.busIDLen);
- }
- }
-
- if (*name && *busID && tmpBuf) {
--
- _XRead(dpy, tmpBuf, realSize);
- strncpy(*name,tmpBuf,rep.nameLen);
-+ name[rep.nameLen - 1] = '\0';
- strncpy(*busID,tmpBuf+rep.nameLen,rep.busIDLen);
-+ busID[rep.busIDLen - 1] = '\0';
- XFree(tmpBuf);
--
- } else {
-+ XFree(*name);
-+ *name = NULL;
-+ XFree(*busID);
-+ *name = NULL;
-+ XFree(tmpBuf);
-
- _XEatDataWords(dpy, rep.length);
- UnlockDisplay (dpy);
---
-1.7.9.2
-
-From 8c164524d229adb6141fdac8336b3823e7fe1a5d Mon Sep 17 00:00:00 2001
-From: Dave Airlie <[email protected]>
-Date: Fri, 24 May 2013 14:47:30 +1000
-Subject: [PATCH:libXvMC] Multiple unvalidated patches in CVE-2013-1999
-
-Al Viro pointed out that Debian started segfaulting in Xine for him,
-
-Reported-by: Al Viro
-Signed-off-by: Dave Airlie <[email protected]>
----
- src/XvMC.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/XvMC.c b/src/XvMC.c
-index cb42487..74c8b85 100644
---- a/src/XvMC.c
-+++ b/src/XvMC.c
-@@ -585,15 +585,15 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
- if (*name && *busID && tmpBuf) {
- _XRead(dpy, tmpBuf, realSize);
- strncpy(*name,tmpBuf,rep.nameLen);
-- name[rep.nameLen - 1] = '\0';
-+ (*name)[rep.nameLen - 1] = '\0';
- strncpy(*busID,tmpBuf+rep.nameLen,rep.busIDLen);
-- busID[rep.busIDLen - 1] = '\0';
-+ (*busID)[rep.busIDLen - 1] = '\0';
- XFree(tmpBuf);
- } else {
- XFree(*name);
- *name = NULL;
- XFree(*busID);
-- *name = NULL;
-+ *busID = NULL;
- XFree(tmpBuf);
-
- _XEatDataWords(dpy, rep.length);
---
-1.7.9.2
-
--- a/open-src/lib/libXvMC/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXvMC/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,15 @@
MODULE_NAME=libXvMC
# Version number (used in path names)
-MODULE_VERSION=1.0.7
+MODULE_VERSION=1.0.8
# Checksums for upstream tarball
-TARBALL_MD5 = 3340c99ff556ea2457b4be47f5cb96fa
-TARBALL_SHA1 = b8ee482514dfdf226694c830bdf292cc14e1cb91
-TARBALL_SHA256= 28f085fc8518a3dadfe355360705d50153051f09898093e69af806c0b437cea3
+TARBALL_MD5 = 2e4014e9d55c430e307999a6b3dd256d
+TARBALL_SHA1 = b0fa592cd615aa41290cb8d6f97e6ed53dd21bca
+TARBALL_SHA256= 5e1a401efa433f959d41e17932b8c218c56b931348f494b8fa4656d7d798b204
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = CVE-2013-1990.patch,-p1
+SOURCE_PATCHES =
# Library name
LIBNAME=XvMC
--- a/open-src/lib/libXxf86vm/CVE-2013-2001.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-From 284a88e21fc05a63466115b33efa411c60d988c9 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 14:24:12 -0700
-Subject: [PATCH:libXxf86vm 1/3] Use _XEatDataWords to avoid overflow of
- length calculations
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 6 ++++++
- src/XF86VMode.c | 35 +++++++++++++++++++++++++----------
- 2 files changed, 31 insertions(+), 10 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index d8a23b0..b637788 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -22,6 +22,12 @@ XORG_CHECK_MALLOC_ZERO
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(XXF86VM, xproto x11 xextproto xext [xf86vidmodeproto >= 2.2.99.1])
-
-+# Check for _XEatDataWords function that may be patched into older Xlib release
-+SAVE_LIBS="$LIBS"
-+LIBS="$XXF86VM_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
- AC_CONFIG_FILES([Makefile
- src/Makefile
- man/Makefile
-diff --git a/src/XF86VMode.c b/src/XF86VMode.c
-index 1b907f4..bd54937 100644
---- a/src/XF86VMode.c
-+++ b/src/XF86VMode.c
-@@ -30,11 +30,27 @@ from Kaleb S. KEITHLEY.
-
- /* THIS IS NOT AN X CONSORTIUM STANDARD */
-
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
- #include <X11/Xlibint.h>
- #include <X11/extensions/xf86vmproto.h>
- #include <X11/extensions/xf86vmode.h>
- #include <X11/extensions/Xext.h>
- #include <X11/extensions/extutil.h>
-+#include <limits.h>
-+
-+#ifndef HAVE__XEATDATAWORDS
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-
- #ifdef DEBUG
- #include <stdio.h>
-@@ -257,7 +273,8 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock,
- if (modeline->privsize > 0) {
- modeline->private = Xcalloc(modeline->privsize, sizeof(INT32));
- if (modeline->private == NULL) {
-- _XEatData(dpy, (modeline->privsize) * sizeof(INT32));
-+ _XEatDataWords(dpy, rep.length -
-+ ((SIZEOF(xXF86VidModeGetModeLineReply) - SIZEOF(xReply)) >> 2));
- result = False;
- } else
- _XRead(dpy, (char*)modeline->private, modeline->privsize * sizeof(INT32));
-@@ -318,10 +335,8 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount,
- if (!(modelines = (XF86VidModeModeInfo **) Xcalloc(rep.modecount,
- sizeof(XF86VidModeModeInfo *)
- +sizeof(XF86VidModeModeInfo)))) {
-- if (majorVersion < 2)
-- _XEatData(dpy, (rep.modecount) * sizeof(xXF86OldVidModeModeInfo));
-- else
-- _XEatData(dpy, (rep.modecount) * sizeof(xXF86VidModeModeInfo));
-+ _XEatDataWords(dpy, rep.length -
-+ ((SIZEOF(xXF86VidModeGetAllModeLinesReply) - SIZEOF(xReply)) >> 2));
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
-@@ -354,7 +369,7 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount,
- if (oldxmdline.privsize > 0) {
- if (!(modelines[i]->private =
- Xcalloc(oldxmdline.privsize, sizeof(INT32)))) {
-- _XEatData(dpy, (oldxmdline.privsize) * sizeof(INT32));
-+ _XEatDataWords(dpy, oldxmdline.privsize);
- } else {
- _XRead(dpy, (char*)modelines[i]->private,
- oldxmdline.privsize * sizeof(INT32));
-@@ -384,7 +399,7 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount,
- if (xmdline.privsize > 0) {
- if (!(modelines[i]->private =
- Xcalloc(xmdline.privsize, sizeof(INT32)))) {
-- _XEatData(dpy, (xmdline.privsize) * sizeof(INT32));
-+ _XEatDataWords(dpy, xmdline.privsize);
- } else {
- _XRead(dpy, (char*)modelines[i]->private,
- xmdline.privsize * sizeof(INT32));
-@@ -902,8 +917,7 @@ XF86VidModeGetMonitor(Display* dpy, int screen, XF86VidModeMonitor* monitor)
- monitor->hsync = monitor->vsync = NULL;
- }
- if (result == False) {
-- _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 +
-- ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
-+ _XEatDataWords(dpy, rep.length);
- Xfree(monitor->vendor);
- monitor->vendor = NULL;
- Xfree(monitor->model);
-@@ -1036,7 +1050,8 @@ XF86VidModeGetDotClocks(Display* dpy, int screen, int *flagsPtr,
-
- dotclocks = Xcalloc(rep.clocks, sizeof(int));
- if (dotclocks == NULL) {
-- _XEatData(dpy, (rep.clocks) * 4);
-+ _XEatDataWords(dpy, rep.length -
-+ ((SIZEOF(xXF86VidModeGetDotClocksReply) - SIZEOF(xReply)) >> 2));
- result = False;
- }
- else {
---
-1.7.9.2
-
-From 47bb28ac0e6e49d3b6eb90c7c215f2fcf54f1a95 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 14:33:32 -0700
-Subject: [PATCH:libXxf86vm 2/3] memory corruption in
- XF86VidModeGetGammaRamp() [CVE-2013-2001]
-
-We trusted the server not to return more data than the client said it had
-allocated room for, and would overflow the provided buffers if it did.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XF86VMode.c | 21 +++++++++++++--------
- 1 file changed, 13 insertions(+), 8 deletions(-)
-
-diff --git a/src/XF86VMode.c b/src/XF86VMode.c
-index bd54937..a32564e 100644
---- a/src/XF86VMode.c
-+++ b/src/XF86VMode.c
-@@ -1110,6 +1110,7 @@ XF86VidModeGetGammaRamp (
- XExtDisplayInfo *info = find_display (dpy);
- xXF86VidModeGetGammaRampReq *req;
- xXF86VidModeGetGammaRampReply rep;
-+ Bool result = True;
-
- XF86VidModeCheckExtension (dpy, info, False);
-
-@@ -1120,19 +1121,23 @@ XF86VidModeGetGammaRamp (
- req->screen = screen;
- req->size = size;
- if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) {
-- UnlockDisplay (dpy);
-- SyncHandle ();
-- return False;
-+ result = False;
- }
-- if(rep.size) {
-- _XRead(dpy, (char*)red, rep.size << 1);
-- _XRead(dpy, (char*)green, rep.size << 1);
-- _XRead(dpy, (char*)blue, rep.size << 1);
-+ else if (rep.size) {
-+ if (rep.size <= size) {
-+ _XRead(dpy, (char*)red, rep.size << 1);
-+ _XRead(dpy, (char*)green, rep.size << 1);
-+ _XRead(dpy, (char*)blue, rep.size << 1);
-+ }
-+ else {
-+ _XEatDataWords(dpy, rep.length);
-+ result = False;
-+ }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-- return True;
-+ return result;
- }
-
- Bool XF86VidModeGetGammaRampSize(
---
-1.7.9.2
-
-From 4c4123441e40da97acd10f58911193ad3dcef5cd Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 14:43:48 -0700
-Subject: [PATCH:libXxf86vm 3/3] avoid integer overflow in
- XF86VidModeGetModeLine()
-
-rep.privsize is a CARD32 and needs to be bounds checked before multiplying
-by sizeof(INT32) to come up with the total size to allocate & read to avoid
-integer overflow, though it would not result in buffer overflow as the same
-calculation was used for both allocation & reading from the network.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/XF86VMode.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/XF86VMode.c b/src/XF86VMode.c
-index a32564e..fb94816 100644
---- a/src/XF86VMode.c
-+++ b/src/XF86VMode.c
-@@ -271,7 +271,10 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock,
- }
-
- if (modeline->privsize > 0) {
-- modeline->private = Xcalloc(modeline->privsize, sizeof(INT32));
-+ if (modeline->privsize < (INT_MAX / sizeof(INT32)))
-+ modeline->private = Xcalloc(modeline->privsize, sizeof(INT32));
-+ else
-+ modeline->private = NULL;
- if (modeline->private == NULL) {
- _XEatDataWords(dpy, rep.length -
- ((SIZEOF(xXF86VidModeGetModeLineReply) - SIZEOF(xReply)) >> 2));
---
-1.7.9.2
-
--- a/open-src/lib/libXxf86vm/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libXxf86vm/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,15 +29,15 @@
MODULE_NAME=libXxf86vm
# Version number (used in path names)
-MODULE_VERSION=1.1.2
+MODULE_VERSION=1.1.3
# Checksums for upstream tarball
-TARBALL_MD5 = ffd93bcedd8b2b5aeabf184e7b91f326
-TARBALL_SHA1 = 57bbf3bb69a49f6a6dec515813394a383f85502f
-TARBALL_SHA256= a564172fb866b1b587bbccb7d041088931029845245e0d15c32ca7f1bb48fc84
+TARBALL_MD5 = e46f6ee4f4567349a3189044fe1bb712
+TARBALL_SHA1 = 5a307415da68e0b71abcf0cb9b5005f16a41ede8
+TARBALL_SHA256= da5e86c32ee2069b9e6d820e4c2e4242d4877cb155a2b2fbf2675a1480ec37b8
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = upstream-error-fixes.patch,-p1 CVE-2013-2001.patch,-p1
+SOURCE_PATCHES =
# Library name
LIBNAME=Xxf86vm
--- a/open-src/lib/libXxf86vm/upstream-error-fixes.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,331 +0,0 @@
-From ef95f1c3737d9efc7d97fb1784f80ef3540a846b Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 15:13:06 -0700
-Subject: [PATCH:libXxf86vm 1/8] When Xcalloc() returns NULL, you don't need
- to Xfree() it
-
-I have no words to explain how this ever happened.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XF86VMode.c | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/src/XF86VMode.c b/src/XF86VMode.c
-index 4f19cf3..c0e50e6 100644
---- a/src/XF86VMode.c
-+++ b/src/XF86VMode.c
-@@ -256,7 +256,6 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock,
- if (modeline->privsize > 0) {
- if (!(modeline->private = Xcalloc(modeline->privsize, sizeof(INT32)))) {
- _XEatData(dpy, (modeline->privsize) * sizeof(INT32));
-- Xfree(modeline->private);
- return False;
- }
- _XRead(dpy, (char*)modeline->private, modeline->privsize * sizeof(INT32));
-@@ -321,7 +320,6 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount,
- _XEatData(dpy, (rep.modecount) * sizeof(xXF86OldVidModeModeInfo));
- else
- _XEatData(dpy, (rep.modecount) * sizeof(xXF86VidModeModeInfo));
-- Xfree(modelines);
- return False;
- }
- mdinfptr = (XF86VidModeModeInfo *) (
-@@ -353,7 +351,6 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount,
- if (!(modelines[i]->private =
- Xcalloc(oldxmdline.privsize, sizeof(INT32)))) {
- _XEatData(dpy, (oldxmdline.privsize) * sizeof(INT32));
-- Xfree(modelines[i]->private);
- } else {
- _XRead(dpy, (char*)modelines[i]->private,
- oldxmdline.privsize * sizeof(INT32));
-@@ -384,7 +381,6 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount,
- if (!(modelines[i]->private =
- Xcalloc(xmdline.privsize, sizeof(INT32)))) {
- _XEatData(dpy, (xmdline.privsize) * sizeof(INT32));
-- Xfree(modelines[i]->private);
- } else {
- _XRead(dpy, (char*)modelines[i]->private,
- xmdline.privsize * sizeof(INT32));
-@@ -1039,7 +1035,6 @@ XF86VidModeGetDotClocks(Display* dpy, int screen, int *flagsPtr,
-
- if (!(dotclocks = (int*) Xcalloc(rep.clocks, sizeof(int)))) {
- _XEatData(dpy, (rep.clocks) * 4);
-- Xfree(dotclocks);
- return False;
- }
-
---
-1.7.9.2
-
-From a89b1ad3377bfef9bab52f15f98b00f6540d531a Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 17:40:24 -0700
-Subject: [PATCH:libXxf86vm 2/8] Improve error handling in
- XF86VidModeGetMonitor()
-
-Ensure that when we return an error we unlock the display first, and
-NULL out any pointers we freed in error cleanup.
-
-Instead of adding these fixes to every error check, instead combine
-the error handling cleanup into a single copy.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XF86VMode.c | 82 ++++++++++++++++++++++++++-----------------------------
- 1 file changed, 39 insertions(+), 43 deletions(-)
-
-diff --git a/src/XF86VMode.c b/src/XF86VMode.c
-index c0e50e6..165f8ba 100644
---- a/src/XF86VMode.c
-+++ b/src/XF86VMode.c
-@@ -856,6 +856,7 @@ XF86VidModeGetMonitor(Display* dpy, int screen, XF86VidModeMonitor* monitor)
- xXF86VidModeGetMonitorReq *req;
- CARD32 syncrange;
- int i;
-+ Bool result = True;
-
- XF86VidModeCheckExtension (dpy, info, False);
-
-@@ -875,63 +876,58 @@ XF86VidModeGetMonitor(Display* dpy, int screen, XF86VidModeMonitor* monitor)
- monitor->bandwidth = (float)rep.bandwidth / 1e6;
- #endif
- if (rep.vendorLength) {
-- if (!(monitor->vendor = (char *)Xcalloc(rep.vendorLength + 1, 1))) {
-- _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 +
-- ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
-- return False;
-- }
-+ monitor->vendor = Xcalloc(rep.vendorLength + 1, 1);
-+ if (monitor->vendor == NULL)
-+ result = False;
- } else {
- monitor->vendor = NULL;
- }
-- if (rep.modelLength) {
-- if (!(monitor->model = Xcalloc(rep.modelLength + 1, 1))) {
-- _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 +
-- ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
-- if (monitor->vendor)
-- Xfree(monitor->vendor);
-- return False;
-- }
-+ if (result && rep.modelLength) {
-+ monitor->model = Xcalloc(rep.modelLength + 1, 1);
-+ if (monitor->model == NULL)
-+ result = False;
- } else {
- monitor->model = NULL;
- }
-- if (!(monitor->hsync = Xcalloc(rep.nhsync, sizeof(XF86VidModeSyncRange)))) {
-- _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 +
-- ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
--
-- if (monitor->vendor)
-- Xfree(monitor->vendor);
-- if (monitor->model)
-- Xfree(monitor->model);
-- return False;
-+ if (result) {
-+ monitor->hsync = Xcalloc(rep.nhsync, sizeof(XF86VidModeSyncRange));
-+ monitor->vsync = Xcalloc(rep.nvsync, sizeof(XF86VidModeSyncRange));
-+ if ((monitor->hsync == NULL) || (monitor->vsync == NULL))
-+ result = False;
-+ } else {
-+ monitor->hsync = monitor->vsync = NULL;
- }
-- if (!(monitor->vsync = Xcalloc(rep.nvsync, sizeof(XF86VidModeSyncRange)))) {
-+ if (result == False) {
- _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 +
- ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
-- if (monitor->vendor)
-- Xfree(monitor->vendor);
-- if (monitor->model)
-- Xfree(monitor->model);
-+ Xfree(monitor->vendor);
-+ monitor->vendor = NULL;
-+ Xfree(monitor->model);
-+ monitor->model = NULL;
- Xfree(monitor->hsync);
-- return False;
-- }
-- for (i = 0; i < rep.nhsync; i++) {
-- _XRead(dpy, (char *)&syncrange, 4);
-- monitor->hsync[i].lo = (float)(syncrange & 0xFFFF) / 100.0;
-- monitor->hsync[i].hi = (float)(syncrange >> 16) / 100.0;
-+ monitor->hsync = NULL;
-+ Xfree(monitor->vsync);
-+ monitor->vsync = NULL;
- }
-- for (i = 0; i < rep.nvsync; i++) {
-- _XRead(dpy, (char *)&syncrange, 4);
-- monitor->vsync[i].lo = (float)(syncrange & 0xFFFF) / 100.0;
-- monitor->vsync[i].hi = (float)(syncrange >> 16) / 100.0;
-+ else {
-+ for (i = 0; i < rep.nhsync; i++) {
-+ _XRead(dpy, (char *)&syncrange, 4);
-+ monitor->hsync[i].lo = (float)(syncrange & 0xFFFF) / 100.0;
-+ monitor->hsync[i].hi = (float)(syncrange >> 16) / 100.0;
-+ }
-+ for (i = 0; i < rep.nvsync; i++) {
-+ _XRead(dpy, (char *)&syncrange, 4);
-+ monitor->vsync[i].lo = (float)(syncrange & 0xFFFF) / 100.0;
-+ monitor->vsync[i].hi = (float)(syncrange >> 16) / 100.0;
-+ }
-+ if (rep.vendorLength)
-+ _XReadPad(dpy, monitor->vendor, rep.vendorLength);
-+ if (rep.modelLength)
-+ _XReadPad(dpy, monitor->model, rep.modelLength);
- }
-- if (rep.vendorLength)
-- _XReadPad(dpy, monitor->vendor, rep.vendorLength);
-- if (rep.modelLength)
-- _XReadPad(dpy, monitor->model, rep.modelLength);
--
- UnlockDisplay(dpy);
- SyncHandle();
-- return True;
-+ return result;
- }
-
- Bool
---
-1.7.9.2
-
-From 8ed00bd0a7c44c7fece687e2566d920ea74ef809 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 17:52:12 -0700
-Subject: [PATCH:libXxf86vm 3/8] Unlock display before returning alloc error
- in XF86VidModeGetModeLine()
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XF86VMode.c | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/src/XF86VMode.c b/src/XF86VMode.c
-index 165f8ba..28c79c1 100644
---- a/src/XF86VMode.c
-+++ b/src/XF86VMode.c
-@@ -203,6 +203,7 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock,
- xXF86OldVidModeGetModeLineReply oldrep;
- xXF86VidModeGetModeLineReq *req;
- int majorVersion, minorVersion;
-+ Bool result = True;
-
- XF86VidModeCheckExtension (dpy, info, False);
- XF86VidModeQueryVersion(dpy, &majorVersion, &minorVersion);
-@@ -254,17 +255,18 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock,
- }
-
- if (modeline->privsize > 0) {
-- if (!(modeline->private = Xcalloc(modeline->privsize, sizeof(INT32)))) {
-+ modeline->private = Xcalloc(modeline->privsize, sizeof(INT32));
-+ if (modeline->private == NULL) {
- _XEatData(dpy, (modeline->privsize) * sizeof(INT32));
-- return False;
-- }
-- _XRead(dpy, (char*)modeline->private, modeline->privsize * sizeof(INT32));
-+ result = False;
-+ } else
-+ _XRead(dpy, (char*)modeline->private, modeline->privsize * sizeof(INT32));
- } else {
- modeline->private = NULL;
- }
- UnlockDisplay(dpy);
- SyncHandle();
-- return True;
-+ return result;
- }
-
- Bool
---
-1.7.9.2
-
-From 6c82906f25abcb0f8ec92bcdaf1872bd8b63ca5d Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 17:54:45 -0700
-Subject: [PATCH:libXxf86vm 4/8] Unlock display before returning alloc error
- in XF86VidModeGetAllModeLines()
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XF86VMode.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/XF86VMode.c b/src/XF86VMode.c
-index 28c79c1..76276b6 100644
---- a/src/XF86VMode.c
-+++ b/src/XF86VMode.c
-@@ -322,6 +322,8 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount,
- _XEatData(dpy, (rep.modecount) * sizeof(xXF86OldVidModeModeInfo));
- else
- _XEatData(dpy, (rep.modecount) * sizeof(xXF86VidModeModeInfo));
-+ UnlockDisplay(dpy);
-+ SyncHandle();
- return False;
- }
- mdinfptr = (XF86VidModeModeInfo *) (
---
-1.7.9.2
-
-From d0355b28dd53fba6fb29c350e090ed4a73d4c480 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 13 Apr 2013 17:58:28 -0700
-Subject: [PATCH:libXxf86vm 5/8] Unlock display before returning alloc error
- in XF86VidModeGetDotClocks()
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
----
- src/XF86VMode.c | 17 ++++++++++-------
- 1 file changed, 10 insertions(+), 7 deletions(-)
-
-diff --git a/src/XF86VMode.c b/src/XF86VMode.c
-index 76276b6..1b907f4 100644
---- a/src/XF86VMode.c
-+++ b/src/XF86VMode.c
-@@ -1014,6 +1014,7 @@ XF86VidModeGetDotClocks(Display* dpy, int screen, int *flagsPtr,
- xXF86VidModeGetDotClocksReq *req;
- int i, *dotclocks;
- CARD32 dotclk;
-+ Bool result = True;
-
- XF86VidModeCheckExtension (dpy, info, False);
-
-@@ -1033,19 +1034,21 @@ XF86VidModeGetDotClocks(Display* dpy, int screen, int *flagsPtr,
- *maxclocksPtr = rep.maxclocks;
- *flagsPtr = rep.flags;
-
-- if (!(dotclocks = (int*) Xcalloc(rep.clocks, sizeof(int)))) {
-+ dotclocks = Xcalloc(rep.clocks, sizeof(int));
-+ if (dotclocks == NULL) {
- _XEatData(dpy, (rep.clocks) * 4);
-- return False;
-+ result = False;
- }
--
-- for (i = 0; i < rep.clocks; i++) {
-- _XRead(dpy, (char*)&dotclk, 4);
-- dotclocks[i] = dotclk;
-+ else {
-+ for (i = 0; i < rep.clocks; i++) {
-+ _XRead(dpy, (char*)&dotclk, 4);
-+ dotclocks[i] = dotclk;
-+ }
- }
- *clocksPtr = dotclocks;
- UnlockDisplay(dpy);
- SyncHandle();
-- return True;
-+ return result;
- }
-
- Bool
---
-1.7.9.2
-
--- a/open-src/lib/libdmx/CVE-2013-1992.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,290 +0,0 @@
-From f34f6f64698c3b957aadba7315bb13726e3d79b0 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 3 May 2013 23:10:47 -0700
-Subject: [PATCH:libdmx 1/4] Use _XEatDataWords to avoid overflow of
- rep.length bit shifting
-
-rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- configure.ac | 7 +++++++
- src/dmx.c | 17 +++++++++++++++++
- 2 files changed, 24 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 24e03fc..4629cf8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -43,6 +43,13 @@ XORG_CHECK_MALLOC_ZERO
- # Obtain compiler/linker options for depedencies
- PKG_CHECK_MODULES(DMX, x11 xext xextproto [dmxproto >= 2.2.99.1])
-
-+# Check for _XEatDataWords function that may be patched into older Xlib releases
-+SAVE_LIBS="$LIBS"
-+LIBS="$DMX_LIBS"
-+AC_CHECK_FUNCS([_XEatDataWords])
-+LIBS="$SAVE_LIBS"
-+
-+
- AC_CONFIG_FILES([Makefile
- src/Makefile
- man/Makefile
-diff --git a/src/dmx.c b/src/dmx.c
-index 201568e..e43d624 100644
---- a/src/dmx.c
-+++ b/src/dmx.c
-@@ -38,12 +38,16 @@
- * can be included in client applications by linking with the libdmx.a
- * library. */
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
- #include <X11/Xlibint.h>
- #include <X11/extensions/Xext.h>
- #define EXTENSION_PROC_ARGS void *
- #include <X11/extensions/extutil.h>
- #include <X11/extensions/dmxproto.h>
- #include <X11/extensions/dmxext.h>
-+#include <limits.h>
-
- static XExtensionInfo dmx_extension_info_data;
- static XExtensionInfo *dmx_extension_info = &dmx_extension_info_data;
-@@ -82,6 +86,19 @@ static XEXT_GENERATE_FIND_DISPLAY(find_display, dmx_extension_info,
-
- static XEXT_GENERATE_CLOSE_DISPLAY(close_display, dmx_extension_info)
-
-+#ifndef HAVE__XEATDATAWORDS
-+#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */
-+
-+static inline void _XEatDataWords(Display *dpy, unsigned long n)
-+{
-+# ifndef LONG64
-+ if (n >= (ULONG_MAX >> 2))
-+ _XIOError(dpy);
-+# endif
-+ _XEatData (dpy, n << 2);
-+}
-+#endif
-+
-
- /*****************************************************************************
- * *
---
-1.7.9.2
-
-From 78e11efe70d00063c830475eaaaa42f19380755d Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 13:48:28 -0800
-Subject: [PATCH:libdmx 2/4] integer overflow in DMXGetScreenAttributes()
- [CVE-2013-1992 1/3]
-
-If the server provided displayNameLength causes integer overflow
-when padding length is added, a smaller buffer would be allocated
-than the amount of data written to it.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/dmx.c | 17 +++++++++++++++--
- 1 file changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/src/dmx.c b/src/dmx.c
-index e43d624..15a6650 100644
---- a/src/dmx.c
-+++ b/src/dmx.c
-@@ -250,6 +250,7 @@ Bool DMXGetScreenAttributes(Display *dpy, int physical_screen,
- XExtDisplayInfo *info = find_display(dpy);
- xDMXGetScreenAttributesReply rep;
- xDMXGetScreenAttributesReq *req;
-+ Bool ret = False;
-
- DMXCheckExtension(dpy, info, False);
-
-@@ -264,7 +265,15 @@ Bool DMXGetScreenAttributes(Display *dpy, int physical_screen,
- SyncHandle();
- return False;
- }
-- attr->displayName = Xmalloc(rep.displayNameLength + 1 + 4 /* for pad */);
-+
-+ if (rep.displayNameLength < 1024)
-+ attr->displayName = Xmalloc(rep.displayNameLength + 1 + 4 /* for pad */);
-+ else
-+ attr->displayName = NULL; /* name length is unbelievable, reject */
-+ if (attr->displayName == NULL) {
-+ _XEatDataWords(dpy, rep.length);
-+ goto end;
-+ }
- _XReadPad(dpy, attr->displayName, rep.displayNameLength);
- attr->displayName[rep.displayNameLength] = '\0';
- attr->logicalScreen = rep.logicalScreen;
-@@ -280,9 +289,13 @@ Bool DMXGetScreenAttributes(Display *dpy, int physical_screen,
- attr->rootWindowYoffset = rep.rootWindowYoffset;
- attr->rootWindowXorigin = rep.rootWindowXorigin;
- attr->rootWindowYorigin = rep.rootWindowYorigin;
-+
-+ ret = True;
-+
-+ end:
- UnlockDisplay(dpy);
- SyncHandle();
-- return True;
-+ return ret;
- }
-
- static CARD32 _DMXGetScreenAttribute(int bit, DMXScreenAttributes *attr)
---
-1.7.9.2
-
-From b6fe1a7af34ea620e002fc453f9c5eacf7db3969 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 13:48:28 -0800
-Subject: [PATCH:libdmx 3/4] integer overflow in DMXGetWindowAttributes()
- [CVE-2013-1992 2/3]
-
-If the server provided screenCount causes integer overflow when
-multiplied by the size of each array element, a smaller buffer
-would be allocated than the amount of data written to it.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/dmx.c | 34 ++++++++++++++++++++++++++++------
- 1 file changed, 28 insertions(+), 6 deletions(-)
-
-diff --git a/src/dmx.c b/src/dmx.c
-index 15a6650..67434c8 100644
---- a/src/dmx.c
-+++ b/src/dmx.c
-@@ -524,6 +524,7 @@ Bool DMXGetWindowAttributes(Display *dpy, Window window,
- CARD32 *windows; /* Must match protocol size */
- XRectangle *pos; /* Must match protocol size */
- XRectangle *vis; /* Must match protocol size */
-+ Bool ret = False;
-
- DMXCheckExtension(dpy, info, False);
-
-@@ -538,11 +539,30 @@ Bool DMXGetWindowAttributes(Display *dpy, Window window,
- return False;
- }
-
-- /* FIXME: check for NULL? */
-- screens = Xmalloc(rep.screenCount * sizeof(*screens));
-- windows = Xmalloc(rep.screenCount * sizeof(*windows));
-- pos = Xmalloc(rep.screenCount * sizeof(*pos));
-- vis = Xmalloc(rep.screenCount * sizeof(*vis));
-+ /*
-+ * rep.screenCount is a CARD32 so could be as large as 2^32
-+ * The X11 protocol limits the total screen size to 64k x 64k,
-+ * and no screen can be smaller than a pixel. While technically
-+ * that means we could theoretically reach 2^32 screens, and that's
-+ * not even taking overlap into account, 64k seems far larger than
-+ * any reasonable configuration, so we limit to that to prevent both
-+ * integer overflow in the size calculations, and bad X server
-+ * responses causing massive memory allocation.
-+ */
-+ if (rep.screenCount < 65536) {
-+ screens = Xmalloc(rep.screenCount * sizeof(*screens));
-+ windows = Xmalloc(rep.screenCount * sizeof(*windows));
-+ pos = Xmalloc(rep.screenCount * sizeof(*pos));
-+ vis = Xmalloc(rep.screenCount * sizeof(*vis));
-+ } else {
-+ screens = windows = NULL;
-+ pos = vis = NULL;
-+ }
-+
-+ if (!screens || !windows || !pos || !vis) {
-+ _XEatDataWords(dpy, rep.length);
-+ goto end;
-+ }
-
- _XRead(dpy, (char *)screens, rep.screenCount * sizeof(*screens));
- _XRead(dpy, (char *)windows, rep.screenCount * sizeof(*windows));
-@@ -558,7 +578,9 @@ Bool DMXGetWindowAttributes(Display *dpy, Window window,
- inf->pos = pos[current];
- inf->vis = vis[current];
- }
-+ ret = True;
-
-+ end:
- Xfree(vis);
- Xfree(pos);
- Xfree(windows);
-@@ -566,7 +588,7 @@ Bool DMXGetWindowAttributes(Display *dpy, Window window,
-
- UnlockDisplay(dpy);
- SyncHandle();
-- return True;
-+ return ret;
- }
-
- /** If the DMXGetDesktopAttributes protocol request returns information
---
-1.7.9.2
-
-From 5074d9d64192bd04519a438062b7d5bf216d06ee Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sat, 9 Mar 2013 13:48:28 -0800
-Subject: [PATCH:libdmx 4/4] integer overflow in DMXGetInputAttributes()
- [CVE-2013-1992 3/3]
-
-If the server provided nameLength causes integer overflow
-when padding length is added, a smaller buffer would be allocated
-than the amount of data written to it.
-
-Reported-by: Ilja Van Sprundel <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/dmx.c | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/src/dmx.c b/src/dmx.c
-index 67434c8..d097062 100644
---- a/src/dmx.c
-+++ b/src/dmx.c
-@@ -723,6 +723,7 @@ Bool DMXGetInputAttributes(Display *dpy, int id, DMXInputAttributes *inf)
- xDMXGetInputAttributesReply rep;
- xDMXGetInputAttributesReq *req;
- char *buffer;
-+ Bool ret = False;
-
- DMXCheckExtension(dpy, info, False);
-
-@@ -737,6 +738,16 @@ Bool DMXGetInputAttributes(Display *dpy, int id, DMXInputAttributes *inf)
- return False;
- }
-
-+ if (rep.nameLength < 1024)
-+ buffer = Xmalloc(rep.nameLength + 1 + 4 /* for pad */);
-+ else
-+ buffer = NULL; /* name length is unbelievable, reject */
-+
-+ if (buffer == NULL) {
-+ _XEatDataWords(dpy, rep.length);
-+ goto end;
-+ }
-+
- switch (rep.inputType) {
- case 0: inf->inputType = DMXLocalInputType; break;
- case 1: inf->inputType = DMXConsoleInputType; break;
-@@ -748,13 +759,14 @@ Bool DMXGetInputAttributes(Display *dpy, int id, DMXInputAttributes *inf)
- inf->isCore = rep.isCore;
- inf->sendsCore = rep.sendsCore;
- inf->detached = rep.detached;
-- buffer = Xmalloc(rep.nameLength + 1 + 4 /* for pad */);
- _XReadPad(dpy, buffer, rep.nameLength);
- buffer[rep.nameLength] = '\0';
- inf->name = buffer;
-+ ret = True;
-+ end:
- UnlockDisplay(dpy);
- SyncHandle();
-- return True;
-+ return ret;
- }
-
- /** Add input. */
---
-1.7.9.2
-
--- a/open-src/lib/libdmx/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libdmx/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -29,18 +29,18 @@
MODULE_NAME=libdmx
# Version number (used in path names)
-MODULE_VERSION=1.1.2
+MODULE_VERSION=1.1.3
# Checksums for upstream tarball
-TARBALL_MD5 = 782ced3a9e754dfeb53a8a006a75eb1a
-TARBALL_SHA1 = 76956d4127ded2e6d1bb5746a6d1603ee23b442a
-TARBALL_SHA256= a7870b648a8768d65432af76dd11581ff69f3955118540d5967eb1eef43838ba
+TARBALL_MD5 = ba983eba5a9f05d152a0725b8e863151
+TARBALL_SHA1 = 0eeac14a06cffb04a1c78793563f233a8f8b79be
+TARBALL_SHA256= c97da36d2e56a2d7b6e4f896241785acc95e97eb9557465fd66ba2a155a7b201
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = CVE-2013-1992.patch,-p1
+SOURCE_PATCHES =
# Package metadata
-ORACLE_TPNO = 3811
+ORACLE_TPNO = 14484
# Library name (used for specfiles/mapfiles)
LIBNAME=dmx
--- a/open-src/lib/libfontenc/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libfontenc/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -32,12 +32,12 @@
MODULE_DESC = the libfontenc font encoding table parser & mapping library
# Version number (used in path names)
-MODULE_VERSION=1.1.1
+MODULE_VERSION=1.1.2
# Checksums for upstream tarball
-TARBALL_MD5 = a2a861f142c3b4367f14fc14239fc1f7
-TARBALL_SHA1 = 90bdd53d75585dd0f06ad7bc23faccd8a01bb733
-TARBALL_SHA256= de72812f1856bb63bd2226ec8c2e2301931d3c72bd0f08b0d63a0cdf0722017f
+TARBALL_MD5 = ad2919764933e075bb0361ad5caa3d19
+TARBALL_SHA1 = 2beffa0e9260c479b49f90f789318c7f9db2d41d
+TARBALL_SHA256= a9a4efed3359b2e80161bb66b65038fac145137fa134e71335264cbc23b02f62
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libglu/COPYING Mon Sep 30 13:26:39 2013 -0700
@@ -0,0 +1,30 @@
+--------------------------------------------------------------------
+
+ SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ Copyright (C) 1991-2000 Silicon Graphics, Inc. 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 including the dates of first publication and
+ either this permission notice or a reference to
+ http://oss.sgi.com/projects/FreeB/
+ 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
+ SILICON GRAPHICS, INC. 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.
+
+ Except as contained in this notice, the name of Silicon Graphics, Inc.
+ shall not be used in advertising or otherwise to promote the sale, use or
+ other dealings in this Software without prior written authorization from
+ Silicon Graphics, Inc.
+
--- a/open-src/lib/libpciaccess/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libpciaccess/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -28,24 +28,15 @@
MODULE_NAME=libpciaccess
# Version number (used in path names)
-MODULE_VERSION=0.13.1
+MODULE_VERSION=0.13.2
# Checksums for upstream tarball
-TARBALL_MD5 = 399a419ac6a54f0fc07c69c9bdf452dc
-TARBALL_SHA1 = ae4dcf27a1b52c6a1fd90b21165fbaecae34e8ac
-TARBALL_SHA256= 27ab68f645691a4ca258dcc9d131040586e134f9233ce079794496f6264da084
+TARBALL_MD5 = b7c0d3afce14eedca57312a3141ec13a
+TARBALL_SHA1 = 63df515a4c5d5a339a7c1f9e4baa6543efa3c7da
+TARBALL_SHA256= abab8c2b050afb89bc29280e9c6b50ec5867174960d88bfb81a01036ec20de19
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = \
- legacy-io.patch,-p1 \
- scanpci.man.patch \
- primary-vga.patch,-p1 \
- scanpci_64bit.patch,-p1 \
- sparc.patch \
- nexus_devlist.patch,-p1 \
- rom_and_scanpci.patch,-p1 \
- sparc_domain.patch,-p1 \
- probe_improve.patch,-p1
+SOURCE_PATCHES = scanpci.man.patch
# Library name
LIBNAME=libpciaccess
@@ -96,8 +87,6 @@
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = scanpci
-AUTORECONF=yes
-
include ../Makefile.inc
# We want to install scanpci, even though the upstream Makefile doesn't
--- a/open-src/lib/libpciaccess/legacy-io.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-From 1a75f838b0b0c1ec4f5b5c8200d5b9ebbded3165 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Wed, 18 Apr 2012 15:30:30 -0700
-Subject: [PATCH:libpciaccess] Solaris: Implement map_legacy & legacy_io
- functions
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/solx_devfs.c | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 135 insertions(+), 2 deletions(-)
-
-diff --git a/src/solx_devfs.c b/src/solx_devfs.c
-index 2079df0..4069dc2 100644
---- a/src/solx_devfs.c
-+++ b/src/solx_devfs.c
-@@ -1,6 +1,6 @@
- /*
- * (C) Copyright IBM Corporation 2006
-- * Copyright (c) 2007, 2009, 2011, Oracle and/or its affiliates.
-+ * Copyright (c) 2007, 2009, 2011, 2012, Oracle and/or its affiliates.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
-@@ -38,6 +38,11 @@
- #include <libdevinfo.h>
- #include "pci_tools.h"
-
-+#ifdef __x86
-+# include <sys/sysi86.h>
-+# include <sys/psw.h>
-+#endif
-+
- #include "pciaccess.h"
- #include "pciaccess_private.h"
-
-@@ -1122,7 +1127,125 @@ pci_device_solx_devfs_write( struct pci_device * dev, const void * data,
- return (err);
- }
-
-+static struct pci_io_handle *
-+pci_device_solx_devfs_open_legacy_io(struct pci_io_handle *ret,
-+ struct pci_device *dev,
-+ pciaddr_t base, pciaddr_t size)
-+{
-+#ifdef __x86
-+ if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) == 0) {
-+ ret->base = base;
-+ ret->size = size;
-+ return ret;
-+ }
-+#endif
-+ return NULL;
-+}
-+
-+static uint32_t
-+pci_device_solx_devfs_read32(struct pci_io_handle *handle, uint32_t reg)
-+{
-+#ifdef __x86
-+ uint16_t port = (uint16_t) (handle->base + reg);
-+ uint32_t ret;
-+ __asm__ __volatile__("inl %1,%0":"=a"(ret):"d"(port));
-+ return ret;
-+#else
-+ return *(uint32_t *)((uintptr_t)handle->memory + reg);
-+#endif
-+}
-
-+static uint16_t
-+pci_device_solx_devfs_read16(struct pci_io_handle *handle, uint32_t reg)
-+{
-+#ifdef __x86
-+ uint16_t port = (uint16_t) (handle->base + reg);
-+ uint16_t ret;
-+ __asm__ __volatile__("inw %1,%0":"=a"(ret):"d"(port));
-+ return ret;
-+#else
-+ return *(uint16_t *)((uintptr_t)handle->memory + reg);
-+#endif
-+}
-+
-+static uint8_t
-+pci_device_solx_devfs_read8(struct pci_io_handle *handle, uint32_t reg)
-+{
-+#ifdef __x86
-+ uint16_t port = (uint16_t) (handle->base + reg);
-+ uint8_t ret;
-+ __asm__ __volatile__("inb %1,%0":"=a"(ret):"d"(port));
-+ return ret;
-+#else
-+ return *(uint8_t *)((uintptr_t)handle->memory + reg);
-+#endif
-+}
-+
-+static void
-+pci_device_solx_devfs_write32(struct pci_io_handle *handle, uint32_t reg,
-+ uint32_t data)
-+{
-+#ifdef __x86
-+ uint16_t port = (uint16_t) (handle->base + reg);
-+ __asm__ __volatile__("outl %0,%1"::"a"(data), "d"(port));
-+#else
-+ *(uint16_t *)((uintptr_t)handle->memory + reg) = data;
-+#endif
-+}
-+
-+static void
-+pci_device_solx_devfs_write16(struct pci_io_handle *handle, uint32_t reg,
-+ uint16_t data)
-+{
-+#ifdef __x86
-+ uint16_t port = (uint16_t) (handle->base + reg);
-+ __asm__ __volatile__("outw %0,%1"::"a"(data), "d"(port));
-+#else
-+ *(uint8_t *)((uintptr_t)handle->memory + reg) = data;
-+#endif
-+}
-+
-+static void
-+pci_device_solx_devfs_write8(struct pci_io_handle *handle, uint32_t reg,
-+ uint8_t data)
-+{
-+#ifdef __x86
-+ uint16_t port = (uint16_t) (handle->base + reg);
-+ __asm__ __volatile__("outb %0,%1"::"a"(data), "d"(port));
-+#else
-+ *(uint32_t *)((uintptr_t)handle->memory + reg) = data;
-+#endif
-+}
-+
-+static int
-+pci_device_solx_devfs_map_legacy(struct pci_device *dev, pciaddr_t base,
-+ pciaddr_t size, unsigned map_flags,
-+ void **addr)
-+{
-+ int err;
-+ struct pci_device_mapping map = {
-+ .base = base,
-+ .size = size,
-+ .flags = map_flags,
-+ };
-+
-+ err = pci_device_solx_devfs_map_range(dev, &map);
-+ if (err == 0)
-+ *addr = map.memory;
-+ return err;
-+}
-+
-+static int
-+pci_device_solx_devfs_unmap_legacy(struct pci_device *dev,
-+ void *addr, pciaddr_t size)
-+{
-+ struct pci_device_mapping map = {
-+ .memory = addr,
-+ .size = size,
-+ };
-+
-+ return pci_device_generic_unmap_range(dev, &map);
-+}
-
- static const struct pci_system_methods solx_devfs_methods = {
- .destroy = pci_system_solx_devfs_destroy,
-@@ -1135,7 +1258,17 @@ static const struct pci_system_methods solx_devfs_methods = {
- .read = pci_device_solx_devfs_read,
- .write = pci_device_solx_devfs_write,
-
-- .fill_capabilities = pci_fill_capabilities_generic
-+ .fill_capabilities = pci_fill_capabilities_generic,
-+
-+ .open_legacy_io = pci_device_solx_devfs_open_legacy_io,
-+ .read32 = pci_device_solx_devfs_read32,
-+ .read16 = pci_device_solx_devfs_read16,
-+ .read8 = pci_device_solx_devfs_read8,
-+ .write32 = pci_device_solx_devfs_write32,
-+ .write16 = pci_device_solx_devfs_write16,
-+ .write8 = pci_device_solx_devfs_write8,
-+ .map_legacy = pci_device_solx_devfs_map_legacy,
-+ .unmap_legacy = pci_device_solx_devfs_unmap_legacy,
- };
-
- /*
---
-1.7.9.2
-
--- a/open-src/lib/libpciaccess/nexus_devlist.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-From: Mark Logan <[email protected]>
-Date: Tue, 28 Aug 2012 15:03:51 -0700
-Subject: Re: CR 7186363 Updated, P2 xserver/programs scanpci is core dumping on M5000
-
---- a/src/common_init.c Tue Aug 28 11:56:52 2012
-+++ b/src/common_init.c Tue Aug 28 11:56:52 2012
-@@ -112,15 +112,22 @@
- }
- }
-
-+#ifdef __sparc
-+ if ( pci_sys->methods->destroy != NULL ) {
-+ (*pci_sys->methods->destroy)();
-+ }
-+#endif
-+
- free( pci_sys->devices );
- pci_sys->devices = NULL;
- pci_sys->num_devices = 0;
- }
-
--
-+#ifndef __sparc
- if ( pci_sys->methods->destroy != NULL ) {
- (*pci_sys->methods->destroy)();
- }
-+#endif
-
- free( pci_sys );
- pci_sys = NULL;
---- a/src/solx_devfs.c Tue Aug 28 11:56:53 2012
-+++ b/src/solx_devfs.c Tue Aug 28 11:56:53 2012
-@@ -72,7 +72,7 @@
- char *dev_path;
- struct nexus *next;
- #ifdef __sparc
-- struct pci_device **devlist;
-+ size_t *devlist;
- volatile size_t num_allocated_elems;
- volatile size_t num_devices;
- #endif
-@@ -151,7 +151,8 @@
-
- for (nexus = nexus_list ; nexus != NULL ; nexus = nexus->next) {
- for (i = 0; i < nexus->num_devices; i++) {
-- if (nexus->devlist[i] == dev)
-+ size_t dev_idx = nexus->devlist[i];
-+ if (&pci_sys->devices[dev_idx].base == dev)
- return nexus;
- }
- }
-@@ -207,7 +208,8 @@
- int i;
-
- for (i = 0; i < nexus->num_devices; i++) {
-- dev = nexus->devlist[i];
-+ size_t dev_idx = nexus->devlist[i];
-+ dev = &pci_sys->devices[dev_idx].base;
- if (MAPPING_DEV_PATH(dev))
- di_devfs_path_free((char *) MAPPING_DEV_PATH(dev));
- }
-@@ -454,7 +456,8 @@
- * function number.
- */
-
-- pci_base = &pinfo->devices[pinfo->num_devices].base;
-+ size_t dev_idx = pinfo->num_devices;
-+ pci_base = &pinfo->devices[dev_idx].base;
-
- pci_base->domain = nexus->domain;
- pci_base->bus = prg_p->bus_no;
-@@ -477,7 +480,7 @@
- pci_base->subdevice_id = GET_CONFIG_VAL_16(PCI_CONF_SUBSYSID);
- pci_base->irq = GET_CONFIG_VAL_8(PCI_CONF_ILINE);
-
-- pinfo->devices[pinfo->num_devices].header_type
-+ pinfo->devices[dev_idx].header_type
- = GET_CONFIG_VAL_8(PCI_CONF_HEADER);
-
- #ifdef DEBUG
-@@ -508,19 +511,19 @@
- }
-
- #ifdef __sparc
-- nexus->devlist[nexus->num_devices++] = pci_base;
-+ nexus->devlist[nexus->num_devices++] = dev_idx;
-
- if (nexus->num_devices == nexus->num_allocated_elems) {
-- struct pci_device **new_devs;
-+ size_t *new_devs;
- size_t new_num_elems = nexus->num_allocated_elems * 2;
-
- new_devs = realloc(nexus->devlist,
-- new_num_elems * sizeof (struct pci_device *));
-+ new_num_elems * sizeof (size_t *));
- if (new_devs == NULL)
- return (rval);
- (void) memset(&new_devs[nexus->num_devices], 0,
- nexus->num_allocated_elems *
-- sizeof (struct pci_device *));
-+ sizeof (size_t *));
- nexus->num_allocated_elems = new_num_elems;
- nexus->devlist = new_devs;
- }
-@@ -714,7 +717,7 @@
-
- #ifdef __sparc
- if ((nexus->devlist = calloc(INITIAL_NUM_DEVICES,
-- sizeof (struct pci_device *))) == NULL) {
-+ sizeof (size_t *))) == NULL) {
- (void) fprintf(stderr, "Error allocating memory for nexus devlist: %s\n",
- strerror(errno));
- free (nexus);
--- a/open-src/lib/libpciaccess/primary-vga.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-diff --git a/src/pciaccess_private.h b/src/pciaccess_private.h
-index fea9c9f..6996f8d 100644
---- a/src/pciaccess_private.h
-+++ b/src/pciaccess_private.h
-@@ -146,6 +146,7 @@ struct pci_device_private {
- struct pci_device_mapping *mappings;
- unsigned num_mappings;
- /*@}*/
-+ int is_primary;
- };
-
-
-diff --git a/src/solx_devfs.c b/src/solx_devfs.c
-index 4069dc2..504de9e 100644
---- a/src/solx_devfs.c
-+++ b/src/solx_devfs.c
-@@ -796,6 +796,18 @@ pci_device_solx_devfs_probe( struct pci_device * dev )
- #ifdef __sparc
- di_minor_t minor;
- #endif
-+ int *prop;
-+ struct pci_device_private *priv =
-+ (struct pci_device_private *) dev;
-+
-+ priv->is_primary = 0;
-+
-+ if (di_prop_lookup_ints(DDI_DEV_T_ANY,
-+ args.node, "primary-controller", &prop) >= 1) {
-+ if (prop[0])
-+ priv->is_primary = 1;
-+
-+ }
-
- #ifdef __sparc
- if (minor = di_minor_next(args.node, DI_MINOR_NIL))
-@@ -850,22 +862,33 @@ pci_device_solx_devfs_probe( struct pci_device * dev )
- }
-
- /*
-- * Solaris has its own BAR index.
-+ * Each BAR address get its own region slot in sequence.
-+ * 32 bit BAR:
-+ * BAR 0x10 -> slot0, BAR 0x14 -> slot1...
-+ * 64 bit BAR:
-+ * BAR 0x10 -> slot0, BAR 0x18 -> slot2...,
-+ * slot1 is part of BAR 0x10
- * Linux give two region slot for 64 bit address.
- */
- for (i = 0; i < len; i = i + CELL_NUMS_1275) {
-
- reg = (pci_regspec_t *)®buf[i];
- ent = reg->pci_phys_hi & 0xff;
-+
-+ if (ent > PCI_CONF_BASE5) {
-+ fprintf(stderr, "error ent = %d\n", ent);
-+ break;
-+ }
- /*
- * G35 broken in BAR0
- */
-- ent = (ent - PCI_CONF_BASE0) >> 2;
-- if (ent >= 6) {
-- fprintf(stderr, "error ent = %d\n", ent);
-- break;
-- }
--
-+ if (ent < PCI_CONF_BASE0) {
-+ /*
-+ * VGA resource here and ignore it
-+ */
-+ break;
-+ } else
-+ ent = (ent - PCI_CONF_BASE0) >> 2;
- /*
- * non relocatable resource is excluded
- * such like 0xa0000, 0x3b0. If it is met,
-@@ -1127,6 +1150,15 @@ pci_device_solx_devfs_write( struct pci_device * dev, const void * data,
- return (err);
- }
-
-+static int pci_device_solx_devfs_boot_vga(struct pci_device *dev)
-+{
-+ struct pci_device_private *priv =
-+ (struct pci_device_private *) dev;
-+
-+ return (priv->is_primary);
-+
-+}
-+
- static struct pci_io_handle *
- pci_device_solx_devfs_open_legacy_io(struct pci_io_handle *ret,
- struct pci_device *dev,
-@@ -1259,6 +1291,7 @@ static const struct pci_system_methods solx_devfs_methods = {
- .write = pci_device_solx_devfs_write,
-
- .fill_capabilities = pci_fill_capabilities_generic,
-+ .boot_vga = pci_device_solx_devfs_boot_vga,
-
- .open_legacy_io = pci_device_solx_devfs_open_legacy_io,
- .read32 = pci_device_solx_devfs_read32,
--- a/open-src/lib/libpciaccess/probe_improve.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,623 +0,0 @@
---- a/src/solx_devfs.c Thu Jan 10 14:15:59 2013
-+++ b/src/solx_devfs.c Thu Jan 10 16:22:52 2013
-@@ -51,11 +51,6 @@
- #define INITIAL_NUM_DEVICES 256
- #define CELL_NUMS_1275 (sizeof(pci_regspec_t) / sizeof(uint_t))
-
--typedef union {
-- uint8_t bytes[16 * sizeof (uint32_t)];
-- uint32_t dwords[16];
--} pci_conf_hdr_t;
--
- typedef struct i_devnode {
- uint8_t bus;
- uint8_t dev;
-@@ -79,14 +74,17 @@
- struct pci_device_private * volatile devices;
- } probe_info_t;
-
--#ifdef __sparc
--typedef struct bdf_table_info {
-- int bus;
-- int dev;
-- int func;
--} bdf_table_info_t;
--#endif
-+typedef struct probe_args {
-+ probe_info_t *pinfo;
-+ nexus_t *nexus;
-+ int ret;
-+} probe_args_t;
-
-+typedef struct property_info {
-+ char *name;
-+ int value;
-+} property_info_t;
-+
- static nexus_t *nexus_list = NULL;
- #if !defined(__sparc)
- static int xsvc_fd = -1;
-@@ -94,9 +92,6 @@
-
- #ifdef __sparc
- static di_prom_handle_t di_phdl;
--static bdf_table_info_t *bdf_table = NULL;
--static size_t num_bdfs = 0;
--static size_t num_allocated_bdfs = 0;
- static size_t nexus_count = 0;
- #endif
-
-@@ -152,15 +147,6 @@
- return NULL;
- }
-
--#define GET_CONFIG_VAL_8(offset) (config_hdr.bytes[offset])
--#define GET_CONFIG_VAL_16(offset) \
-- (uint16_t) (GET_CONFIG_VAL_8(offset) + (GET_CONFIG_VAL_8(offset+1) << 8))
--#define GET_CONFIG_VAL_32(offset) \
-- (uint32_t) (GET_CONFIG_VAL_8(offset) + \
-- (GET_CONFIG_VAL_8(offset+1) << 8) + \
-- (GET_CONFIG_VAL_8(offset+2) << 16) + \
-- (GET_CONFIG_VAL_8(offset+3) << 24))
--
- /*
- * Release all the resources
- * Solaris version
-@@ -209,358 +195,111 @@
- #endif
-
-
--/*
-- * Retrieve first 16 dwords of device's config header, except for the first
-- * dword. First 16 dwords are defined by the PCI specification.
-- */
- static int
--get_config_header(int fd, uint8_t bus_no, uint8_t dev_no, uint8_t func_no,
-- pci_conf_hdr_t *config_hdr_p)
-+probe_device_node(di_node_t node, void *arg)
- {
-- pcitool_reg_t cfg_prg;
-- int i;
-- int rval = 0;
-+ int *retbuf = NULL;
-+ int len = 0, i;
-+ struct pci_device *pci_base;
-+ probe_info_t *pinfo = ((probe_args_t *)arg)->pinfo;
-+ nexus_t *nexus = ((probe_args_t *)arg)->nexus;
-+ property_info_t property_list[] = {
-+ "class-code", 0,
-+ "device-id", 0,
-+ "vendor-id", 0,
-+ "revision-id", 0,
-+ "subsystem-vendor-id", 0,
-+ "subsystem-id", 0,
-+ };
-+#define NUM_PROPERTIES sizeof(property_list)/sizeof(property_info_t)
-
-- /* Prepare a local pcitool_reg_t so as to not disturb the caller's. */
-- cfg_prg.offset = 0;
-- cfg_prg.acc_attr = PCITOOL_ACC_ATTR_SIZE_4 + NATIVE_ENDIAN;
-- cfg_prg.bus_no = bus_no;
-- cfg_prg.dev_no = dev_no;
-- cfg_prg.func_no = func_no;
-- cfg_prg.barnum = 0;
-- cfg_prg.user_version = PCITOOL_USER_VERSION;
-+ len = di_prop_lookup_ints(DDI_DEV_T_ANY, node, "reg", &retbuf);
-
-- /* Get dwords 1-15 of config space. They must be read as uint32_t. */
-- for (i = 1; i < (sizeof (pci_conf_hdr_t) / sizeof (uint32_t)); i++) {
-- cfg_prg.offset += sizeof (uint32_t);
-- if ((rval = ioctl(fd, PCITOOL_DEVICE_GET_REG, &cfg_prg)) != 0) {
-- break;
-- }
-- config_hdr_p->dwords[i] = (uint32_t)cfg_prg.data;
-- }
--
-- return (rval);
--}
--
- #ifdef __sparc
--static int
--create_bdf_table(di_node_t node, void *arg)
--{
-- int *regbuf = NULL;
-- int len = 0;
--
-- len = di_prop_lookup_ints(DDI_DEV_T_ANY, node, "reg", ®buf);
--
- if ((len <= 0) && di_phdl)
-- len = di_prom_prop_lookup_ints(di_phdl, node, "reg", ®buf);
-+ len = di_prom_prop_lookup_ints(di_phdl, node, "reg", &retbuf);
-+#endif
-
- /* Exclude usb devices */
- if (len < 5) {
-- return (DI_WALK_CONTINUE);
-+ return DI_WALK_CONTINUE;
- }
-
-- bdf_table[num_bdfs].bus = PCI_REG_BUS_G(regbuf[0]);
-- bdf_table[num_bdfs].dev = PCI_REG_DEV_G(regbuf[0]);
-- bdf_table[num_bdfs].func = PCI_REG_FUNC_G(regbuf[0]);
-+ pci_base = &pinfo->devices[pinfo->num_devices].base;
-
-- if (++num_bdfs == num_allocated_bdfs) {
-- bdf_table_info_t *new_bdfs;
-- size_t new_num_bdfs = num_allocated_bdfs * 2;
-+ pci_base->domain = nexus->domain;
-+ pci_base->bus = PCI_REG_BUS_G(retbuf[0]);
-+ pci_base->dev = PCI_REG_DEV_G(retbuf[0]);
-+ pci_base->func = PCI_REG_FUNC_G(retbuf[0]);
-
-- new_bdfs = realloc (bdf_table,
-- new_num_bdfs * sizeof (bdf_table_info_t));
-- if (new_bdfs == NULL)
-- return (DI_WALK_TERMINATE);
--
-- (void) memset(&new_bdfs[num_bdfs], 0,
-- num_allocated_bdfs *
-- sizeof (bdf_table_info_t));
-- num_allocated_bdfs = new_num_bdfs;
-- bdf_table = new_bdfs;
-- }
--
-- return (DI_WALK_CONTINUE);
--}
--#endif
--
--/*
-- * Probe device's functions. Modifies many fields in the prg_p.
-- */
--static int
--probe_dev(nexus_t *nexus, pcitool_reg_t *prg_p, probe_info_t *pinfo)
--{
-- pci_conf_hdr_t config_hdr;
-- boolean_t multi_function_device;
-- int8_t func;
-- int8_t first_func = 0;
-- int8_t last_func = PCI_REG_FUNC_M >> PCI_REG_FUNC_SHIFT;
-- int rval = 0;
-- struct pci_device * pci_base;
--
-- /*
-- * Loop through at least func=first_func. Continue looping through
-- * functions if there are no errors and the device is a multi-function
-- * device.
-- *
-- * (Note, if first_func == 0, header will show whether multifunction
-- * device and set multi_function_device. If first_func != 0, then we
-- * will force the loop as the user wants a specific function to be
-- * checked.
-- */
--
-- for (func = first_func, multi_function_device = B_FALSE;
-- ((func <= last_func) &&
-- ((func == first_func) || (multi_function_device)));
-- func++) {
-+ /* Get property values */
-+ for (i = 0; i < NUM_PROPERTIES; i++) {
-+ len = di_prop_lookup_ints(DDI_DEV_T_ANY, node,
-+ property_list[i].name, &retbuf);
- #ifdef __sparc
-- int i;
-+ if ((len <= 0) && di_phdl)
-+ len = di_prom_prop_lookup_ints(di_phdl, node,
-+ property_list[i].name, &retbuf);
- #endif
-
-- prg_p->func_no = func;
--
--#ifdef __sparc
-- /* Check validity of bdf */
-- for (i = 0; i < num_bdfs; i++) {
-- if ((bdf_table[i].bus == prg_p->bus_no) &&
-- (bdf_table[i].dev == prg_p->dev_no) &&
-- (bdf_table[i].func == prg_p->func_no))
-- break;
-+ if (len > 0)
-+ property_list[i].value = retbuf[0];
-+ else {
-+ /* a device must have property "class-code", "device-id", "vendor-id" */
-+ if (i < 3)
-+ return DI_WALK_CONTINUE;
-+#ifdef DEBUG
-+ fprintf(stderr, "cannot get property \"%s\" for nexus = %s :\n",
-+ property_list[i].name, nexus->path);
-+ fprintf(stderr, " domain = %x, busno = %x, devno = %x, funcno = %x\n",
-+ pci_base->domain, pci_base->bus, pci_base->dev, pci_base->func);
-+#endif
- }
-+ }
-
-- /* Skipping if bdf device not on devinfo tree */
-- if (i == num_bdfs) {
-- continue;
-- }
--#endif
--
-- /*
-- * Four things can happen here:
-- *
-- * 1) ioctl comes back as EFAULT and prg_p->status is
-- * PCITOOL_INVALID_ADDRESS. There is no device at this location.
-- *
-- * 2) ioctl comes back successful and the data comes back as
-- * zero. Config space is mapped but no device responded.
-- *
-- * 3) ioctl comes back successful and the data comes back as
-- * non-zero. We've found a device.
-- *
-- * 4) Some other error occurs in an ioctl.
-- */
-+ if ((property_list[1].value == 0) && (property_list[2].value == 0))
-+ return DI_WALK_CONTINUE;
-
-- prg_p->status = PCITOOL_SUCCESS;
-- prg_p->offset = 0;
-- prg_p->data = 0;
-- prg_p->user_version = PCITOOL_USER_VERSION;
-+ pci_base->device_class = property_list[0].value;
-+ pci_base->device_id = property_list[1].value;
-+ pci_base->vendor_id = property_list[2].value;
-+ pci_base->revision = property_list[3].value;
-+ pci_base->subvendor_id = property_list[4].value;
-+ pci_base->subdevice_id = property_list[5].value;
-
-- errno = 0;
-- if (((rval = ioctl(nexus->fd, PCITOOL_DEVICE_GET_REG, prg_p)) != 0) ||
-- (prg_p->data == 0xffffffff)) {
--
-- /*
-- * Accept errno == EINVAL along with status of
-- * PCITOOL_OUT_OF_RANGE because some systems
-- * don't implement the full range of config space.
-- * Leave the loop quietly in this case.
-- */
-- if ((errno == EINVAL) ||
-- (prg_p->status == PCITOOL_OUT_OF_RANGE)) {
-- break;
-- }
--
-- /*
-- * Exit silently with ENXIO as this means that there are
-- * no devices under the pci root nexus.
-- */
-- else if ((errno == ENXIO) &&
-- (prg_p->status == PCITOOL_IO_ERROR)) {
-- break;
-- }
--
-- /*
-- * Expect errno == EFAULT along with status of
-- * PCITOOL_INVALID_ADDRESS because there won't be
-- * devices at each stop. Quit on any other error.
-- */
-- else if (((errno != EFAULT) ||
-- (prg_p->status != PCITOOL_INVALID_ADDRESS)) &&
-- (prg_p->data != 0xffffffff)) {
--#ifdef __sparc
--/* on sparc, devices can be enumerated discontiguously. Do not quit */
-- rval = 0;
--#endif
-- break;
-- }
--
-- /*
-- * If no function at this location,
-- * just advance to the next function.
-- */
-- else {
-- rval = 0;
-- }
--
-- /*
-- * Data came back as 0.
-- * Treat as unresponsive device and check next device.
-- */
-- } else if (prg_p->data == 0) {
-- rval = 0;
-- break; /* Func loop. */
--
-- /* Found something. */
-- } else {
-- config_hdr.dwords[0] = (uint32_t)prg_p->data;
--
-- /* Get the rest of the PCI header. */
-- if ((rval = get_config_header(nexus->fd, prg_p->bus_no,
-- prg_p->dev_no, prg_p->func_no,
-- &config_hdr)) != 0) {
-- break;
-- }
--
-- /*
-- * Special case for the type of Southbridge found on
-- * Ultra-45 and other sun4u fire workstations.
-- */
-- if ((config_hdr.dwords[0] == U45_SB_DEVID_VID) &&
-- (config_hdr.dwords[2] == U45_SB_CLASS_RID)) {
-- rval = ECANCELED;
-- break;
-- }
--
-- /*
-- * Found one device with bus number, device number and
-- * function number.
-- */
--
-- pci_base = &pinfo->devices[pinfo->num_devices].base;
--
-- pci_base->domain = nexus->domain;
-- pci_base->bus = prg_p->bus_no;
-- pci_base->dev = prg_p->dev_no;
-- pci_base->func = func;
--
-- /*
-- * for the format of device_class, see struct pci_device;
-- */
--
-- pci_base->device_class =
-- (GET_CONFIG_VAL_8(PCI_CONF_BASCLASS) << 16) |
-- (GET_CONFIG_VAL_8(PCI_CONF_SUBCLASS) << 8) |
-- GET_CONFIG_VAL_8(PCI_CONF_PROGCLASS);
--
-- pci_base->revision = GET_CONFIG_VAL_8(PCI_CONF_REVID);
-- pci_base->vendor_id = GET_CONFIG_VAL_16(PCI_CONF_VENID);
-- pci_base->device_id = GET_CONFIG_VAL_16(PCI_CONF_DEVID);
-- pci_base->subvendor_id = GET_CONFIG_VAL_16(PCI_CONF_SUBVENID);
-- pci_base->subdevice_id = GET_CONFIG_VAL_16(PCI_CONF_SUBSYSID);
-- pci_base->irq = GET_CONFIG_VAL_8(PCI_CONF_ILINE);
--
-- pinfo->devices[pinfo->num_devices].header_type
-- = GET_CONFIG_VAL_8(PCI_CONF_HEADER);
--
- #ifdef DEBUG
-- fprintf(stderr,
-- "nexus = %s, busno = %x, devno = %x, funcno = %x\n",
-- nexus->path, prg_p->bus_no, prg_p->dev_no, func);
-+ fprintf(stderr,
-+ "nexus = %s, domain = %x, busno = %x, devno = %x, funcno = %x\n",
-+ nexus->path, pci_base->domain, pci_base->bus, pci_base->dev, pci_base->func);
- #endif
-
-- pinfo->num_devices++;
-- if (pinfo->num_devices == pinfo->num_allocated_elems) {
-- struct pci_device_private *new_devs;
-- size_t new_num_elems = pinfo->num_allocated_elems * 2;
-+ pinfo->num_devices++;
-+ if (pinfo->num_devices == pinfo->num_allocated_elems) {
-+ struct pci_device_private *new_devs;
-+ size_t new_num_elems = pinfo->num_allocated_elems * 2;
-
-- new_devs = realloc(pinfo->devices,
-- new_num_elems * sizeof (struct pci_device_private));
-- if (new_devs == NULL) {
-- (void) fprintf(stderr,
-- "Error allocating memory for PCI devices:"
-- " %s\n discarding additional devices\n",
-- strerror(errno));
-- return (rval);
-- }
-- (void) memset(&new_devs[pinfo->num_devices], 0,
-- pinfo->num_allocated_elems *
-- sizeof (struct pci_device_private));
-- pinfo->num_allocated_elems = new_num_elems;
-- pinfo->devices = new_devs;
-- }
--
-- /*
-- * Accommodate devices which state their
-- * multi-functionality only in their function 0 config
-- * space. Note multi-functionality throughout probing
-- * of all of this device's functions.
-- */
-- if (config_hdr.bytes[PCI_CONF_HEADER] & PCI_HEADER_MULTI) {
-- multi_function_device = B_TRUE;
-- }
-+ new_devs = realloc(pinfo->devices,
-+ new_num_elems * sizeof (struct pci_device_private));
-+ if (new_devs == NULL) {
-+ (void) fprintf(stderr,
-+ "Error allocating memory for PCI devices:"
-+ " %s\n discarding additional devices\n",
-+ strerror(errno));
-+ ((probe_args_t *)arg)->ret = 1;
-+ return (DI_WALK_TERMINATE);
- }
-+ (void) memset(&new_devs[pinfo->num_devices], 0,
-+ pinfo->num_allocated_elems *
-+ sizeof (struct pci_device_private));
-+ pinfo->num_allocated_elems = new_num_elems;
-+ pinfo->devices = new_devs;
- }
-
-- return (rval);
-+ return (DI_WALK_CONTINUE);
- }
-
-
- /*
-- * Solaris version
-- * Probe a given nexus config space for devices.
-- *
-- * fd is the file descriptor of the nexus.
-- * input_args contains commandline options as specified by the user.
-- */
--static int
--do_probe(nexus_t *nexus, probe_info_t *pinfo)
--{
-- pcitool_reg_t prg;
-- uint32_t bus;
-- uint8_t dev;
-- uint32_t last_bus = nexus->last_bus;
-- uint8_t last_dev = PCI_REG_DEV_M >> PCI_REG_DEV_SHIFT;
-- uint8_t first_bus = nexus->first_bus;
-- uint8_t first_dev = 0;
-- int rval = 0;
--
-- prg.barnum = 0; /* Config space. */
--
-- /* Must read in 4-byte quantities. */
-- prg.acc_attr = PCITOOL_ACC_ATTR_SIZE_4 + NATIVE_ENDIAN;
--
-- prg.data = 0;
--
-- /*
-- * Loop through all valid bus / dev / func combinations to check for
-- * all devices, with the following exceptions:
-- *
-- * When nothing is found at function 0 of a bus / dev combination, skip
-- * the other functions of that bus / dev combination.
-- *
-- * When a found device's function 0 is probed and it is determined that
-- * it is not a multifunction device, skip probing of that device's
-- * other functions.
-- */
-- for (bus = first_bus; ((bus <= last_bus) && (rval == 0)); bus++) {
-- prg.bus_no = (uint8_t)bus;
--
-- for (dev = first_dev; ((dev <= last_dev) && (rval == 0)); dev++) {
-- prg.dev_no = dev;
-- rval = probe_dev(nexus, &prg, pinfo);
-- }
--
-- /*
-- * Ultra-45 southbridge workaround:
-- * ECANCELED tells to skip to the next bus.
-- */
-- if (rval == ECANCELED) {
-- rval = 0;
-- }
-- }
--
-- return (rval);
--}
--
--/*
- * This function is called from di_walk_minor() when any PROBE is processed
- */
- static int
-@@ -579,11 +318,11 @@
- int pci_node = 0;
- int first_bus = 0, last_bus = PCI_REG_BUS_G(PCI_REG_BUS_M);
- int domain = 0;
-+ di_node_t rnode = DI_NODE_NIL;
- #ifdef __sparc
- int bus_range_found = 0;
- int device_type_found = 0;
- di_prom_prop_t prom_prop;
-- di_node_t rnode = DI_NODE_NIL;
- #endif
-
-
-@@ -590,6 +329,7 @@
- #ifdef DEBUG
- nexus_name = di_devfs_minor_path(minor);
- fprintf(stderr, "-- device name: %s\n", nexus_name);
-+ di_devfs_path_free(nexus_name);
- #endif
-
- for (prop = di_prop_next(di_node, NULL); prop != NULL;
-@@ -698,6 +438,8 @@
- #endif
-
- if ((fd = open(nexus_path, O_RDWR | O_CLOEXEC)) >= 0) {
-+ probe_args_t args;
-+
- nexus->fd = fd;
- nexus->path = strdup(nexus_path);
- nexus_dev_path = di_devfs_path(di_node);
-@@ -704,44 +446,32 @@
- nexus->dev_path = strdup(nexus_dev_path);
- di_devfs_path_free(nexus_dev_path);
-
--#ifdef __sparc
- if ((rnode = di_init(nexus->dev_path, DINFOCPYALL)) == DI_NODE_NIL) {
- (void) fprintf(stderr, "di_init failed: %s\n", strerror(errno));
-+ close(nexus->fd);
-+ free(nexus->path);
-+ free(nexus->dev_path);
-+ free(nexus);
- return (DI_WALK_TERMINATE);
- }
-
-- if ((bdf_table = calloc(INITIAL_NUM_DEVICES,
-- sizeof (bdf_table_info_t))) == NULL) {
-- di_fini(rnode);
-- return (DI_WALK_TERMINATE);
-- }
-- num_bdfs = 0;
-- num_allocated_bdfs = INITIAL_NUM_DEVICES;
-+ /* Walk through devices under the rnode */
-+ args.pinfo = pinfo;
-+ args.nexus = nexus;
-+ args.ret = 0;
-
-- /* Create a bdf table for the nexus node */
-- (void) di_walk_node(rnode, DI_WALK_CLDFIRST, (void *)NULL, create_bdf_table);
--#endif
--
-- if ((do_probe(nexus, pinfo) != 0) && (errno != ENXIO)) {
-- (void) fprintf(stderr, "Error probing node %s: %s\n",
-- nexus_path, strerror(errno));
-- (void) close(fd);
-+ (void) di_walk_node(rnode, DI_WALK_CLDFIRST, (void *)&args, probe_device_node);
-+ if (args.ret) {
-+ close(nexus->fd);
- free(nexus->path);
- free(nexus->dev_path);
- free(nexus);
-- } else {
-- nexus->next = nexus_list;
-- nexus_list = nexus;
-+ di_fini(rnode);
-+ return (DI_WALK_TERMINATE);
- }
--#ifdef __sparc
-- if (bdf_table) {
-- free (bdf_table);
-- bdf_table = NULL;
-- num_bdfs = 0;
-- num_allocated_bdfs = 0;
-- }
-- di_fini(rnode);
--#endif
-+
-+ nexus->next = nexus_list;
-+ nexus_list = nexus;
- } else {
- (void) fprintf(stderr, "Error opening %s: %s\n",
- nexus_path, strerror(errno));
-@@ -748,6 +478,10 @@
- free(nexus);
- }
-
-+ if (rnode != DI_NODE_NIL) {
-+ di_fini(rnode);
-+ }
-+
- return DI_WALK_CONTINUE;
- }
-
-@@ -832,6 +566,10 @@
- if ( (nexus = find_nexus_for_bus(dev->domain, dev->bus)) == NULL )
- return ENODEV;
-
-+ pci_device_cfg_read_u8(dev, &priv->header_type, PCI_CONF_HEADER);
-+
-+ pci_device_cfg_read_u8(dev, (uint8_t *)&dev->irq, PCI_CONF_ILINE);
-+
- /*
- * starting to find if it is MEM/MEM64/IO
- * using libdevinfo
-@@ -848,10 +586,10 @@
- }
-
- if (args.node != DI_NODE_NIL) {
-+ int *prop;
- #ifdef __sparc
- di_minor_t minor;
- #endif
-- int *prop;
-
- priv->is_primary = 0;
-
--- a/open-src/lib/libpciaccess/rom_and_scanpci.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
---- a/scanpci/Makefile.am Tue Oct 23 17:35:09 2012
-+++ b/scanpci/Makefile.am Tue Oct 23 17:26:39 2012
-@@ -23,7 +23,7 @@
-
- noinst_PROGRAMS = scanpci
-
--AM_CPPFLAGS = -I$(top_srcdir)/include
-+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
- LDADD = $(top_builddir)/src/libpciaccess.la
-
- scanpci_SOURCES = scanpci.c
---- a/scanpci/scanpci.c Tue Oct 23 17:34:59 2012
-+++ b/scanpci/scanpci.c Tue Oct 23 17:25:59 2012
-@@ -47,8 +47,8 @@
- #endif
-
- #include "pciaccess.h"
-+#include "pciaccess_private.h"
-
--
- static void
- print_pci_bridge( const struct pci_bridge_info * info )
- {
-@@ -171,8 +171,12 @@
- }
-
- if ( dev->rom_size ) {
-- printf( " BASEROM 0x%08x addr 0x%08x\n",
-- 0, 0 );
-+ struct pci_device_private *priv =
-+ (struct pci_device_private *) dev;
-+
-+ if (priv->rom_base)
-+ printf( " BASEROM 0x%08llx SIZE %d\n",
-+ priv->rom_base, (size_t) dev->rom_size);
- }
-
- pci_device_cfg_read_u8( dev, & int_pin, 61 );
---- a/src/solx_devfs.c Tue Oct 23 17:34:46 2012
-+++ b/src/solx_devfs.c Tue Oct 30 14:01:09 2012
-@@ -871,6 +871,8 @@
- int i;
- int len = 0;
- uint ent = 0;
-+ struct pci_device_private *priv =
-+ (struct pci_device_private *) dev;
- nexus_t *nexus;
-
- #ifdef __sparc
-@@ -900,18 +902,9 @@
- di_minor_t minor;
- #endif
- int *prop;
-- struct pci_device_private *priv =
-- (struct pci_device_private *) dev;
-
- priv->is_primary = 0;
-
-- if (di_prop_lookup_ints(DDI_DEV_T_ANY,
-- args.node, "primary-controller", &prop) >= 1) {
-- if (prop[0])
-- priv->is_primary = 1;
--
-- }
--
- #ifdef __sparc
- if (minor = di_minor_next(args.node, DI_MINOR_NIL))
- MAPPING_DEV_PATH(dev) = di_devfs_minor_path (minor);
-@@ -919,6 +912,13 @@
- MAPPING_DEV_PATH(dev) = NULL;
- #endif
-
-+ if (di_prop_lookup_ints(DDI_DEV_T_ANY,
-+ args.node, "primary-controller", &prop) >= 1) {
-+ if (prop[0])
-+ priv->is_primary = 1;
-+
-+ }
-+
- /*
- * It will succeed for sure, because it was
- * successfully called in find_target_node
-@@ -938,33 +938,7 @@
- if (len <= 0)
- goto cleanup;
-
--
- /*
-- * how to find the size of rom???
-- * if the device has expansion rom,
-- * it must be listed in the last
-- * cells because solaris find probe
-- * the base address from offset 0x10
-- * to 0x30h. So only check the last
-- * item.
-- */
-- reg = (pci_regspec_t *)®buf[len - CELL_NUMS_1275];
-- if (PCI_REG_REG_G(reg->pci_phys_hi) == PCI_CONF_ROM) {
-- /*
-- * rom can only be 32 bits
-- */
-- dev->rom_size = reg->pci_size_low;
-- len = len - CELL_NUMS_1275;
-- }
-- else {
-- /*
-- * size default to 64K and base address
-- * default to 0xC0000
-- */
-- dev->rom_size = 0x10000;
-- }
--
-- /*
- * Each BAR address get its own region slot in sequence.
- * 32 bit BAR:
- * BAR 0x10 -> slot0, BAR 0x14 -> slot1...
-@@ -978,7 +952,7 @@
- reg = (pci_regspec_t *)®buf[i];
- ent = reg->pci_phys_hi & 0xff;
-
-- if (ent > PCI_CONF_BASE5) {
-+ if (ent > PCI_CONF_ROM) {
- fprintf(stderr, "error ent = %d\n", ent);
- break;
- }
-@@ -990,38 +964,43 @@
- * VGA resource here and ignore it
- */
- break;
-- } else
-+ } else if (ent == PCI_CONF_ROM) {
-+ priv->rom_base = reg->pci_phys_low |
-+ ((uint64_t)reg->pci_phys_mid << 32);
-+ dev->rom_size = reg->pci_size_low;
-+ } else {
- ent = (ent - PCI_CONF_BASE0) >> 2;
-- /*
-- * non relocatable resource is excluded
-- * such like 0xa0000, 0x3b0. If it is met,
-- * the loop is broken;
-- */
-- if (!PCI_REG_REG_G(reg->pci_phys_hi))
-- break;
-+ /*
-+ * non relocatable resource is excluded
-+ * such like 0xa0000, 0x3b0. If it is met,
-+ * the loop is broken;
-+ */
-+ if (!PCI_REG_REG_G(reg->pci_phys_hi))
-+ break;
-
-- if (reg->pci_phys_hi & PCI_PREFETCH_B) {
-- dev->regions[ent].is_prefetchable = 1;
-- }
-+ if (reg->pci_phys_hi & PCI_PREFETCH_B) {
-+ dev->regions[ent].is_prefetchable = 1;
-+ }
-
-
-- dev->regions[ent].base_addr = reg->pci_phys_low |
-- ((uint64_t)reg->pci_phys_mid << 32);
-- dev->regions[ent].size = reg->pci_size_low |
-- ((uint64_t)reg->pci_size_hi << 32);
-+ dev->regions[ent].base_addr = reg->pci_phys_low |
-+ ((uint64_t)reg->pci_phys_mid << 32);
-+ dev->regions[ent].size = reg->pci_size_low |
-+ ((uint64_t)reg->pci_size_hi << 32);
-
-- switch (reg->pci_phys_hi & PCI_REG_ADDR_M) {
-- case PCI_ADDR_IO:
-- dev->regions[ent].is_IO = 1;
-- break;
-- case PCI_ADDR_MEM32:
-- break;
-- case PCI_ADDR_MEM64:
-- dev->regions[ent].is_64 = 1;
-- /*
-- * Skip one slot for 64 bit address
-- */
-- break;
-+ switch (reg->pci_phys_hi & PCI_REG_ADDR_M) {
-+ case PCI_ADDR_IO:
-+ dev->regions[ent].is_IO = 1;
-+ break;
-+ case PCI_ADDR_MEM32:
-+ break;
-+ case PCI_ADDR_MEM64:
-+ dev->regions[ent].is_64 = 1;
-+ /*
-+ * Skip one slot for 64 bit address
-+ */
-+ break;
-+ }
- }
- }
-
-@@ -1105,15 +1084,22 @@
- int err;
- struct pci_device_mapping prom = {
- .base = 0xC0000,
-- .size = dev->rom_size,
-+ .size = 0x10000,
- .flags = 0
- };
-+ struct pci_device_private *priv =
-+ (struct pci_device_private *) dev;
-
-+ if (priv->rom_base) {
-+ prom.base = priv->rom_base;
-+ prom.size = dev->rom_size;
-+ }
-+
- err = pci_device_solx_devfs_map_range(dev, &prom);
- if (err == 0) {
- (void) bcopy(prom.memory, buffer, dev->rom_size);
-
-- if (munmap(prom.memory, dev->rom_size) == -1) {
-+ if (munmap(prom.memory, prom.size) == -1) {
- err = errno;
- }
- }
--- a/open-src/lib/libpciaccess/scanpci_64bit.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-diff --git a/scanpci/scanpci.c b/scanpci/scanpci.c
-index 1f5f8bd..480e152 100644
---- a/scanpci/scanpci.c
-+++ b/scanpci/scanpci.c
-@@ -151,11 +151,14 @@ print_pci_device( struct pci_device * dev, int verbose )
- pci_device_probe( dev );
- for ( i = 0 ; i < 6 ; i++ ) {
- if ( dev->regions[i].base_addr != 0 ) {
-- printf( " BASE%u 0x%08"PRIxPTR" SIZE %zu %s",
-+ static const char *fmt8 = " BASE%u 0x%08llx SIZE %d %s";
-+ static const char *fmt16 = " BASE%u 0x%016llx SIZE %d %s";
-+ printf( dev->regions[i].is_64 ? fmt16 : fmt8,
- i,
- (intptr_t) dev->regions[i].base_addr,
- (size_t) dev->regions[i].size,
-- (dev->regions[i].is_IO) ? "I/O" : "MEM" );
-+ (dev->regions[i].is_IO) ? "I/O" :
-+ ((dev->regions[i].is_64) ? "MEM64" : "MEM") );
-
- if ( ! dev->regions[i].is_IO ) {
- if ( dev->regions[i].is_prefetchable ) {
-diff --git a/src/solx_devfs.c b/src/solx_devfs.c
-index 908bb9f..6127f5d 100644
---- a/src/solx_devfs.c
-+++ b/src/solx_devfs.c
-@@ -902,14 +902,10 @@ pci_device_solx_devfs_probe( struct pci_device * dev )
- }
-
-
-- /*
-- * We split the shift count 32 into two 16 to
-- * avoid the complaining of the compiler
-- */
-- dev->regions[ent].base_addr = reg->pci_phys_low +
-- ((reg->pci_phys_mid << 16) << 16);
-- dev->regions[ent].size = reg->pci_size_low +
-- ((reg->pci_size_hi << 16) << 16);
-+ dev->regions[ent].base_addr = reg->pci_phys_low |
-+ ((uint64_t)reg->pci_phys_mid << 32);
-+ dev->regions[ent].size = reg->pci_size_low |
-+ ((uint64_t)reg->pci_size_hi << 32);
-
- switch (reg->pci_phys_hi & PCI_REG_ADDR_M) {
- case PCI_ADDR_IO:
--- a/open-src/lib/libpciaccess/sparc.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
---- src/solx_devfs.c Tue Aug 14 10:11:53 2012
-+++ src/solx_devfs.c Fri Aug 17 11:55:38 2012
-@@ -84,6 +84,14 @@
- struct pci_device_private * volatile devices;
- } probe_info_t;
-
-+#ifdef __sparc
-+typedef struct bdf_table_info {
-+ int bus;
-+ int dev;
-+ int func;
-+} bdf_table_info_t;
-+#endif
-+
- static nexus_t *nexus_list = NULL;
- #if !defined(__sparc)
- static int xsvc_fd = -1;
-@@ -91,6 +99,9 @@
-
- #ifdef __sparc
- static di_prom_handle_t di_phdl;
-+static bdf_table_info_t *bdf_table = NULL;
-+static size_t num_bdfs = 0;
-+static size_t num_allocated_bdfs = 0;
- #endif
-
- /*
-@@ -251,7 +262,47 @@
- return (rval);
- }
-
-+#ifdef __sparc
-+static int
-+create_bdf_table(di_node_t node, void *arg)
-+{
-+ int *regbuf = NULL;
-+ int len = 0;
-
-+ len = di_prop_lookup_ints(DDI_DEV_T_ANY, node, "reg", ®buf);
-+
-+ if ((len <= 0) && di_phdl)
-+ len = di_prom_prop_lookup_ints(di_phdl, node, "reg", ®buf);
-+
-+ /* Exclude usb devices */
-+ if (len < 5) {
-+ return (DI_WALK_CONTINUE);
-+ }
-+
-+ bdf_table[num_bdfs].bus = PCI_REG_BUS_G(regbuf[0]);
-+ bdf_table[num_bdfs].dev = PCI_REG_DEV_G(regbuf[0]);
-+ bdf_table[num_bdfs].func = PCI_REG_FUNC_G(regbuf[0]);
-+
-+ if (++num_bdfs == num_allocated_bdfs) {
-+ bdf_table_info_t *new_bdfs;
-+ size_t new_num_bdfs = num_allocated_bdfs * 2;
-+
-+ new_bdfs = realloc (bdf_table,
-+ new_num_bdfs * sizeof (bdf_table_info_t));
-+ if (new_bdfs == NULL)
-+ return (DI_WALK_TERMINATE);
-+
-+ (void) memset(&new_bdfs[num_bdfs], 0,
-+ num_allocated_bdfs *
-+ sizeof (bdf_table_info_t));
-+ num_allocated_bdfs = new_num_bdfs;
-+ bdf_table = new_bdfs;
-+ }
-+
-+ return (DI_WALK_CONTINUE);
-+}
-+#endif
-+
- /*
- * Probe device's functions. Modifies many fields in the prg_p.
- */
-@@ -276,12 +327,32 @@
- * will force the loop as the user wants a specific function to be
- * checked.
- */
-+
- for (func = first_func, multi_function_device = B_FALSE;
- ((func <= last_func) &&
- ((func == first_func) || (multi_function_device)));
- func++) {
-+#ifdef __sparc
-+ int i;
-+#endif
-+
- prg_p->func_no = func;
-
-+#ifdef __sparc
-+ /* Check validity of bdf */
-+ for (i = 0; i < num_bdfs; i++) {
-+ if ((bdf_table[i].bus == prg_p->bus_no) &&
-+ (bdf_table[i].dev == prg_p->dev_no) &&
-+ (bdf_table[i].func == prg_p->func_no))
-+ break;
-+ }
-+
-+ /* Skipping if bdf device not on devinfo tree */
-+ if (i == num_bdfs) {
-+ continue;
-+ }
-+#endif
-+
- /*
- * Four things can happen here:
- *
-@@ -551,6 +622,7 @@
- int bus_range_found = 0;
- int device_type_found = 0;
- di_prom_prop_t prom_prop;
-+ di_node_t rnode = DI_NODE_NIL;
- #endif
-
-
-@@ -674,6 +746,25 @@
- nexus_dev_path = di_devfs_path(di_node);
- nexus->dev_path = strdup(nexus_dev_path);
- di_devfs_path_free(nexus_dev_path);
-+
-+#ifdef __sparc
-+ if ((rnode = di_init(nexus->dev_path, DINFOCPYALL)) == DI_NODE_NIL) {
-+ (void) fprintf(stderr, "di_init failed: %s\n", strerror(errno));
-+ return (DI_WALK_TERMINATE);
-+ }
-+
-+ if ((bdf_table = calloc(INITIAL_NUM_DEVICES,
-+ sizeof (bdf_table_info_t))) == NULL) {
-+ di_fini(rnode);
-+ return (DI_WALK_TERMINATE);
-+ }
-+ num_bdfs = 0;
-+ num_allocated_bdfs = INITIAL_NUM_DEVICES;
-+
-+ /* Create a bdf table for the nexus node */
-+ (void) di_walk_node(rnode, DI_WALK_CLDFIRST, (void *)NULL, create_bdf_table);
-+#endif
-+
- if ((do_probe(nexus, pinfo) != 0) && (errno != ENXIO)) {
- (void) fprintf(stderr, "Error probing node %s: %s\n",
- nexus_path, strerror(errno));
-@@ -685,6 +776,15 @@
- nexus->next = nexus_list;
- nexus_list = nexus;
- }
-+#ifdef __sparc
-+ if (bdf_table) {
-+ free (bdf_table);
-+ bdf_table = NULL;
-+ num_bdfs = 0;
-+ num_allocated_bdfs = 0;
-+ }
-+ di_fini(rnode);
-+#endif
- } else {
- (void) fprintf(stderr, "Error opening %s: %s\n",
- nexus_path, strerror(errno));
--- a/open-src/lib/libpciaccess/sparc_domain.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
---- a/src/solx_devfs.c Fri Feb 15 12:42:00 2013
-+++ b/src/solx_devfs.c Fri Feb 15 12:39:04 2013
-@@ -1,6 +1,6 @@
- /*
- * (C) Copyright IBM Corporation 2006
-- * Copyright (c) 2007, 2009, 2011, 2012, Oracle and/or its affiliates.
-+ * Copyright (c) 2007, 2009, 2011, 2012, 2013 Oracle and/or its affiliates.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
-@@ -71,11 +71,6 @@
- char *path; /* for errors/debugging; fd is all we need */
- char *dev_path;
- struct nexus *next;
--#ifdef __sparc
-- size_t *devlist;
-- volatile size_t num_allocated_elems;
-- volatile size_t num_devices;
--#endif
- } nexus_t;
-
- typedef struct probe_info {
-@@ -102,6 +97,7 @@
- static bdf_table_info_t *bdf_table = NULL;
- static size_t num_bdfs = 0;
- static size_t num_allocated_bdfs = 0;
-+static size_t nexus_count = 0;
- #endif
-
- /*
-@@ -142,24 +138,7 @@
- # define U45_SB_CLASS_RID 0x06040000
- #endif
-
--#ifdef __sparc
- static nexus_t *
--find_nexus_for_dev(struct pci_device *dev)
--{
-- nexus_t *nexus;
-- int i;
--
-- for (nexus = nexus_list ; nexus != NULL ; nexus = nexus->next) {
-- for (i = 0; i < nexus->num_devices; i++) {
-- size_t dev_idx = nexus->devlist[i];
-- if (&pci_sys->devices[dev_idx].base == dev)
-- return nexus;
-- }
-- }
-- return NULL;
--}
--#else
--static nexus_t *
- find_nexus_for_bus( int domain, int bus )
- {
- nexus_t *nexus;
-@@ -172,7 +151,6 @@
- }
- return NULL;
- }
--#endif
-
- #define GET_CONFIG_VAL_8(offset) (config_hdr.bytes[offset])
- #define GET_CONFIG_VAL_16(offset) \
-@@ -202,20 +180,6 @@
- close(nexus->fd);
- free(nexus->path);
- free(nexus->dev_path);
--#ifdef __sparc
-- {
-- struct pci_device *dev;
-- int i;
--
-- for (i = 0; i < nexus->num_devices; i++) {
-- size_t dev_idx = nexus->devlist[i];
-- dev = &pci_sys->devices[dev_idx].base;
-- if (MAPPING_DEV_PATH(dev))
-- di_devfs_path_free((char *) MAPPING_DEV_PATH(dev));
-- }
-- }
-- free(nexus->devlist);
--#endif
- free(nexus);
- }
- nexus_list = NULL;
-@@ -231,7 +195,21 @@
- #endif
- }
-
-+
-+#ifdef __sparc
- /*
-+ * Release resources per device
-+ */
-+static void
-+pci_system_solx_devfs_destroy_device( struct pci_device *dev )
-+{
-+ if (MAPPING_DEV_PATH(dev))
-+ di_devfs_path_free((char *) MAPPING_DEV_PATH(dev));
-+}
-+#endif
-+
-+
-+/*
- * Retrieve first 16 dwords of device's config header, except for the first
- * dword. First 16 dwords are defined by the PCI specification.
- */
-@@ -456,8 +434,7 @@
- * function number.
- */
-
-- size_t dev_idx = pinfo->num_devices;
-- pci_base = &pinfo->devices[dev_idx].base;
-+ pci_base = &pinfo->devices[pinfo->num_devices].base;
-
- pci_base->domain = nexus->domain;
- pci_base->bus = prg_p->bus_no;
-@@ -480,7 +457,7 @@
- pci_base->subdevice_id = GET_CONFIG_VAL_16(PCI_CONF_SUBSYSID);
- pci_base->irq = GET_CONFIG_VAL_8(PCI_CONF_ILINE);
-
-- pinfo->devices[dev_idx].header_type
-+ pinfo->devices[pinfo->num_devices].header_type
- = GET_CONFIG_VAL_8(PCI_CONF_HEADER);
-
- #ifdef DEBUG
-@@ -510,25 +487,6 @@
- pinfo->devices = new_devs;
- }
-
--#ifdef __sparc
-- nexus->devlist[nexus->num_devices++] = dev_idx;
--
-- if (nexus->num_devices == nexus->num_allocated_elems) {
-- size_t *new_devs;
-- size_t new_num_elems = nexus->num_allocated_elems * 2;
--
-- new_devs = realloc(nexus->devlist,
-- new_num_elems * sizeof (size_t *));
-- if (new_devs == NULL)
-- return (rval);
-- (void) memset(&new_devs[nexus->num_devices], 0,
-- nexus->num_allocated_elems *
-- sizeof (size_t *));
-- nexus->num_allocated_elems = new_num_elems;
-- nexus->devlist = new_devs;
-- }
--#endif
--
- /*
- * Accommodate devices which state their
- * multi-functionality only in their function 0 config
-@@ -671,6 +629,9 @@
- #endif
- }
- }
-+#ifdef __sparc
-+ domain = nexus_count;
-+#else
- else if (strcmp(prop_name, "pciseg") == 0) {
- numval = di_prop_ints(prop, &ints);
- if (numval == 1) {
-@@ -677,6 +638,7 @@
- domain = ints[0];
- }
- }
-+#endif
- }
-
- #ifdef __sparc
-@@ -716,15 +678,7 @@
- nexus->domain = domain;
-
- #ifdef __sparc
-- if ((nexus->devlist = calloc(INITIAL_NUM_DEVICES,
-- sizeof (size_t *))) == NULL) {
-- (void) fprintf(stderr, "Error allocating memory for nexus devlist: %s\n",
-- strerror(errno));
-- free (nexus);
-- return (DI_WALK_TERMINATE);
-- }
-- nexus->num_allocated_elems = INITIAL_NUM_DEVICES;
-- nexus->num_devices = 0;
-+ nexus_count++;
- #endif
-
- nexus_name = di_devfs_minor_path(minor);
-@@ -875,11 +829,7 @@
- (struct pci_device_private *) dev;
- nexus_t *nexus;
-
--#ifdef __sparc
-- if ( (nexus = find_nexus_for_dev(dev)) == NULL )
--#else
- if ( (nexus = find_nexus_for_bus(dev->domain, dev->bus)) == NULL )
--#endif
- return ENODEV;
-
- /*
-@@ -1119,11 +1069,7 @@
- int i = 0;
- nexus_t *nexus;
-
--#ifdef __sparc
-- nexus = find_nexus_for_dev(dev);
--#else
- nexus = find_nexus_for_bus(dev->domain, dev->bus);
--#endif
-
- *bytes_read = 0;
-
-@@ -1177,11 +1123,7 @@
- int cmd;
- nexus_t *nexus;
-
--#ifdef __sparc
-- nexus = find_nexus_for_dev(dev);
--#else
- nexus = find_nexus_for_bus(dev->domain, dev->bus);
--#endif
-
- if ( bytes_written != NULL ) {
- *bytes_written = 0;
-@@ -1366,7 +1308,11 @@
-
- static const struct pci_system_methods solx_devfs_methods = {
- .destroy = pci_system_solx_devfs_destroy,
-+#ifdef __sparc
-+ .destroy_device = pci_system_solx_devfs_destroy_device,
-+#else
- .destroy_device = NULL,
-+#endif
- .read_rom = pci_device_solx_devfs_read_rom,
- .probe = pci_device_solx_devfs_probe,
- .map_range = pci_device_solx_devfs_map_range,
-@@ -1427,6 +1373,9 @@
- pinfo.num_allocated_elems = INITIAL_NUM_DEVICES;
- pinfo.num_devices = 0;
- pinfo.devices = devices;
-+#ifdef __sparc
-+ nexus_count = 0;
-+#endif
- (void) di_walk_minor(di_node, DDI_NT_REGACC, 0, &pinfo, probe_nexus_node);
-
- di_fini(di_node);
---- a/src/common_init.c Fri Dec 14 15:50:20 2012
-+++ b/src/common_init.c Fri Dec 14 15:50:35 2012
-@@ -112,22 +112,14 @@
- }
- }
-
--#ifdef __sparc
-- if ( pci_sys->methods->destroy != NULL ) {
-- (*pci_sys->methods->destroy)();
-- }
--#endif
--
- free( pci_sys->devices );
- pci_sys->devices = NULL;
- pci_sys->num_devices = 0;
- }
-
--#ifndef __sparc
- if ( pci_sys->methods->destroy != NULL ) {
- (*pci_sys->methods->destroy)();
- }
--#endif
-
- free( pci_sys );
- pci_sys = NULL;
--- a/open-src/lib/libxcb/CVE-2013-2064.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-From e480abd0af181242022a85bff2d4d5e73385255e Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Wed, 1 May 2013 17:59:31 -0700
-Subject: [PATCH:libxcb] integer overflow in read_packet() [CVE-2013-2064]
-
-Ensure that when calculating the size of the incoming response from the
-Xserver, we don't overflow the integer used in the calculations when we
-multiply the int32_t length by 4 and add it to the default response size.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/xcb_in.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/src/xcb_in.c b/src/xcb_in.c
-index b810783..8a7af92 100644
---- a/src/xcb_in.c
-+++ b/src/xcb_in.c
-@@ -93,8 +93,9 @@ static void remove_finished_readers(reader_list **prev_reader, uint64_t complete
- static int read_packet(xcb_connection_t *c)
- {
- xcb_generic_reply_t genrep;
-- int length = 32;
-- int eventlength = 0; /* length after first 32 bytes for GenericEvents */
-+ uint64_t length = 32;
-+ uint64_t eventlength = 0; /* length after first 32 bytes for GenericEvents */
-+ uint64_t bufsize;
- void *buf;
- pending_reply *pend = 0;
- struct event_list *event;
-@@ -169,8 +170,12 @@ static int read_packet(xcb_connection_t *c)
- if ((genrep.response_type & 0x7f) == XCB_XGE_EVENT)
- eventlength = genrep.length * 4;
-
-- buf = malloc(length + eventlength +
-- (genrep.response_type == XCB_REPLY ? 0 : sizeof(uint32_t)));
-+ bufsize = length + eventlength +
-+ (genrep.response_type == XCB_REPLY ? 0 : sizeof(uint32_t));
-+ if (bufsize < INT32_MAX)
-+ buf = malloc((size_t) bufsize);
-+ else
-+ buf = NULL;
- if(!buf)
- {
- _xcb_conn_shutdown(c, XCB_CONN_CLOSED_MEM_INSUFFICIENT);
---
-1.7.9.2
-
--- a/open-src/lib/libxcb/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/lib/libxcb/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -28,11 +28,12 @@
MODULE_NAME=libxcb
# Version number (used in path names)
-MODULE_VERSION=1.9
+MODULE_VERSION=1.9.1
# Checksums for upstream tarball
-TARBALL_MD5 = 2b05856e9d1cb37836aae7406f2f4ce2
-TARBALL_SHA1 = ad2fb95eeec41ba3d39502a4f7460c3b64fdf061
+TARBALL_MD5 = ed632cb0dc31b6fbd7ea5c0f931cf5a4
+TARBALL_SHA1 = bf786bb7b9089102b73753135e061c87dc8e8685
+TARBALL_SHA256= d44a5ff4eb0b9569e6f7183b51fdaf6f58da90e7d6bfc36b612d7263f83e362f
# ARC cases that covered this module
MODULE_ARC_CASES = PSARC/2010/109
@@ -44,9 +45,7 @@
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = Makefile.am.0.patch,-p1
-SOURCE_PATCHES += Makefile.am.4.patch,-p1
SOURCE_PATCHES += 16702043.patch
-SOURCE_PATCHES += CVE-2013-2064.patch,-p1
# Regenerate Makefile.in's from Makefile.am's after patching them
AUTORECONF=yes
--- a/open-src/lib/libxcb/Makefile.am.4.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-diff --git a/doc/Makefile.am b/doc/Makefile.am
-index dbe2e0b..fff55cc 100644
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -31,8 +31,8 @@ install-data-local:
- $(mkinstalldirs) '$(DESTDIR)$(htmldir)'; \
- fi
- @for d in $(docdirs); do \
-- echo "cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \
-- cp -pR $$d '$(DESTDIR)$(htmldir)/'; \
-+ echo "/usr/gnu/bin/cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \
-+ /usr/gnu/bin/cp -pR $$d '$(DESTDIR)$(htmldir)/'; \
- done
-
- uninstall-local:
--- a/open-src/proto/dmxproto/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/proto/dmxproto/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -34,7 +34,7 @@
TARBALL_SHA1 = 3b8b273b8ef3d8dbab998df9ec1dddf99edf4d91
# Package metadata
-ORACLE_TPNO = 3811
+ORACLE_TPNO = 14484
MODULE_DESC = headers & documentation for DMX extension to the X11 protocol
### Include common rulesets
--- a/open-src/proto/randrproto/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-Copyright © 2000 Compaq Computer Corporation
-Copyright © 2002 Hewlett-Packard Company
-Copyright © 2006 Intel Corporation
-Copyright © 2008 Red Hat, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting documentation, and
-that the name of the copyright holders not be used in advertising or
-publicity pertaining to distribution of the software without specific,
-written prior permission. The copyright holders make no representations
-about the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-OF THIS SOFTWARE.
--- a/open-src/proto/resourceproto/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-Copyright (c) 2002 XFree86 Inc
-
-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 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
-XFREE86 PROJECT 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.
-
-Except as contained in this notice, the name of the XFree86 Project shall not
-be used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the XFree86 Project.
--- a/open-src/proto/videoproto/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/proto/videoproto/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -27,11 +27,12 @@
MODULE_NAME=videoproto
# Version number (used in path names)
-MODULE_VERSION=2.3.1
+MODULE_VERSION=2.3.2
# Checksums for upstream tarball
-TARBALL_MD5 = c3b348c6e2031b72b11ae63fc7f805c2
-TARBALL_SHA1 = bb8b366687a7f345e3a8697bac516cb436cbf4b2
+TARBALL_MD5 = e658641595327d3990eab70fdb55ca8b
+TARBALL_SHA1 = aa60e3b93c6a78ad03f1c502b910e7c45faaedbc
+TARBALL_SHA256= 8dae168cb820fcd32f564879afb3f24d27c176300d9af66819a18265539bd4b6
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES=
--- a/open-src/proto/x11proto/COPYING Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-Copyright (c) 1991, 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.
-
-
-Copyright 1985, 1987, 1988, 1990, 1991, 1993-1996, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice 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
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-The X Window System is a Trademark of The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-
-Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts.
-Copyright 1989 by Hewlett-Packard Company.
-
- All Rights Reserved
-
-Permission to use, duplicate, change, and distribute this software and
-its documentation for any purpose and without fee is granted, provided
-that the above copyright notice appear in such copy and that this
-copyright notice appear in all supporting documentation, and that the
-names of Apollo Computer Inc., the Hewlett-Packard Company, or the X
-Consortium not be used in advertising or publicity pertaining to
-distribution of the software without written prior permission.
-
-HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
-TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. Hewlett-Packard shall not be liable for errors
-contained herein or direct, indirect, special, incidental or
-consequential damages in connection with the furnishing,
-performance, or use of this material.
-
-
-Copyright (c) 1999 The XFree86 Project Inc.
-
-All Rights Reserved.
-
-The above copyright notice and this permission notice 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
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The XFree86 Project
-Inc. shall not be used in advertising or otherwise to promote the
-sale, use or other dealings in this Software without prior written
-authorization from The XFree86 Project Inc.
--- a/open-src/util/imake/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/util/imake/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -32,12 +32,12 @@
MODULE_DESC = the imake makefile generation tool
# Version number (used in path names)
-MODULE_VERSION=1.0.5
+MODULE_VERSION=1.0.6
# Checksums for upstream tarball
-TARBALL_MD5 = 797ec5dcad4df56eaafa0c701d6aa5ce
-TARBALL_SHA1 = 1fd3dca267d125ad86583d7f9663b6ff532cddd1
-TARBALL_SHA256= 99ce77ce73892d262522ee621032cef2fad2d30a36088b1305a156af4ee21cc1
+TARBALL_MD5 = d5058b1317a85bedc1dc40c7e85c8d26
+TARBALL_SHA1 = a54c025d7ac9894b6bc919d13454c6adb12ae140
+TARBALL_SHA256= fa8983fdb0a72ba8482d1d2683967fb45c29edd7149b25f619f97ea5a599069d
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES=
@@ -56,6 +56,9 @@
--disable-ccmakedep --disable-cleanlinks --disable-makeg \
--disable-mergelib --disable-mkhtmlindex --disable-revpath
+# Prefer cpp from /usr/lib
+MODULE_CONFIG_OPTS += RAWCPP=/usr/lib/cpp
+
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = imake xmkmf mkdirhier
--- a/open-src/util/makedepend/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/util/makedepend/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -36,12 +36,12 @@
MODULE_DESC = the makedepend makefile dependency generation utility
# Version number (used in path names)
-MODULE_VERSION=1.0.4
+MODULE_VERSION=1.0.5
# Checksums for upstream tarball
-TARBALL_MD5 = 7acb9a831817fdd11ba7f7aaa3c74fd8
-TARBALL_SHA1 = 1f0f8aea1526c6c022f2cf16f7a6c67118c68336
-TARBALL_SHA256= ab56b8aeee00ed78d93c57d102e33ef4e6828ef5edd7108574966ed7d212f7fe
+TARBALL_MD5 = 0475638eb40a3920d0d3f14482c924a4
+TARBALL_SHA1 = 2599afa039d2070bae9df6ce43da288b3a4adf97
+TARBALL_SHA256= f7a80575f3724ac3d9b19eaeab802892ece7e4b0061dd6425b4b789353e25425
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES =
--- a/open-src/util/util-macros/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/util/util-macros/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -1,6 +1,6 @@
###############################################################################
#
-# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2013, 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"),
@@ -31,12 +31,12 @@
MODULE_PKGNAME_SET=yes
# Version number (used in path names)
-MODULE_VERSION=1.17
+MODULE_VERSION=1.17.1
# Checksums for upstream tarball
-TARBALL_MD5 = 4f41667e1bf4938bb2b24fa09d517f77
-TARBALL_SHA1 = c424a09fa6f628e24eff74496acebef13e8093b9
-TARBALL_SHA256= 7d79edde72fc17dcdc56cfbe2f8ff384d1bffd1d8c58c0fd25970f5b2ccb75ed
+TARBALL_MD5 = 661d762243f494d390613b85ee321a50
+TARBALL_SHA1 = 80db85f0c117260e01c3ab8705cdcc6e38b39d09
+TARBALL_SHA256= 5e52654f2a0b04223cf28a9d7fd62cf288852e639ac13a75172fd47d0d6ac625
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES=
--- a/open-src/util/xorg-cf-files/Makefile Wed Sep 25 10:37:28 2013 -0700
+++ b/open-src/util/xorg-cf-files/Makefile Mon Sep 30 13:26:39 2013 -0700
@@ -34,11 +34,12 @@
MODULE_DESC = X.Org platform configuration files for imake
# Version number (used in path names)
-MODULE_VERSION=1.0.4
+MODULE_VERSION=1.0.5
# Checksums for upstream tarball
-TARBALL_MD5 = 700c6d040d36a569e657a3ba5e1d8b24
-TARBALL_SHA1 = c58b7252df481572ec1ccd77b9f1ab561ed89e45
+TARBALL_MD5 = 4a9cd7fc995ebf8f3cdad5395f9d8eba
+TARBALL_SHA1 = ae22eb81d56d018f0b3b149f70965ebfef2385fd
+TARBALL_SHA256= ed23b85043edecc38fad4229e0ebdb7ff80b570e746bc03a7c8678d601be7ed4
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES=
--- a/open-src/xserver/xorg/CR7054054.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,323 +0,0 @@
-diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
-index f87c1eb..bd0279a 100644
---- a/hw/xfree86/common/xf86Globals.c
-+++ b/hw/xfree86/common/xf86Globals.c
-@@ -103,6 +103,8 @@ xf86InfoRec xf86Info = {
- .vtPendingNum = -1,
- #endif
- .dontVTSwitch = FALSE,
-+ .autoVTSwitch = TRUE,
-+ .ShareVTs = FALSE,
- .dontZap = FALSE,
- .dontZoom = FALSE,
- .notrapSignals = FALSE,
-diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
-index c3ff668..db8c02b 100644
---- a/hw/xfree86/common/xf86Init.c
-+++ b/hw/xfree86/common/xf86Init.c
-@@ -1334,6 +1334,16 @@ ddxProcessArgument(int argc, char **argv, int i)
- xf86xkbdirFlag = TRUE;
- return 0;
- }
-+ if (!strcmp(argv[i], "-novtswitch"))
-+ {
-+ xf86Info.autoVTSwitch = FALSE;
-+ return 1;
-+ }
-+ if (!strcmp(argv[i], "-sharevts"))
-+ {
-+ xf86Info.ShareVTs = TRUE;
-+ return 1;
-+ }
-
- /* OS-specific processing */
- return xf86ProcessArgument(argc, argv, i);
-@@ -1390,6 +1400,8 @@ ddxUseMsg(void)
- ErrorF("-version show the server version\n");
- ErrorF("-showDefaultModulePath show the server default module path\n");
- ErrorF("-showDefaultLibPath show the server default library path\n");
-+ ErrorF("-novtswitch don't automatically switch VT at reset & exit\n");
-+ ErrorF("-sharevts share VTs with another X server\n");
- /* OS-specific usage */
- xf86UseMsg();
- ErrorF("\n");
-diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
-index 608f9bd..cdc67cb 100644
---- a/hw/xfree86/common/xf86Privstr.h
-+++ b/hw/xfree86/common/xf86Privstr.h
-@@ -66,6 +66,8 @@ typedef struct {
- int vtPendingNum;
- #endif
- Bool dontVTSwitch;
-+ Bool autoVTSwitch;
-+ Bool ShareVTs;
- Bool dontZap;
- Bool dontZoom;
- Bool notrapSignals; /* don't exit cleanly - die at fault */
-diff --git a/hw/xfree86/doc/man/Xorg.man b/hw/xfree86/doc/man/Xorg.man
-index 6fa334c..ffeefd1 100644
---- a/hw/xfree86/doc/man/Xorg.man
-+++ b/hw/xfree86/doc/man/Xorg.man
-@@ -334,6 +334,10 @@ as root (i.e, with real-uid 0).
- .B \-nosilk
- Disable Silken Mouse support.
- .TP 8
-+.B \-novtswitch
-+Disable the automatic switching on X server reset and shutdown to the
-+VT that was active when the server started, if supported by the OS.
-+.TP 8
- .B \-pixmap24
- Set the internal pixmap format for depth 24 pixmaps to 24 bits per pixel.
- The default is usually 32 bits per pixel. There is normally little
-@@ -376,6 +380,9 @@ and
- .B \-ggamma
- options.
- .TP 8
-+.B \-sharevts
-+Share virtual terminals with another X server, if supported by the OS.
-+.TP 8
- .BI \-screen " screen-name"
- Use the __xconfigfile__(__filemansuffix__) file
- .B Screen
-diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
-index 123eb17..c9ef330 100644
---- a/hw/xfree86/os-support/bsd/bsd_init.c
-+++ b/hw/xfree86/os-support/bsd/bsd_init.c
-@@ -45,7 +45,6 @@ static int devConsoleFd = -1;
- #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- static int VTnum = -1;
- static int initialVT = -1;
--static Bool ShareVTs = FALSE;
- #endif
-
- #ifdef PCCONS_SUPPORT
-@@ -266,7 +265,7 @@ xf86OpenConsole()
- }
- #endif
- acquire_vt:
-- if (!ShareVTs) {
-+ if (!xf86Info.ShareVTs) {
- /*
- * now get the VT
- */
-@@ -304,7 +303,7 @@ acquire_vt:
- {
- FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
- }
-- } else { /* ShareVTs */
-+ } else { /* xf86Info.ShareVTs */
- close(xf86Info.consoleFd);
- }
- break;
-@@ -320,7 +319,8 @@ acquire_vt:
- {
- /* serverGeneration != 1 */
- #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-- if (!ShareVTs) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT)
-+ if (!xf86Info.ShareVTs &&
-+ (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT))
- {
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
- {
-@@ -393,7 +393,7 @@ xf86OpenSyscons()
- if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0)
- initialVT = -1;
- #endif
-- if (ShareVTs)
-+ if (xf86Info.ShareVTs)
- xf86Info.vtno = initialVT;
-
- if (xf86Info.vtno == -1)
-@@ -655,7 +655,7 @@ xf86CloseConsole()
- struct vt_mode VT;
- #endif
-
-- if (ShareVTs) return;
-+ if (xf86Info.ShareVTs) return;
-
- switch (xf86Info.consType)
- {
-@@ -723,11 +723,6 @@ xf86ProcessArgument(int argc, char *argv[], int i)
- return 1;
- }
- #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-- if (!strcmp(argv[i], "-sharevts"))
-- {
-- ShareVTs = TRUE;
-- return 1;
-- }
- if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
- {
- if (sscanf(argv[i], "vt%2d", &VTnum) == 0 ||
-diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
-index 77dfb2f..8977ab8 100644
---- a/hw/xfree86/os-support/linux/lnx_init.c
-+++ b/hw/xfree86/os-support/linux/lnx_init.c
-@@ -39,8 +39,6 @@
- #include <sys/stat.h>
-
- static Bool KeepTty = FALSE;
--static Bool VTSwitch = TRUE;
--static Bool ShareVTs = FALSE;
- static int activeVT = -1;
-
- static char vtname[11];
-@@ -109,7 +107,7 @@ xf86OpenConsole(void)
- "xf86OpenConsole: Cannot open /dev/tty0 (%s)\n",
- strerror(errno));
-
-- if (ShareVTs)
-+ if (xf86Info.ShareVTs)
- {
- SYSCALL(ret = ioctl(fd, VT_GETSTATE, &vts));
- if (ret < 0)
-@@ -184,7 +182,7 @@ xf86OpenConsole(void)
- }
- #endif
-
-- if (!ShareVTs)
-+ if (!xf86Info.ShareVTs)
- {
- struct termios nTty;
-
-@@ -240,7 +238,7 @@ xf86OpenConsole(void)
- * of Init?$#*&Device(). So I just place it here */
- }
- } else { /* serverGeneration != 1 */
-- if (!ShareVTs && VTSwitch)
-+ if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch)
- {
- /* now get the VT */
- switch_to(xf86Info.vtno, "xf86OpenConsole");
-@@ -254,7 +252,7 @@ xf86CloseConsole(void)
- struct vt_mode VT;
- int ret;
-
-- if (ShareVTs) {
-+ if (xf86Info.ShareVTs) {
- close(xf86Info.consoleFd);
- return;
- }
-@@ -286,7 +284,7 @@ xf86CloseConsole(void)
- strerror(errno));
- }
-
-- if (VTSwitch)
-+ if (xf86Info.autoVTSwitch)
- {
- /*
- * Perform a switch back to the active VT when we were started
-@@ -311,16 +309,6 @@ xf86ProcessArgument(int argc, char *argv[], int i)
- KeepTty = TRUE;
- return 1;
- }
-- if (!strcmp(argv[i], "-novtswitch"))
-- {
-- VTSwitch = FALSE;
-- return 1;
-- }
-- if (!strcmp(argv[i], "-sharevts"))
-- {
-- ShareVTs = TRUE;
-- return 1;
-- }
- if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
- {
- if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0)
-@@ -340,6 +328,4 @@ xf86UseMsg(void)
- ErrorF("vtXX use the specified VT number\n");
- ErrorF("-keeptty ");
- ErrorF("don't detach controlling tty (for debugging only)\n");
-- ErrorF("-novtswitch don't immediately switch to new VT\n");
-- ErrorF("-sharevts share VTs with another X server\n");
- }
-diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
-index 42e20ac..4fe40ca 100644
---- a/hw/xfree86/os-support/solaris/sun_init.c
-+++ b/hw/xfree86/os-support/solaris/sun_init.c
-@@ -66,6 +66,22 @@ static char consoleDev[PATH_MAX] = "/dev/fb";
- Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */
- _X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb";
-
-+static void
-+switch_to(int vt, const char *from)
-+{
-+ int ret;
-+
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
-+ if (ret != 0)
-+ xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n",
-+ from, strerror(errno));
-+
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
-+ if (ret != 0)
-+ xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n",
-+ from, strerror(errno));
-+}
-+
- void
- xf86OpenConsole(void)
- {
-@@ -173,6 +189,11 @@ xf86OpenConsole(void)
- xf86Info.vtno = VTnum;
- from = X_CMDLINE;
- }
-+ else if (xf86Info.ShareVTs)
-+ {
-+ xf86Info.vtno = vtinfo.v_active;
-+ from = X_CMDLINE;
-+ }
- else
- {
- if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
-@@ -204,16 +225,15 @@ OPENCONSOLE:
- chown(consoleDev, getuid(), getgid());
-
- #ifdef HAS_USL_VTS
-+ if (xf86Info.ShareVTs)
-+ return;
-+
- if (vtEnabled)
- {
- /*
- * Now get the VT
- */
-- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
-- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
--
-- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
-- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
-+ switch_to(xf86Info.vtno, "xf86OpenConsole");
-
- #ifdef VT_SET_CONSUSER /* added in snv_139 */
- if (strcmp(display, "0") == 0)
-@@ -254,16 +274,13 @@ OPENCONSOLE:
- else /* serverGeneration != 1 */
- {
- #ifdef HAS_USL_VTS
-- if (vtEnabled)
-+ if (vtEnabled && !xf86Info.ShareVTs)
- {
- /*
- * Now re-get the VT
- */
-- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
-- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
--
-- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
-- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
-+ if (xf86Info.autoVTSwitch)
-+ switch_to(xf86Info.vtno, "xf86OpenConsole");
-
- #ifdef VT_SET_CONSUSER /* added in snv_139 */
- if (strcmp(display, "0") == 0)
-@@ -352,7 +369,8 @@ xf86CloseConsole(void)
- }
-
- /* Activate the VT that X was started on */
-- ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT);
-+ if (xf86Info.autoVTSwitch)
-+ switch_to(xf86StartVT, "xf86CloseConsole");
- }
- #endif /* HAS_USL_VTS */
-
--- a/open-src/xserver/xorg/CVE-2011-4028.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-From 6ba44b91e37622ef8c146d8f2ac92d708a18ed34 Mon Sep 17 00:00:00 2001
-From: Matthieu Herrb <[email protected]>
-Date: Mon, 17 Oct 2011 22:26:12 +0200
-Subject: [PATCH 1/2] Fix CVE-2011-4028: File disclosure vulnerability.
-
-use O_NOFOLLOW to open the existing lock file, so symbolic links
-aren't followed, thus avoid revealing if it point to an existing
-file.
-
-Signed-off-by: Matthieu Herrb <[email protected]>
-Reviewed-by: Alan Coopersmith <[email protected]>
----
- os/utils.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/os/utils.c b/os/utils.c
-index e8ecb71..fe49254 100644
---- a/os/utils.c
-+++ b/os/utils.c
-@@ -318,7 +318,7 @@ LockServer(void)
- /*
- * Read the pid from the existing file
- */
-- lfd = open(LockFile, O_RDONLY);
-+ lfd = open(LockFile, O_RDONLY|O_NOFOLLOW);
- if (lfd < 0) {
- unlink(tmp);
- FatalError("Can't read lock file %s\n", LockFile);
---
-1.7.3.2
-
--- a/open-src/xserver/xorg/CVE-2011-4029.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-From b67581cf825940fdf52bf2e0af4330e695d724a4 Mon Sep 17 00:00:00 2001
-From: Matthieu Herrb <[email protected]>
-Date: Mon, 17 Oct 2011 22:27:35 +0200
-Subject: [PATCH 2/2] Fix CVE-2011-4029: File permission change vulnerability.
-
-Use fchmod() to change permissions of the lock file instead
-of chmod(), thus avoid the race that can be exploited to set
-a symbolic link to any file or directory in the system.
-
-Signed-off-by: Matthieu Herrb <[email protected]>
-Reviewed-by: Alan Coopersmith <[email protected]>
----
- os/utils.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/os/utils.c b/os/utils.c
-index fe49254..07cf4c2 100644
---- a/os/utils.c
-+++ b/os/utils.c
-@@ -297,7 +297,7 @@ LockServer(void)
- FatalError("Could not create lock file in %s\n", tmp);
- (void) sprintf(pid_str, "%10ld\n", (long)getpid());
- (void) write(lfd, pid_str, 11);
-- (void) chmod(tmp, 0444);
-+ (void) fchmod(lfd, 0444);
- (void) close(lfd);
-
- /*
---
-1.7.3.2
-
--- a/open-src/xserver/xorg/dmx-glxproxy.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-From f405dfffe7d5db81d398615a80acbeba7e014ada Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <[email protected]>
-Date: Mon, 7 Nov 2011 22:14:30 +0000
-Subject: [PATCH] dmx: Build fix for -Werror=implicit-function-declaration
-
-Signed-off-by: Jeremy Huddleston <[email protected]>
-Reviewed-by: Alan Coopersmith <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- hw/dmx/glxProxy/compsize.c | 1 +
- hw/dmx/glxProxy/compsize.h | 51 ++++++++++++++++++++++++++++++++++++++++
- hw/dmx/glxProxy/g_renderswap.c | 1 +
- hw/dmx/glxProxy/glxcmds.c | 2 +
- hw/dmx/glxProxy/glxcmds.h | 37 +++++++++++++++++++++++++++++
- hw/dmx/glxProxy/glxcmdsswap.c | 3 ++
- 6 files changed, 95 insertions(+), 0 deletions(-)
- create mode 100644 hw/dmx/glxProxy/compsize.h
- create mode 100644 hw/dmx/glxProxy/glxcmds.h
-
-diff --git a/hw/dmx/glxProxy/compsize.c b/hw/dmx/glxProxy/compsize.c
-index 9a40d65..5a5d5d0 100644
---- a/hw/dmx/glxProxy/compsize.c
-+++ b/hw/dmx/glxProxy/compsize.c
-@@ -29,6 +29,7 @@
- */
-
- #include <GL/gl.h>
-+#include "compsize.h"
-
- GLint __glFogiv_size(GLenum pname)
- {
-diff --git a/hw/dmx/glxProxy/compsize.h b/hw/dmx/glxProxy/compsize.h
-new file mode 100644
-index 0000000..856c6f5
---- /dev/null
-+++ b/hw/dmx/glxProxy/compsize.h
-@@ -0,0 +1,51 @@
-+/*
-+ * Copyright 2011 Apple Inc.
-+ *
-+ * 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 on 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
-+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
-+ * 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.
-+ */
-+
-+#ifndef __compsize_h__
-+#define __compsize_h__
-+
-+extern GLint __glColorTableParameterfv_size(GLenum pname);
-+extern GLint __glColorTableParameteriv_size(GLenum pname);
-+extern GLint __glConvolutionParameterfv_size(GLenum pname);
-+extern GLint __glConvolutionParameteriv_size(GLenum pname);
-+extern GLint __glFogfv_size(GLenum pname);
-+extern GLint __glFogiv_size(GLenum pname);
-+extern GLint __glLightModelfv_size(GLenum pname);
-+extern GLint __glLightModeliv_size(GLenum pname);
-+extern GLint __glLightfv_size(GLenum pname);
-+extern GLint __glLightiv_size(GLenum pname);
-+extern GLint __glMaterialfv_size(GLenum pname);
-+extern GLint __glMaterialiv_size(GLenum pname);
-+extern GLint __glTexEnvfv_size(GLenum e);
-+extern GLint __glTexEnviv_size(GLenum e);
-+extern GLint __glTexGendv_size(GLenum e);
-+extern GLint __glTexGenfv_size(GLenum e);
-+extern GLint __glTexGeniv_size(GLenum e);
-+extern GLint __glTexParameterfv_size(GLenum e);
-+extern GLint __glTexParameteriv_size(GLenum e);
-+
-+#endif /* !__compsize_h__ */
-diff --git a/hw/dmx/glxProxy/g_renderswap.c b/hw/dmx/glxProxy/g_renderswap.c
-index e675696..e434a71 100644
---- a/hw/dmx/glxProxy/g_renderswap.c
-+++ b/hw/dmx/glxProxy/g_renderswap.c
-@@ -32,6 +32,7 @@
- #include "glxext.h"
- #include "g_disptab.h"
- #include "unpack.h"
-+#include "compsize.h"
-
- void __glXDispSwap_CallList(GLbyte *pc)
- {
-diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
-index a76201d..fb4bce8 100644
---- a/hw/dmx/glxProxy/glxcmds.c
-+++ b/hw/dmx/glxProxy/glxcmds.c
-@@ -52,6 +52,8 @@
- #include "glxvisuals.h"
- #include "glxswap.h"
-
-+#include "glxcmds.h"
-+
- #ifdef PANORAMIX
- #include "panoramiXsrv.h"
- #endif
-diff --git a/hw/dmx/glxProxy/glxcmds.h b/hw/dmx/glxProxy/glxcmds.h
-new file mode 100644
-index 0000000..ae866be
---- /dev/null
-+++ b/hw/dmx/glxProxy/glxcmds.h
-@@ -0,0 +1,37 @@
-+/*
-+ * Copyright 2011 Apple Inc.
-+ *
-+ * 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 on 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
-+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
-+ * 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.
-+ */
-+
-+#ifndef __GLX_cmds_h__
-+#define __GLX_cmds_h__
-+
-+extern int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc);
-+extern int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc);
-+extern int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc);
-+extern int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
-+extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc);
-+
-+#endif /* !__GLX_cmds_h__ */
-diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c
-index 2294059..f28a79d 100644
---- a/hw/dmx/glxProxy/glxcmdsswap.c
-+++ b/hw/dmx/glxProxy/glxcmdsswap.c
-@@ -35,11 +35,14 @@
- #include <pixmapstr.h>
- #include <windowstr.h>
- #include "unpack.h"
-+#include "glxcmds.h"
- #include "glxext.h"
- #include "glxvendor.h"
-
- extern int glxIsExtensionSupported( char *ext );
-
-+int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
-+
- /************************************************************************/
-
- /*
---
-1.7.3.2
-
--- a/open-src/xserver/xorg/dtrace-doc.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-From a883023b2ed63d9e02d09b6d39002566eace3ecb Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Thu, 1 Sep 2011 16:48:37 -0700
-Subject: [PATCH] Assign ids to more tags in Xserver-Dtrace.xml
-
-Keeps xsltproc from adding random-number id tags to html output so that
-it's easier to see real changes vs. different random numbers.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- doc/dtrace/Xserver-DTrace.xml | 14 +++++++-------
- 1 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/doc/dtrace/Xserver-DTrace.xml b/doc/dtrace/Xserver-DTrace.xml
-index 69cd30e..ebba466 100644
---- a/doc/xml/dtrace/Xserver-DTrace.xml
-+++ b/doc/xml/dtrace/Xserver-DTrace.xml
-@@ -15,7 +15,7 @@
- </affiliation>
- </author>
- <releaseinfo>X.Org Xserver version &xserver.version;</releaseinfo>
-- <legalnotice>
-+ <legalnotice id="copyright">
- <para>
- Copyright (c) 2005, 2006, 2007, 2010, Oracle and/or its affiliates.
- All rights reserved.
-@@ -79,7 +79,7 @@ DEALINGS IN THE SOFTWARE.
- <parameter>arg2</parameter>, etc. These tables should help you
- determine what the real data is for each of the probe arguments.
-
-- <table>
-+ <table id="probe-table">
- <title>Probes and their arguments</title>
- <tgroup cols='7'>
- <colspec colname="probe" colwidth="2*"/>
-@@ -195,7 +195,7 @@ DEALINGS IN THE SOFTWARE.
- To access data buffers referenced via <type>uintptr_t</type>'s, you will
- need to use <ulink url="http://wikis.sun.com/display/DTrace/Actions+and+Subroutines#ActionsandSubroutines-{{copyin}}"><function>copyin()</function></ulink>.
-
-- <table>
-+ <table id="arguments-table">
- <title>Probe Arguments</title>
- <tgroup cols='3'>
- <colspec colname="arg" colwidth="2*"/>
-@@ -313,7 +313,7 @@ DEALINGS IN THE SOFTWARE.
- <sect1 id="examples">
- <title>Examples</title>
-
-- <example>
-+ <example id="counting-requests">
- <title>Counting requests by request name</title>
-
- <para>
-@@ -370,7 +370,7 @@ Xserver*:::request-start
- </para>
- </example>
-
-- <example>
-+ <example id="cpu-per-request">
- <title>Get average CPU time per request</title>
-
- <para>This script records the CPU time used between the probes at
-@@ -419,7 +419,7 @@ Xserver*:::request-done
- </para>
- </example>
-
-- <example>
-+ <example id="monitor-connects">
- <title>Monitoring clients that connect and disconnect</title>
-
- <para>
-@@ -476,7 +476,7 @@ CPU ID FUNCTION:NAME
- </para>
- </example>
-
-- <example>
-+ <example id="monitor-pixmaps">
- <title>Monitoring clients creating Pixmaps</title>
-
- <para>
---
-1.7.3.2
-
--- a/open-src/xserver/xorg/oslog-race.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-[Backported from upstream to fix race condition in dtrace-enabled builds
- that can cause os.O to fail to include the log.c functions and thus fail
- to build the X servers that call functions in it.]
-
-From 2b364bf970b2ce6829af656990c33afd0d365f3c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rami=20Ylim=C3=A4ki?= <[email protected]>
-Date: Tue, 15 Jun 2010 14:44:38 +0200
-Subject: [PATCH] Revert "os: Prevent backtrace from being stopped in noreturn functions."
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This reverts commit 579715f830fbbca9e1ecb17dc18176132f5969e7.
-
-The patch is not needed anymore. I haven't encountered backtrace
-problems with GCC 4.3.3. Even if the problems still persisted, this
-commit should be removed and instead the definition of _X_NORETURN
-should be modified to be empty if GCC/ARM is used. However, currently
-it seems that ARM backtraces are OK even if _X_NORETURN is used and
--mapcs-frame is not defined in CFLAGS.
-
-Signed-off-by: Rami Ylimäki <[email protected]>
-Reviewed-by: Jamey Sharp <[email protected]>
----
- configure.ac | 13 -------------
- os/Makefile.am | 17 +++++------------
- 2 files changed, 5 insertions(+), 25 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1ceffe7..de172ce 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -312,19 +312,6 @@ AC_CHECK_HEADER([execinfo.h],[
- ])]
- )
-
--dnl ARM needs additional compiler flags for proper backtraces if GCC is
--dnl used. Compile a dummy program with the -mapcs-frame option. If it
--dnl succeeds, we know that we are building for ARM with GCC.
--old_CFLAGS="$CFLAGS"
--CFLAGS="-mapcs-frame"
--AC_COMPILE_IFELSE(
-- AC_LANG_PROGRAM([[ ]]),
-- ARM_BACKTRACE_CFLAGS="$CFLAGS",
-- ARM_BACKTRACE_CFLAGS=""
--)
--CFLAGS="$old_CFLAGS"
--AC_SUBST(ARM_BACKTRACE_CFLAGS)
--
- dnl ---------------------------------------------------------------------------
- dnl Bus options and CPU capabilities. Replaces logic in
- dnl hw/xfree86/os-support/bus/Makefile.am, among others.
-diff --git a/os/Makefile.am b/os/Makefile.am
-index 3e4f2c5..66a4a0f 100644
---- a/os/Makefile.am
-+++ b/os/Makefile.am
-@@ -1,19 +1,11 @@
--noinst_LTLIBRARIES = libos.la liblog.la
-+noinst_LTLIBRARIES = libos.la
-
- AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS)
-
- SECURERPC_SRCS = rpcauth.c
- XDMCP_SRCS = xdmcp.c
- STRLCAT_SRCS = strlcat.c strlcpy.c
--
--# Build a convenience library liblog.la that will be added into
--# libos.la. The split is done so that log.c can be built with
--# different compiler options.
--liblog_la_SOURCES = log.c
--# Add flags needed for proper backtraces of functions marked with GCC
--# __attribute__((noreturn)). Currently those flags are needed for
--# FatalError and AbortServer in log.c.
--liblog_la_CFLAGS = $(AM_CFLAGS) $(ARM_BACKTRACE_CFLAGS)
-+XORG_SRCS = log.c
-
- libos_la_SOURCES = \
- WaitFor.c \
-@@ -32,8 +24,9 @@ libos_la_SOURCES = \
- xdmauth.c \
- xsha1.c \
- xstrans.c \
-- xprintf.c
--libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS) liblog.la
-+ xprintf.c \
-+ $(XORG_SRCS)
-+libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS)
-
- if SECURE_RPC
- libos_la_SOURCES += $(SECURERPC_SRCS)
---
-1.7.3.2
-
--- a/open-src/xserver/xorg/trim-fallbacks.patch Wed Sep 25 10:37:28 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-From 8c9f6e0377ed5c1dc7b137e4a3e89129f6176275 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Mon, 1 Aug 2011 14:09:33 -0700
-Subject: [PATCH] Don't fallback to wsfb or fbdev on Solaris
-
-We don't ship either one, so don't waste time and make confusing log
-entries trying to load them.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- hw/xfree86/common/xf86AutoConfig.c | 2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
-index 7dc3189..76a9109 100644
---- a/hw/xfree86/common/xf86AutoConfig.c
-+++ b/hw/xfree86/common/xf86AutoConfig.c
-@@ -300,6 +300,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
- #endif
- }
-
-+#if !defined(sun)
- /* Fallback to platform default frame buffer driver */
- if (i < (nmatches - 1)) {
- #if !defined(__linux__) && defined(__sparc__)
-@@ -308,6 +309,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
- matches[i++] = xnfstrdup("fbdev");
- #endif
- }
-+#endif /* !sun */
- }
-
- /* copy a screen section and enter the desired driver
---
-1.7.3.2
-
--- a/pkg/manifests/developer-build-imake.p5m Wed Sep 25 10:37:28 2013 -0700
+++ b/pkg/manifests/developer-build-imake.p5m Mon Sep 30 13:26:39 2013 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, 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"),
@@ -155,3 +155,6 @@
file path=usr/share/man/man1/imake.1
file path=usr/share/man/man1/mkdirhier.1
file path=usr/share/man/man1/xmkmf.1
+
+# imake now uses GNU install from coreutils package in generated Makefiles
+depend type=require fmri=pkg:/file/gnu-coreutils
--- a/pkg/manifests/x11-data-xcursor-themes.p5m Wed Sep 25 10:37:28 2013 -0700
+++ b/pkg/manifests/x11-data-xcursor-themes.p5m Mon Sep 30 13:26:39 2013 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2013, 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"),
@@ -26,7 +26,10 @@
dir path=usr/share/icons
dir path=usr/share/icons/handhelds
dir path=usr/share/icons/handhelds/cursors
+link path=usr/share/icons/handhelds/cursors/08e8e1c95fe2fc01f976f1e063a24ccd \
+ target=left_ptr_watch
file path=usr/share/icons/handhelds/cursors/X_cursor
+link path=usr/share/icons/handhelds/cursors/arrow target=right_ptr
file path=usr/share/icons/handhelds/cursors/based_arrow_down
file path=usr/share/icons/handhelds/cursors/based_arrow_up
file path=usr/share/icons/handhelds/cursors/bottom_left_corner
@@ -36,9 +39,13 @@
file path=usr/share/icons/handhelds/cursors/center_ptr
file path=usr/share/icons/handhelds/cursors/circle
file path=usr/share/icons/handhelds/cursors/cross
+link path=usr/share/icons/handhelds/cursors/cross_reverse target=cross
+link path=usr/share/icons/handhelds/cursors/crosshair target=cross
file path=usr/share/icons/handhelds/cursors/dot
file path=usr/share/icons/handhelds/cursors/dotbox
file path=usr/share/icons/handhelds/cursors/double_arrow
+link path=usr/share/icons/handhelds/cursors/draft_large target=right_ptr
+link path=usr/share/icons/handhelds/cursors/draft_small target=right_ptr
file path=usr/share/icons/handhelds/cursors/draped_box
file path=usr/share/icons/handhelds/cursors/fleur
file path=usr/share/icons/handhelds/cursors/gumby
@@ -49,6 +56,7 @@
file path=usr/share/icons/handhelds/cursors/left_tee
file path=usr/share/icons/handhelds/cursors/ll_angle
file path=usr/share/icons/handhelds/cursors/pencil
+link path=usr/share/icons/handhelds/cursors/plus target=cross
file path=usr/share/icons/handhelds/cursors/right_ptr
file path=usr/share/icons/handhelds/cursors/right_side
file path=usr/share/icons/handhelds/cursors/right_tee
@@ -57,6 +65,8 @@
file path=usr/share/icons/handhelds/cursors/sb_up_arrow
file path=usr/share/icons/handhelds/cursors/sb_v_double_arrow
file path=usr/share/icons/handhelds/cursors/shuttle
+link path=usr/share/icons/handhelds/cursors/tcross target=cross
+link path=usr/share/icons/handhelds/cursors/top_left_arrow target=left_ptr
file path=usr/share/icons/handhelds/cursors/top_left_corner
file path=usr/share/icons/handhelds/cursors/top_right_corner
file path=usr/share/icons/handhelds/cursors/top_side
@@ -65,7 +75,10 @@
file path=usr/share/icons/handhelds/cursors/xterm
dir path=usr/share/icons/redglass
dir path=usr/share/icons/redglass/cursors
+link path=usr/share/icons/redglass/cursors/08e8e1c95fe2fc01f976f1e063a24ccd \
+ target=left_ptr_watch
file path=usr/share/icons/redglass/cursors/X_cursor
+link path=usr/share/icons/redglass/cursors/arrow target=right_ptr
file path=usr/share/icons/redglass/cursors/based_arrow_down
file path=usr/share/icons/redglass/cursors/based_arrow_up
file path=usr/share/icons/redglass/cursors/bottom_left_corner
@@ -75,9 +88,13 @@
file path=usr/share/icons/redglass/cursors/center_ptr
file path=usr/share/icons/redglass/cursors/circle
file path=usr/share/icons/redglass/cursors/cross
+link path=usr/share/icons/redglass/cursors/cross_reverse target=cross
+link path=usr/share/icons/redglass/cursors/crosshair target=cross
file path=usr/share/icons/redglass/cursors/dot
file path=usr/share/icons/redglass/cursors/dotbox
file path=usr/share/icons/redglass/cursors/double_arrow
+link path=usr/share/icons/redglass/cursors/draft_large target=right_ptr
+link path=usr/share/icons/redglass/cursors/draft_small target=right_ptr
file path=usr/share/icons/redglass/cursors/draped_box
file path=usr/share/icons/redglass/cursors/fleur
file path=usr/share/icons/redglass/cursors/gumby
@@ -88,6 +105,7 @@
file path=usr/share/icons/redglass/cursors/left_tee
file path=usr/share/icons/redglass/cursors/ll_angle
file path=usr/share/icons/redglass/cursors/pencil
+link path=usr/share/icons/redglass/cursors/plus target=cross
file path=usr/share/icons/redglass/cursors/right_ptr
file path=usr/share/icons/redglass/cursors/right_side
file path=usr/share/icons/redglass/cursors/right_tee
@@ -96,6 +114,8 @@
file path=usr/share/icons/redglass/cursors/sb_up_arrow
file path=usr/share/icons/redglass/cursors/sb_v_double_arrow
file path=usr/share/icons/redglass/cursors/shuttle
+link path=usr/share/icons/redglass/cursors/tcross target=cross
+link path=usr/share/icons/redglass/cursors/top_left_arrow target=left_ptr
file path=usr/share/icons/redglass/cursors/top_left_corner
file path=usr/share/icons/redglass/cursors/top_right_corner
file path=usr/share/icons/redglass/cursors/top_side
@@ -104,7 +124,10 @@
file path=usr/share/icons/redglass/cursors/xterm
dir path=usr/share/icons/whiteglass
dir path=usr/share/icons/whiteglass/cursors
+link path=usr/share/icons/whiteglass/cursors/08e8e1c95fe2fc01f976f1e063a24ccd \
+ target=left_ptr_watch
file path=usr/share/icons/whiteglass/cursors/X_cursor
+link path=usr/share/icons/whiteglass/cursors/arrow target=right_ptr
file path=usr/share/icons/whiteglass/cursors/base_arrow_down
file path=usr/share/icons/whiteglass/cursors/base_arrow_up
file path=usr/share/icons/whiteglass/cursors/boat
@@ -115,9 +138,13 @@
file path=usr/share/icons/whiteglass/cursors/center_ptr
file path=usr/share/icons/whiteglass/cursors/circle
file path=usr/share/icons/whiteglass/cursors/cross
+link path=usr/share/icons/whiteglass/cursors/cross_reverse target=cross
+link path=usr/share/icons/whiteglass/cursors/crosshair target=cross
file path=usr/share/icons/whiteglass/cursors/dot
file path=usr/share/icons/whiteglass/cursors/dot_box_mask
file path=usr/share/icons/whiteglass/cursors/double_arrow
+link path=usr/share/icons/whiteglass/cursors/draft_large target=right_ptr
+link path=usr/share/icons/whiteglass/cursors/draft_small target=right_ptr
file path=usr/share/icons/whiteglass/cursors/draped_box
file path=usr/share/icons/whiteglass/cursors/exchange
file path=usr/share/icons/whiteglass/cursors/fleur
@@ -132,6 +159,7 @@
file path=usr/share/icons/whiteglass/cursors/lr_angle
file path=usr/share/icons/whiteglass/cursors/pencil
file path=usr/share/icons/whiteglass/cursors/pirate
+link path=usr/share/icons/whiteglass/cursors/plus target=cross
file path=usr/share/icons/whiteglass/cursors/question_arrow
file path=usr/share/icons/whiteglass/cursors/right_ptr
file path=usr/share/icons/whiteglass/cursors/right_side
@@ -146,6 +174,8 @@
file path=usr/share/icons/whiteglass/cursors/shuttle
file path=usr/share/icons/whiteglass/cursors/sizing
file path=usr/share/icons/whiteglass/cursors/target
+link path=usr/share/icons/whiteglass/cursors/tcross target=cross
+link path=usr/share/icons/whiteglass/cursors/top_left_arrow target=left_ptr
file path=usr/share/icons/whiteglass/cursors/top_left_corner
file path=usr/share/icons/whiteglass/cursors/top_right_corner
file path=usr/share/icons/whiteglass/cursors/top_side
--- a/pkg/manifests/x11-library-libx11.p5m Wed Sep 25 10:37:28 2013 -0700
+++ b/pkg/manifests/x11-library-libx11.p5m Mon Sep 30 13:26:39 2013 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2013, 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"),
@@ -66,7 +66,6 @@
file path=usr/lib/$(ARCH64)/pkgconfig/x11-xcb.pc
file path=usr/lib/$(ARCH64)/pkgconfig/x11.pc
dir path=usr/lib/X11
-file path=usr/lib/X11/Xcms.txt
dir path=usr/lib/X11/locale
dir path=usr/lib/X11/locale/$(ARCH64)
dir path=usr/lib/X11/locale/$(ARCH64)/common
@@ -115,6 +114,7 @@
file path=usr/lib/pkgconfig/x11.pc
dir path=usr/share/X11
file path=usr/share/X11/XErrorDB
+file path=usr/share/X11/Xcms.txt
dir path=usr/share/X11/locale
dir path=usr/share/X11/locale/C
file path=usr/share/X11/locale/C/Compose
@@ -226,18 +226,10 @@
file path=usr/share/X11/locale/ja.JIS/Compose
file path=usr/share/X11/locale/ja.JIS/XI18N_OBJS
file path=usr/share/X11/locale/ja.JIS/XLC_LOCALE
-dir path=usr/share/X11/locale/ja.S90
-file path=usr/share/X11/locale/ja.S90/Compose
-file path=usr/share/X11/locale/ja.S90/XI18N_OBJS
-file path=usr/share/X11/locale/ja.S90/XLC_LOCALE
dir path=usr/share/X11/locale/ja.SJIS
file path=usr/share/X11/locale/ja.SJIS/Compose
file path=usr/share/X11/locale/ja.SJIS/XI18N_OBJS
file path=usr/share/X11/locale/ja.SJIS/XLC_LOCALE
-dir path=usr/share/X11/locale/ja.U90
-file path=usr/share/X11/locale/ja.U90/Compose
-file path=usr/share/X11/locale/ja.U90/XI18N_OBJS
-file path=usr/share/X11/locale/ja.U90/XLC_LOCALE
file path=usr/share/X11/locale/ja/Compose
file path=usr/share/X11/locale/ja/XI18N_OBJS
file path=usr/share/X11/locale/ja/XLC_LOCALE
@@ -245,6 +237,10 @@
file path=usr/share/X11/locale/ja_JP.UTF-8/Compose
file path=usr/share/X11/locale/ja_JP.UTF-8/XI18N_OBJS
file path=usr/share/X11/locale/ja_JP.UTF-8/XLC_LOCALE
+dir path=usr/share/X11/locale/km_KH.UTF-8
+file path=usr/share/X11/locale/km_KH.UTF-8/Compose
+file path=usr/share/X11/locale/km_KH.UTF-8/XI18N_OBJS
+file path=usr/share/X11/locale/km_KH.UTF-8/XLC_LOCALE
dir path=usr/share/X11/locale/ko
file path=usr/share/X11/locale/ko/Compose
file path=usr/share/X11/locale/ko/XI18N_OBJS
@@ -295,6 +291,10 @@
file path=usr/share/X11/locale/ru_RU.UTF-8/Compose
file path=usr/share/X11/locale/ru_RU.UTF-8/XI18N_OBJS
file path=usr/share/X11/locale/ru_RU.UTF-8/XLC_LOCALE
+dir path=usr/share/X11/locale/sr_CS.UTF-8
+file path=usr/share/X11/locale/sr_CS.UTF-8/Compose
+file path=usr/share/X11/locale/sr_CS.UTF-8/XI18N_OBJS
+file path=usr/share/X11/locale/sr_CS.UTF-8/XLC_LOCALE
dir path=usr/share/X11/locale/tatar-cyr
file path=usr/share/X11/locale/tatar-cyr/Compose
file path=usr/share/X11/locale/tatar-cyr/XI18N_OBJS
@@ -445,11 +445,10 @@
file path=usr/share/doc/libX11/i18n/compose/iso8859-9.xml
file path=usr/share/doc/libX11/i18n/compose/iso8859-9e.xml
file path=usr/share/doc/libX11/i18n/compose/ja.JIS.xml
-file path=usr/share/doc/libX11/i18n/compose/ja.S90.xml
file path=usr/share/doc/libX11/i18n/compose/ja.SJIS.xml
-file path=usr/share/doc/libX11/i18n/compose/ja.U90.xml
file path=usr/share/doc/libX11/i18n/compose/ja.xml
file path=usr/share/doc/libX11/i18n/compose/ja_JP.UTF-8.xml
+file path=usr/share/doc/libX11/i18n/compose/km_KH.UTF-8.xml
file path=usr/share/doc/libX11/i18n/compose/ko.xml
file path=usr/share/doc/libX11/i18n/compose/ko_KR.UTF-8.xml
file path=usr/share/doc/libX11/i18n/compose/koi8-c.xml
@@ -463,6 +462,7 @@
file path=usr/share/doc/libX11/i18n/compose/nokhchi-1.xml
file path=usr/share/doc/libX11/i18n/compose/pt_BR.UTF-8.xml
file path=usr/share/doc/libX11/i18n/compose/ru_RU.UTF-8.xml
+file path=usr/share/doc/libX11/i18n/compose/sr_CS.UTF-8.xml
file path=usr/share/doc/libX11/i18n/compose/tatar-cyr.xml
file path=usr/share/doc/libX11/i18n/compose/th_TH.UTF-8.xml
file path=usr/share/doc/libX11/i18n/compose/th_TH.xml
--- a/pkg/manifests/x11-server-xorg-driver-xorg-input-synaptics.p5m Wed Sep 25 10:37:28 2013 -0700
+++ b/pkg/manifests/x11-server-xorg-driver-xorg-input-synaptics.p5m Mon Sep 30 13:26:39 2013 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2013, 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"),
@@ -29,7 +29,6 @@
file path=etc/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi
file path=usr/include/xorg/synaptics-properties.h
-file path=usr/include/xorg/synaptics.h
file path=usr/lib/xorg/modules/input/synaptics_drv.so
file path=usr/lib/xorg/synclient mode=0555
file path=usr/lib/xorg/syndaemon mode=0555