[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libx11: Changes to 'upstream-unstable'



 Makefile.am                            |    4 
 acinclude.m4                           |  230 -
 configure.ac                           |  143 
 include/X11/Xlibint.h                  |    7 
 m4/ax_define_dir.m4                    |   49 
 m4/dolt.m4                             |  185 +
 man/Makefile.am                        |    2 
 man/XRaiseWindow.man                   |    2 
 man/XStringToKeysym.man                |    4 
 man/xkb/Makefile.am                    |    4 
 man/xkb/XkbFreeGeometry.man            |    3 
 man/xkb/XkbGetBounceKeysDelay.man      |    2 
 man/xkb/XkbGetDetectableAutoRepeat.man |   92 
 man/xkb/XkbGetDetectableAutorepeat.man |   92 
 man/xkb/XkbGetSlowKeysDelay.man        |    2 
 man/xkb/XkbGetState.man                |    2 
 man/xkb/XkbKeyActionEntry.man          |    8 
 man/xkb/XkbSetBounceKeysDelay.man      |    2 
 man/xkb/XkbSetDetectableAutoRepeat.man |  105 
 man/xkb/XkbSetDetectableAutorepeat.man |  105 
 modules/im/ximcp/Makefile.am           |    3 
 modules/im/ximcp/imLcIm.c              |    4 
 modules/im/ximcp/imLcPrs.c             |    5 
 modules/im/ximcp/imRm.c                |    4 
 modules/lc/Utf8/Makefile.am            |    3 
 modules/lc/def/Makefile.am             |    3 
 modules/lc/gen/Makefile.am             |    3 
 modules/lc/xlocale/Makefile.am         |    3 
 modules/om/generic/Makefile.am         |    3 
 nls/en_US.UTF-8/Compose.pre            |    1 
 nls/fi_FI.UTF-8/Compose.pre            | 5463 +--------------------------------
 specs/.gitignore                       |    2 
 specs/XIM/Makefile.am                  |    2 
 specs/i18n/Makefile.am                 |    4 
 specs/libX11/Makefile.am               |    3 
 specs/troffrules.in                    |   38 
 src/ConnDis.c                          |   23 
 src/Makefile.am                        |    3 
 src/OpenDis.c                          |   27 
 src/SetPntMap.c                        |    1 
 src/XErrorDB                           |    6 
 src/XlibInt.c                          |   58 
 src/Xprivate.h                         |   15 
 src/Xxcbint.h                          |    8 
 src/locking.c                          |    3 
 src/util/Makefile.am                   |    7 
 src/xcb_disp.c                         |   42 
 src/xcb_io.c                           |  459 +-
 src/xcms/Makefile.am                   |    3 
 src/xkb/Makefile.am                    |    3 
 src/xlibi18n/Makefile.am               |    3 
 src/xlibi18n/lcUTF8.c                  |   28 
 52 files changed, 1337 insertions(+), 5939 deletions(-)

New commits:
commit fb19eb767a32fd4ff74021c51bc6f60eb8bdff74
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Jun 3 15:21:40 2010 -0700

    libX11 1.3.4
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index eb3e71a..abf914a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ(2.60)
 AC_INIT([libX11],
-        1.3.3,
+        1.3.4,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         libX11)
 AC_CONFIG_SRCDIR([Makefile.am])

commit 8f3db40ca5108a919244f3fff7466d01a14b3ce2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Jun 3 13:08:17 2010 -0700

    Workaround bug in groff flag processing that breaks distcheck
    
    At least with the groff 1.19.2 package I have installed, groff passes
    on the -I flags for the include path to grohtml, which if they come
    after the -P-I... flag we pass to grohtml to specify the image file
    name pattern cause it to override that flag and put the images in
    the wrong place, breaking "make distcheck" - changing the flag order
    works around this.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/specs/troffrules.in b/specs/troffrules.in
index 83c3de4..5616844 100644
--- a/specs/troffrules.in
+++ b/specs/troffrules.in
@@ -84,7 +84,7 @@ SUFFIXES = .ms .ps .txt .html .pdf
 	 $< 2> index.$@.raw > $@
 
 .ms.html:
-	$(AM_V_GEN) $(GROFF) -Thtml -P-Dimages -P-I$*-image $(GROFF_FLAGS) $< 2> index.$@.raw > $@
+	$(AM_V_GEN) $(GROFF) $(GROFF_FLAGS) -Thtml -P-Dimages -P-I$*-image $< 2> index.$@.raw > $@
 
 .ps.pdf:
 	$(AM_V_GEN) $(PS2PDF) $< $@

commit bdb31a1fb707cebccc9efbbf68cb55c10fa4ea3e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Jun 3 11:25:33 2010 -0700

    Fix typo that made configure always report "none" for man page suffix
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index b1495d9..eb3e71a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -579,7 +579,7 @@ AC_OUTPUT([Makefile
 	   x11.pc
 	   x11-xcb.pc])
 
-man_pages_suffix=$LIBMAN_SUFFIX
+man_pages_suffix=$LIB_MAN_SUFFIX
 if test -z "$man_pages_suffix"; then
     man_pages_suffix=none
 fi

commit 6bb7d2d21d6b58019fb37b724b59c9744f30b9ce
Author: Paul Bender <pebender@gmail.com>
Date:   Thu Jun 3 11:20:26 2010 -0700

    Bug 22591 - configure does not obey the --enable-*-transport options
    
    https://bugs.freedesktop.org/show_bug.cgi?id=22591
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 4247894..b1495d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,22 +134,64 @@ 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.
-		DEFAULT_LOCAL_TRANS="UNIX_TRANS,LOCAL_TRANS,TCP_TRANS"
+		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.
-		DEFAULT_LOCAL_TRANS="LOCAL_TRANS,UNIX_TRANS,TCP_TRANS"
+		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
-			DEFAULT_LOCAL_TRANS="LOCAL_TRANS,UNIX_TRANS,TCP_TRANS"
-		else
-			DEFAULT_LOCAL_TRANS="UNIX_TRANS,TCP_TRANS"
+		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

commit d7f35946d673bb00f2768e025b6e1017422b2174
Author: Paul Bender <pebender@gmail.com>
Date:   Thu Jun 3 11:17:45 2010 -0700

    Bug 22590 - libX11 1.2.1 has broken abstract namespace support
    
    https://bugs.freedesktop.org/show_bug.cgi?id=22590
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 502996a..4247894 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,6 +141,10 @@ case $host_os in
 		# Unix domain sockets are faster now.
 		DEFAULT_LOCAL_TRANS="UNIX_TRANS,LOCAL_TRANS,TCP_TRANS"
 		;;
+	linux*)
+		# LOCAL_TRANS is used for abstract sockets.
+		DEFAULT_LOCAL_TRANS="LOCAL_TRANS,UNIX_TRANS,TCP_TRANS"
+		;;
 	*)
 		if test "$LOCALCONN" = "yes"; then
 			DEFAULT_LOCAL_TRANS="LOCAL_TRANS,UNIX_TRANS,TCP_TRANS"
diff --git a/src/ConnDis.c b/src/ConnDis.c
index 197e14c..e171940 100644
--- a/src/ConnDis.c
+++ b/src/ConnDis.c
@@ -92,7 +92,7 @@ static char *copystring (const char *src, int len)
 #ifdef UNIXCONN
 # define UNIX_TRANS	"unix"
 #endif
-#if defined(LOCALCONN) || defined(OS2PIPECONN)
+#if defined(LOCALCONN) || defined(OS2PIPECONN) || defined(UNIXCONN)
 # define LOCAL_TRANS	"local"
 #endif
 

commit b2487d07f7b355f230a56e32c763acd08862735c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Jun 3 11:06:15 2010 -0700

    Bug 22584 - libX11 does not cross compile
    
    Adaptation of patch submitted by Paul Bender in attachment 27301 to
    https://bugs.freedesktop.org/show_bug.cgi?id=22584
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
    Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>

diff --git a/configure.ac b/configure.ac
index 85e7b44..502996a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,8 @@ AC_INIT([libX11],
         libX11)
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
 
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
@@ -32,6 +34,7 @@ XORG_WITH_PS2PDF
 AC_PROG_LIBTOOL
 DOLT
 AC_PROG_CC
+PKG_PROG_PKG_CONFIG
 
 if test x"$CC_FOR_BUILD" = x; then
 	if test x"$cross_compiling" = xyes; then
@@ -42,6 +45,27 @@ if test x"$CC_FOR_BUILD" = x; then
 fi
 AC_SUBST([CC_FOR_BUILD])
 
+if test x"$CPPFLAGS_FOR_BUILD" = x; then
+	if test ! x"$cross_compiling" = xyes; then
+		CPPFLAGS_FOR_BUILD=${CPPFLAGS}
+	fi
+fi
+AC_SUBST(CPPFLAGS_FOR_BUILD)
+
+if test x"$CFLAGS_FOR_BUILD" = x; then
+	if test ! x"$cross_compiling" = xyes; then
+		CFLAGS_FOR_BUILD=${CFLAGS}
+	fi
+fi
+AC_SUBST(CFLAGS_FOR_BUILD)
+
+if test x"$LDFLAGS_FOR_BUILD" = x; then
+	if test ! x"$cross_compiling" = xyes; then
+		LDFLAGS_FOR_BUILD=${LDFLAGS}
+	fi
+fi
+AC_SUBST(LDFLAGS_FOR_BUILD)
+
 XORG_PROG_RAWCPP
 
 # Find perl for "make check" tests in nls/localerules.in
@@ -285,7 +309,7 @@ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
 # Find keysymdef.h
 #
 AC_MSG_CHECKING([keysymdef.h])
-dir=`pkg-config --variable=includedir xproto`
+dir=`$PKG_CONFIG --variable=includedir xproto`
 KEYSYMDEF="$dir/X11/keysymdef.h"
 if test -f "$KEYSYMDEF"; then
         AC_MSG_RESULT([$KEYSYMDEF])
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 644d6b6..3b100e0 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -6,6 +6,9 @@ makekeys_CFLAGS = \
 	$(CWARNFLAGS)
 
 CC = @CC_FOR_BUILD@
+CPPFLAGS = @CPPFLAGS_FOR_BUILD@
+CFLAGS = @CFLAGS_FOR_BUILD@
+LDFLAGS = @LDFLAGS_FOR_BUILD@
 
 EXTRA_DIST = mkks.sh
 

commit 4378219ff8c1418418c70086085358b69d574e74
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Jun 1 18:55:48 2010 -0700

    Clarify requirements in XRestackWindows man page
    
    The required common parent window is not specified in the arguments,
    just implied as the parent of the first window in the list.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/man/XRaiseWindow.man b/man/XRaiseWindow.man
index 8d74466..3926b16 100644
--- a/man/XRaiseWindow.man
+++ b/man/XRaiseWindow.man
@@ -305,7 +305,7 @@ The stacking order of the first window in the windows array is unaffected,
 but the other windows in the array are stacked underneath the first window,
 in the order of the array.
 The stacking order of the other windows is not affected.
-For each window in the window array that is not a child of the specified window,
+For each window in the window array that is not a sibling of the first window,
 a
 .ZN BadMatch
 error results.

commit f09c5299a381e2729e800a0ac43f1c0e371f65f6
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed May 12 16:42:18 2010 -0700

    xcb: Add TCP fallback
    
    If we fail to connect to a UNIX socket and the transport isn't specified,
    fallback on TCP.  This matches behavior with the xtrans codepath and the
    Xlib spec.
    
    http://lists.x.org/archives/xorg-devel/2010-April/007915.html
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>

diff --git a/src/OpenDis.c b/src/OpenDis.c
index 46e1026..2983b31 100644
--- a/src/OpenDis.c
+++ b/src/OpenDis.c
@@ -93,8 +93,8 @@ XOpenDisplay (
 	register Display *dpy;		/* New Display object being created. */
 	register int i;
 	int j, k;			/* random iterator indexes */
-#if !USE_XCB
 	char *display_name;		/* pointer to display name */
+#if !USE_XCB
 	int endian;			/* to determine which endian. */
 	xConnClientPrefix client;	/* client information */
 	int idisplay;			/* display number */
@@ -119,12 +119,13 @@ XOpenDisplay (
 	long setuplength;	/* number of bytes in setup message */
 	long usedbytes = 0;     /* number of bytes we have processed */
 	unsigned long mask;
-       long int conn_buf_size;
-       char *xlib_buffer_size;
+	long int conn_buf_size;
+	char *xlib_buffer_size;
 
 #if !USE_XCB
 	bzero((char *) &client, sizeof(client));
 	bzero((char *) &prefix, sizeof(prefix));
+#endif /* !USE_XCB */
 
 	/*
 	 * If the display specifier string supplied as an argument to this
@@ -140,7 +141,6 @@ XOpenDisplay (
 		/* Display is non-NULL, copy the pointer */
 		display_name = (char *)display;
 	}
-#endif /* !USE_XCB */
 
 /*
  * Set the default error handlers.  This allows the global variables to
@@ -164,10 +164,29 @@ XOpenDisplay (
 
 #if USE_XCB
 	if(!_XConnectXCB(dpy, display, &fullname, &iscreen)) {
+		/* Try falling back on other transports if no transport specified */
+		const char *slash = strrchr(display_name, '/');
+		if(slash == NULL) {
+			const char *protocols[] = {"local", "unix", "tcp", "inet6", "inet", NULL};
+			const char **s;
+			size_t buf_size = strlen(display_name) + 7; // max strlen + 2 (null + /)
+			char *buf = Xmalloc(buf_size * sizeof(char));
+
+			if(buf) {
+				for(s = protocols; buf && *s; s++) {
+					snprintf(buf, buf_size, "%s/%s", *s, display_name);
+					if(_XConnectXCB(dpy, buf, &fullname, &iscreen))
+						goto fallback_success;
+				}
+				Xfree(buf);
+			}
+		}
+
 		dpy->display_name = fullname;
 		OutOfMemory(dpy, NULL);
 		return NULL;
 	}
+fallback_success:
 #else /* !USE_XCB */
 	if ((dpy->trans_conn = _X11TransConnectDisplay (
 					 display_name, &fullname, &idisplay,

commit aae2a4a7aab26de3fa715d6ecd0a0e0926b37fc9
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Apr 23 21:50:29 2010 -0700

    Don't append the screen number when using a launchd socket
    
    ssh gets confused by this.  XQuartz is the only DDX using this
    functionality, and it doesn't support different screens, so
    let's just not include this until most ssh know how to handle
    this.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/xcb_disp.c b/src/xcb_disp.c
index fe1bdbf..99e0836 100644
--- a/src/xcb_disp.c
+++ b/src/xcb_disp.c
@@ -1,6 +1,10 @@
 /* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett
  * This file is licensed under the MIT license. See the file COPYING. */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "Xlibint.h"
 #include "Xxcbint.h"
 #include <xcb/xcbext.h>
@@ -73,7 +77,12 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr
 		return 0;
 	}
 
-	snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp);
+#ifdef HAVE_LAUNCHD
+	if(strncmp(host, "/tmp/launch", 11) == 0)
+		snprintf(*fullnamep, len, "%s:%d", host, n);
+	else
+#endif
+		snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp);
 	free(host);
 
 	_XLockMutex(_Xglobal_lock);

commit adcd0ec209abf832a769d52db660fb37eaad6e0c
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Apr 23 16:33:44 2010 -0700

    Remove launchd logic from _XConnectXCB as it's handled in XCB
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/xcb_disp.c b/src/xcb_disp.c
index 2625966..fe1bdbf 100644
--- a/src/xcb_disp.c
+++ b/src/xcb_disp.c
@@ -63,28 +63,19 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr
 	if(!dpy->xcb)
 		return 0;
 
-#ifdef HAVE_LAUNCHD
-	if(!display || !*display) display = getenv("DISPLAY");
-
-	if(display && strlen(display)>11 && !strncmp(display, "/tmp/launch", 11)) {
-		/* do nothing -- the magic happens inside of xcb_connect */
-	} else
-#endif
-	{
-		if(!xcb_parse_display(display, &host, &n, screenp))
-			return 0;
-
-		len = strlen(host) + (1 + 20 + 1 + 20 + 1);
-		*fullnamep = Xmalloc(len);
-		if (!*fullnamep) {
-			free(host);
-			return 0;
-		}
+	if(!xcb_parse_display(display, &host, &n, screenp))
+		return 0;
 
-		snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp);
+	len = strlen(host) + (1 + 20 + 1 + 20 + 1);
+	*fullnamep = Xmalloc(len);
+	if (!*fullnamep) {
 		free(host);
+		return 0;
 	}
 
+	snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp);
+	free(host);
+
 	_XLockMutex(_Xglobal_lock);
 	if(xauth.name && xauth.data)
 		c = xcb_connect_to_display_with_auth_info(display, &xauth, NULL);

commit d232b259c36fdde1f4179822809fec1480867dc5
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Tue Feb 2 17:01:28 2010 -0800

    Fix various build warnings
    
    imLcIm.c: In function '_XimCachedFileName':
    imLcIm.c:361: warning: format '%03x' expects type 'unsigned int', but argument 8 has type 'long unsigned int'
    imLcIm.c:364: warning: format '%03x' expects type 'unsigned int', but argument 8 has type 'long unsigned int'
    
    imRm.c: In function '_XimDefaultArea':
    imRm.c:597: warning: cast from pointer to integer of different size
    imRm.c: In function '_XimDefaultColormap':
    imRm.c:626: warning: cast from pointer to integer of different size
    
    lcFile.c:224: warning: no previous prototype for 'xlocaledir'
    
    lcUTF8.c: In function 'iconv_cstombs':
    lcUTF8.c:1841: warning: assignment discards qualifiers from pointer target type
    lcUTF8.c:1869: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
    lcUTF8.c:1873: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
    lcUTF8.c: In function 'iconv_mbstocs':
    lcUTF8.c:1935: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
    lcUTF8.c: In function 'iconv_mbtocs':
    lcUTF8.c:2031: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
    lcUTF8.c: In function 'iconv_mbstostr':
    lcUTF8.c:2121: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
    lcUTF8.c: In function 'iconv_strtombs':
    lcUTF8.c:2180: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
    lcUTF8.c: In function '_XlcAddGB18030LocaleConverters':
    lcUTF8.c:2367: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
    lcUTF8.c:2368: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
    lcUTF8.c:2373: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
    lcUTF8.c:2374: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
    lcUTF8.c:2375: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
    lcUTF8.c:2376: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
    lcUTF8.c:2377: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
    
    XlibInt.c: In function '_XGetHostname':
    XlibInt.c:3441: warning: implicit declaration of function 'gethostname'
    XlibInt.c:3441: warning: nested extern declaration of 'gethostname'
    
    ConnDis.c: In function '_XDisconnectDisplay':
    ConnDis.c:540: warning: old-style function definition
    ConnDis.c: In function '_XSendClientPrefix':
    ConnDis.c:554: warning: old-style function definition
    ConnDis.c: In function 'XSetAuthorization':
    ConnDis.c:677: warning: old-style function definition
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
index 767b083..0e97fd9 100644
--- a/include/X11/Xlibint.h
+++ b/include/X11/Xlibint.h
@@ -1391,6 +1391,13 @@ extern Bool _XCopyEventCookie(
         XGenericEventCookie *in,
         XGenericEventCookie *out);
 
+/* lcFile.c */
+
+extern void xlocaledir(
+    char *buf,
+    int buf_len
+);
+
 _XFUNCPROTOEND
 
 #endif /* _XLIBINT_H_ */
diff --git a/modules/im/ximcp/imLcIm.c b/modules/im/ximcp/imLcIm.c
index eb41603..83f216a 100644
--- a/modules/im/ximcp/imLcIm.c
+++ b/modules/im/ximcp/imLcIm.c
@@ -359,10 +359,10 @@ Private int _XimCachedFileName (
 
     if (len == 0 || dir [len-1] != '/')
        sprintf (*res, "%s/%c%d_%03x_%08x_%08x", dir, _XimGetMyEndian(),
-		XIM_CACHE_VERSION, sizeof (DefTree), hash, hash2);
+		XIM_CACHE_VERSION, (unsigned int)sizeof (DefTree), hash, hash2);
     else
        sprintf (*res, "%s%c%d_%03x_%08x_%08x", dir, _XimGetMyEndian(),
-		XIM_CACHE_VERSION, sizeof (DefTree), hash, hash2);
+		XIM_CACHE_VERSION, (unsigned int)sizeof (DefTree), hash, hash2);
 
 /* fprintf (stderr, "-> %s\n", *res); */
     if ( (fd = _XOpenFile (*res, O_RDONLY)) == -1)
diff --git a/modules/im/ximcp/imLcPrs.c b/modules/im/ximcp/imLcPrs.c
index c080172..75449ef 100644
--- a/modules/im/ximcp/imLcPrs.c
+++ b/modules/im/ximcp/imLcPrs.c
@@ -44,11 +44,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
 
 #define XLC_BUFSIZE 256
 
-extern void xlocaledir(
-    char *buf,
-    int buf_len
-);
-
 extern int _Xmbstowcs(
     wchar_t	*wstr,
     char	*str,
diff --git a/modules/im/ximcp/imRm.c b/modules/im/ximcp/imRm.c
index 94190e9..2e2c31f 100644
--- a/modules/im/ximcp/imRm.c
+++ b/modules/im/ximcp/imRm.c
@@ -594,7 +594,7 @@ _XimDefaultArea(
     if(XGetGeometry(im->core.display, (Drawable)ic->core.focus_window,
 		&root_return, &x_return, &y_return, &width_return,
 		&height_return, &border_width_return, &depth_return)
-		== (Status)NULL) {
+		== (Status)Success) {
 	return True;
     }
     area.x	= 0;
@@ -623,7 +623,7 @@ _XimDefaultColormap(
 	return True;
     }
     if(XGetWindowAttributes(im->core.display, ic->core.client_window,
-					&win_attr) == (Status)NULL) {
+					&win_attr) == (Status)Success) {
 	return True;
     }
 
diff --git a/src/ConnDis.c b/src/ConnDis.c
index 7fa7998..197e14c 100644
--- a/src/ConnDis.c
+++ b/src/ConnDis.c
@@ -533,10 +533,7 @@ int _XConnectDisplay (
  * Disconnect from server.
  */
 
-int _XDisconnectDisplay (trans_conn)
-
-XtransConnInfo	trans_conn;
-
+int _XDisconnectDisplay (XtransConnInfo trans_conn)
 {
     _X11TransDisconnect(trans_conn);
     _X11TransClose(trans_conn);
@@ -546,11 +543,11 @@ XtransConnInfo	trans_conn;
 
 
 Bool
-_XSendClientPrefix (dpy, client, auth_proto, auth_string, prefix)
-     Display *dpy;
-     xConnClientPrefix *client;		/* contains count for auth_* */
-     char *auth_proto, *auth_string;	/* NOT null-terminated */
-     xConnSetupPrefix *prefix;		/* prefix information */
+_XSendClientPrefix(
+     Display *dpy,
+     xConnClientPrefix *client,			/* contains count for auth_* */
+     char *auth_proto, char *auth_string,	/* NOT null-terminated */
+     xConnSetupPrefix *prefix)			/* prefix information */
 {
     int auth_length = client->nbytesAuthProto;
     int auth_strlen = client->nbytesAuthString;
@@ -671,9 +668,9 @@ static _Xconst int  *xauth_lengths = default_xauth_lengths;
 
 static int  xauth_names_length = NUM_DEFAULT_AUTH;
 
-void XSetAuthorization (name, namelen, data, datalen)
-    int namelen, datalen;		/* lengths of name and data */
-    char *name, *data;			/* NULL or arbitrary array of bytes */
+void XSetAuthorization (
+    char *name, int namelen,		/* *len are lengths of name and data */
+    char *data, int datalen)		/* name/data are NULL or arbitrary array of bytes */
 {
     char *tmpname, *tmpdata;
 
diff --git a/src/XlibInt.c b/src/XlibInt.c
index 5ed532b..13e6508 100644
--- a/src/XlibInt.c
+++ b/src/XlibInt.c
@@ -3424,6 +3424,10 @@ void _XData32(
 #if (defined(_POSIX_SOURCE) && !defined(AIXV3) && !defined(__QNX__)) || defined(hpux) || defined(SVR4)
 #define NEED_UTSNAME
 #include <sys/utsname.h>
+#else
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #endif
 
 /*
diff --git a/src/xlibi18n/lcUTF8.c b/src/xlibi18n/lcUTF8.c
index 08906c6..3e934b7 100644
--- a/src/xlibi18n/lcUTF8.c
+++ b/src/xlibi18n/lcUTF8.c
@@ -1822,7 +1822,7 @@ iconv_cstombs(XlcConv conv, XPointer *from, int *from_left,
 	      XPointer *to, int *to_left, XPointer *args, int num_args)
 {
     XlcCharSet charset;
-    char *name;
+    char const *name;
     Utf8Conv convptr;
     int i;
     unsigned char const *src;
@@ -1866,11 +1866,11 @@ iconv_cstombs(XlcConv conv, XPointer *from, int *from_left,
 
     /* Use stdc iconv to convert widechar -> multibyte */
 
-	count = wctomb(dst, wc);
+	count = wctomb((char *)dst, wc);
 	if (count == 0)
 	    break;
 	if (count == -1) {
-	    count = wctomb(dst, BAD_WCHAR);
+	    count = wctomb((char *)dst, BAD_WCHAR);
 	    if (count == 0)
 		break;
 	    unconv_num++;
@@ -1895,7 +1895,7 @@ static XlcConvMethodsRec iconv_cstombs_methods = {
 };
 
 static XlcConv
-open_iconv_cstombs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type)
+open_iconv_cstombs(XLCd from_lcd, const char *from_type, XLCd to_lcd, const char *to_type)
 {
     lazy_init_all_charsets();
     return create_conv(from_lcd, &iconv_cstombs_methods);
@@ -1932,7 +1932,7 @@ iconv_mbstocs(XlcConv conv, XPointer *from, int *from_left,
 
     /* Uses stdc iconv to convert multibyte -> widechar */
 
-	consumed = mbtowc(&wc, src, srcend-src);
+	consumed = mbtowc(&wc, (const char *)src, srcend-src);
 	if (consumed == 0)
 	    break;
 	if (consumed == -1) {
@@ -1990,7 +1990,7 @@ static XlcConvMethodsRec iconv_mbstocs_methods = {
 };
 
 static XlcConv
-open_iconv_mbstocs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type)
+open_iconv_mbstocs(XLCd from_lcd, const char *from_type, XLCd to_lcd, const char *to_type)
 {
     return create_tocs_conv(from_lcd, &iconv_mbstocs_methods);
 }
@@ -2028,7 +2028,7 @@ iconv_mbtocs(XlcConv conv, XPointer *from, int *from_left,
 
     /* Uses stdc iconv to convert multibyte -> widechar */
 
-	consumed = mbtowc(&wc, src, srcend-src);
+	consumed = mbtowc(&wc, (const char *)src, srcend-src);
 	if (consumed == 0)
 	    break;
 	if (consumed == -1) {
@@ -2085,7 +2085,7 @@ static XlcConvMethodsRec iconv_mbtocs_methods = {
 };
 
 static XlcConv
-open_iconv_mbtocs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type)
+open_iconv_mbtocs(XLCd from_lcd, const char *from_type, XLCd to_lcd, const char *to_type)
 {
     return create_tocs_conv(from_lcd, &iconv_mbtocs_methods );
 }
@@ -2118,7 +2118,7 @@ iconv_mbstostr(XlcConv conv, XPointer *from, int *from_left,
 
     /* Uses stdc iconv to convert multibyte -> widechar */
 
-	consumed = mbtowc(&wc, src, srcend-src);
+	consumed = mbtowc(&wc, (const char *)src, srcend-src);
 	if (consumed == 0)
 	    break;
 	if (dst == dstend)
@@ -2153,7 +2153,7 @@ static XlcConvMethodsRec iconv_mbstostr_methods = {
 };
 
 static XlcConv
-open_iconv_mbstostr(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type)
+open_iconv_mbstostr(XLCd from_lcd, const char *from_type, XLCd to_lcd, const char *to_type)
 {
     return create_conv(from_lcd, &iconv_mbstostr_methods);
 }
@@ -2177,7 +2177,7 @@ iconv_strtombs(XlcConv conv, XPointer *from, int *from_left,
     dstend = dst + *to_left;
 
     while (src < srcend) {
-	int count = wctomb(dst, *src);
+	int count = wctomb((char *)dst, *src);
 	if (count < 0)
 	    break;
 	dst += count;
@@ -2199,7 +2199,7 @@ static XlcConvMethodsRec iconv_strtombs_methods= {
 };
 
 static XlcConv
-open_iconv_strtombs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type)
+open_iconv_strtombs(XLCd from_lcd, const char *from_type, XLCd to_lcd, const char *to_type)
 {
     return create_conv(from_lcd, &iconv_strtombs_methods);
 }
@@ -2260,7 +2260,7 @@ static XlcConvMethodsRec iconv_mbstowcs_methods = {
 } ;
 
 static XlcConv
-open_iconv_mbstowcs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type)
+open_iconv_mbstowcs(XLCd from_lcd, const char *from_type, XLCd to_lcd, const char *to_type)
 {
     return create_conv(from_lcd, &iconv_mbstowcs_methods);
 }
@@ -2307,7 +2307,7 @@ static XlcConvMethodsRec iconv_wcstombs_methods = {
 } ;
 
 static XlcConv
-open_iconv_wcstombs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type)
+open_iconv_wcstombs(XLCd from_lcd, const char *from_type, XLCd to_lcd, const char *to_type)
 {
     return create_conv(from_lcd, &iconv_wcstombs_methods);
 }

commit 3e11c73187acb2e2be9a812840bbbea947527ccb
Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date:   Fri Apr 23 00:01:54 2010 +0200

    Allow X11 users to compose anarchism
    
    I can easily compose the hammer and sickle (the symbol representative
    of communism) by pressing the key sequence:
    
      <Compose> <C> <C> <C> <P> -> ☭
    
    But i can't easily make the circled A (the symbol representative of
    anarchism).
    
    I'd like to be able to use <Compose> <O> <A> (this is a
    currently unused key sequence) to generate the symbol:  Ⓐ
    
    Debian bug#555938 <http://bugs.debian.org/555938>
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>

diff --git a/nls/en_US.UTF-8/Compose.pre b/nls/en_US.UTF-8/Compose.pre
index c6ea2da..8732861 100644
--- a/nls/en_US.UTF-8/Compose.pre
+++ b/nls/en_US.UTF-8/Compose.pre
@@ -215,6 +215,7 @@ XCOMM Other symbols
 <Multi_key> <exclam> <question>         : "‽"   U203D # INTERROBANG
 
 <Multi_key> <C> <C> <C> <P>             : "☭"   U262D # HAMMER AND SICKLE
+<Multi_key> <O> <A>                     : "Ⓐ"   U24B6 # CIRCLED LATIN CAPITAL LETTER A
 <Multi_key> <less> <3>                  : "♥"   U2665 # BLACK HEART SUIT
 
 <Multi_key> <colon> <parenright>        : "☺"   U263A # WHITE SMILING FACE

commit 933aee1d5c53b0cc7d608011a29188b594c8d70b
Author: Jamey Sharp <jamey@minilop.net>
Date:   Fri Apr 16 20:18:28 2010 -0700

    Fix Xlib/XCB for multi-threaded applications (with caveats).
    
    Rather than trying to group all response processing in one monolithic
    process_responses function, let _XEventsQueued, _XReadEvents, and
    _XReply each do their own thing with a minimum of code that can all be
    reasoned about independently.
    
    Tested with `ico -threads 20`, which seems to be able to make many
    icosahedrons dance at once quite nicely now.
    
    Caveats:
    
    - Anything that was not thread-safe in Xlib before XCB probably still
      isn't. XListFontsWithInfo, for instance.
    
    - If one thread is waiting for events and another thread tries to read a
      reply, both will hang until an event arrives. Previously, if this
      happened it might work sometimes, but otherwise would trigger either
      an assertion failure or a permanent hang.
    
    - Versions of libxcb up to and including 1.6 have a bug that can cause
      xcb_wait_for_event or xcb_wait_for_reply to hang if they run
      concurrently with xcb_writev or other writers. So you'll want that fix
      as well.
    
    Signed-off-by: Jamey Sharp <jamey@minilop.net>
    Reviewed-by: Josh Triplett <josh@freedesktop.org>

diff --git a/src/Xxcbint.h b/src/Xxcbint.h
index 8b6a361..c819162 100644
--- a/src/Xxcbint.h
+++ b/src/Xxcbint.h
@@ -16,6 +16,7 @@ typedef struct PendingRequest PendingRequest;
 struct PendingRequest {
 	PendingRequest *next;
 	unsigned long sequence;
+	unsigned reply_waiter;
 };
 
 typedef struct _X11XCBPrivate {
@@ -31,11 +32,10 @@ typedef struct _X11XCBPrivate {
 	enum XEventQueueOwner event_owner;
 	XID next_xid;
 
-	/* handle simultaneous threads waiting for events,
-	 * used in wait_or_poll_for_event
-	 */
+	/* handle simultaneous threads waiting for responses */
 	xcondition_t event_notify;
 	int event_waiter;
+	xcondition_t reply_notify;
 } _X11XCBPrivate;
 
 /* xcb_disp.c */
diff --git a/src/xcb_disp.c b/src/xcb_disp.c
index 622afe7..fea1326 100644
--- a/src/xcb_disp.c
+++ b/src/xcb_disp.c
@@ -98,9 +98,11 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr
 	dpy->xcb->next_xid = xcb_generate_id(dpy->xcb->connection);
 
 	dpy->xcb->event_notify = xcondition_malloc();
-	if (!dpy->xcb->event_notify)
+	dpy->xcb->reply_notify = xcondition_malloc();
+	if (!dpy->xcb->event_notify || !dpy->xcb->reply_notify)
 		return 0;
 	xcondition_init(dpy->xcb->event_notify);
+	xcondition_init(dpy->xcb->reply_notify);
 	return !xcb_connection_has_error(c);
 }
 
@@ -115,5 +117,6 @@ void _XFreeX11XCBStructure(Display *dpy)
 		free(tmp);
 	}
 	xcondition_free(dpy->xcb->event_notify);
+	xcondition_free(dpy->xcb->reply_notify);
 	Xfree(dpy->xcb);
 }
diff --git a/src/xcb_io.c b/src/xcb_io.c
index 19dc6a9..dac7622 100644
--- a/src/xcb_io.c
+++ b/src/xcb_io.c
@@ -122,6 +122,7 @@ static PendingRequest *append_pending_request(Display *dpy, unsigned long sequen
 	assert(node);
 	node->next = NULL;
 	node->sequence = sequence;
+	node->reply_waiter = 0;
 	if(dpy->xcb->pending_requests_tail)
 	{
 		assert(XLIB_SEQUENCE_COMPARE(dpy->xcb->pending_requests_tail->sequence, <, node->sequence));
@@ -166,43 +167,6 @@ static int handle_error(Display *dpy, xError *err, Bool in_XReply)
 	return 0;
 }
 
-static void call_handlers(Display *dpy, xcb_generic_reply_t *buf)
-{
-	_XAsyncHandler *async, *next;
-	for(async = dpy->async_handlers; async; async = next)
-	{
-		next = async->next;
-		if(async->handler(dpy, (xReply *) buf, (char *) buf, sizeof(xReply) + (buf->length << 2), async->data))
-			return;
-	}
-}
-
-static xcb_generic_event_t * wait_or_poll_for_event(Display *dpy, int wait)
-{
-	xcb_connection_t *c = dpy->xcb->connection;


Reply to: