summaryrefslogtreecommitdiff
path: root/lib/libX11
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2016-11-03 10:21:32 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2016-11-03 10:21:32 +0000
commit8bbe3c422ab753407cf561f700944f741e927c3c (patch)
tree14baf6a2af8dedcb0168e504edd77502c1ebcedb /lib/libX11
parent84525cc973107a701917a245211dd4197b0d4f35 (diff)
Update to libX11 1.6.4
Diffstat (limited to 'lib/libX11')
-rw-r--r--lib/libX11/ChangeLog566
-rw-r--r--lib/libX11/compile2
-rw-r--r--lib/libX11/configure221
-rw-r--r--lib/libX11/configure.ac91
-rw-r--r--lib/libX11/include/X11/Xlib.h34
-rw-r--r--lib/libX11/include/X11/Xlibint.h126
-rw-r--r--lib/libX11/man/XFree.man3
-rw-r--r--lib/libX11/modules/im/ximcp/imExten.c2
-rw-r--r--lib/libX11/modules/im/ximcp/imLcIm.c6
-rw-r--r--lib/libX11/modules/im/ximcp/imLcPrs.c6
-rw-r--r--lib/libX11/modules/om/generic/omGeneric.c75
-rw-r--r--lib/libX11/modules/om/generic/omImText.c4
-rw-r--r--lib/libX11/nls/compose.dir.pre8
-rw-r--r--lib/libX11/nls/en_US.UTF-8/Compose.pre107
-rw-r--r--lib/libX11/nls/locale.alias.pre10
-rw-r--r--lib/libX11/nls/locale.dir.pre10
-rw-r--r--lib/libX11/nls/pt_PT.UTF-8/Compose.pre3
-rw-r--r--lib/libX11/nls/pt_PT.UTF-8/XI18N_OBJS7
-rw-r--r--lib/libX11/nls/pt_PT.UTF-8/XLC_LOCALE.pre142
-rw-r--r--lib/libX11/specs/libX11/CH04.xml3
-rw-r--r--lib/libX11/src/ClDisplay.c2
-rw-r--r--lib/libX11/src/Font.c2
-rw-r--r--lib/libX11/src/FontNames.c2
-rw-r--r--lib/libX11/src/GetAtomNm.c13
-rw-r--r--lib/libX11/src/GetFPath.c2
-rw-r--r--lib/libX11/src/GetWAttrs.c13
-rw-r--r--lib/libX11/src/IntAtom.c14
-rw-r--r--lib/libX11/src/ListExt.c2
-rw-r--r--lib/libX11/src/Makefile.am1
-rw-r--r--lib/libX11/src/Makefile.in3
-rw-r--r--lib/libX11/src/OpenDis.c4
-rw-r--r--lib/libX11/src/PutImage.c2
-rw-r--r--lib/libX11/src/XlibAsync.c18
-rw-r--r--lib/libX11/src/XlibInt.c35
-rw-r--r--lib/libX11/src/Xxcbint.h5
-rw-r--r--lib/libX11/src/config.h.in12
-rw-r--r--lib/libX11/src/xcb_io.c80
-rw-r--r--lib/libX11/src/xcms/HVC.c8
-rw-r--r--lib/libX11/src/xcms/IdOfPr.c2
-rw-r--r--lib/libX11/src/xcms/LRGB.c6
-rw-r--r--lib/libX11/src/xcms/Lab.c4
-rw-r--r--lib/libX11/src/xcms/Luv.c4
-rw-r--r--lib/libX11/src/xcms/XYZ.c4
-rw-r--r--lib/libX11/src/xcms/cmsColNm.c6
-rw-r--r--lib/libX11/src/xcms/cmsTrig.c11
-rw-r--r--lib/libX11/src/xcms/uvY.c8
-rw-r--r--lib/libX11/src/xcms/xyY.c4
-rw-r--r--lib/libX11/src/xkb/XKBGetByName.c6
-rw-r--r--lib/libX11/src/xkb/XKBNames.c2
-rw-r--r--lib/libX11/src/xlibi18n/ICWrap.c15
-rw-r--r--lib/libX11/src/xlibi18n/XDefaultIMIF.c66
-rw-r--r--lib/libX11/src/xlibi18n/XDefaultOMIF.c156
-rw-r--r--lib/libX11/src/xlibi18n/XlcDL.c22
-rw-r--r--lib/libX11/src/xlibi18n/lcPrTxt.c2
-rw-r--r--lib/libX11/src/xlibi18n/lcPubWrap.c3
55 files changed, 1218 insertions, 747 deletions
diff --git a/lib/libX11/ChangeLog b/lib/libX11/ChangeLog
index 5f00b6f2e..c4821d384 100644
--- a/lib/libX11/ChangeLog
+++ b/lib/libX11/ChangeLog
@@ -1,3 +1,569 @@
+commit 8f349feac24aacc958bd816afcc52380764e3d92
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date: Tue Oct 4 21:01:39 2016 +0200
+
+ libX11 1.6.4
+
+ Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+
+commit 8ea762f94f4c942d898fdeb590a1630c83235c17
+Author: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Sun Sep 25 21:25:25 2016 +0200
+
+ Validation of server responses in XGetImage()
+
+ Check if enough bytes were received for specified image type and
+ geometry. Otherwise GetPixel and other functions could trigger an
+ out of boundary read later on.
+
+ Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
+ Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 8c29f1607a31dac0911e45a0dd3d74173822b3c9
+Author: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Sun Sep 25 21:22:57 2016 +0200
+
+ The validation of server responses avoids out of boundary accesses.
+
+ v2: FontNames.c return a NULL list whenever a single
+ length field from the server is incohent.
+
+ Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
+ Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 78851f6a03130e3c720b60c3cbf96f8eb216d741
+Author: walter harms <wharms@bfs.de>
+Date: Mon Aug 15 19:18:14 2016 +0200
+
+ XFree will accept NULL as argument
+
+ since Xfree is a define for free():
+ Xlibint.h:#define Xfree(ptr) free((ptr))
+
+ Xfree will accept NULL and do nothing.
+
+ Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 83adf3d1e3d0d6602244381334f75c216da4ab6e
+Author: Matthew D. Fuller <fullermd@over-yonder.net>
+Date: Sat Jun 4 11:24:01 2016 -0500
+
+ Fixup param specification for XChangeProperty()
+
+ Signed-off-by: Matthew D. Fuller <fullermd@over-yonder.net>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 3129c757f9da8586ab8b8654a56c8f687cc9ef5c
+Author: Mats Blakstad <mats.gbproject@gmail.com>
+Date: Sun Feb 28 13:22:03 2016 -0500
+
+ New compose keys for local languages in Togo
+
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit e1011b9e2f6c82255959cf3cc1d8cda402ded0a9
+Author: Daniel Albers <daniel@lbe.rs>
+Date: Wed Mar 9 14:35:48 2016 +0100
+
+ Add Compose sequence for U+1F4A9.
+
+ Signed-off-by: Daniel Albers <daniel@lbe.rs>
+
+commit 6d7bb040c928485f2557c2c914b95cffb2354179
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Feb 6 14:18:32 2016 -0800
+
+ xcms: use size_t for pointer offsets passed to strncmp
+
+ instead of converting to int and back
+
+ Fixes clang warnings of the form:
+ HVC.c:190:43: warning: implicit conversion changes signedness: 'int' to
+ 'unsigned long' [-Wsign-conversion]
+ if (strncmp(spec, _XcmsTekHVC_prefix, n) != 0) {
+ ~~~~~~~
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a9266804eed38a83897ab5f0f9f8a8ab82a98882
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Feb 6 13:32:44 2016 -0800
+
+ xcms: use unsigned indexes when looping through unsigned values
+
+ Clears many gcc warnings of the form:
+
+ uvY.c: In function ‘XcmsCIEuvYToCIEXYZ’:
+ uvY.c:263:19: warning: comparison between signed and unsigned integer
+ expressions [-Wsign-compare]
+ for (i = 0; i < nColors; i++, pColor++) {
+ ^
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0ee0d383b4488b7b90d8bd50b75c371e0dc0d397
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Feb 6 13:01:25 2016 -0800
+
+ xcms: use size_t for strlen/sizeof values instead of converting to int & back
+
+ Fixes gcc warnings of the form:
+
+ IdOfPr.c: In function ‘XcmsFormatOfPrefix’:
+ IdOfPr.c:69:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
+ if ((len = strlen(prefix)) >= sizeof(string_buf)) {
+ ^
+ IdOfPr.c:83:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
+ if (len >= sizeof(string_buf)) Xfree(string_lowered);
+ ^
+ IdOfPr.c:97:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
+ if (len >= sizeof(string_buf)) Xfree(string_lowered);
+ ^
+ IdOfPr.c:104:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
+ if (len >= sizeof(string_buf)) Xfree(string_lowered);
+ ^
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 4de6ed3e7b1833c52c9d58ab74d59d57ca2a9f0d
+Author: Dominik Muth <nxdomainuser-muth@yahoo.com>
+Date: Thu Mar 26 07:52:58 2015 +0100
+
+ Xlib.h: Fix macros imitating C functions.
+
+ The basic rule "put parantheses around macro parameters" should be
+ observed where possible. Otherwise code like
+
+ ConnectionNumber(foo = bar);
+
+ fails to compile. (It obviously passes if ConnectionNumber is a C
+ function.) There are several other macros amended for the same reason.
+
+ This bug appeared while building http://ioccc.org/1993/cmills.c, so
+ historically it was not present.
+
+ Signed-off-by: Dominik Muth <muth@nxdomain.no-ip.biz>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3706b0f2b14cc97578a6bee620266edca2722ebf
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Nov 15 18:03:25 2013 -0800
+
+ Don't need to link libX11-xcb against libX11
+
+ libX11-xcb only accesses data structures defined in X11 headers,
+ it doesn't call any functions or reference any global variables
+ in libX11 itself. (Seems to have been left from previous XCL
+ implementation.)
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit eddf1bbd18872b286a9f939140f0cd9ba4e93804
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Jan 22 11:44:25 2016 -0800
+
+ Stop checking for preferred order of local transports
+
+ Removes --with-local-transport-order=... flag to configure.
+
+ Code which used this ordered list was removed in commit 15e5eaf6289
+ which outsourced X11 connection handling & authentication to libxcb.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 1a66c1e964ff8d11382313404f48b5a3d5ed8be8
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Jan 22 09:39:28 2016 -0800
+
+ Stop checking XTRANS_SECURE_RPC_FLAGS since we no longer use them
+
+ Removes --enable-secure-rpc & --disable-secure-rpc flags to configure
+
+ Code that used SECURE_RPC definitions was removed in commit 15e5eaf6289
+ which outsourced X11 connection handling & authentication to libxcb.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 7eb724dc24505f1591ef32620fa63f079b540646
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date: Thu Jan 21 11:54:19 2016 +0100
+
+ XKB: fix XkbGetKeyboardByName with Xming server
+
+ XkbGetKeyboardByName relies on flags to read the data from the server.
+
+ If the X server sends us the wrong flags or if a subreply is smaller
+ than it should be, XkbGetKeyboardByName will not read all the available
+ data and leave data in the buffer, which will cause the next _XReply()
+ to fail with:
+
+ [xcb] Extra reply data still left in queue
+ [xcb] This is most likely caused by a broken X extension library
+ [xcb] Aborting, sorry about that.
+ xcb_io.c:576: _XReply: Assertion `!xcb_xlib_extra_reply_data_left' failed.
+ Aborted
+
+ Check if there is some extra data left at the end of
+ XkbGetKeyboardByName() and discard that data if any is found.
+
+ Many thanks to Peter Hutterer <peter.hutterer@who-t.net> for finding the
+ root cause of the issue and Adam Jackson <ajax@redhat.com> for helping
+ with the analysis!
+
+ Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+ Reviewed-by: Daniel Stone <daniels@collabora.com>
+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 43ba0a68d3d17b496ec1f48d44921122ddd7d7d9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 19 18:03:41 2015 -0800
+
+ lcPubWrap: replace malloc(strlen) + strcpy with strdup
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 6fc95cb12b70c5a67cb4fc5e5749f9f1ec741e2a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 19 10:21:04 2015 -0800
+
+ XlcDL.c: reduce code duplication
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit f7ecc0856be58608881d2086954cb71857ad64e1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 19 10:19:25 2015 -0800
+
+ XlcDL.c: replace strcpy+strcat sequences with snprintf
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 522989b34398bd6a6ea144c4af0ba69d6dc4faea
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 19 10:05:42 2015 -0800
+
+ XDefaultOMIF: Remove comments referring to ancient Sun bug ids
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit b738a104ae80e4270dd1d215ad0c6a80016982c2
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 19 10:00:22 2015 -0800
+
+ XDefaultOMIF: additional code simplification
+
+ Don't need to test for a case that we already returned for, don't need
+ to store a count that will only ever be 1 if we didn't return, don't
+ need to increment pointers to allow storing more than one item when we
+ can only ever possibly do one.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 31011cf100419269eae7409581c784638be503cf
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 19 09:46:31 2015 -0800
+
+ XDefaultOMIF: replace strlen+Xmalloc+strcpy with strdup
+
+ Code seems to have been originally written to handle appending multiple
+ strings, but only ever operates on a single string.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit c27c46d5e22bbf60fb5608eaabe584b7fdeb0b09
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 19 09:20:55 2015 -0800
+
+ Use strdup instead of Xmalloc+strcpy in _XDefaultOpenIM
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 4359dfabc04af082872d2bc2d5b52e26d6d93290
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Dec 4 22:20:53 2015 -0800
+
+ Delete #if 0 hunks of code
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a2f9dfac286f37e54eb47d4736cc3f0150224a84
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Dec 3 23:38:07 2015 -0800
+
+ Bug 93183: _XDefaultOpenIM memory leaks in out-of-memory error paths
+
+ Rework code to store allocations directly into XIM struct instead of
+ temporary local variables, so we can use _XCloseIM to unwind instead
+ of duplicating it, and consistently jump to error handler on failure,
+ instead of sometimes leaking and sometimes freeing.
+
+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93183
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 07a97b3944467dce085a1efd24706cc851d2caf2
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Dec 3 23:19:48 2015 -0800
+
+ Bug 93184: read_EncodingInfo invalid free
+
+ Free the correct bits of memory if we run out and need to unwind
+
+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93184
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 11118e9eb3705fcbe42b6a68d4a8aa86ab0211f1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Nov 28 13:18:11 2015 -0800
+
+ Remove unused definition of XCONN_CHECK_FREQ
+
+ The only use of XCONN_CHECK_FREQ was removed in commit 15e5eaf62897b3179
+ when we dropped the old Xlib connection handling in favor of xcb's.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+
+commit 5f0da8311a61498edf073cc877f5b467bfd5f863
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Dec 3 18:24:44 2015 -0500
+
+ Fix another missing update in cf4d5989383a
+
+ Reported in:
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=81875#c7
+
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit 33840a5465a2e5fecab520bfbdd2d1bd0a456f51
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Dec 3 18:15:40 2015 -0500
+
+ Fix missing update in cf4d5989383a
+
+ Reported in:
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=81875#c7
+
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit dbcb847a08c44d99e4e1de2ba777d63238fb0e03
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun Sep 27 18:38:32 2015 -0700
+
+ Get rid of some extraneous ; at the end of C source lines
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
+
+commit 121a1bad334459f66f78bfca6df53dc841cf97f8
+Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
+Date: Wed Sep 23 11:44:55 2015 -0400
+
+ Add compose file for pt_PT similar to pt_BR
+
+ This is a forward of the Ubuntu bug https://launchpad.net/bugs/518056
+
+ One of the conclusions from the discussion on that bug report, which
+ basically is about typing the ccedilla character easily on a non-
+ Portuguese keyboard, is that X11 should include a compose file for
+ pt_PT.UTF-8 similar to the file for pt_BR.UTF-8.
+
+ FDO bug: https://bugs.freedesktop.org/show_bug.cgi?id=90300
+
+ Signed-off-by: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit 3f41d8a7f82eb5ffbd5c5d36472cf7043186b904
+Author: Julien Cristau <jcristau@debian.org>
+Date: Fri May 1 13:50:15 2015 +0200
+
+ Mark _XNextRequest as hidden
+
+ It's only used inside XNextRequest(), so doesn't need to be exported.
+
+ Signed-off-by: Julien Cristau <jcristau@debian.org>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a72d2d06c002b644b7040a0a9936c8525e092ba8
+Author: Christian Linhart <chris@demorecorder.com>
+Date: Mon Sep 7 17:17:32 2015 +0200
+
+ fix for Xlib 32-bit request number issues
+
+ Make use of the new 64-bit sequence number API in XCB 1.11.1 to avoid
+ the 32-bit sequence number wrap in libX11.
+
+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71338
+ Signed-off-by: Christian Linhart <chris@demorecorder.com>
+ Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 58af066a764305c506efea7065ef7679369a1a98
+Author: Thomas Klausner <wiz@NetBSD.org>
+Date: Sun Jul 19 10:23:21 2015 +0200
+
+ Ignore test-driver (used by newer autoconf).
+
+ Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 80b9a346b9ba200fa4652560282e80d249519287
+Author: Thomas Klausner <wiz@NetBSD.org>
+Date: Sun Jul 19 10:22:45 2015 +0200
+
+ Do not return() after exit().
+
+ Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c827edcd1c4a7f920aa25208083b5b58d60d2b44
+Author: Ross Burton <ross.burton@intel.com>
+Date: Mon May 18 14:49:01 2015 +0100
+
+ Add missing NULL checks to ICWrap
+
+ ICWrap.c dereferences the xim parameter passed in from client code without a
+ NULL check. I have seen mplayer trigger this resulting in a segfault. In this
+ case mplayer had called XOpenIM and NULL was returned which was later passed
+ into XCreateIC.
+
+ Patch originally by Drew Moseley <drew_moseley@mentor.com>.
+
+ Signed-off-by: Ross Burton <ross.burton@intel.com>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 26e0d2de294f8adf1ce65f1dbff0b59af41a00b9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Jun 4 20:51:17 2015 -0700
+
+ Replace Xmalloc+memset pairs with Xcalloc calls
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit f0286b2770ece10aef5e2e8c004260217f12fd25
+Author: Bhavi Dhingra <b.dhingra@samsung.com>
+Date: Thu Jun 4 19:07:12 2015 -0700
+
+ omGeneric.c: Correct the parameter usage of sizeof
+
+ Incorrect parameter usage with sizeof. Earlier passed argument FontData
+ will be 4 bytes always as its a pointer hence the change is needed and
+ FontDataRec should be used for memset.
+
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 47da70d75f9e48e800719c0db752f9ccd2d77aea
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue May 19 12:30:22 2015 +1000
+
+ Fix three "use of uninitialized variable" coverity warnings
+
+ False positive, if rlen/nbytes are unset we quit early before using it. Still,
+ initialize it so we don't have to deal with these warnings again.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 19a30f17f30e9ae9641a7c0634fc52134208b060
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon May 18 07:56:22 2015 +1000
+
+ Fix an indentation issue
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 013ccece124b990217ad3bcf2c41688e8fda1df8
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon May 18 07:55:17 2015 +1000
+
+ Fix potential memory leak
+
+ If we hit the depth limit, filename leaks. Move the depth check up before we
+ allocate filename.
+ Introduced in 226622349a4b1e16064649d4444a34fb4be4f464.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d3415d1f052530760b4617db45affcb984cfe35c
+Author: Mike FABIAN <mfabian@redhat.com>
+Date: Mon Apr 20 17:59:30 2015 +0200
+
+ Fix spelling mistake introduced by 748d47e69f5c12d8557d56a8a8ec166588da7b93
+
+ Sorry, my patch to fix the spelling mistakes in the ks_IN and sd_IN
+ locales fixed it only partly, I introduced a new spelling mistake
+ in the sd_IN locales. This patch fixes this.
+
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit 748d47e69f5c12d8557d56a8a8ec166588da7b93
+Author: Mike FABIAN <mfabian@redhat.com>
+Date: Wed Feb 19 11:46:45 2014 +0100
+
+ fix spelling mistakes in ks_IN and sd_IN devanagari locales
+
+ The codeset must be *before* the modifier.
+
+ See also: http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html
+
+ opengroup> The syntax for these environment variables is thus defined as:
+ opengroup>
+ opengroup> [language[_territory][.codeset][@modifier]]
+
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit c64fe5553aa4738f9d1d74a795f5651fbb7b1b09
+Author: Mike FABIAN <mfabian@redhat.com>
+Date: Wed Feb 19 11:50:55 2014 +0100
+
+ add be_BY.UTF-8@latin and sr_RS.UTF-8@latin to locale.dir
+
+ See also: https://bugzilla.redhat.com/show_bug.cgi?id=1066910
+
+ If these are not in locale.dir,
+
+ $ LANG=sr_RS.UTF-8@latin xterm
+
+ and
+
+ $ LANG=sr_RS@latin xterm
+
+ give the warning:
+
+ Warning: locale not supported by Xlib, locale set to C
+
+ and some programs (like xmms) fail to find translations for Serbian
+ in Latin because of this.
+
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit c85be01b006126c4407eebd1eb6e01a17312b7b4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun Mar 22 16:46:45 2015 -0700
+
+ Move Compose \ o / to be with other emoji compose sequences
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
commit 5a499ca7b064bf7e6a4fcc169f22862dce0c60c5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Mar 9 15:28:29 2015 -0700
diff --git a/lib/libX11/compile b/lib/libX11/compile
index a85b723c7..531136b06 100644
--- a/lib/libX11/compile
+++ b/lib/libX11/compile
@@ -3,7 +3,7 @@
scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/lib/libX11/configure b/lib/libX11/configure
index 4d60a206c..dad0e82bb 100644
--- a/lib/libX11/configure
+++ b/lib/libX11/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libX11 1.6.3.
+# Generated by GNU Autoconf 2.69 for libX11 1.6.4.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -651,8 +651,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libX11'
PACKAGE_TARNAME='libX11'
-PACKAGE_VERSION='1.6.3'
-PACKAGE_STRING='libX11 1.6.3'
+PACKAGE_VERSION='1.6.4'
+PACKAGE_STRING='libX11 1.6.4'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -932,8 +932,6 @@ enable_unix_transport
enable_tcp_transport
enable_ipv6
enable_local_transport
-enable_secure_rpc
-with_local_transport_order
enable_loadable_i18n
enable_loadable_xcursor
with_launchd
@@ -1512,7 +1510,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libX11 1.6.3 to adapt to many kinds of systems.
+\`configure' configures libX11 1.6.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1582,7 +1580,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libX11 1.6.3:";;
+ short | recursive ) echo "Configuration of libX11 1.6.4:";;
esac
cat <<\_ACEOF
@@ -1616,7 +1614,6 @@ Optional Features:
--enable-ipv6 Enable IPv6 support
--enable-local-transport
Enable os-specific local transport
- --enable-secure-rpc Enable Secure RPC
--enable-loadable-i18n Controls loadable i18n module support
--disable-loadable-xcursor
Controls loadable xcursor library support
@@ -1646,9 +1643,6 @@ Optional Packages:
(default: auto)
--with-perl Use perl for extracting information from files
(default: auto)
- --with-local-transport-order=LIST
- preference sorted list of transport types to try for
- local connections
--with-launchd Build with support for Apple's launchd (default:
auto)
--with-keysymdefdir=DIR The location of keysymdef.h (defaults to xproto
@@ -1752,7 +1746,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libX11 configure 1.6.3
+libX11 configure 1.6.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2278,7 +2272,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libX11 $as_me 1.6.3, which was
+It was created by libX11 $as_me 1.6.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4496,7 +4490,7 @@ fi
# Define the identity of the package.
PACKAGE='libX11'
- VERSION='1.6.3'
+ VERSION='1.6.4'
cat >>confdefs.h <<_ACEOF
@@ -18927,8 +18921,8 @@ fi
# Checks for pkg-config packages
# Always required
-X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.1.92'
-X11_EXTRA_DEPS="xcb >= 1.1.92"
+X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.11.1'
+X11_EXTRA_DEPS="xcb >= 1.11.1"
@@ -19385,187 +19379,6 @@ $as_echo "#define LOCALCONN 1" >>confdefs.h
-# Secure RPC detection macro from xtrans.m4
-
- # Check whether --enable-secure-rpc was given.
-if test "${enable_secure_rpc+set}" = set; then :
- enableval=$enable_secure_rpc; SECURE_RPC=$enableval
-else
- SECURE_RPC="try"
-fi
-
-
- if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
- FOUND_SECURE_RPC="no"
- for ac_func in authdes_seccreate authdes_create
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- FOUND_SECURE_RPC="yes"
-fi
-done
-
- if test "x$FOUND_SECURE_RPC" = "xno" ; then
- if test "x$SECURE_RPC" = "xyes" ; then
- as_fn_error $? "Secure RPC requested, but required functions not found" "$LINENO" 5
- fi
- SECURE_RPC="no"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsecretkey" >&5
-$as_echo_n "checking for library containing getsecretkey... " >&6; }
-if ${ac_cv_search_getsecretkey+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getsecretkey ();
-int
-main ()
-{
-return getsecretkey ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' rpcsvc; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_getsecretkey=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_getsecretkey+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_getsecretkey+:} false; then :
-
-else
- ac_cv_search_getsecretkey=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsecretkey" >&5
-$as_echo "$ac_cv_search_getsecretkey" >&6; }
-ac_res=$ac_cv_search_getsecretkey
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
- SECURE_RPC="yes"
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5
-$as_echo_n "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... " >&6; }
- if test "x$SECURE_RPC" = "xyes" ; then
-
-$as_echo "#define SECURE_RPC 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SECURE_RPC" >&5
-$as_echo "$SECURE_RPC" >&6; }
-
-
-# Preferred order to try transports for local connections
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what order to try transports in for local connections" >&5
-$as_echo_n "checking what order to try transports in for local connections... " >&6; }
-DEFAULT_LOCAL_TRANS=""
-case $host_os in
- solaris*)
- # On Solaris 2.6 through 9, named pipes (LOCAL_TRANS) were
- # faster than Unix domain sockets, but on Solaris 10 & later,
- # Unix domain sockets are faster now.
- if test "$UNIXCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}UNIX_TRANS"
- fi
- if test "$LOCALCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS"
- fi
- if test "$TCPCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
- fi
- ;;
- linux*)
- # LOCAL_TRANS is used for abstract sockets.
- if test "$UNIXCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS,UNIX_TRANS"
- fi
- if test "$TCPCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
- fi
- ;;
- *)
- if test "$LOCALCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS"
- fi
- if test "$UNIXCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}UNIX_TRANS"
- fi
- if test "$TCPCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
- fi
- ;;
-esac
-
-
-# Check whether --with-local-transport-order was given.
-if test "${with_local_transport_order+set}" = set; then :
- withval=$with_local_transport_order; LOCAL_TRANSPORT_LIST=$withval
-else
- LOCAL_TRANSPORT_LIST=$DEFAULT_LOCAL_TRANS
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define LOCAL_TRANSPORT_LIST $LOCAL_TRANSPORT_LIST
-_ACEOF
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCAL_TRANSPORT_LIST" >&5
-$as_echo "$LOCAL_TRANSPORT_LIST" >&6; }
-
# Check for dlopen
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if run-time linking is supported" >&5
$as_echo_n "checking if run-time linking is supported... " >&6; }
@@ -20835,11 +20648,11 @@ locales="\
iso8859-7 iso8859-8 iso8859-9 iso8859-9e ja ja.JIS \
ja_JP.UTF-8 ja.SJIS km_KH.UTF-8 ko koi8-c koi8-r \
koi8-u ko_KR.UTF-8 microsoft-cp1251 microsoft-cp1255 \
- microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 ru_RU.UTF-8 \
- sr_CS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 vi_VN.tcvn \
- vi_VN.viscii zh_CN zh_CN.gb18030 zh_CN.gbk zh_CN.UTF-8 \
- zh_HK.big5 zh_HK.big5hkscs zh_HK.UTF-8 zh_TW zh_TW.big5 \
- zh_TW.UTF-8"
+ microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 pt_PT.UTF-8 \
+ ru_RU.UTF-8 sr_CS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 \
+ vi_VN.tcvn vi_VN.viscii zh_CN zh_CN.gb18030 \
+ zh_CN.gbk zh_CN.UTF-8 zh_HK.big5 zh_HK.big5hkscs zh_HK.UTF-8 \
+ zh_TW zh_TW.big5 zh_TW.UTF-8"
XKEYSYMDB="${X11_DATADIR}/XKeysymDB"
@@ -21548,7 +21361,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libX11 $as_me 1.6.3, which was
+This file was extended by libX11 $as_me 1.6.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21614,7 +21427,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libX11 config.status 1.6.3
+libX11 config.status 1.6.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/lib/libX11/configure.ac b/lib/libX11/configure.ac
index 92b791c29..58f2681ad 100644
--- a/lib/libX11/configure.ac
+++ b/lib/libX11/configure.ac
@@ -1,7 +1,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libX11], [1.6.3],
+AC_INIT([libX11], [1.6.4],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libX11])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([src/config.h include/X11/XlibConf.h])
@@ -68,8 +68,8 @@ AC_SUBST(LDFLAGS_FOR_BUILD)
# Checks for pkg-config packages
# Always required
-X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.1.92'
-X11_EXTRA_DEPS="xcb >= 1.1.92"
+X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.11.1'
+X11_EXTRA_DEPS="xcb >= 1.11.1"
PKG_PROG_PKG_CONFIG()
@@ -87,81 +87,6 @@ m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$])
# Transport selection macro from xtrans.m4
XTRANS_CONNECTION_FLAGS
-# Secure RPC detection macro from xtrans.m4
-XTRANS_SECURE_RPC_FLAGS
-
-# Preferred order to try transports for local connections
-AC_MSG_CHECKING([what order to try transports in for local connections])
-DEFAULT_LOCAL_TRANS=""
-case $host_os in
- solaris*)
- # On Solaris 2.6 through 9, named pipes (LOCAL_TRANS) were
- # faster than Unix domain sockets, but on Solaris 10 & later,
- # Unix domain sockets are faster now.
- if test "$UNIXCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}UNIX_TRANS"
- fi
- if test "$LOCALCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS"
- fi
- if test "$TCPCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
- fi
- ;;
- linux*)
- # LOCAL_TRANS is used for abstract sockets.
- if test "$UNIXCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS,UNIX_TRANS"
- fi
- if test "$TCPCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
- fi
- ;;
- *)
- if test "$LOCALCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS"
- fi
- if test "$UNIXCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}UNIX_TRANS"
- fi
- if test "$TCPCONN" = "yes" ; then
- if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
- fi
- DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
- fi
- ;;
-esac
-
-AC_ARG_WITH(local-transport-order,
- AS_HELP_STRING([--with-local-transport-order=LIST], [preference sorted list of transport types to try for local connections]),
- [LOCAL_TRANSPORT_LIST=$withval],
- [LOCAL_TRANSPORT_LIST=$DEFAULT_LOCAL_TRANS])
-AC_DEFINE_UNQUOTED([LOCAL_TRANSPORT_LIST], [$LOCAL_TRANSPORT_LIST],
- [preference sorted list of transport types to try for local connections])
-AC_MSG_RESULT([$LOCAL_TRANSPORT_LIST])
-
# Check for dlopen
AC_MSG_CHECKING([if run-time linking is supported])
AC_SEARCH_LIBS(dlopen,[dl svld])
@@ -438,11 +363,11 @@ locales="\
iso8859-7 iso8859-8 iso8859-9 iso8859-9e ja ja.JIS \
ja_JP.UTF-8 ja.SJIS km_KH.UTF-8 ko koi8-c koi8-r \
koi8-u ko_KR.UTF-8 microsoft-cp1251 microsoft-cp1255 \
- microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 ru_RU.UTF-8 \
- sr_CS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 vi_VN.tcvn \
- vi_VN.viscii zh_CN zh_CN.gb18030 zh_CN.gbk zh_CN.UTF-8 \
- zh_HK.big5 zh_HK.big5hkscs zh_HK.UTF-8 zh_TW zh_TW.big5 \
- zh_TW.UTF-8"
+ microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 pt_PT.UTF-8 \
+ ru_RU.UTF-8 sr_CS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 \
+ vi_VN.tcvn vi_VN.viscii zh_CN zh_CN.gb18030 \
+ zh_CN.gbk zh_CN.UTF-8 zh_HK.big5 zh_HK.big5hkscs zh_HK.UTF-8 \
+ zh_TW zh_TW.big5 zh_TW.UTF-8"
AC_SUBST(locales)
XKEYSYMDB="${X11_DATADIR}/XKeysymDB"
diff --git a/lib/libX11/include/X11/Xlib.h b/lib/libX11/include/X11/Xlib.h
index 2bffa76de..84403f79e 100644
--- a/lib/libX11/include/X11/Xlib.h
+++ b/lib/libX11/include/X11/Xlib.h
@@ -88,39 +88,39 @@ typedef char *XPointer;
#define QueuedAfterReading 1
#define QueuedAfterFlush 2
-#define ConnectionNumber(dpy) (((_XPrivDisplay)dpy)->fd)
+#define ConnectionNumber(dpy) (((_XPrivDisplay)(dpy))->fd)
#define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root)
-#define DefaultScreen(dpy) (((_XPrivDisplay)dpy)->default_screen)
+#define DefaultScreen(dpy) (((_XPrivDisplay)(dpy))->default_screen)
#define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
#define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc)
#define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel)
#define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel)
#define AllPlanes ((unsigned long)~0L)
-#define QLength(dpy) (((_XPrivDisplay)dpy)->qlen)
+#define QLength(dpy) (((_XPrivDisplay)(dpy))->qlen)
#define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width)
#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
#define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries)
-#define ScreenCount(dpy) (((_XPrivDisplay)dpy)->nscreens)
-#define ServerVendor(dpy) (((_XPrivDisplay)dpy)->vendor)
-#define ProtocolVersion(dpy) (((_XPrivDisplay)dpy)->proto_major_version)
-#define ProtocolRevision(dpy) (((_XPrivDisplay)dpy)->proto_minor_version)
-#define VendorRelease(dpy) (((_XPrivDisplay)dpy)->release)
-#define DisplayString(dpy) (((_XPrivDisplay)dpy)->display_name)
+#define ScreenCount(dpy) (((_XPrivDisplay)(dpy))->nscreens)
+#define ServerVendor(dpy) (((_XPrivDisplay)(dpy))->vendor)
+#define ProtocolVersion(dpy) (((_XPrivDisplay)(dpy))->proto_major_version)
+#define ProtocolRevision(dpy) (((_XPrivDisplay)(dpy))->proto_minor_version)
+#define VendorRelease(dpy) (((_XPrivDisplay)(dpy))->release)
+#define DisplayString(dpy) (((_XPrivDisplay)(dpy))->display_name)
#define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
-#define BitmapUnit(dpy) (((_XPrivDisplay)dpy)->bitmap_unit)
-#define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order)
-#define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad)
-#define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order)
-#define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1)
-#define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read)
+#define BitmapUnit(dpy) (((_XPrivDisplay)(dpy))->bitmap_unit)
+#define BitmapBitOrder(dpy) (((_XPrivDisplay)(dpy))->bitmap_bit_order)
+#define BitmapPad(dpy) (((_XPrivDisplay)(dpy))->bitmap_pad)
+#define ImageByteOrder(dpy) (((_XPrivDisplay)(dpy))->byte_order)
+#define NextRequest(dpy) (((_XPrivDisplay)(dpy))->request + 1)
+#define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)(dpy))->last_request_read)
/* macros for screen oriented applications (toolkit) */
-#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
+#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)(dpy))->screens[scr])
#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
#define DisplayOfScreen(s) ((s)->display)
#define RootWindowOfScreen(s) ((s)->root)
@@ -1009,7 +1009,7 @@ typedef union _XEvent {
} XEvent;
#endif
-#define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
+#define XAllocID(dpy) ((*((_XPrivDisplay)(dpy))->resource_alloc)((dpy)))
/*
* per character font metric information.
diff --git a/lib/libX11/include/X11/Xlibint.h b/lib/libX11/include/X11/Xlibint.h
index 443155964..6b95bcf7d 100644
--- a/lib/libX11/include/X11/Xlibint.h
+++ b/lib/libX11/include/X11/Xlibint.h
@@ -38,6 +38,7 @@ from The Open Group.
* Warning, there be dragons here....
*/
+#include <stdint.h>
#include <X11/Xlib.h>
#include <X11/Xproto.h> /* to declare xEvent */
#include <X11/XlibConf.h> /* for configured options like XTHREADS */
@@ -54,14 +55,6 @@ from The Open Group.
#define _XFlush _XFlushIt
#endif
-/*
- * If your BytesReadable correctly detects broken connections, then
- * you should NOT define XCONN_CHECK_FREQ.
- */
-#ifndef XCONN_CHECK_FREQ
-#define XCONN_CHECK_FREQ 256
-#endif
-
struct _XGC
{
XExtData *ext_data; /* hook for extension to hang data */
@@ -205,10 +198,122 @@ struct _XDisplay
XGenericEventCookie * /* in */,
XGenericEventCookie * /* out*/);
void *cookiejar; /* cookie events returned but not claimed */
+#ifndef LONG64
+ unsigned long last_request_read_upper32bit;
+ unsigned long request_upper32bit;
+#endif
};
#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
+/*
+ * access "last_request_read" and "request" with 64bit
+ * warning: the value argument of the SET-macros must not
+ * have any side-effects because it may get called twice.
+ */
+#ifndef LONG64
+/* accessors for 32-bit unsigned long */
+
+#define X_DPY_GET_REQUEST(dpy) \
+ ( \
+ ((uint64_t)(((struct _XDisplay*)dpy)->request)) \
+ + (((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) << 32) \
+ )
+
+#define X_DPY_SET_REQUEST(dpy, value) \
+ ( \
+ (((struct _XDisplay*)dpy)->request = \
+ (value) & 0xFFFFFFFFUL), \
+ (((struct _XDisplay*)dpy)->request_upper32bit = \
+ ((uint64_t)(value)) >> 32), \
+ (void)0 /* don't use the result */ \
+ )
+
+#define X_DPY_GET_LAST_REQUEST_READ(dpy) \
+ ( \
+ ((uint64_t)(((struct _XDisplay*)dpy)->last_request_read)) \
+ + ( \
+ ((uint64_t)( \
+ ((struct _XDisplay*)dpy)->last_request_read_upper32bit \
+ )) << 32 \
+ ) \
+ )
+
+#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \
+ ( \
+ (((struct _XDisplay*)dpy)->last_request_read = \
+ (value) & 0xFFFFFFFFUL), \
+ (((struct _XDisplay*)dpy)->last_request_read_upper32bit = \
+ ((uint64_t)(value)) >> 32), \
+ (void)0 /* don't use the result */ \
+ )
+
+/*
+ * widen a 32-bit sequence number to a 64 sequence number.
+ * This macro makes the following assumptions:
+ * - ulseq refers to a sequence that has already been sent
+ * - ulseq means the most recent possible sequence number
+ * with these lower 32 bits.
+ *
+ * The following optimization is used:
+ * The comparison result is taken a 0 or 1 to avoid a branch.
+ */
+#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) \
+ ( \
+ ((uint64_t)ulseq) \
+ + \
+ (( \
+ ((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) \
+ - (uint64_t)( \
+ (ulseq) > (((struct _XDisplay*)dpy)->request) \
+ ) \
+ ) << 32) \
+ )
+
+#define X_DPY_REQUEST_INCREMENT(dpy) \
+ ( \
+ ((struct _XDisplay*)dpy)->request++, \
+ ( \
+ (((struct _XDisplay*)dpy)->request == 0) ? ( \
+ ((struct _XDisplay*)dpy)->request_upper32bit++ \
+ ) : 0 \
+ ), \
+ (void)0 /* don't use the result */ \
+ )
+
+
+#define X_DPY_REQUEST_DECREMENT(dpy) \
+ ( \
+ ( \
+ (((struct _XDisplay*)dpy)->request == 0) ? (\
+ ((struct _XDisplay*)dpy)->request--, /* wrap */ \
+ ((struct _XDisplay*)dpy)->request_upper32bit-- \
+ ) : ( \
+ ((struct _XDisplay*)dpy)->request-- \
+ ) \
+ ), \
+ (void)0 /* don't use the result */ \
+ )
+
+#else
+/* accessors for 64-bit unsigned long */
+#define X_DPY_GET_REQUEST(dpy) \
+ (((struct _XDisplay*)dpy)->request)
+#define X_DPY_SET_REQUEST(dpy, value) \
+ ((struct _XDisplay*)dpy)->request = (value)
+
+#define X_DPY_GET_LAST_REQUEST_READ(dpy) \
+ (((struct _XDisplay*)dpy)->last_request_read)
+#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \
+ ((struct _XDisplay*)dpy)->last_request_read = (value)
+
+#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) ulseq
+
+#define X_DPY_REQUEST_INCREMENT(dpy) ((struct _XDisplay*)dpy)->request++
+#define X_DPY_REQUEST_DECREMENT(dpy) ((struct _XDisplay*)dpy)->request--
+#endif
+
+
#ifndef _XEVENT_
/*
* _QEvent datatype for use in input queueing.
@@ -673,6 +778,11 @@ typedef struct _XInternalAsync {
XPointer data;
} _XAsyncHandler;
+/*
+ * This struct is part of the ABI and is defined by value
+ * in user-code. This means that we cannot make
+ * the sequence-numbers 64bit.
+ */
typedef struct _XAsyncEState {
unsigned long min_sequence_number;
unsigned long max_sequence_number;
diff --git a/lib/libX11/man/XFree.man b/lib/libX11/man/XFree.man
index ffc513bde..89b640884 100644
--- a/lib/libX11/man/XFree.man
+++ b/lib/libX11/man/XFree.man
@@ -92,6 +92,7 @@ The
function is a general-purpose Xlib routine that frees the specified data.
You must use it to free any objects that were allocated by Xlib,
unless an alternate function is explicitly specified for the object.
-A NULL pointer cannot be passed to this function.
+
+If data is NULL, no operation is performed.
.SH "SEE ALSO"
\fI\*(xL\fP
diff --git a/lib/libX11/modules/im/ximcp/imExten.c b/lib/libX11/modules/im/ximcp/imExten.c
index 58de32e60..c2e48a891 100644
--- a/lib/libX11/modules/im/ximcp/imExten.c
+++ b/lib/libX11/modules/im/ximcp/imExten.c
@@ -367,7 +367,7 @@ _XimParseExtensionList(
if (!(n = _XimCountNumberOfExtension(data[0], (CARD8 *)&data[1])))
return True;
- buf = (CARD8 *)&data[1];;
+ buf = (CARD8 *)&data[1];
for (i = 0; i < n; i++) {
len = *((INT16 *)(&buf[2]));
for (j = 0; j < num; j++) {
diff --git a/lib/libX11/modules/im/ximcp/imLcIm.c b/lib/libX11/modules/im/ximcp/imLcIm.c
index f3678868c..c19695df8 100644
--- a/lib/libX11/modules/im/ximcp/imLcIm.c
+++ b/lib/libX11/modules/im/ximcp/imLcIm.c
@@ -447,7 +447,7 @@ _XimWriteCachedDefaultTree(
+ XIM_CACHE_TREE_ALIGNMENT-1) & -XIM_CACHE_TREE_ALIGNMENT;
DefTreeBase *b = &im->private.local.base;
- if (! b->tree && ! (b->tree = Xmalloc (sizeof(DefTree))) )
+ if (! b->tree && ! (b->tree = Xcalloc (1, sizeof(DefTree))) )
return;
if (! b->mb && ! (b->mb = Xmalloc (1)) )
return;
@@ -457,13 +457,11 @@ _XimWriteCachedDefaultTree(
return;
/* First entry is always unused */
- memset (b->tree, 0, sizeof(DefTree));
b->mb[0] = 0;
b->wc[0] = 0;
b->utf8[0] = 0;
- m = Xmalloc (msize);
- memset (m, 0, msize);
+ m = Xcalloc (1, msize);
m->id = XIM_CACHE_MAGIC;
m->version = XIM_CACHE_VERSION;
m->top = im->private.local.top;
diff --git a/lib/libX11/modules/im/ximcp/imLcPrs.c b/lib/libX11/modules/im/ximcp/imLcPrs.c
index 9bb45ff31..60215c706 100644
--- a/lib/libX11/modules/im/ximcp/imLcPrs.c
+++ b/lib/libX11/modules/im/ximcp/imLcPrs.c
@@ -496,12 +496,12 @@ parseline(
token = nexttoken(fp, tokenbuf, &lastch);
if (token != KEY && token != STRING)
goto error;
- if ((filename = TransFileName(im, tokenbuf)) == NULL)
- goto error;
if (++depth > 100)
goto error;
+ if ((filename = TransFileName(im, tokenbuf)) == NULL)
+ goto error;
infp = _XFopenFile(filename, "r");
- Xfree(filename);
+ Xfree(filename);
if (infp == NULL)
goto error;
parsestringfile(infp, im, depth);
diff --git a/lib/libX11/modules/om/generic/omGeneric.c b/lib/libX11/modules/om/generic/omGeneric.c
index a835f00d7..61070ca3f 100644
--- a/lib/libX11/modules/om/generic/omGeneric.c
+++ b/lib/libX11/modules/om/generic/omGeneric.c
@@ -65,32 +65,6 @@
#define CHARSET_ENCODING_FIELD 14
#define XLFD_MAX_LEN 255
-#if 0
-extern int _XmbDefaultTextEscapement(), _XwcDefaultTextEscapement(),
- _Xutf8DefaultTextEscapement();
-extern int _XmbDefaultTextExtents(), _XwcDefaultTextExtents(),
- _Xutf8DefaultTextExtents();
-extern Status _XmbDefaultTextPerCharExtents(), _XwcDefaultTextPerCharExtents(),
- _Xutf8DefaultTextPerCharExtents();
-extern int _XmbDefaultDrawString(), _XwcDefaultDrawString(),
- _Xutf8DefaultDrawString();
-extern void _XmbDefaultDrawImageString(), _XwcDefaultDrawImageString(),
- _Xutf8DefaultDrawImageString();
-
-extern int _XmbGenericTextEscapement(), _XwcGenericTextEscapement(),
- _Xutf8GenericTextEscapement();
-extern int _XmbGenericTextExtents(), _XwcGenericTextExtents(),
- _Xutf8GenericTextExtents();
-extern Status _XmbGenericTextPerCharExtents(), _XwcGenericTextPerCharExtents(),
- _Xutf8GenericTextPerCharExtents();
-extern int _XmbGenericDrawString(), _XwcGenericDrawString(),
- _Xutf8GenericDrawString();
-extern void _XmbGenericDrawImageString(), _XwcGenericDrawImageString(),
- _Xutf8GenericDrawImageString();
-
-extern void _XlcDbg_printValue (const char *str, char **value, int num);
-#endif
-
/* For VW/UDC start */
static FontData
@@ -101,11 +75,10 @@ init_fontdata(
FontData fd;
int i;
- fd = Xmalloc(sizeof(FontDataRec) * font_data_count);
+ fd = Xcalloc(font_data_count, sizeof(FontDataRec));
if(fd == (FontData) NULL)
return False;
- memset(fd, 0x00, sizeof(FontData) * font_data_count);
for(i = 0 ; i < font_data_count ; i++)
fd[i] = font_data[i];
@@ -126,11 +99,10 @@ init_vrotate(
if(type == VROTATE_NONE)
return (VRotate)NULL;
- vrotate = Xmalloc(sizeof(VRotateRec) * font_data_count);
+ vrotate = Xcalloc(font_data_count, sizeof(VRotateRec));
if(vrotate == (VRotate) NULL)
return False;
- memset(vrotate, 0x00, sizeof(VRotateRec) * font_data_count);
for(i = 0 ; i < font_data_count ; i++) {
vrotate[i].charset_name = font_data[i].name;
vrotate[i].side = font_data[i].side;
@@ -155,10 +127,9 @@ init_fontset(
count = XOM_GENERIC(oc->core.om)->data_num;
data = XOM_GENERIC(oc->core.om)->data;
- font_set = Xmalloc(sizeof(FontSetRec) * count);
+ font_set = Xcalloc(count, sizeof(FontSetRec));
if (font_set == NULL)
return False;
- memset((char *) font_set, 0x00, sizeof(FontSetRec) * count);
gen = XOC_GENERIC(oc);
gen->font_set_num = count;
@@ -638,34 +609,6 @@ is_match_charset(
return False;
}
-#if 0
-static char *
-get_font_name_from_list(
- XOC oc,
- char *pattern,
- FontData font_data)
-{
- char **list, *name = (char *)NULL, *fname;
- int count = 0, i;
-
- list = XListFonts(oc->core.om->core.display, pattern, MAXFONTS, &count);
- if (list == NULL)
- return NULL;
-
- for (i = 0; i < count; i++) {
- fname = list[i];
- if(is_match_charset(font_data, fname) == True) {
- name = strdup(fname);
- break;
- }
- }
-
- XFreeFontNames(list);
-
- return name;
-}
-#endif
-
static int
parse_all_name(
XOC oc,
@@ -1094,11 +1037,10 @@ parse_vw(
Xfree(vrotate);
if(sub_num > 0) {
- vrotate = font_set->vrotate = Xmalloc
- (sizeof(VRotateRec) * sub_num);
+ vrotate = font_set->vrotate = Xcalloc(sub_num,
+ sizeof(VRotateRec));
if(font_set->vrotate == (VRotate)NULL)
return (-1);
- memset(font_set->vrotate, 0x00, sizeof(VRotateRec) * sub_num);
for(i = 0 ; i < sub_num ; i++) {
vrotate[i].charset_name = font_set->substitute[i].name;
@@ -1881,13 +1823,13 @@ read_EncodingInfo(
{
FontData font_data,ret;
char *buf, *bufptr,*scp;
- int len;
+ int len, i;
font_data = Xcalloc(count, sizeof(FontDataRec));
if (font_data == NULL)
return NULL;
ret = font_data;
- for ( ; count-- > 0; font_data++) {
+ for (i = 0; i < count; i++, font_data++) {
/*
strcpy(buf, *value++);
*/
@@ -1899,7 +1841,8 @@ read_EncodingInfo(
len = strlen(buf);
font_data->name = Xmalloc(len + 1);
if (font_data->name == NULL) {
- Xfree(font_data);
+ free_fontdataOM(ret, i + 1);
+ Xfree(ret);
return NULL;
}
strncpy(font_data->name, buf,len);
diff --git a/lib/libX11/modules/om/generic/omImText.c b/lib/libX11/modules/om/generic/omImText.c
index 1bc08bc25..9cfb5497d 100644
--- a/lib/libX11/modules/om/generic/omImText.c
+++ b/lib/libX11/modules/om/generic/omImText.c
@@ -29,10 +29,6 @@
#include "Xlibint.h"
#include "XomGeneric.h"
-#if 0
-extern int _XomGenericTextExtents(), _XomGenericDrawString();
-#endif
-
#define GET_VALUE_MASK (GCFunction | GCForeground | GCBackground | GCFillStyle)
#define SET_VALUE_MASK (GCFunction | GCForeground | GCFillStyle)
diff --git a/lib/libX11/nls/compose.dir.pre b/lib/libX11/nls/compose.dir.pre
index e52a5c568..e59cbe859 100644
--- a/lib/libX11/nls/compose.dir.pre
+++ b/lib/libX11/nls/compose.dir.pre
@@ -301,7 +301,7 @@ en_US.UTF-8/Compose: ca_AD.UTF-8
en_US.UTF-8/Compose: ca_ES.UTF-8
en_US.UTF-8/Compose: ca_FR.UTF-8
en_US.UTF-8/Compose: ca_IT.UTF-8
-en_US.UTF-8/Compose: cs_CZ.UTF-8
+cs_CZ.UTF-8/Compose: cs_CZ.UTF-8
en_US.UTF-8/Compose: cy_GB.UTF-8
en_US.UTF-8/Compose: da_DK.UTF-8
en_US.UTF-8/Compose: de_AT.UTF-8
@@ -389,7 +389,7 @@ km_KH.UTF-8/Compose: km_KH.UTF-8
en_US.UTF-8/Compose: kn_IN.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: ks_IN@devanagari.UTF-8
+en_US.UTF-8/Compose: ks_IN.UTF-8@devanagari
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
@@ -422,14 +422,14 @@ en_US.UTF-8/Compose: ph_PH.UTF-8
en_US.UTF-8/Compose: pl_PL.UTF-8
en_US.UTF-8/Compose: pp_AN.UTF-8
pt_BR.UTF-8/Compose: pt_BR.UTF-8
-en_US.UTF-8/Compose: pt_PT.UTF-8
+pt_PT.UTF-8/Compose: pt_PT.UTF-8
en_US.UTF-8/Compose: ro_RO.UTF-8
ru_RU.UTF-8/Compose: ru_RU.UTF-8
en_US.UTF-8/Compose: ru_UA.UTF-8
en_US.UTF-8/Compose: rw_RW.UTF-8
en_US.UTF-8/Compose: sa_IN.UTF-8
en_US.UTF-8/Compose: sd_IN.UTF-8
-en_US.UTF-8/Compose: sd_IN@devanagari.UTF-8
+en_US.UTF-8/Compose: sd_IN.UTF-8@devanagari
en_US.UTF-8/Compose: se_NO.UTF-8
en_US.UTF-8/Compose: sh_BA.UTF-8
en_US.UTF-8/Compose: sh_YU.UTF-8
diff --git a/lib/libX11/nls/en_US.UTF-8/Compose.pre b/lib/libX11/nls/en_US.UTF-8/Compose.pre
index 972e111b9..adc24fb5b 100644
--- a/lib/libX11/nls/en_US.UTF-8/Compose.pre
+++ b/lib/libX11/nls/en_US.UTF-8/Compose.pre
@@ -276,6 +276,9 @@ XCOMM Other symbols
<Multi_key> <colon> <parenright> : "☺" U263A # WHITE SMILING FACE
<Multi_key> <colon> <parenleft> : "☹" U2639 # WHITE FROWNING FACE
+<Multi_key> <backslash> <o> <slash> : "🙌" # PERSON RAISING BOTH HANDS IN CELEBRATION
+
+<Multi_key> <p> <o> <o> : "💩" U1F4A9 # PILE OF POO
<Multi_key> <F> <U> : "🖕" U1F595 # REVERSED HAND WITH MIDDLE FINGER EXTENDED
<Multi_key> <L> <L> <A> <P> : "🖖" U1F596 # RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS
@@ -5840,8 +5843,6 @@ XCOMM
<dead_circumflex> <Cyrillic_ER> : "Р̂" # CYRILLIC CAPITAL LETTER ER WITH COMBINING CIRCUMFLEX ACCENT
<Multi_key> <asciicircum> <Cyrillic_ER> : "Р̂" # CYRILLIC CAPITAL LETTER ER WITH COMBINING CIRCUMFLEX ACCENT
-<Multi_key> <backslash> <o> <slash> : "🙌" # PERSON RAISING BOTH HANDS IN CELEBRATION
-
XCOMM APL support Geoff Streeter 2012-01-04
XCOMM APL was initially an overstruck language. The original APL terminal was an IBM golfball
@@ -6016,3 +6017,105 @@ 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
+
+XCOMM Diacritics used in African languages
+<dead_acute> <U025B> : "ɛ́" # LATIN SMALL LETTER EPSILON WITH ACUTE
+<dead_grave> <U025B> : "ɛ̀" # LATIN SMALL LETTER EPSILON WITH GRAVE
+<dead_circumflex> <U025B> : "ɛ̂" # LATIN SMALL LETTER EPSILON WITH CIRCUMFLEX
+<dead_caron> <U025B> : "ɛ̌" # LATIN SMALL LETTER EPSILON WITH CARON
+<dead_macron> <U025B> : "ɛ̄" # LATIN SMALL LETTER EPSILON WITH MACRON
+<dead_tilde> <U025B> : "ɛ̃" # LATIN SMALL LETTER EPSILON WITH TILDE
+<dead_acute> <dead_tilde> <U025B> : "ɛ̃́" # LATIN SMALL LETTER EPSILON WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <U025B> : "ɛ̃̀" # LATIN SMALL LETTER EPSILON WITH TILDE AND GRAVE
+<dead_acute> <U0190> : "Ɛ́" # LATIN CAPITAL LETTER EPSILON WITH ACUTE
+<dead_grave> <U0190> : "Ɛ̀" # LATIN CAPITAL LETTER EPSILON WITH GRAVE
+<dead_circumflex> <U0190> : "Ɛ̂" # LATIN CAPITAL LETTER EPSILON WITH CIRCUMFLEX
+<dead_caron> <U0190> : "Ɛ̌" # LATIN CAPITAL LETTER EPSILON WITH CARON
+<dead_macron> <U0190> : "Ɛ̄" # LATIN CAPITAL LETTER EPSILON WITH MACRON
+<dead_tilde> <U0190> : "Ɛ̃" # LATIN CAPITAL LETTER EPSILON WITH TILDE
+<dead_acute> <dead_tilde> <U0190> : "Ɛ̃́" # LATIN CAPITAL LETTER EPSILON WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <U0190> : "Ɛ̃̀" # LATIN CAPITAL LETTER EPSILON WITH TILDE AND GRAVE
+<dead_acute> <U0269> : "ɩ́" # LATIN SMALL LETTER IOTA WITH ACUTE
+<dead_grave> <U0269> : "ɩ̀" # LATIN SMALL LETTER IOTA WITH GRAVE
+<dead_circumflex> <U0269> : "ɩ̂" # LATIN SMALL LETTER IOTA WITH CIRCUMFLEX
+<dead_caron> <U0269> : "ɩ̌" # LATIN SMALL LETTER IOTA WITH CARON
+<dead_macron> <U0269> : "ɩ̄" # LATIN SMALL LETTER IOTA WITH MACRON
+<dead_acute> <U0196> : "Ɩ́" # LATIN CAPITAL LETTER IOTA WITH ACUTE
+<dead_grave> <U0196> : "Ɩ̀" # LATIN CAPITAL LETTER IOTA WITH GRAVE
+<dead_circumflex> <U0196> : "Ɩ̂" # LATIN CAPITAL LETTER IOTA WITH CIRCUMFLEX
+<dead_caron> <U0196> : "Ɩ̌" # LATIN CAPITAL LETTER IOTA WITH CARON
+<dead_macron> <U0196> : "Ɩ̄" # LATIN CAPITAL LETTER IOTA WITH MACRON
+<dead_acute> <U0254> : "ɔ́" # LATIN SMALL LETTER OPEN O WITH ACUTE
+<dead_grave> <U0254> : "ɔ̀" # LATIN SMALL LETTER OPEN O WITH GRAVE
+<dead_circumflex> <U0254> : "ɔ̂" # LATIN SMALL LETTER OPEN O WITH CIRCUMFLEX
+<dead_caron> <U0254> : "ɔ̌" # LATIN SMALL LETTER OPEN O WITH CARON
+<dead_macron> <U0254> : "ɔ̄" # LATIN SMALL LETTER OPEN O WITH MACRON
+<dead_tilde> <U0254> : "ɔ̃" # LATIN SMALL LETTER OPEN O WITH TILDE
+<dead_acute> <dead_tilde> <U0254> : "ɔ̃́" # LATIN SMALL LETTER OPEN O WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <U0254> : "ɔ̃̀" # LATIN SMALL LETTER OPEN O WITH TILDE AND GRAVE
+<dead_acute> <U0186> : "Ɔ́" # LATIN CAPITAL LETTER OPEN O WITH ACUTE
+<dead_grave> <U0186> : "Ɔ̀" # LATIN CAPITAL LETTER OPEN O WITH GRAVE
+<dead_circumflex> <U0186> : "Ɔ̂" # LATIN CAPITAL LETTER OPEN O WITH CIRCUMFLEX
+<dead_caron> <U0186> : "Ɔ̌" # LATIN CAPITAL LETTER OPEN O WITH CARON
+<dead_macron> <U0186> : "Ɔ̄" # LATIN CAPITAL LETTER OPEN O WITH MACRON
+<dead_tilde> <U0186> : "Ɔ̃" # LATIN CAPITAL LETTER OPEN O WITH TILDE
+<dead_acute> <dead_tilde> <U0186> : "Ɔ̃́" # LATIN CAPITAL LETTER OPEN O WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <U0186> : "Ɔ̃̀" # LATIN CAPITAL LETTER OPEN O WITH TILDE AND GRAVE
+<dead_acute> <U01DD> : "ǝ́" # LATIN SMALL LETTER TURNED E WITH ACUTE
+<dead_grave> <U01DD> : "ǝ̀" # LATIN SMALL LETTER TURNED E WITH GRAVE
+<dead_circumflex> <U01DD> : "ǝ̂" # LATIN SMALL LETTER TURNED E WITH CIRCUMFLEX
+<dead_caron> <U01DD> : "ǝ̌" # LATIN SMALL LETTER TURNED E WITH CARON
+<dead_macron> <U01DD> : "ǝ̄" # LATIN SMALL LETTER TURNED E WITH MACRON
+<dead_tilde> <U01DD> : "ǝ̃" # LATIN SMALL LETTER TURNED E WITH TILDE
+<dead_acute> <dead_tilde> <U01DD> : "ǝ̃́" # LATIN SMALL LETTER TURNED E WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <U01DD> : "ǝ̃̀" # LATIN SMALL LETTER TURNED E WITH TILDE AND GRAVE
+<dead_acute> <U018E> : "Ǝ́" # LATIN CAPITAL LETTER TURNED E WITH ACUTE
+<dead_grave> <U018E> : "Ǝ̀" # LATIN CAPITAL LETTER TURNED E WITH GRAVE
+<dead_circumflex> <U018E> : "Ǝ̂" # LATIN CAPITAL LETTER TURNED E WITH CIRCUMFLEX
+<dead_caron> <U018E> : "Ǝ̌" # LATIN CAPITAL LETTER TURNED E WITH CARON
+<dead_macron> <U018E> : "Ǝ̄" # LATIN CAPITAL LETTER TURNED E WITH MACRON
+<dead_tilde> <U018E> : "Ǝ̃" # LATIN CAPITAL LETTER TURNED E WITH TILDE
+<dead_acute> <dead_tilde> <U018E> : "Ǝ̃́" # LATIN CAPITAL LETTER TURNED E WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <U018E> : "Ǝ̃̀" # LATIN CAPITAL LETTER TURNED E WITH TILDE AND GRAVE
+<dead_acute> <U028B> : "ʋ́" # LATIN SMALL LETTER V WITH HOOK WITH ACUTE
+<dead_grave> <U028B> : "ʋ̀" # LATIN SMALL LETTER V WITH HOOK WITH GRAVE
+<dead_circumflex> <U028B> : "ʋ̂" # LATIN SMALL LETTER V WITH HOOK WITH CIRCUMFLEX
+<dead_caron> <U028B> : "ʋ̌" # LATIN SMALL LETTER V WITH HOOK WITH CARON
+<dead_macron> <U028B> : "ʋ̄" # LATIN SMALL LETTER V WITH HOOK WITH MACRON
+<dead_acute> <U01B2> : "Ʋ́" # LATIN CAPITAL LETTER V WITH HOOK WITH ACUTE
+<dead_grave> <U01B2> : "Ʋ̀" # LATIN CAPITAL LETTER V WITH HOOK WITH GRAVE
+<dead_circumflex> <U01B2> : "Ʋ̂" # LATIN CAPITAL LETTER V WITH HOOK WITH CIRCUMFLEX
+<dead_caron> <U01B2> : "Ʋ̌" # LATIN CAPITAL LETTER V WITH HOOK WITH CARON
+<dead_macron> <U01B2> : "Ʋ̄" # LATIN CAPITAL LETTER V WITH HOOK WITH MACRON
+<dead_acute> <U028A> : "ʊ́" # LATIN SMALL LETTER UPSILON WITH ACUTE
+<dead_grave> <U028A> : "ʊ̀" # LATIN SMALL LETTER UPSILONK WITH GRAVE
+<dead_circumflex> <U028A> : "ʊ̂" # LATIN SMALL LETTER UPSILON WITH CIRCUMFLEX
+<dead_caron> <U028A> : "ʊ̌" # LATIN SMALL LETTER UPSILON WITH CARON
+<dead_macron> <U028A> : "ʊ̄" # LATIN SMALL LETTER UPSILON WITH MACRON
+<dead_acute> <U01B1> : "Ʊ́" # LATIN CAPITAL LETTER UPSILON WITH ACUTE
+<dead_grave> <U01B1> : "Ʊ̀" # LATIN CAPITAL LETTER UPSILONK WITH GRAVE
+<dead_circumflex> <U01B1> : "Ʊ̂" # LATIN CAPITAL LETTER UPSILON WITH CIRCUMFLEX
+<dead_caron> <U01B1> : "Ʊ̌" # LATIN CAPITAL LETTER UPSILON WITH CARON
+<dead_macron> <U01B1> : "Ʊ̄" # LATIN CAPITAL LETTER UPSILON WITH MACRON
+<dead_acute> <dead_tilde> <a> : "ã́" # LATIN SMALL LETTER A WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <a> : "ã̀" # LATIN SMALL LETTER A WITH TILDE AND GRAVE
+<dead_acute> <dead_tilde> <A> : "Ã́" # LATIN CAPITAL LETTER A WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <A> : "Ã̀" # LATIN CAPITAL LETTER A WITH TILDE AND GRAVE
+<dead_acute> <dead_tilde> <e> : "ẽ́" # LATIN SMALL LETTER E WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <e> : "ẽ̀" # LATIN SMALL LETTER E WITH TILDE AND GRAVE
+<dead_acute> <dead_tilde> <E> : "Ẽ́" # LATIN CAPITAL LETTER E WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <E> : "Ẽ̀" # LATIN CAPITAL LETTER E WITH TILDE AND GRAVE
+<dead_acute> <dead_tilde> <i> : "ĩ́" # LATIN SMALL LETTER I WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <i> : "ĩ̀" # LATIN SMALL LETTER I WITH TILDE AND GRAVE
+<dead_acute> <dead_tilde> <I> : "Ĩ́" # LATIN CAPITAL LETTER I WITH TILDE AND ACUTE
+<dead_grave> <dead_tilde> <I> : "Ĩ̀" # LATIN CAPITAL LETTER I WITH TILDE AND GRAVE
+<dead_grave> <dead_tilde> <o> : "õ̀" # LATIN SMALL LETTER O WITH TILDE AND GRAVE
+<dead_grave> <dead_tilde> <O> : "Õ̀" # LATIN CAPITAL LETTER O WITH TILDE AND GRAVE
+<dead_grave> <dead_tilde> <u> : "ũ̀" # LATIN SMALL LETTER U WITH TILDE AND GRAVE
+<dead_grave> <dead_tilde> <U> : "Ũ̀" # LATIN CAPITAL LETTER U WITH TILDE AND GRAVE
+<dead_grave> <m> : "m̀" # LATIN SMALL LETTER M WITH GRAVE
+<dead_grave> <M> : "M̀" # LATIN CAPITAL LETTER M WITH GRAVE
+<dead_acute> <eng> : "ŋ́" # LATIN SMALL LETTER ENG WITH ACUTE
+<dead_grave> <eng> : "ŋ̀" # LATIN SMALL LETTER ENG WITH GRAVE
+<dead_acute> <ENG> : "Ŋ́" # LATIN CAPITAL LETTER ENG WITH ACUTE
+<dead_grave> <ENG> : "Ŋ̀" # LATIN CAPITAL LETTER ENG WITH GRAVE
diff --git a/lib/libX11/nls/locale.alias.pre b/lib/libX11/nls/locale.alias.pre
index 1319492fb..d9f078551 100644
--- a/lib/libX11/nls/locale.alias.pre
+++ b/lib/libX11/nls/locale.alias.pre
@@ -750,8 +750,8 @@ KO_KR.UTF-8: ko_KR.UTF-8
ks: ks_IN.UTF-8
ks_IN: ks_IN.UTF-8
ks_IN.utf8: ks_IN.UTF-8
-ks_IN@devanagari: ks_IN@devanagari.UTF-8
-ks_IN@devanagari.utf8: ks_IN@devanagari.UTF-8
+ks_IN@devanagari: ks_IN.UTF-8@devanagari
+ks_IN.utf8@devanagari: ks_IN.UTF-8@devanagari
kw: kw_GB.ISO8859-1
kw_GB: kw_GB.ISO8859-1
kw_GB.iso88591: kw_GB.ISO8859-1
@@ -982,9 +982,9 @@ rw_RW.ISO-8859-1: rw_RW.ISO8859-1
rw_RW.utf8: rw_RW.UTF-8
sd: sd_IN.UTF-8
sd_IN.utf8: sd_IN.UTF-8
-sd@devanagari: sd_IN@devanagari.UTF-8
-sd_IN@devanagari: sd_IN@devanagari.UTF-8
-sd_IN@devanagari.utf8: sd_IN@devanagari.UTF-8
+sd@devanagari: sd_IN.UTF-8@devanagari
+sd_IN@devanagari: sd_IN.UTF-8@devanagari
+sd_IN.utf8@devanagari: sd_IN.UTF-8@devanagari
se_NO: se_NO.UTF-8
se_NO.utf8: se_NO.UTF-8
XCOMM sh was the old ISO code for Serbo-Croatian (now individual sr and hr).
diff --git a/lib/libX11/nls/locale.dir.pre b/lib/libX11/nls/locale.dir.pre
index ab1bacec6..c4740a7e6 100644
--- a/lib/libX11/nls/locale.dir.pre
+++ b/lib/libX11/nls/locale.dir.pre
@@ -292,6 +292,7 @@ en_US.UTF-8/XLC_LOCALE: ar_YE.UTF-8
en_US.UTF-8/XLC_LOCALE: as_IN.UTF-8
en_US.UTF-8/XLC_LOCALE: az_AZ.UTF-8
en_US.UTF-8/XLC_LOCALE: be_BY.UTF-8
+en_US.UTF-8/XLC_LOCALE: be_BY.UTF-8@latin
en_US.UTF-8/XLC_LOCALE: bg_BG.UTF-8
en_US.UTF-8/XLC_LOCALE: bn_BD.UTF-8
en_US.UTF-8/XLC_LOCALE: bn_IN.UTF-8
@@ -301,7 +302,7 @@ en_US.UTF-8/XLC_LOCALE: ca_AD.UTF-8
en_US.UTF-8/XLC_LOCALE: ca_ES.UTF-8
en_US.UTF-8/XLC_LOCALE: ca_FR.UTF-8
en_US.UTF-8/XLC_LOCALE: ca_IT.UTF-8
-en_US.UTF-8/XLC_LOCALE: cs_CZ.UTF-8
+cs_CZ.UTF-8/XLC_LOCALE: cs_CZ.UTF-8
en_US.UTF-8/XLC_LOCALE: cy_GB.UTF-8
en_US.UTF-8/XLC_LOCALE: cs_CZ.UTF-8
en_US.UTF-8/XLC_LOCALE: da_DK.UTF-8
@@ -389,7 +390,7 @@ en_US.UTF-8/XLC_LOCALE: kl_GL.UTF-8
en_US.UTF-8/XLC_LOCALE: km_KH.UTF-8
en_US.UTF-8/XLC_LOCALE: kn_IN.UTF-8
en_US.UTF-8/XLC_LOCALE: ks_IN.UTF-8
-en_US.UTF-8/XLC_LOCALE: ks_IN@devanagari.UTF-8
+en_US.UTF-8/XLC_LOCALE: ks_IN.UTF-8@devanagari
ko_KR.UTF-8/XLC_LOCALE: ko_KR.UTF-8
en_US.UTF-8/XLC_LOCALE: ku_TR.UTF-8
en_US.UTF-8/XLC_LOCALE: kw_GB.UTF-8
@@ -422,14 +423,14 @@ en_US.UTF-8/XLC_LOCALE: ph_PH.UTF-8
en_US.UTF-8/XLC_LOCALE: pl_PL.UTF-8
en_US.UTF-8/XLC_LOCALE: pp_AN.UTF-8
pt_BR.UTF-8/XLC_LOCALE: pt_BR.UTF-8
-en_US.UTF-8/XLC_LOCALE: pt_PT.UTF-8
+pt_PT.UTF-8/XLC_LOCALE: pt_PT.UTF-8
en_US.UTF-8/XLC_LOCALE: ro_RO.UTF-8
ru_RU.UTF-8/XLC_LOCALE: ru_RU.UTF-8
en_US.UTF-8/XLC_LOCALE: ru_UA.UTF-8
en_US.UTF-8/XLC_LOCALE: rw_RW.UTF-8
en_US.UTF-8/XLC_LOCALE: sa_IN.UTF-8
en_US.UTF-8/XLC_LOCALE: sd_IN.UTF-8
-en_US.UTF-8/XLC_LOCALE: sd_IN@devanagari.UTF-8
+en_US.UTF-8/XLC_LOCALE: sd_IN.UTF-8@devanagari
en_US.UTF-8/XLC_LOCALE: se_NO.UTF-8
en_US.UTF-8/XLC_LOCALE: sh_BA.UTF-8
en_US.UTF-8/XLC_LOCALE: sh_YU.UTF-8
@@ -440,6 +441,7 @@ en_US.UTF-8/XLC_LOCALE: sq_AL.UTF-8
en_US.UTF-8/XLC_LOCALE: sr_CS.UTF-8
en_US.UTF-8/XLC_LOCALE: sr_ME.UTF-8
en_US.UTF-8/XLC_LOCALE: sr_RS.UTF-8
+en_US.UTF-8/XLC_LOCALE: sr_RS.UTF-8@latin
en_US.UTF-8/XLC_LOCALE: sr_YU.UTF-8
en_US.UTF-8/XLC_LOCALE: ss_ZA.UTF-8
en_US.UTF-8/XLC_LOCALE: st_ZA.UTF-8
diff --git a/lib/libX11/nls/pt_PT.UTF-8/Compose.pre b/lib/libX11/nls/pt_PT.UTF-8/Compose.pre
new file mode 100644
index 000000000..31d937715
--- /dev/null
+++ b/lib/libX11/nls/pt_PT.UTF-8/Compose.pre
@@ -0,0 +1,3 @@
+include "X11_LOCALEDATADIR/en_US.UTF-8/Compose"
+<dead_acute> <C> : "Ç" Ccedilla # LATIN CAPITAL LETTER C WITH CEDILLA
+<dead_acute> <c> : "ç" ccedilla # LATIN SMALL LETTER C WITH CEDILLA
diff --git a/lib/libX11/nls/pt_PT.UTF-8/XI18N_OBJS b/lib/libX11/nls/pt_PT.UTF-8/XI18N_OBJS
new file mode 100644
index 000000000..628fc7bc0
--- /dev/null
+++ b/lib/libX11/nls/pt_PT.UTF-8/XI18N_OBJS
@@ -0,0 +1,7 @@
+# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME
+#
+# XI18N objects table for pt_PT.UTF-8 locale
+#
+XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open
+XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister
+XOM common/xomGeneric _XomGenericOpenOM # XOM_open
diff --git a/lib/libX11/nls/pt_PT.UTF-8/XLC_LOCALE.pre b/lib/libX11/nls/pt_PT.UTF-8/XLC_LOCALE.pre
new file mode 100644
index 000000000..115621f2c
--- /dev/null
+++ b/lib/libX11/nls/pt_PT.UTF-8/XLC_LOCALE.pre
@@ -0,0 +1,142 @@
+XCOMM XLocale Database Sample for pt_PT.UTF-8
+XCOMM
+XCOMM Based on XLocale Database Sample for en_US.UTF-8
+XCOMM
+
+XCOMM
+XCOMM XLC_FONTSET category
+XCOMM
+XLC_FONTSET
+
+on_demand_loading True
+
+object_name generic
+
+XCOMM fs0 class (7 bit ASCII)
+fs0 {
+ charset {
+ name ISO8859-1:GL
+ }
+ font {
+ primary ISO8859-1:GL
+ vertical_rotate all
+ }
+}
+XCOMM fs1 class (ISO8859 families)
+fs1 {
+ charset {
+ name ISO8859-1:GR
+ }
+ font {
+ primary ISO8859-1:GR
+ }
+}
+XCOMM fs2 class (Kanji)
+fs2 {
+ charset {
+ name JISX0208.1983-0:GL
+ }
+ font {
+ primary JISX0208.1983-0:GL
+ }
+}
+XCOMM fs3 class (Korean Character)
+fs3 {
+ charset {
+ name KSC5601.1987-0:GL
+ }
+ font {
+ primary KSC5601.1987-0:GL
+ }
+}
+XCOMM fs4 class (Chinese Han Character)
+fs4 {
+ charset {
+ name GB2312.1980-0:GL
+ }
+ font {
+ primary GB2312.1980-0:GL
+ }
+}
+XCOMM fs5 class (Half Kana)
+fs5 {
+ charset {
+ name JISX0201.1976-0:GR
+ }
+ font {
+ primary JISX0201.1976-0:GR
+ vertical_rotate all
+ }
+}
+XCOMM ISO10646 is last, per Roland Mainz in
+XCOMM http://bugs.freedesktop.org/show_bug.cgi?id=1896
+fs6 {
+ charset {
+ name ISO10646-1
+ }
+ font {
+ primary ISO10646-1
+ }
+}
+END XLC_FONTSET
+
+XCOMM
+XCOMM XLC_XLOCALE category
+XCOMM
+XLC_XLOCALE
+
+encoding_name UTF-8
+mb_cur_max 6
+state_depend_encoding False
+
+XCOMM cs0 class
+cs0 {
+ side GL:Default
+ length 1
+ ct_encoding ISO8859-1:GL
+}
+
+XCOMM cs1 class
+cs1 {
+ side GR:Default
+ length 1
+ ct_encoding ISO8859-1:GR
+}
+
+XCOMM cs2 class
+cs2 {
+ side GR
+ length 2
+ ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR;\
+ JISX0208.1983-1:GL; JISX0208.1983-1:GR
+}
+
+XCOMM cs3 class
+cs3 {
+ side GL
+ length 2
+ ct_encoding KSC5601.1987-0:GL; KSC5601.1987-0:GR;\
+ KSC5601.1987-1:GL; KSC5601.1987-1:GR
+}
+
+XCOMM cs4 class
+cs4 {
+ side GR
+ length 2
+ ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR
+}
+
+XCOMM cs5 class
+cs5 {
+ side GR
+ length 1
+ ct_encoding JISX0201.1976-0:GR
+}
+
+XCOMM cs6 class
+cs6 {
+ side none
+ ct_encoding ISO10646-1
+}
+
+END XLC_XLOCALE
diff --git a/lib/libX11/specs/libX11/CH04.xml b/lib/libX11/specs/libX11/CH04.xml
index a147b1848..5312db176 100644
--- a/lib/libX11/specs/libX11/CH04.xml
+++ b/lib/libX11/specs/libX11/CH04.xml
@@ -1761,7 +1761,8 @@ To change a property of a given window, use
<funcdef><function>XChangeProperty</function></funcdef>
<paramdef>Display<parameter> *display</parameter></paramdef>
<paramdef>Window<parameter> w</parameter></paramdef>
- <paramdef>Atomproperty,<parameter> type</parameter></paramdef>
+ <paramdef>Atom<parameter> property</parameter></paramdef>
+ <paramdef>Atom<parameter> type</parameter></paramdef>
<paramdef>int<parameter> format</parameter></paramdef>
<paramdef>int<parameter> mode</parameter></paramdef>
<paramdef>unsignedchar<parameter> *data</parameter></paramdef>
diff --git a/lib/libX11/src/ClDisplay.c b/lib/libX11/src/ClDisplay.c
index bddd7736f..aa904e516 100644
--- a/lib/libX11/src/ClDisplay.c
+++ b/lib/libX11/src/ClDisplay.c
@@ -65,7 +65,7 @@ XCloseDisplay (
(*ext->close_display)(dpy, &ext->codes);
}
/* if the closes generated more protocol, sync them up */
- if (dpy->request != dpy->last_request_read)
+ if (X_DPY_GET_REQUEST(dpy) != X_DPY_GET_LAST_REQUEST_READ(dpy))
XSync(dpy, 1);
}
xcb_disconnect(dpy->xcb->connection);
diff --git a/lib/libX11/src/Font.c b/lib/libX11/src/Font.c
index 650bc6f69..a73f9b19d 100644
--- a/lib/libX11/src/Font.c
+++ b/lib/libX11/src/Font.c
@@ -105,7 +105,7 @@ XFontStruct *XLoadQueryFont(
return font_result;
LockDisplay(dpy);
GetReq(OpenFont, req);
- seq = dpy->request;
+ seq = dpy->request; /* Can't use extended sequence number here */
nbytes = req->nbytes = name ? strlen(name) : 0;
req->fid = fid = XAllocID(dpy);
req->length += (nbytes+3)>>2;
diff --git a/lib/libX11/src/FontNames.c b/lib/libX11/src/FontNames.c
index 2dbca40dc..e55f338ca 100644
--- a/lib/libX11/src/FontNames.c
+++ b/lib/libX11/src/FontNames.c
@@ -47,7 +47,7 @@ int *actualCount) /* RETURN */
int count = 0;
xListFontsReply rep;
register xListFontsReq *req;
- unsigned long rlen;
+ unsigned long rlen = 0;
LockDisplay(dpy);
GetReq(ListFonts, req);
diff --git a/lib/libX11/src/GetAtomNm.c b/lib/libX11/src/GetAtomNm.c
index 32de50d23..d7f06e365 100644
--- a/lib/libX11/src/GetAtomNm.c
+++ b/lib/libX11/src/GetAtomNm.c
@@ -87,8 +87,8 @@ char *XGetAtomName(
}
typedef struct {
- unsigned long start_seq;
- unsigned long stop_seq;
+ uint64_t start_seq;
+ uint64_t stop_seq;
Atom *atoms;
char **names;
int idx;
@@ -107,10 +107,11 @@ Bool _XGetAtomNameHandler(
register _XGetAtomNameState *state;
xGetAtomNameReply replbuf;
register xGetAtomNameReply *repl;
+ uint64_t last_request_read = X_DPY_GET_LAST_REQUEST_READ(dpy);
state = (_XGetAtomNameState *)data;
- if (dpy->last_request_read < state->start_seq ||
- dpy->last_request_read > state->stop_seq)
+ if (last_request_read < state->start_seq ||
+ last_request_read > state->stop_seq)
return False;
while (state->idx < state->count && state->names[state->idx])
state->idx++;
@@ -152,7 +153,7 @@ XGetAtomNames (
int missed = -1;
LockDisplay(dpy);
- async_state.start_seq = dpy->request + 1;
+ async_state.start_seq = X_DPY_GET_REQUEST(dpy) + 1;
async_state.atoms = atoms;
async_state.names = names_return;
async_state.idx = 0;
@@ -165,7 +166,7 @@ XGetAtomNames (
for (i = 0; i < count; i++) {
if (!(names_return[i] = _XGetAtomName(dpy, atoms[i]))) {
missed = i;
- async_state.stop_seq = dpy->request;
+ async_state.stop_seq = X_DPY_GET_REQUEST(dpy);
}
}
if (missed >= 0) {
diff --git a/lib/libX11/src/GetFPath.c b/lib/libX11/src/GetFPath.c
index 62ba01436..8c3f49c95 100644
--- a/lib/libX11/src/GetFPath.c
+++ b/lib/libX11/src/GetFPath.c
@@ -35,7 +35,7 @@ char **XGetFontPath(
int *npaths) /* RETURN */
{
xGetFontPathReply rep;
- unsigned long nbytes;
+ unsigned long nbytes = 0;
char **flist = NULL;
char *ch = NULL;
char *chend;
diff --git a/lib/libX11/src/GetWAttrs.c b/lib/libX11/src/GetWAttrs.c
index c10824cf4..0f5f7bb89 100644
--- a/lib/libX11/src/GetWAttrs.c
+++ b/lib/libX11/src/GetWAttrs.c
@@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
typedef struct _WAttrsState {
- unsigned long attr_seq;
- unsigned long geom_seq;
+ uint64_t attr_seq;
+ uint64_t geom_seq;
XWindowAttributes *attr;
} _XWAttrsState;
@@ -47,10 +47,11 @@ _XWAttrsHandler(
xGetWindowAttributesReply replbuf;
register xGetWindowAttributesReply *repl;
register XWindowAttributes *attr;
+ uint64_t last_request_read = X_DPY_GET_LAST_REQUEST_READ(dpy);
state = (_XWAttrsState *)data;
- if (dpy->last_request_read != state->attr_seq) {
- if (dpy->last_request_read == state->geom_seq &&
+ if (last_request_read != state->attr_seq) {
+ if (last_request_read == state->geom_seq &&
!state->attr &&
rep->generic.type == X_Error &&
rep->error.errorCode == BadDrawable)
@@ -99,7 +100,7 @@ _XGetWindowAttributes(
GetResReq(GetWindowAttributes, w, req);
- async_state.attr_seq = dpy->request;
+ async_state.attr_seq = X_DPY_GET_REQUEST(dpy);
async_state.geom_seq = 0;
async_state.attr = attr;
async.next = dpy->async_handlers;
@@ -109,7 +110,7 @@ _XGetWindowAttributes(
GetResReq(GetGeometry, w, req);
- async_state.geom_seq = dpy->request;
+ async_state.geom_seq = X_DPY_GET_REQUEST(dpy);
if (!_XReply (dpy, (xReply *)&rep, 0, xTrue)) {
DeqAsyncHandler(dpy, &async);
diff --git a/lib/libX11/src/IntAtom.c b/lib/libX11/src/IntAtom.c
index 3042b65dd..d9c6c588e 100644
--- a/lib/libX11/src/IntAtom.c
+++ b/lib/libX11/src/IntAtom.c
@@ -188,8 +188,8 @@ XInternAtom (
}
typedef struct {
- unsigned long start_seq;
- unsigned long stop_seq;
+ uint64_t start_seq;
+ uint64_t stop_seq;
char **names;
Atom *atoms;
int count;
@@ -208,10 +208,12 @@ Bool _XIntAtomHandler(
register int i, idx = 0;
xInternAtomReply replbuf;
register xInternAtomReply *repl;
+ uint64_t last_request_read = X_DPY_GET_LAST_REQUEST_READ(dpy);
state = (_XIntAtomState *)data;
- if (dpy->last_request_read < state->start_seq ||
- dpy->last_request_read > state->stop_seq)
+
+ if (last_request_read < state->start_seq ||
+ last_request_read > state->stop_seq)
return False;
for (i = 0; i < state->count; i++) {
if (state->atoms[i] & 0x80000000) {
@@ -252,7 +254,7 @@ XInternAtoms (
xInternAtomReply rep;
LockDisplay(dpy);
- async_state.start_seq = dpy->request + 1;
+ async_state.start_seq = X_DPY_GET_REQUEST(dpy) + 1;
async_state.atoms = atoms_return;
async_state.names = names;
async_state.count = count - 1;
@@ -266,7 +268,7 @@ XInternAtoms (
&sig, &idx, &n))) {
missed = i;
atoms_return[i] = ~((Atom)idx);
- async_state.stop_seq = dpy->request;
+ async_state.stop_seq = X_DPY_GET_REQUEST(dpy);
}
}
if (missed >= 0) {
diff --git a/lib/libX11/src/ListExt.c b/lib/libX11/src/ListExt.c
index 75f5f5428..0516e4596 100644
--- a/lib/libX11/src/ListExt.c
+++ b/lib/libX11/src/ListExt.c
@@ -42,7 +42,7 @@ char **XListExtensions(
register unsigned i;
register int length;
register xReq *req;
- unsigned long rlen;
+ unsigned long rlen = 0;
LockDisplay(dpy);
GetEmptyReq (ListExtensions, req);
diff --git a/lib/libX11/src/Makefile.am b/lib/libX11/src/Makefile.am
index 762acd75e..f8c476de9 100644
--- a/lib/libX11/src/Makefile.am
+++ b/lib/libX11/src/Makefile.am
@@ -346,7 +346,6 @@ EXTRA_DIST = \
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
#
# Figure out which sub-libraries to link into Xlib
diff --git a/lib/libX11/src/Makefile.in b/lib/libX11/src/Makefile.in
index f0facaed4..6a652d78a 100644
--- a/lib/libX11/src/Makefile.in
+++ b/lib/libX11/src/Makefile.in
@@ -102,7 +102,7 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lintlibdir)" \
"$(DESTDIR)$(x11datadir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-libX11_xcb_la_DEPENDENCIES = libX11.la
+libX11_xcb_la_LIBADD =
am_libX11_xcb_la_OBJECTS = x11_xcb.lo
libX11_xcb_la_OBJECTS = $(am_libX11_xcb_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -599,7 +599,6 @@ EXTRA_DIST = \
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
#
# Figure out which sub-libraries to link into Xlib
diff --git a/lib/libX11/src/OpenDis.c b/lib/libX11/src/OpenDis.c
index 636860e24..82723578e 100644
--- a/lib/libX11/src/OpenDis.c
+++ b/lib/libX11/src/OpenDis.c
@@ -197,8 +197,8 @@ XOpenDisplay (
dpy->idlist_alloc = _XAllocIDs;
dpy->synchandler = NULL;
dpy->savedsynchandler = NULL;
- dpy->request = 0;
- dpy->last_request_read = 0;
+ X_DPY_SET_REQUEST(dpy, 0);
+ X_DPY_SET_LAST_REQUEST_READ(dpy, 0);
dpy->default_screen = iscreen; /* Value returned by ConnectDisplay */
dpy->last_req = (char *)&_dummy_request;
diff --git a/lib/libX11/src/PutImage.c b/lib/libX11/src/PutImage.c
index de085bcde..13cbba356 100644
--- a/lib/libX11/src/PutImage.c
+++ b/lib/libX11/src/PutImage.c
@@ -602,7 +602,7 @@ static int const HalfOrderWord[12] = {
#define UnGetReq(name)\
dpy->bufptr -= SIZEOF(x##name##Req);\
- dpy->request--
+ X_DPY_REQUEST_DECREMENT(dpy)
static void
SendXYImage(
diff --git a/lib/libX11/src/XlibAsync.c b/lib/libX11/src/XlibAsync.c
index eb2b81963..d62000e54 100644
--- a/lib/libX11/src/XlibAsync.c
+++ b/lib/libX11/src/XlibAsync.c
@@ -32,6 +32,18 @@ from The Open Group.
#include <X11/Xlibint.h>
#include <X11/Xos.h>
+/*
+ * Xlib's _XAsyncErrorState sequence number may wrap in 32bit
+ * and we cannot use 64bit as it's public API.
+ */
+#ifdef LONG64
+#define _XLIB_ASYNC_SEQUENCE_CMP(a,op,b) ((a == 0) || (a op b))
+#else /* !LONG64 */
+#define _XLIB_ASYNC_SEQUENCE_CMP(a,op,b) ((a == 0) || \
+ (((a op b) && (b - a op (UINT32_MAX >> 1))) || \
+ ((b op a) && ((UINT32_MAX >> 1) op a - b))))
+#endif /* !LONG64 */
+
/*ARGSUSED*/
Bool
_XAsyncErrorHandler(
@@ -51,10 +63,8 @@ _XAsyncErrorHandler(
rep->error.majorCode == state->major_opcode) &&
(!state->minor_opcode ||
rep->error.minorCode == state->minor_opcode) &&
- (!state->min_sequence_number ||
- (state->min_sequence_number <= dpy->last_request_read)) &&
- (!state->max_sequence_number ||
- (state->max_sequence_number >= dpy->last_request_read))) {
+ (_XLIB_ASYNC_SEQUENCE_CMP(state->min_sequence_number,<=,dpy->last_request_read)) &&
+ (_XLIB_ASYNC_SEQUENCE_CMP(state->max_sequence_number,>=,dpy->last_request_read))) {
state->last_error_received = rep->error.errorCode;
state->error_count++;
return True;
diff --git a/lib/libX11/src/XlibInt.c b/lib/libX11/src/XlibInt.c
index 80c12987d..729694885 100644
--- a/lib/libX11/src/XlibInt.c
+++ b/lib/libX11/src/XlibInt.c
@@ -167,8 +167,12 @@ void _XPollfdCacheDel(
static int sync_hazard(Display *dpy)
{
- unsigned long span = dpy->request - dpy->last_request_read;
- unsigned long hazard = min((dpy->bufmax - dpy->buffer) / SIZEOF(xReq), 65535 - 10);
+ /*
+ * "span" and "hazard" need to be signed such that the ">=" comparision
+ * works correctly in the case that hazard is greater than 65525
+ */
+ int64_t span = X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy);
+ int64_t hazard = min((dpy->bufmax - dpy->buffer) / SIZEOF(xReq), 65535 - 10);
return span >= 65535 - hazard - 10;
}
@@ -194,7 +198,7 @@ void _XSeqSyncFunction(
xGetInputFocusReply rep;
register xReq *req;
- if ((dpy->request - dpy->last_request_read) >= (65535 - BUFSIZE/SIZEOF(xReq))) {
+ if ((X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy)) >= (65535 - BUFSIZE/SIZEOF(xReq))) {
GetEmptyReq(GetInputFocus, req);
(void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
sync_while_locked(dpy);
@@ -276,9 +280,9 @@ _XSetLastRequestRead(
register Display *dpy,
register xGenericReply *rep)
{
- register unsigned long newseq, lastseq;
+ register uint64_t newseq, lastseq;
- lastseq = dpy->last_request_read;
+ lastseq = X_DPY_GET_LAST_REQUEST_READ(dpy);
/*
* KeymapNotify has no sequence number, but is always guaranteed
* to immediately follow another event, except when generated via
@@ -287,20 +291,21 @@ _XSetLastRequestRead(
if ((rep->type & 0x7f) == KeymapNotify)
return(lastseq);
- newseq = (lastseq & ~((unsigned long)0xffff)) | rep->sequenceNumber;
+ newseq = (lastseq & ~((uint64_t)0xffff)) | rep->sequenceNumber;
if (newseq < lastseq) {
newseq += 0x10000;
- if (newseq > dpy->request) {
+ if (newseq > X_DPY_GET_REQUEST(dpy)) {
(void) fprintf (stderr,
- "Xlib: sequence lost (0x%lx > 0x%lx) in reply type 0x%x!\n",
- newseq, dpy->request,
+ "Xlib: sequence lost (0x%llx > 0x%llx) in reply type 0x%x!\n",
+ (unsigned long long)newseq,
+ (unsigned long long)(X_DPY_GET_REQUEST(dpy)),
(unsigned int) rep->type);
newseq -= 0x10000;
}
}
- dpy->last_request_read = newseq;
+ X_DPY_SET_LAST_REQUEST_READ(dpy, newseq);
return(newseq);
}
@@ -1256,7 +1261,7 @@ int _XDefaultIOError(
}
exit(1);
- return(0); /* dummy - function should never return */
+ /*NOTREACHED*/
}
@@ -1363,10 +1368,10 @@ static int _XPrintDefaultError(
mesg, BUFSIZ);
fputs(" ", fp);
(void) fprintf(fp, mesg, event->serial);
- XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%d",
+ XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%lld",
mesg, BUFSIZ);
fputs("\n ", fp);
- (void) fprintf(fp, mesg, dpy->request);
+ (void) fprintf(fp, mesg, (unsigned long long)(X_DPY_GET_REQUEST(dpy)));
fputs("\n", fp);
if (event->error_code == BadImplementation) return 0;
return 1;
@@ -1465,7 +1470,7 @@ _XIOError (
else
_XDefaultIOError(dpy);
exit (1);
- return 0;
+ /*NOTREACHED*/
}
@@ -1720,7 +1725,7 @@ void *_XGetRequest(Display *dpy, CARD8 type, size_t len)
req->reqType = type;
req->length = len / 4;
dpy->bufptr += len;
- dpy->request++;
+ X_DPY_REQUEST_INCREMENT(dpy);
return req;
}
diff --git a/lib/libX11/src/Xxcbint.h b/lib/libX11/src/Xxcbint.h
index bf41c23ff..4ef13d2ff 100644
--- a/lib/libX11/src/Xxcbint.h
+++ b/lib/libX11/src/Xxcbint.h
@@ -13,12 +13,12 @@
#include <X11/Xlib-xcb.h>
#include "locking.h"
-#define XLIB_SEQUENCE_COMPARE(a,op,b) (((long) (a) - (long) (b)) op 0)
+#define XLIB_SEQUENCE_COMPARE(a,op,b) (((int64_t) (a) - (int64_t) (b)) op 0)
typedef struct PendingRequest PendingRequest;
struct PendingRequest {
PendingRequest *next;
- unsigned long sequence;
+ uint64_t sequence;
unsigned reply_waiter;
};
@@ -46,6 +46,7 @@ typedef struct _X11XCBPrivate {
int _XConnectXCB(Display *dpy, _Xconst char *display, int *screenp);
void _XFreeX11XCBStructure(Display *dpy);
+_X_HIDDEN
unsigned long _XNextRequest(Display *dpy);
#endif /* XXCBINT_H */
diff --git a/lib/libX11/src/config.h.in b/lib/libX11/src/config.h.in
index 96a72d8be..e3738bb8f 100644
--- a/lib/libX11/src/config.h.in
+++ b/lib/libX11/src/config.h.in
@@ -15,12 +15,6 @@
/* Has shm*() functions */
#undef HAS_SHM
-/* Define to 1 if you have the `authdes_create' function. */
-#undef HAVE_AUTHDES_CREATE
-
-/* Define to 1 if you have the `authdes_seccreate' function. */
-#undef HAVE_AUTHDES_SECCREATE
-
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@@ -93,9 +87,6 @@
/* Support os-specific local connections */
#undef LOCALCONN
-/* preference sorted list of transport types to try for local connections */
-#undef LOCAL_TRANSPORT_LIST
-
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
@@ -133,9 +124,6 @@
/* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL
-/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
-#undef SECURE_RPC
-
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
diff --git a/lib/libX11/src/xcb_io.c b/lib/libX11/src/xcb_io.c
index 59873296c..bd26a62ae 100644
--- a/lib/libX11/src/xcb_io.c
+++ b/lib/libX11/src/xcb_io.c
@@ -68,22 +68,8 @@ static void require_socket(Display *dpy)
if(!xcb_take_socket(dpy->xcb->connection, return_socket, dpy,
flags, &sent))
_XIOError(dpy);
- /* Xlib uses unsigned long for sequence numbers. XCB
- * uses 64-bit internally, but currently exposes an
- * unsigned int API. If these differ, Xlib cannot track
- * the full 64-bit sequence number if 32-bit wrap
- * happens while Xlib does not own the socket. A
- * complete fix would be to make XCB's public API use
- * 64-bit sequence numbers. */
- if (sizeof(unsigned long) > sizeof(unsigned int) &&
- dpy->xcb->event_owner == XlibOwnsEventQueue &&
- (sent - dpy->last_request_read >= (UINT64_C(1) << 32))) {
- throw_thread_fail_assert("Sequence number wrapped "
- "beyond 32 bits while Xlib "
- "did not own the socket",
- xcb_xlib_seq_number_wrapped);
- }
- dpy->xcb->last_flushed = dpy->request = sent;
+ dpy->xcb->last_flushed = sent;
+ X_DPY_SET_REQUEST(dpy, sent);
dpy->bufmax = dpy->xcb->real_bufmax;
}
}
@@ -145,7 +131,7 @@ static void check_internal_connections(Display *dpy)
}
}
-static PendingRequest *append_pending_request(Display *dpy, unsigned long sequence)
+static PendingRequest *append_pending_request(Display *dpy, uint64_t sequence)
{
PendingRequest *node = malloc(sizeof(PendingRequest));
assert(node);
@@ -214,14 +200,13 @@ static int handle_error(Display *dpy, xError *err, Bool in_XReply)
return 0;
}
-/* Widen a 32-bit sequence number into a native-word-size (unsigned long)
- * sequence number. Treating the comparison as a 1 and shifting it avoids a
- * conditional branch, and shifting by 16 twice avoids a compiler warning when
- * sizeof(unsigned long) == 4. */
-static void widen(unsigned long *wide, unsigned int narrow)
+/* Widen a 32-bit sequence number into a 64bit (uint64_t) sequence number.
+ * Treating the comparison as a 1 and shifting it avoids a conditional branch.
+ */
+static void widen(uint64_t *wide, unsigned int narrow)
{
- unsigned long new = (*wide & ~0xFFFFFFFFUL) | narrow;
- *wide = new + ((unsigned long) (new < *wide) << 16 << 16);
+ uint64_t new = (*wide & ~((uint64_t)0xFFFFFFFFUL)) | narrow;
+ *wide = new + (((uint64_t)(new < *wide)) << 32);
}
/* Thread-safety rules:
@@ -260,20 +245,20 @@ static xcb_generic_reply_t *poll_for_event(Display *dpy)
{
PendingRequest *req = dpy->xcb->pending_requests;
xcb_generic_event_t *event = dpy->xcb->next_event;
- unsigned long event_sequence = dpy->last_request_read;
+ uint64_t event_sequence = X_DPY_GET_LAST_REQUEST_READ(dpy);
widen(&event_sequence, event->full_sequence);
if(!req || XLIB_SEQUENCE_COMPARE(event_sequence, <, req->sequence)
|| (event->response_type != X_Error && event_sequence == req->sequence))
{
- if (XLIB_SEQUENCE_COMPARE(event_sequence, >,
- dpy->request))
+ uint64_t request = X_DPY_GET_REQUEST(dpy);
+ if (XLIB_SEQUENCE_COMPARE(event_sequence, >, request))
{
throw_thread_fail_assert("Unknown sequence "
"number while "
"processing queue",
xcb_xlib_threads_sequence_lost);
}
- dpy->last_request_read = event_sequence;
+ X_DPY_SET_LAST_REQUEST_READ(dpy, event_sequence);
dpy->xcb->next_event = NULL;
return (xcb_generic_reply_t *) event;
}
@@ -289,15 +274,16 @@ static xcb_generic_reply_t *poll_for_response(Display *dpy)
while(!(response = poll_for_event(dpy)) &&
(req = dpy->xcb->pending_requests) &&
!req->reply_waiter &&
- xcb_poll_for_reply(dpy->xcb->connection, req->sequence, &response, &error))
+ xcb_poll_for_reply64(dpy->xcb->connection, req->sequence, &response, &error))
{
- if(XLIB_SEQUENCE_COMPARE(req->sequence, >, dpy->request))
+ uint64_t request = X_DPY_GET_REQUEST(dpy);
+ if(XLIB_SEQUENCE_COMPARE(req->sequence, >, request))
{
throw_thread_fail_assert("Unknown sequence number "
"while awaiting reply",
xcb_xlib_threads_sequence_lost);
}
- dpy->last_request_read = req->sequence;
+ X_DPY_SET_LAST_REQUEST_READ(dpy, req->sequence);
if(response)
break;
dequeue_pending_request(dpy, req);
@@ -456,6 +442,7 @@ void _XSend(Display *dpy, const char *data, long size)
static char const pad[3];
struct iovec vec[3];
uint64_t requests;
+ uint64_t dpy_request;
_XExtension *ext;
xcb_connection_t *c = dpy->xcb->connection;
if(dpy->flags & XlibDisplayIOError)
@@ -464,6 +451,10 @@ void _XSend(Display *dpy, const char *data, long size)
if(dpy->bufptr == dpy->buffer && !size)
return;
+ /* append_pending_request does not alter the dpy request number
+ * therefore we can get it outside of the loop and the if
+ */
+ dpy_request = X_DPY_GET_REQUEST(dpy);
/* iff we asked XCB to set aside errors, we must pick those up
* eventually. iff there are async handlers, we may have just
* issued requests that will generate replies. in either case,
@@ -471,11 +462,11 @@ void _XSend(Display *dpy, const char *data, long size)
if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers)
{
uint64_t sequence;
- for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy->request; ++sequence)
+ for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy_request; ++sequence)
append_pending_request(dpy, sequence);
}
- requests = dpy->request - dpy->xcb->last_flushed;
- dpy->xcb->last_flushed = dpy->request;
+ requests = dpy_request - dpy->xcb->last_flushed;
+ dpy->xcb->last_flushed = dpy_request;
vec[0].iov_base = dpy->buffer;
vec[0].iov_len = dpy->bufptr - dpy->buffer;
@@ -570,6 +561,7 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
xcb_connection_t *c = dpy->xcb->connection;
char *reply;
PendingRequest *current;
+ uint64_t dpy_request;
if (dpy->xcb->reply_data)
throw_extlib_fail_assert("Extra reply data still left in queue",
@@ -579,10 +571,12 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
return 0;
_XSend(dpy, NULL, 0);
- if(dpy->xcb->pending_requests_tail && dpy->xcb->pending_requests_tail->sequence == dpy->request)
+ dpy_request = X_DPY_GET_REQUEST(dpy);
+ if(dpy->xcb->pending_requests_tail
+ && dpy->xcb->pending_requests_tail->sequence == dpy_request)
current = dpy->xcb->pending_requests_tail;
else
- current = append_pending_request(dpy, dpy->request);
+ current = append_pending_request(dpy, dpy_request);
/* Don't let any other thread get this reply. */
current->reply_waiter = 1;
@@ -599,9 +593,9 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
}
req->reply_waiter = 1;
UnlockDisplay(dpy);
- response = xcb_wait_for_reply(c, req->sequence, &error);
+ response = xcb_wait_for_reply64(c, req->sequence, &error);
/* Any user locks on another thread must have been taken
- * while we slept in xcb_wait_for_reply. Classic Xlib
+ * while we slept in xcb_wait_for_reply64. Classic Xlib
* ignored those user locks in this case, so we do too. */
InternalLockDisplay(dpy, /* ignore user locks */ 1);
@@ -629,12 +623,13 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
req->reply_waiter = 0;
ConditionBroadcast(dpy, dpy->xcb->reply_notify);
- if(XLIB_SEQUENCE_COMPARE(req->sequence, >, dpy->request)) {
+ dpy_request = X_DPY_GET_REQUEST(dpy);
+ if(XLIB_SEQUENCE_COMPARE(req->sequence, >, dpy_request)) {
throw_thread_fail_assert("Unknown sequence number "
"while processing reply",
xcb_xlib_threads_sequence_lost);
}
- dpy->last_request_read = req->sequence;
+ X_DPY_SET_LAST_REQUEST_READ(dpy, req->sequence);
if(!response)
dequeue_pending_request(dpy, req);
@@ -654,9 +649,10 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
if(dpy->xcb->next_event && dpy->xcb->next_event->response_type == X_Error)
{
xcb_generic_event_t *event = dpy->xcb->next_event;
- unsigned long event_sequence = dpy->last_request_read;
+ uint64_t last_request_read = X_DPY_GET_LAST_REQUEST_READ(dpy);
+ uint64_t event_sequence = last_request_read;
widen(&event_sequence, event->full_sequence);
- if(event_sequence == dpy->last_request_read)
+ if(event_sequence == last_request_read)
{
error = (xcb_generic_error_t *) event;
dpy->xcb->next_event = NULL;
diff --git a/lib/libX11/src/xcms/HVC.c b/lib/libX11/src/xcms/HVC.c
index 80f1735cf..ce02ab3af 100644
--- a/lib/libX11/src/xcms/HVC.c
+++ b/lib/libX11/src/xcms/HVC.c
@@ -176,13 +176,13 @@ TekHVC_ParseString(
* XcmsSuccess if valid.
*/
{
- int n;
+ size_t n;
char *pchar;
if ((pchar = strchr(spec, ':')) == NULL) {
return(XcmsFailure);
}
- n = (int)(pchar - spec);
+ n = (size_t)(pchar - spec);
/*
* Check for proper prefix.
@@ -349,7 +349,7 @@ XcmsTekHVCToCIEuvY(
XcmsCIEuvY uvY_return;
XcmsFloat tempHue, u, v;
XcmsFloat tmpVal;
- register int i;
+ unsigned int i;
/*
* Check arguments
@@ -468,7 +468,7 @@ XcmsCIEuvYToTekHVC(
XcmsColor *pColor = pColors_in_out;
XcmsColor whitePt;
XcmsTekHVC HVC_return;
- register int i;
+ unsigned int i;
/*
* Check arguments
diff --git a/lib/libX11/src/xcms/IdOfPr.c b/lib/libX11/src/xcms/IdOfPr.c
index e15f34fec..9f43dd387 100644
--- a/lib/libX11/src/xcms/IdOfPr.c
+++ b/lib/libX11/src/xcms/IdOfPr.c
@@ -61,7 +61,7 @@ XcmsFormatOfPrefix(char *prefix)
XcmsColorSpace **papColorSpaces;
char string_buf[64];
char *string_lowered;
- int len;
+ size_t len;
/*
* While copying prefix to string_lowered, convert to lowercase
diff --git a/lib/libX11/src/xcms/LRGB.c b/lib/libX11/src/xcms/LRGB.c
index 461d07d87..380b4d17d 100644
--- a/lib/libX11/src/xcms/LRGB.c
+++ b/lib/libX11/src/xcms/LRGB.c
@@ -966,7 +966,7 @@ _XcmsGetTableType1(
*
*/
{
- int count;
+ unsigned int count;
unsigned int max_index;
IntensityRec *pIRec;
@@ -1405,13 +1405,13 @@ XcmsLRGB_RGBi_ParseString(
* 0 if failed, non-zero otherwise.
*/
{
- int n;
+ size_t n;
char *pchar;
if ((pchar = strchr(spec, ':')) == NULL) {
return(XcmsFailure);
}
- n = (int)(pchar - spec);
+ n = (size_t)(pchar - spec);
/*
* Check for proper prefix.
diff --git a/lib/libX11/src/xcms/Lab.c b/lib/libX11/src/xcms/Lab.c
index 02c8d3b7c..bf6ae54db 100644
--- a/lib/libX11/src/xcms/Lab.c
+++ b/lib/libX11/src/xcms/Lab.c
@@ -251,7 +251,7 @@ XcmsCIELabToCIEXYZ(
XcmsCIEXYZ XYZ_return;
XcmsFloat tmpFloat, tmpL;
XcmsColor whitePt;
- int i;
+ unsigned int i;
XcmsColor *pColor = pColors_in_out;
/*
@@ -354,7 +354,7 @@ XcmsCIEXYZToCIELab(
XcmsCIELab Lab_return;
XcmsFloat fX_Xn, fY_Yn, fZ_Zn;
XcmsColor whitePt;
- int i;
+ unsigned int i;
XcmsColor *pColor = pColors_in_out;
/*
diff --git a/lib/libX11/src/xcms/Luv.c b/lib/libX11/src/xcms/Luv.c
index 82bc2946a..c27018a73 100644
--- a/lib/libX11/src/xcms/Luv.c
+++ b/lib/libX11/src/xcms/Luv.c
@@ -251,7 +251,7 @@ XcmsCIELuvToCIEuvY(
XcmsColor whitePt;
XcmsCIEuvY uvY_return;
XcmsFloat tmpVal;
- register int i;
+ unsigned int i;
/*
* Check arguments
@@ -343,7 +343,7 @@ XcmsCIEuvYToCIELuv(
XcmsColor whitePt;
XcmsCIELuv Luv_return;
XcmsFloat tmpVal;
- register int i;
+ unsigned int i;
/*
* Check arguments
diff --git a/lib/libX11/src/xcms/XYZ.c b/lib/libX11/src/xcms/XYZ.c
index 40d6ed3bb..0544b6ab6 100644
--- a/lib/libX11/src/xcms/XYZ.c
+++ b/lib/libX11/src/xcms/XYZ.c
@@ -120,13 +120,13 @@ CIEXYZ_ParseString(
* RETURNS
*/
{
- int n;
+ size_t n;
char *pchar;
if ((pchar = strchr(spec, ':')) == NULL) {
return(XcmsFailure);
}
- n = (int)(pchar - spec);
+ n = (size_t)(pchar - spec);
/*
* Check for proper prefix.
diff --git a/lib/libX11/src/xcms/cmsColNm.c b/lib/libX11/src/xcms/cmsColNm.c
index ab6e4e879..020aa4d11 100644
--- a/lib/libX11/src/xcms/cmsColNm.c
+++ b/lib/libX11/src/xcms/cmsColNm.c
@@ -126,13 +126,13 @@ _XcmsColorSpaceOfString(
*/
{
XcmsColorSpace **papColorSpaces;
- int n;
+ size_t n;
char *pchar;
if ((pchar = strchr(color_string, ':')) == NULL) {
return(XcmsFailure);
}
- n = (int)(pchar - color_string);
+ n = (size_t)(pchar - color_string);
if (ccc == NULL) {
return(NULL);
@@ -198,7 +198,7 @@ _XcmsParseColorString(
XcmsColorSpace *pColorSpace;
char string_buf[64];
char *string_lowered;
- int len;
+ size_t len;
int res;
if (ccc == NULL) {
diff --git a/lib/libX11/src/xcms/cmsTrig.c b/lib/libX11/src/xcms/cmsTrig.c
index fc65d9ba3..ebb92be5b 100644
--- a/lib/libX11/src/xcms/cmsTrig.c
+++ b/lib/libX11/src/xcms/cmsTrig.c
@@ -379,21 +379,10 @@ static double _XcmsPolynomial(
{
auto double rtn_value;
-#if 0
- auto double curr_coeff;
- if (order <= 0) {
- rtn_value = *coeffs;
- } else {
- curr_coeff = *coeffs; /* Bug in Unisoft's compiler. Does not */
- coeffs++; /* generate good code for *coeffs++ */
- rtn_value = curr_coeff + x * _XcmsPolynomial (--order, coeffs, x);
- }
-#else /* ++jrb -- removed tail recursion */
coeffs += order;
rtn_value = *coeffs--;
while(order-- > 0)
rtn_value = *coeffs-- + (x * rtn_value);
-#endif
return(rtn_value);
}
diff --git a/lib/libX11/src/xcms/uvY.c b/lib/libX11/src/xcms/uvY.c
index 5344fb17c..9f0ad2b5c 100644
--- a/lib/libX11/src/xcms/uvY.c
+++ b/lib/libX11/src/xcms/uvY.c
@@ -135,13 +135,13 @@ CIEuvY_ParseString(
* 0 if failed, non-zero otherwise.
*/
{
- int n;
+ size_t n;
char *pchar;
if ((pchar = strchr(spec, ':')) == NULL) {
return(XcmsFailure);
}
- n = (int)(pchar - spec);
+ n = (size_t)(pchar - spec);
/*
* Check for proper prefix.
@@ -243,7 +243,7 @@ XcmsCIEuvYToCIEXYZ(
{
XcmsCIEXYZ XYZ_return;
XcmsColor whitePt;
- int i;
+ unsigned int i;
XcmsColor *pColor = pColors_in_out;
XcmsFloat div, x, y, z, Y;
@@ -358,7 +358,7 @@ XcmsCIEXYZToCIEuvY(
{
XcmsCIEuvY uvY_return;
XcmsColor whitePt;
- int i;
+ unsigned int i;
XcmsColor *pColor = pColors_in_out;
XcmsFloat div;
diff --git a/lib/libX11/src/xcms/xyY.c b/lib/libX11/src/xcms/xyY.c
index 6f9457496..88206c355 100644
--- a/lib/libX11/src/xcms/xyY.c
+++ b/lib/libX11/src/xcms/xyY.c
@@ -253,7 +253,7 @@ XcmsCIExyYToCIEXYZ(
XcmsCIEXYZ XYZ_return;
XcmsFloat div; /* temporary storage in case divisor is zero */
XcmsFloat u, v, x, y, z; /* temporary storage */
- register int i;
+ unsigned int i;
/*
* Check arguments
@@ -359,7 +359,7 @@ XcmsCIEXYZToCIExyY(
XcmsColor *pColor = pColors_in_out;
XcmsCIExyY xyY_return;
XcmsFloat div; /* temporary storage in case divisor is zero */
- register int i;
+ unsigned int i;
/*
* Check arguments
diff --git a/lib/libX11/src/xkb/XKBGetByName.c b/lib/libX11/src/xkb/XKBGetByName.c
index 973052ce6..362761cd3 100644
--- a/lib/libX11/src/xkb/XKBGetByName.c
+++ b/lib/libX11/src/xkb/XKBGetByName.c
@@ -44,7 +44,7 @@ XkbGetKeyboardByName(Display *dpy,
{
register xkbGetKbdByNameReq *req;
xkbGetKbdByNameReply rep;
- int len, extraLen;
+ int len, extraLen = 0;
char *str;
XkbDescPtr xkb;
int mapLen, codesLen, typesLen, compatLen;
@@ -204,12 +204,16 @@ XkbGetKeyboardByName(Display *dpy,
if (status != Success)
goto BAILOUT;
}
+ if (extraLen > 0)
+ goto BAILOUT;
UnlockDisplay(dpy);
SyncHandle();
return xkb;
BAILOUT:
if (xkb != NULL)
XkbFreeKeyboard(xkb, XkbAllComponentsMask, xTrue);
+ if (extraLen > 0)
+ _XEatData(dpy, extraLen);
UnlockDisplay(dpy);
SyncHandle();
return NULL;
diff --git a/lib/libX11/src/xkb/XKBNames.c b/lib/libX11/src/xkb/XKBNames.c
index 6c4800c29..d84f34b55 100644
--- a/lib/libX11/src/xkb/XKBNames.c
+++ b/lib/libX11/src/xkb/XKBNames.c
@@ -549,7 +549,7 @@ XkbChangeNames(Display *dpy, XkbDescPtr xkb, XkbNameChangesPtr changes)
which = changes->changed;
firstType = changes->first_type;
nTypes = changes->num_types;
- firstLvlType = changes->first_lvl;;
+ firstLvlType = changes->first_lvl;
nLvlTypes = changes->num_lvls;
if (which & XkbKeyTypeNamesMask) {
if (nTypes < 1)
diff --git a/lib/libX11/src/xlibi18n/ICWrap.c b/lib/libX11/src/xlibi18n/ICWrap.c
index 8c1b4a01c..69f080d87 100644
--- a/lib/libX11/src/xlibi18n/ICWrap.c
+++ b/lib/libX11/src/xlibi18n/ICWrap.c
@@ -169,7 +169,7 @@ XSetIMValues(XIM im, ...)
va_list var;
int total_count;
XIMArg *args;
- char *ret;
+ char *ret = NULL;
/*
* so count the stuff dangling here
@@ -185,7 +185,8 @@ XSetIMValues(XIM im, ...)
_XIMVaToNestedList(var, total_count, &args);
va_end(var);
- ret = (*im->methods->set_values) (im, args);
+ if (im && im->methods)
+ ret = (*im->methods->set_values) (im, args);
Xfree(args);
return ret;
}
@@ -196,7 +197,7 @@ XGetIMValues(XIM im, ...)
va_list var;
int total_count;
XIMArg *args;
- char *ret;
+ char *ret = NULL;
/*
* so count the stuff dangling here
@@ -212,7 +213,8 @@ XGetIMValues(XIM im, ...)
_XIMVaToNestedList(var, total_count, &args);
va_end(var);
- ret = (*im->methods->get_values) (im, args);
+ if (im && im->methods)
+ ret = (*im->methods->get_values) (im, args);
Xfree(args);
return ret;
}
@@ -228,7 +230,7 @@ XCreateIC(XIM im, ...)
va_list var;
int total_count;
XIMArg *args;
- XIC ic;
+ XIC ic = NULL;
/*
* so count the stuff dangling here
@@ -244,7 +246,8 @@ XCreateIC(XIM im, ...)
_XIMVaToNestedList(var, total_count, &args);
va_end(var);
- ic = (XIC) (*im->methods->create_ic) (im, args);
+ if (im && im->methods)
+ ic = (XIC) (*im->methods->create_ic) (im, args);
Xfree(args);
if (ic) {
ic->core.next = im->core.ic_chain;
diff --git a/lib/libX11/src/xlibi18n/XDefaultIMIF.c b/lib/libX11/src/xlibi18n/XDefaultIMIF.c
index db0f5d1fa..7c32ce296 100644
--- a/lib/libX11/src/xlibi18n/XDefaultIMIF.c
+++ b/lib/libX11/src/xlibi18n/XDefaultIMIF.c
@@ -168,32 +168,25 @@ _XDefaultOpenIM(
char *res_class)
{
StaticXIM im;
- XIMStaticXIMRec *local_impart;
- XlcConv ctom_conv, ctow_conv;
int i;
char *mod;
char buf[BUFSIZ];
- if (!(ctom_conv = _XlcOpenConverter(lcd,
- XlcNCompoundText, lcd, XlcNMultiByte))) {
- return((XIM)NULL);
- }
+ if ((im = Xcalloc(1, sizeof(StaticXIMRec))) == NULL)
+ return NULL;
- if (!(ctow_conv = _XlcOpenConverter(lcd,
- XlcNCompoundText, lcd, XlcNWideChar))) {
- return((XIM)NULL);
- }
+ if ((im->private = Xcalloc(1, sizeof(XIMStaticXIMRec))) == NULL)
+ goto Error;
- if ((im = Xmalloc(sizeof(StaticXIMRec))) == (StaticXIM)NULL) {
- return((XIM)NULL);
- }
- if ((local_impart = Xmalloc(sizeof(XIMStaticXIMRec)))
- == (XIMStaticXIMRec *)NULL) {
- Xfree(im);
- return((XIM)NULL);
- }
- memset(im, 0, sizeof(StaticXIMRec));
- memset(local_impart, 0, sizeof(XIMStaticXIMRec));
+ if ((im->private->ctom_conv = _XlcOpenConverter(lcd, XlcNCompoundText,
+ lcd, XlcNMultiByte))
+ == NULL)
+ goto Error;
+
+ if ((im->private->ctow_conv = _XlcOpenConverter(lcd, XlcNCompoundText,
+ lcd, XlcNWideChar))
+ == NULL)
+ goto Error;
buf[0] = '\0';
i = 0;
@@ -209,11 +202,9 @@ _XDefaultOpenIM(
}
}
#undef MODIFIER
- if ((im->core.im_name = Xmalloc(i+1)) == NULL)
- goto Error2;
- strcpy(im->core.im_name, buf);
+ if ((im->core.im_name = strdup(buf)) == NULL)
+ goto Error;
- im->private = local_impart;
im->methods = (XIMMethods)&local_im_methods;
im->core.lcd = lcd;
im->core.ic_chain = (XIC)NULL;
@@ -222,9 +213,6 @@ _XDefaultOpenIM(
im->core.res_name = NULL;
im->core.res_class = NULL;
- local_impart->ctom_conv = ctom_conv;
- local_impart->ctow_conv = ctow_conv;
-
if ((res_name != NULL) && (*res_name != '\0')){
im->core.res_name = strdup(res_name);
}
@@ -233,12 +221,10 @@ _XDefaultOpenIM(
}
return (XIM)im;
-Error2 :
- Xfree(im->private);
- Xfree(im->core.im_name);
+
+ Error:
+ _CloseIM((XIM)im);
Xfree(im);
- _XlcCloseConverter(ctom_conv);
- _XlcCloseConverter(ctow_conv);
return(NULL);
}
@@ -246,13 +232,16 @@ static Status
_CloseIM(XIM xim)
{
StaticXIM im = (StaticXIM)xim;
- _XlcCloseConverter(im->private->ctom_conv);
- _XlcCloseConverter(im->private->ctow_conv);
+
+ if (im->private->ctom_conv != NULL)
+ _XlcCloseConverter(im->private->ctom_conv);
+ if (im->private->ctow_conv != NULL)
+ _XlcCloseConverter(im->private->ctow_conv);
XFree(im->private);
XFree(im->core.im_name);
- if (im->core.res_name) XFree(im->core.res_name);
- if (im->core.res_class) XFree(im->core.res_class);
- return 1; /*bugID 4163122*/
+ XFree(im->core.res_name);
+ XFree(im->core.res_class);
+ return 1;
}
static char *
@@ -344,10 +333,9 @@ _CreateIC(XIM im, XIMArg *arg)
{
XIC ic;
- if ((ic = Xmalloc(sizeof(XICRec))) == (XIC)NULL) {
+ if ((ic = Xcalloc(1, sizeof(XICRec))) == (XIC)NULL) {
return ((XIC)NULL);
}
- memset(ic, 0, sizeof(XICRec));
ic->methods = (XICMethods)&local_ic_methods;
ic->core.im = im;
diff --git a/lib/libX11/src/xlibi18n/XDefaultOMIF.c b/lib/libX11/src/xlibi18n/XDefaultOMIF.c
index 1a707c842..9345547c3 100644
--- a/lib/libX11/src/xlibi18n/XDefaultOMIF.c
+++ b/lib/libX11/src/xlibi18n/XDefaultOMIF.c
@@ -182,61 +182,6 @@ check_charset(
return (FontData) NULL;
}
-#if 0 /* Unused */
-static int
-check_fontname(
- XOC oc,
- char *name)
-{
- Display *dpy = oc->core.om->core.display;
- XOCGenericPart *gen = XOC_GENERIC(oc);
- FontData data;
- FontSet font_set;
- XFontStruct *fs_list;
- char **fn_list, *fname, *prop_fname = NULL;
- int list_num, i;
- int list2_num;
- char **fn2_list = NULL;
- int found_num = 0;
-
- fn_list = XListFonts(dpy, name, MAXFONTS, &list_num);
- if (fn_list == NULL)
- return found_num;
-
- for (i = 0; i < list_num; i++) {
- fname = fn_list[i];
-
- font_set = gen->font_set;
-
- if ((data = check_charset(font_set, fname)) == NULL) {
- if ((fn2_list = XListFontsWithInfo(dpy, name, MAXFONTS,
- &list2_num, &fs_list))
- && (prop_fname = get_prop_name(dpy, fs_list))
- && (data = check_charset(font_set, prop_fname)))
- fname = prop_fname;
- }
- if (data) {
- font_set->font_name = strdup(fname);
- if (font_set->font_name) {
- found_num++;
- }
- }
- if (fn2_list) {
- XFreeFontInfo(fn2_list, fs_list, list2_num);
- fn2_list = NULL;
- if (prop_fname) {
- Xfree(prop_fname);
- prop_fname = NULL;
- }
- }
- if (found_num == 1)
- break;
- }
- XFreeFontNames(fn_list);
- return found_num;
-}
-#endif
-
static Bool
load_font(
XOC oc)
@@ -256,34 +201,6 @@ load_font(
return True;
}
-#if 0
-static Bool
-load_font_info(
- XOC oc)
-{
- Display *dpy = oc->core.om->core.display;
- XOCGenericPart *gen = XOC_GENERIC(oc);
- FontSet font_set = gen->font_set;
- char **fn_list;
- int fn_num;
-
- if (font_set->font_name == NULL)
- return False;
-
- if (font_set->info == NULL) {
- fn_list = XListFontsWithInfo(dpy, font_set->font_name, 1, &fn_num,
- &font_set->info);
- if (font_set->info == NULL)
- return False;
- if (fn_num > 0)
- font_set->info->fid = XLoadFont(dpy, font_set->font_name);
-
- if (fn_list) XFreeFontNames(fn_list);
- }
- return True;
-}
-#endif
-
static void
set_fontset_extents(
XOC oc)
@@ -320,16 +237,10 @@ init_core_part(
FontSet font_set;
XFontStruct **font_struct_list;
char **font_name_list, *font_name_buf;
- int count, length;
font_set = gen->font_set;
- count = length = 0;
- if (font_set->font_name != NULL) {
- length += strlen(font_set->font_name) + 1;
- count++;
- }
- if (count == 0)
+ if (font_set->font_name == NULL)
return False;
font_struct_list = Xmalloc(sizeof(XFontStruct *));
@@ -340,7 +251,7 @@ init_core_part(
if (font_name_list == NULL)
goto err;
- font_name_buf = Xmalloc(length);
+ font_name_buf = strdup(font_set->font_name);
if (font_name_buf == NULL)
goto err;
@@ -348,19 +259,13 @@ init_core_part(
oc->core.font_info.font_name_list = font_name_list;
oc->core.font_info.font_struct_list = font_struct_list;
- font_set = gen->font_set;
-
- if (font_set->font_name != NULL) {
- font_set->id = 1;
- if (font_set->font)
- *font_struct_list++ = font_set->font;
- else
- *font_struct_list++ = font_set->info;
- strcpy(font_name_buf, font_set->font_name);
- Xfree(font_set->font_name);
- *font_name_list++ = font_set->font_name = font_name_buf;
- font_name_buf += strlen(font_name_buf) + 1;
- }
+ font_set->id = 1;
+ if (font_set->font)
+ *font_struct_list = font_set->font;
+ else
+ *font_struct_list = font_set->info;
+ Xfree(font_set->font_name);
+ *font_name_list = font_set->font_name = font_name_buf;
set_fontset_extents(oc);
@@ -464,11 +369,7 @@ parse_fontname(
found_num++;
goto found;
}
-/*
-1266793
-Limit the length of the string copy to prevent stack corruption.
- strcpy(buf, pattern);
-*/
+
strncpy(buf, pattern, BUFSIZ);
buf[BUFSIZ-1] = '\0';
length = strlen(buf);
@@ -520,11 +421,6 @@ Limit the length of the string copy to prevent stack corruption.
for ( ; font_data_count-- > 0; font_data++) {
if (append_charset)
{
-/*
-1266793
-Limit the length of the string copy to prevent stack corruption.
- strcpy(last, font_data->name);
-*/
strncpy(last, font_data->name, BUFSIZ - length);
buf[BUFSIZ-1] = '\0';
}
@@ -565,24 +461,17 @@ set_missing_list(
XOCGenericPart *gen = XOC_GENERIC(oc);
FontSet font_set;
char **charset_list, *charset_buf;
- int count, length;
font_set = gen->font_set;
- count = length = 0;
-
- if (!font_set->info && !font_set->font) {
- length += strlen(font_set->font_data->name) + 1;
- count++;
- }
- if (count == 0)
+ if (font_set->info == NULL || font_set->font == NULL)
return True;
charset_list = Xmalloc(sizeof(char *));
if (charset_list == NULL)
return False;
- charset_buf = Xmalloc(length);
+ charset_buf = strdup(font_set->font_data->name);
if (charset_buf == NULL) {
Xfree(charset_list);
return False;
@@ -590,13 +479,8 @@ set_missing_list(
oc->core.missing_list.charset_list = charset_list;
- font_set = gen->font_set;
+ *charset_list = charset_buf;
- if (!font_set->info && !font_set->font) {
- strcpy(charset_buf, font_set->font_data->name);
- *charset_list++ = charset_buf;
- charset_buf += strlen(charset_buf) + 1;
- }
return True;
}
@@ -1122,11 +1006,7 @@ add_data(
static _Xconst char *supported_charset_list[] = {
"ISO8859-1",
-/* fix for bug4332979 */
"adobe-fontspecific",
-/* fix for bug4237353: "JISX0201.1976-0" entry should be removed from
- supported_charset_list because it is not a supported_charset for C locale
- "JISX0201.1976-0", */
"SUNOLCURSOR-1",
"SUNOLGLYPH-1"
};
@@ -1141,7 +1021,7 @@ init_om(
char **required_list;
XOrientation *orientation;
char *bufptr;
- int i, count, length = 0;
+ int i, count;
count = XlcNumber(supported_charset_list);
@@ -1161,14 +1041,12 @@ init_om(
return False;
}
- length += strlen(data->font_data->name) + 1;
-
/* required charset list */
required_list = Xmalloc(sizeof(char *));
if (required_list == NULL)
return False;
- bufptr = Xmalloc(length);
+ bufptr = strdup(data->font_data->name);
if (bufptr == NULL) {
Xfree(required_list);
return False;
@@ -1179,9 +1057,7 @@ init_om(
data = gen->data;
- strcpy(bufptr, data->font_data->name);
- *required_list++ = bufptr;
- bufptr += strlen(bufptr) + 1;
+ *required_list = bufptr;
/* orientation list */
orientation = Xmalloc(sizeof(XOrientation));
diff --git a/lib/libX11/src/xlibi18n/XlcDL.c b/lib/libX11/src/xlibi18n/XlcDL.c
index a23603865..bc71900a0 100644
--- a/lib/libX11/src/xlibi18n/XlcDL.c
+++ b/lib/libX11/src/xlibi18n/XlcDL.c
@@ -249,6 +249,7 @@ __lc_path(const char *dl_name, const char *lc_dir)
{
char *path;
size_t len;
+ char *slash_p;
/*
* reject this for possible security issue
@@ -264,22 +265,21 @@ __lc_path(const char *dl_name, const char *lc_dir)
path = Xmalloc(len + 1);
if (strchr(dl_name, '/') != NULL) {
- char *slash_p;
slash_p = strrchr(lc_dir, '/');
*slash_p = '\0';
- strcpy(path, lc_dir); strcat(path, "/");
+ } else
+ slash_p = NULL;
+
#if defined POSTLOCALELIBDIR
- strcat(path, POSTLOCALELIBDIR); strcat(path, "/");
+ snprintf(path, len + 1, "%s/%s/%s.so.2",
+ lc_dir, POSTLOCALELIBDIR, dl_name);
+#else
+ snprintf(path, len + 1, "%s/%s.so.2", lc_dir, dl_name);
#endif
- strcat(path, dl_name); strcat(path, ".so.2");
+
+ if (slash_p != NULL)
*slash_p = '/';
- } else {
- strcpy(path, lc_dir); strcat(path, "/");
-#if defined POSTLOCALELIBDIR
- strcat(path, POSTLOCALELIBDIR); strcat(path, "/");
-#endif
- strcat(path, dl_name); strcat(path, ".so.2");
- }
+
return path;
}
diff --git a/lib/libX11/src/xlibi18n/lcPrTxt.c b/lib/libX11/src/xlibi18n/lcPrTxt.c
index 72fc2b927..77afd9372 100644
--- a/lib/libX11/src/xlibi18n/lcPrTxt.c
+++ b/lib/libX11/src/xlibi18n/lcPrTxt.c
@@ -149,7 +149,7 @@ _XTextPropertyToTextList(
return XConverterNotFound;
if (is_wide_char) {
- buf_len = (text_prop->nitems + 1) * sizeof(wchar_t);;
+ buf_len = (text_prop->nitems + 1) * sizeof(wchar_t);
} else {
if (strcmp(to_type, XlcNUtf8String) == 0)
buf_len = text_prop->nitems * 6 + 1;
diff --git a/lib/libX11/src/xlibi18n/lcPubWrap.c b/lib/libX11/src/xlibi18n/lcPubWrap.c
index d1096d570..3119918c6 100644
--- a/lib/libX11/src/xlibi18n/lcPubWrap.c
+++ b/lib/libX11/src/xlibi18n/lcPubWrap.c
@@ -78,10 +78,9 @@ _XlcCreateLC(
return (XLCd) NULL;
if (lcd->core->name == NULL) {
- lcd->core->name = Xmalloc(strlen(name) + 1);
+ lcd->core->name = strdup(name);
if (lcd->core->name == NULL)
goto err;
- strcpy(lcd->core->name, name);
}
if (lcd->methods == NULL)