free-sw/xcb/libxcb
15 years agoStore xcbproto version libxcb was compiled with
Bob Ham [Mon, 25 May 2009 10:20:23 +0000 (12:20 +0200)]
Store xcbproto version libxcb was compiled with

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agodepends on recent xcb-proto and bump version of randr
Julien Danjou [Sat, 9 May 2009 15:39:34 +0000 (17:39 +0200)]
depends on recent xcb-proto and bump version of randr

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoFix XDM-AUTHORIZATION-1 (bug #14202)
Bart Massey [Tue, 21 Apr 2009 06:39:52 +0000 (08:39 +0200)]
Fix XDM-AUTHORIZATION-1 (bug #14202)

With this patch, we know use correctly the socket address or peer
address for authentication purpose.

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoutil: remove useless strlen calls from decnet opening
Julien Danjou [Tue, 7 Apr 2009 12:22:57 +0000 (14:22 +0200)]
util: remove useless strlen calls from decnet opening

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoutil: merge common code for xcb_connect
Julien Danjou [Tue, 7 Apr 2009 12:18:40 +0000 (14:18 +0200)]
util: merge common code for xcb_connect

Many code was duplicated between xcb_connect_to_display_with_auth_info
and xcb_connect(). We merge both, since the difference is just about the
xcb_auth_info_t pointer being supplied, or not.

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoutil: open_abstract gets filelen as parameters
Julien Danjou [Tue, 7 Apr 2009 11:37:40 +0000 (13:37 +0200)]
util: open_abstract gets filelen as parameters

That saves us from a couple of strlen() calls.

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoauth: use snprintf() return value
Julien Danjou [Tue, 7 Apr 2009 09:55:30 +0000 (11:55 +0200)]
auth: use snprintf() return value

That save us from a strlen().

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoauth: precompute authnameslen
Julien Danjou [Tue, 7 Apr 2009 09:49:13 +0000 (11:49 +0200)]
auth: precompute authnameslen

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agodarwin: Don't use poll() on versions of darwin before darwin10
Jeremy Huddleston [Thu, 9 Apr 2009 12:12:02 +0000 (05:12 -0700)]
darwin: Don't use poll() on versions of darwin before darwin10

15 years agoLocal socket connections do not work on hurd-i386
Samuel Thibault [Mon, 6 Apr 2009 01:31:23 +0000 (03:31 +0200)]
Local socket connections do not work on hurd-i386

Local socket connections currently do not work on hurd-i386 because
xcb_auth calls getpeername() on the client socket, but hurd-i386 does
not implement anything in that case (I actually wonder what reasonable
value could be returned).  In such case the xcb code does not actually
need the peer name anyway.

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agouse poll() instead of select() when available
Michael Ost [Mon, 30 Mar 2009 09:09:32 +0000 (11:09 +0200)]
use poll() instead of select() when available

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agokludgily hand-merged xid fixes
Bart Massey [Tue, 24 Mar 2009 23:24:04 +0000 (16:24 -0700)]
kludgily hand-merged xid fixes

Signed-off-by: Bart Massey <bart@cs.pdx.edu>
Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoFix do_append() arguments
Julien Danjou [Mon, 16 Mar 2009 09:26:02 +0000 (10:26 +0100)]
Fix do_append() arguments

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoCopy full IPv4 mapping (Bug #20665)
Julien Danjou [Sun, 15 Mar 2009 09:18:50 +0000 (10:18 +0100)]
Copy full IPv4 mapping (Bug #20665)

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoAvoid name collisions between xidtype and enum.
Peter Harris [Fri, 13 Mar 2009 19:24:55 +0000 (15:24 -0400)]
Avoid name collisions between xidtype and enum.

These changes are necessary to build with latest xcb/proto.

Signed-off-by: Peter Harris <pharris@opentext.com>
15 years agoRevert "Don't use enums in generated C code"
Peter Harris [Fri, 13 Mar 2009 19:25:30 +0000 (15:25 -0400)]
Revert "Don't use enums in generated C code"

This commit broke xcb/util.

This reverts commit 9984b72888108a038d6b3f7dee374d17e26ef9e2.

Signed-off-by: Peter Harris <pharris@opentext.com>
15 years agoDon't use enums in generated C code - use integer constants instead.
Peter Harris [Wed, 25 Feb 2009 23:48:50 +0000 (18:48 -0500)]
Don't use enums in generated C code - use integer constants instead.

Signed-off-by: Peter Harris <pharris@opentext.com>
15 years agoRelease libxcb 1.2
Julien Danjou [Tue, 17 Feb 2009 12:37:29 +0000 (13:37 +0100)]
Release libxcb 1.2

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoStop providing autogenerated files in tarball
Julien Danjou [Mon, 16 Feb 2009 10:44:20 +0000 (11:44 +0100)]
Stop providing autogenerated files in tarball

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoRelease libxcb 1.1.93
Julien Danjou [Thu, 11 Dec 2008 10:17:13 +0000 (11:17 +0100)]
Release libxcb 1.1.93

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoShutup compiler warning about unused variable...
Jeremy Huddleston [Mon, 24 Nov 2008 01:25:21 +0000 (17:25 -0800)]
Shutup compiler warning about unused variable...

15 years agoApple: Apple launchd cleanup
Jeremy Huddleston [Mon, 24 Nov 2008 01:23:17 +0000 (17:23 -0800)]
Apple: Apple launchd cleanup
Added --with-launchd option instead of just using __APPLE__
Fixed opening launchd fd when displayname=NULL

15 years agoApple: Enable support for launchd DISPLAY socket
Jeremy Huddleston [Sat, 8 Nov 2008 22:41:23 +0000 (14:41 -0800)]
Apple: Enable support for launchd DISPLAY socket

15 years agoTreat XIDs the same as other cardinal values.
Peter Harris [Wed, 12 Nov 2008 19:45:04 +0000 (14:45 -0500)]
Treat XIDs the same as other cardinal values.

This fixes a bug where c_client.py wasn't generating *_end functions,
but expected them to exist in order to find the subsequent list's start.

Signed-off-by: Peter Harris <peter.harris@hummingbird.com>
15 years agoRelease libxcb 1.1.92
Julien Danjou [Tue, 4 Nov 2008 09:19:14 +0000 (10:19 +0100)]
Release libxcb 1.1.92

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoSupport handing off socket write permission to external code.
Josh Triplett [Mon, 17 Mar 2008 06:16:31 +0000 (23:16 -0700)]
Support handing off socket write permission to external code.

Libraries like Xlib, some XCB language bindings, and potentially others
have a common problem: they want to share the X connection with XCB. This
requires coordination of request sequence numbers.  Previously, XCB had an
Xlib-specific lock, and allowed Xlib to block XCB from making requests.
Now we've replaced that lock with a handoff mechanism, xcb_take_socket,
allowing external code to ask XCB for permission to take over the write
side of the socket and send raw data with xcb_writev.  The caller of
xcb_take_socket must supply a callback which XCB can call when it wants
the write side of the socket back to make a request.  This callback
synchronizes with the external socket owner, flushes any output queues if
appropriate, and then returns the sequence number of the last request sent
over the socket.

Commit by Josh Triplett and Jamey Sharp.
Handoff mechanism inspired by Keith Packard.

15 years agoTrack 64-bit sequence numbers internally.
Jamey Sharp [Wed, 21 May 2008 21:44:16 +0000 (14:44 -0700)]
Track 64-bit sequence numbers internally.

External APIs that used 32-bit sequence numbers continue to do so.

Commit by Josh Triplett and Jamey Sharp.

15 years agoUse sequence number ranges in pending replies
Jamey Sharp [Sat, 15 Mar 2008 03:18:52 +0000 (20:18 -0700)]
Use sequence number ranges in pending replies

This allows optimizing adjacent pending replies with the same flags, and
will help support default flags for a range of future requests.

Commit by Josh Triplett and Jamey Sharp.

15 years agoInline _xcb_lock_io, _xcb_unlock_io, and _xcb_wait_io.
Jamey Sharp [Fri, 14 Mar 2008 19:08:58 +0000 (12:08 -0700)]
Inline _xcb_lock_io, _xcb_unlock_io, and _xcb_wait_io.

These functions are once again a single pthread call, so just make that
call directly.

15 years agoRemove libxcb-xlib and xcbxlib.h.
Jamey Sharp [Fri, 14 Mar 2008 19:08:32 +0000 (12:08 -0700)]
Remove libxcb-xlib and xcbxlib.h.

15 years agobuild: fix configure.ac AC_DEFINE
Julien Danjou [Tue, 14 Oct 2008 21:39:07 +0000 (23:39 +0200)]
build: fix configure.ac AC_DEFINE

Rather use AC_DEFINE_UNQUOTED and only once.

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoallow compile-time setting for XCB queue buffer size
Julien Danjou [Fri, 26 Sep 2008 13:26:42 +0000 (15:26 +0200)]
allow compile-time setting for XCB queue buffer size

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoRemove duplicate XCB_EXTENSION calls for Composite extension
Josh Triplett [Wed, 8 Oct 2008 23:04:25 +0000 (16:04 -0700)]
Remove duplicate XCB_EXTENSION calls for Composite extension

15 years agofix tiny memory leak in read_packet (leak only happens when malloc returns NULL so...
Henning Sten [Sat, 20 Sep 2008 11:08:58 +0000 (13:08 +0200)]
fix tiny memory leak in read_packet (leak only happens when malloc returns NULL so it's very rare)

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoAdded generation of extern "C" for compatibility with C++
Carsten Meier [Tue, 9 Sep 2008 10:11:37 +0000 (12:11 +0200)]
Added generation of extern "C" for compatibility with C++

The auto-generated header files now include an extern "C"
declaration for compatibility with C++.

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoAdd support for the abstract socket namespace under Linux
Julien Cristau [Tue, 9 Sep 2008 03:42:36 +0000 (04:42 +0100)]
Add support for the abstract socket namespace under Linux

Based on same in Xtrans.

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoFix some fd leaks in _xcb_open_*()
Julien Cristau [Tue, 9 Sep 2008 03:42:35 +0000 (04:42 +0100)]
Fix some fd leaks in _xcb_open_*()

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agofixed overly aggressive warning about fixed field following variable
Bart Massey [Wed, 3 Sep 2008 20:52:58 +0000 (13:52 -0700)]
fixed overly aggressive warning about fixed field following variable

15 years agoadded small fix to support trailing fixed fields; also warning for non-pad fixed...
Bart Massey [Sun, 31 Aug 2008 07:42:23 +0000 (00:42 -0700)]
added small fix to support trailing fixed fields; also warning for non-pad fixed fields

15 years agofactorize m4 macros and add one to set X extensions
Vincent Torri [Sun, 31 Aug 2008 08:33:31 +0000 (10:33 +0200)]
factorize m4 macros and add one to set X extensions

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoInitialize all fields of addrinfo
Julien Danjou [Thu, 28 Aug 2008 12:35:54 +0000 (14:35 +0200)]
Initialize all fields of addrinfo

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoUse ifdef instead of if for defined value
Julien Danjou [Thu, 28 Aug 2008 11:51:38 +0000 (13:51 +0200)]
Use ifdef instead of if for defined value

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoSet namelen unsigned
Julien Danjou [Wed, 27 Aug 2008 11:56:28 +0000 (13:56 +0200)]
Set namelen unsigned

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoRename index to idx to avoid shadowing
Julien Danjou [Wed, 27 Aug 2008 11:56:26 +0000 (13:56 +0200)]
Rename index to idx to avoid shadowing

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoUse a signed size in read_block()
Julien Danjou [Wed, 27 Aug 2008 11:56:25 +0000 (13:56 +0200)]
Use a signed size in read_block()

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoUse unsigned to compare and rename sync
Julien Danjou [Wed, 27 Aug 2008 11:56:24 +0000 (13:56 +0200)]
Use unsigned to compare and rename sync

- i must be unsigned to be compare in the loop
- sync shadow global sync() function

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoFix htonl() arg & convert sizeof() to signed
Julien Danjou [Wed, 27 Aug 2008 11:56:23 +0000 (13:56 +0200)]
Fix htonl() arg & convert sizeof() to signed

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoinitialize global_id to 0
Julien Danjou [Wed, 27 Aug 2008 11:56:22 +0000 (13:56 +0200)]
initialize global_id to 0

Signed-off-by: Julien Danjou <julien@danjou.info>
15 years agoBump to 1.1.91.
Peter Hutterer [Thu, 17 Jul 2008 04:27:41 +0000 (13:57 +0930)]
Bump to 1.1.91.

15 years agoMake EXTHEADERS, EXTSOURCES, EXTENSION_XML unconditional of configure flags.
Julien Cristau [Wed, 16 Jul 2008 13:55:04 +0000 (23:25 +0930)]
Make EXTHEADERS, EXTSOURCES, EXTENSION_XML unconditional of configure flags.

yay, make distcheck works now even when some extensions are disabled.

Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agofix FreeBSD support
Petr Salinger [Mon, 7 Jul 2008 15:57:37 +0000 (17:57 +0200)]
fix FreeBSD support

The GNU/kFreeBSD (and BSDs in general) have a different
layout of struct sockaddr, sockaddr_in, sockaddr_un ...

The first member do not have to be "sa_family",
they also have "sa_len" field.

Signed-off-by: Julien Danjou <julien@danjou.info>
16 years agoBump to 1.1.90.
Peter Hutterer [Wed, 28 May 2008 08:11:35 +0000 (17:41 +0930)]
Bump to 1.1.90.

16 years agoFix variable declaration formatting
Josh Triplett [Wed, 28 May 2008 19:26:13 +0000 (12:26 -0700)]
Fix variable declaration formatting

16 years agoAdd xcb_ge_event_t and handling for long events.
Peter Hutterer [Tue, 15 May 2007 06:58:19 +0000 (16:28 +0930)]
Add xcb_ge_event_t and handling for long events.

GenericEvent can be more than 32 bytes long. Ensure that the required data is
pulled off the wire and tack it onto the event.

Due to the structure of the xcb_generic_event_t, the data is appended AFTER
the full_sequence field.

16 years agoFix libxcb/src compile with srcdir != builddir.
Oswald Buddenhagen [Thu, 1 May 2008 20:17:55 +0000 (16:17 -0400)]
Fix libxcb/src compile with srcdir != builddir.

16 years agoReplace a stray c-client.xsl in the libxcb SOURCES. Fixes make distcheck.
Eamon Walsh [Thu, 24 Apr 2008 00:26:28 +0000 (20:26 -0400)]
Replace a stray c-client.xsl in the libxcb SOURCES.  Fixes make distcheck.

16 years agoUse the python install path from xcb-xproto.pc to locate the xcbgen package.
Eamon Walsh [Thu, 24 Apr 2008 00:25:57 +0000 (20:25 -0400)]
Use the python install path from xcb-xproto.pc to locate the xcbgen package.

16 years agoAdd mention of PYTHONPATH if xcbgen cannot be found.
Jeremy Kolb [Sun, 20 Apr 2008 20:26:51 +0000 (16:26 -0400)]
Add mention of PYTHONPATH if xcbgen cannot be found.

16 years agoAdd Python parser C language-dependent part.
Eamon Walsh [Fri, 18 Apr 2008 20:30:08 +0000 (16:30 -0400)]
Add Python parser C language-dependent part.

16 years agoAdd SELinux extension support, disabled by default.
Eamon Walsh [Thu, 24 Jan 2008 21:02:34 +0000 (16:02 -0500)]
Add SELinux extension support, disabled by default.

16 years agoAdd XInput extension support, disabled by default.
Eamon Walsh [Thu, 24 Jan 2008 20:57:35 +0000 (15:57 -0500)]
Add XInput extension support, disabled by default.

16 years agoInputs to AC_CONFIG_FILES are automatically distributed.
Eamon Walsh [Tue, 15 Jan 2008 22:06:14 +0000 (17:06 -0500)]
Inputs to AC_CONFIG_FILES are automatically distributed.
Hence, it is not necessary to explicitly add them to EXTRA_DIST.

16 years agoGenerated the configure.ac and Makefile.am's in libxcb with the idea of
Eamon Walsh [Fri, 7 Dec 2007 21:22:04 +0000 (16:22 -0500)]
Generated the configure.ac and Makefile.am's in libxcb with the idea of
making each extension library individually selectable for build.

Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
16 years agoMerge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb
Eamon Walsh [Fri, 7 Dec 2007 21:18:00 +0000 (16:18 -0500)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb

16 years agomake IPv6 optional
Bart Massey [Sat, 24 Nov 2007 22:53:54 +0000 (14:53 -0800)]
make IPv6 optional

16 years agoRemove file that wasn't meant to be committed.
Eamon Walsh [Sat, 17 Nov 2007 00:38:40 +0000 (19:38 -0500)]
Remove file that wasn't meant to be committed.

16 years agoMerge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb
Eamon Walsh [Sat, 17 Nov 2007 00:36:08 +0000 (19:36 -0500)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb

16 years agoAdd comment noting the requirement to free replies when finished.
Eamon Walsh [Sat, 17 Nov 2007 00:34:42 +0000 (19:34 -0500)]
Add comment noting the requirement to free replies when finished.

16 years agoAdd generated comment noting requirement to free replies after use.
Eamon Walsh [Sat, 17 Nov 2007 00:33:20 +0000 (19:33 -0500)]
Add generated comment noting requirement to free replies after use.

16 years agoRelease libxcb 1.1
Jamey Sharp [Mon, 5 Nov 2007 01:29:13 +0000 (17:29 -0800)]
Release libxcb 1.1

16 years agoRevert "Generate error constants as XCB_BAD_*, similar to Xlib."
Jamey Sharp [Mon, 5 Nov 2007 01:26:21 +0000 (17:26 -0800)]
Revert "Generate error constants as XCB_BAD_*, similar to Xlib."

Since several extensions named their errors like "BadFoo", this patch
results in names like XCB_EXT_BAD_BAD_FOO, which is really awful. Those
extensions are already kind of awful, as they produce structure names
like xcb_ext_bad_foo_error_t, which is redundant.

A patch that removes "Bad" from the XML extension descriptions, while
maintaining API and ABI compatibility in XCB, is needed before this
patch can be released.

This reverts commit 158c9b6ba18b39f424bd524fceb66f3fec0d1616.

16 years agoDon't hold the xlib-xcb lock while sleeping: that allows deadlock.
Jamey Sharp [Sun, 28 Oct 2007 20:28:18 +0000 (13:28 -0700)]
Don't hold the xlib-xcb lock while sleeping: that allows deadlock.

With this patch, `ico -threads 2` runs without deadlock.

Many thanks to Christoph Pfister <christophpfister@gmail.com> for
pointing out the problem, providing detailed analyses, explaining it to
me repeatedly until I understood what was going on, and proposing and
reviewing possible solutions.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Christoph Pfister <christophpfister@gmail.com>
16 years agoFactor pthread_cond_wait(iolock) to _xcb_wait_io.
Jamey Sharp [Sun, 28 Oct 2007 18:56:08 +0000 (11:56 -0700)]
Factor pthread_cond_wait(iolock) to _xcb_wait_io.

This parallels the _xcb_lock_io and _xcb_unlock_io factoring.

16 years agoDon't abort() on locking assertions if LIBXCB_ALLOW_SLOPPY_LOCK is set.
Jamey Sharp [Tue, 23 Oct 2007 18:03:33 +0000 (11:03 -0700)]
Don't abort() on locking assertions if LIBXCB_ALLOW_SLOPPY_LOCK is set.

But do still print a full backtrace, on platforms where that's
supported.

This commit follows the spirit of Novell's libxcb-sloppy-lock.diff.

I strongly opposed proposals like this one for a long time. Originally I
had a very good reason: libX11, when compiled to use XCB, would crash
soon after a locking correctness violation, so it was better to have an
informative assert failure than a mystifying crash soon after.

It took some time for me to realize that I'd changed the libX11
implementation (for unrelated reasons) so that it could survive most
invalid locking situations, as long as it wasn't actually being used
from multiple threads concurrently.

The other thing that has changed is that most of the code with incorrect
locking has now been fixed. The value of the assert is accordingly
lower.

However, remaining broken callers do need to be fixed. That's why libXCB
will still noisily print a stacktrace (if possible) on each assertion
failure, even when assert isn't actually invoked to abort() the program;
and that's why aborting is still default. This environment variable is
provided only for use as a temporary workaround for broken applications.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Josh Triplett <josh@freedesktop.org>
16 years agoAllow unix:<screen> style display names again.
Egbert Eich [Thu, 19 Jul 2007 15:00:18 +0000 (17:00 +0200)]
Allow unix:<screen> style display names again.

https://bugzilla.novell.com/show_bug.cgi?id=289007
This notion is used in a lot of scripts.

16 years agoSend locking assertion backtraces to stderr. Improve the heading on the backtrace.
Josh Triplett [Thu, 14 Jun 2007 06:46:37 +0000 (23:46 -0700)]
Send locking assertion backtraces to stderr.  Improve the heading on the backtrace.

17 years agoPrint backtraces in case an assert fails inside xlib/xcb.
Christoph Pfister [Wed, 6 Jun 2007 15:17:49 +0000 (17:17 +0200)]
Print backtraces in case an assert fails inside xlib/xcb.

As you know there are some nasty libs / apps doing locking
incorrectly. In order to improve the information given to the user
when he encounters such a situation (people don't run apps in gdb
normally) I created the patch attached.
It's very non-intrusive (and affects only xlib/xcb, Josh told me on
irc that it could be useful for other areas too, personally I don't
think that it's really needed at other places ...).

Some same outputs and the discussion of them:

    lxuser@pdln:/tmp$ ./main
    Got a backtrace:
    #0 /tmp/usr/lib/libxcb-xlib.so.0 [0xb7f9d728]
    #1 /tmp/usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb7f9d861]
    #2 ./test.so(function_a+0x11) [0xb7f9f3fd]
    #3 ./test.so(function_b+0x11) [0xb7f9f410]
    #4 ./main [0x80484a7]
    #5 /lib/libc.so.6(__libc_start_main+0xdc) [0xb7e60ebc]
    #6 ./main [0x80483f1]
    main: xcb_xlib.c:82: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
    Aborted

That's kinda the normal situation.

    lxuser@pdln:/tmp$ ./main
    Got a backtrace:
    #0 /tmp/usr/lib/libxcb-xlib.so.0 [0xb7f90728]
    #1 /tmp/usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb7f90861]
    #2 /tmp/test.so [0xb7f923cd]
    #3 /tmp/test.so(function_b+0x11) [0xb7f923e0]
    #4 ./main [0x80484ab]
    #5 /lib/libc.so.6(__libc_start_main+0xdc) [0xb7e53ebc]
    #6 ./main [0x80483f1]
    main: xcb_xlib.c:82: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
    Aborted

There are two possible reasons that the name doesn't appear in #2:
a) a hidden symbol or a symbol with statical linkage in a library
b) a symbol in an app not compiled with -rdynamic.
But in both cases you still know _where_ the caller is.

Note that in this example test.so was compiled with
-fomit-frame-pointer; this isn't an issue as _one_ (= the caller)
stack trace is still valid (as long as you don't have the insane idea
to compile xcb with -fo-f-p).

Another issue that may appear is "tail call elimination" (some entries
are mysteriously missing; this is quite ugly, but you still get enough
information so that you can do something useful with the issue e.g. by
disassembling the relevant parts with gdb).

Signed-off-by: Jamey Sharp <jamey@minilop.net>
17 years agoxcb_poll_for_event: Return already-read events before read(2)ing again.
Jamey Sharp [Sun, 3 Jun 2007 01:29:37 +0000 (18:29 -0700)]
xcb_poll_for_event: Return already-read events before read(2)ing again.

17 years agoMerge branch 'master' of git://anongit.freedesktop.org/git/xcb/libxcb
Matthias Hopf [Wed, 18 Apr 2007 10:46:08 +0000 (12:46 +0200)]
Merge branch 'master' of git://anongit.freedesktop.org/git/xcb/libxcb

17 years agoGenerate error constants as XCB_BAD_*, similar to Xlib.
Ian Osgood [Fri, 13 Apr 2007 22:14:12 +0000 (15:14 -0700)]
Generate error constants as XCB_BAD_*, similar to Xlib.

The previous constants remain for compatibility, but should be deprecated.

17 years agoMerge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb
TORRI Vincent [Thu, 12 Apr 2007 13:48:44 +0000 (15:48 +0200)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb

17 years agoremove the 7th bit of the response_type for the event loops
TORRI Vincent [Thu, 12 Apr 2007 13:46:05 +0000 (15:46 +0200)]
remove the 7th bit of the response_type for the event loops

17 years agoUpdate autogen.sh to one that does objdir != srcdir
Matthias Hopf [Wed, 11 Apr 2007 15:31:31 +0000 (17:31 +0200)]
Update autogen.sh to one that does objdir != srcdir

17 years agoModify new attribute from previous patch so that it is necessary only on
Eamon Walsh [Tue, 10 Apr 2007 15:56:06 +0000 (11:56 -0400)]
Modify new attribute from previous patch so that it is necessary only on
extensions with split names.  Tested with diff and found no difference with
previous stylesheet header-file output.

17 years agoReplaces special-casing in c-client stylesheet with support
Eamon Walsh [Thu, 29 Mar 2007 19:28:07 +0000 (12:28 -0700)]
Replaces special-casing in c-client stylesheet with support
for new attribute.  Tested with diff and found no difference with
previous stylesheet header-file output.

17 years agoadd the first step toward the documentation of the request/reply functions. The argum...
TORRI Vincent [Tue, 27 Feb 2007 12:35:02 +0000 (13:35 +0100)]
add the first step toward the documentation of the request/reply functions. The arguments of the requests are not found yet. Josh, can you look at it ?

17 years agoand make the html code valid...
TORRI Vincent [Wed, 7 Feb 2007 19:08:27 +0000 (20:08 +0100)]
and make the html code valid...

17 years agofont part
TORRI Vincent [Wed, 7 Feb 2007 19:04:10 +0000 (20:04 +0100)]
font part

17 years agono more xid or id fields
TORRI Vincent [Wed, 7 Feb 2007 17:57:46 +0000 (18:57 +0100)]
no more xid or id fields

17 years agoadd the complete cursor example. Make the html code valid
TORRI Vincent [Tue, 6 Feb 2007 08:31:54 +0000 (09:31 +0100)]
add the complete cursor example. Make the html code valid

17 years agoadd doxygen doc for the *_end functions
TORRI Vincent [Mon, 22 Jan 2007 10:40:15 +0000 (11:40 +0100)]
add doxygen doc for the *_end functions

17 years agofix all the occurence where a drawable where considered as a union
TORRI Vincent [Sat, 13 Jan 2007 10:20:55 +0000 (11:20 +0100)]
fix all the occurence where a drawable where considered as a union

17 years agoAdd autogen.sh to EXTRA_DIST.
Josh Triplett [Mon, 11 Dec 2006 05:10:06 +0000 (21:10 -0800)]
Add autogen.sh to EXTRA_DIST.

17 years agoAdd tools/* to EXTRA_DIST.
Josh Triplett [Mon, 11 Dec 2006 05:09:30 +0000 (21:09 -0800)]
Add tools/* to EXTRA_DIST.

17 years agoadd doc tag for the _next functions. It creates doxygen doc in the header files for...
TORRI Vincent [Tue, 28 Nov 2006 19:26:54 +0000 (20:26 +0100)]
add doc tag for the _next functions. It creates doxygen doc in the header files for these functions

17 years agoMerge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb
TORRI Vincent [Tue, 28 Nov 2006 19:15:27 +0000 (20:15 +0100)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb

17 years agoadd some output informations to configure script
TORRI Vincent [Tue, 28 Nov 2006 19:14:16 +0000 (20:14 +0100)]
add some output informations to configure script

17 years agoIf enable_build_docs is "no", we don't even try to look for doxygen.
Tilman Sauerbeck [Fri, 24 Nov 2006 14:48:08 +0000 (15:48 +0100)]
If enable_build_docs is "no", we don't even try to look for doxygen.

Also set BUILD_DOCS in that branch. Now the disable-build-docs works
as expected.

17 years agoFixed evaluation of the disable-build-docs argument.
Tilman Sauerbeck [Fri, 24 Nov 2006 14:43:39 +0000 (15:43 +0100)]
Fixed evaluation of the disable-build-docs argument.

Now at least enable_build_docs is set correctly.

17 years agoFix unit tests for FreeBSD
Ian Osgood [Sun, 26 Nov 2006 17:26:32 +0000 (09:26 -0800)]
Fix unit tests for FreeBSD

putenv() string must contain '='
environment failure test is invalid if argument is NULL