Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
It seems like POLLIN is specified as equivalent to POLLRDNORM | POLLRDBAND. Some
systems (e.g. QNX and HP-UX) take this literaly and have POLLIN defined as the
above bit combination. Other systems (e.g. Linux) have POLLIN as just a single
bit.
This means that if no out-of-band data is available (which should never be the
case), the result of poll() will not fulfil (fd.revents & POLLIN) == POLLIN on
QNX, because the POLLRDBAND bit is not set.
In other words, even though poll() signaled that the fd is readable, xcb would
not read from the file descriptor.
Fix this by checking if any bits from POLLIN are set in the result of poll(),
instead of all of them.
(This change was independently done by seanb@qnx.com as well)
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=38001
Acked-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
In commit 8eba8690adac2, the API documentation for xcb_poll_for_event() was
fixed to remove an argument that was previously removed in commit 34168ab549.
However, that commit only removed the first line of the documentation, leaving
behind a spurious half-sentence. That commit happened seven years ago and now
finally someone noticed...
Thanks to Benjamin Herr for reporting this on IRC.
v2: Thanks again to Benjamin Herr for noticing that my commit message blamed the
wrong commit.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
Add check_all.log, check_all.trs and test-suite.log to tests/.gitignore.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
|
|
Don't ignore the files config.h and config.h.in, adjust the pattern to
ignore config.h*. This matches an additional config.h.in~ too.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Tested-By: Ran Benita <ran234@gmail.com>
|
|
- Follow the suggestion by libtoolize:
"Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
rerunning libtoolize, to keep the correct libtool macros in-tree.
Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am."
and add the macro and define.
- Create the m4 directory and move acinclude.m4 as xcb.m4 there.
- Ignore the m4 files libtoolize copies into the m4 directory
(m4/l*.m4).
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Tested-By: Ran Benita <ran234@gmail.com>
|
|
Remove the generated directory ./autom4te.cache by reusing ./build-aux
as cache directory.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Tested-By: Ran Benita <ran234@gmail.com>
|
|
Do not clutter the project directory with generated/copied auxiliary
files, save them in ./build-aux.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Tested-By: Ran Benita <ran234@gmail.com>
|
|
Remove a second AC_PREREQ and bump the required autoconf version to
2.60.
Version 2.59c was a testing release, published in April 2006. Version
2.60 was the stable release afterwards, released in June 2006.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Tested-By: Ran Benita <ran234@gmail.com>
|
|
This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=66413
Bug 66413 - libxcb 1.9.1: Fails to build on Arch Linux: \
/home/<user>/install-sh: No such file or directory
Without that patch the search path for `install-sh` will become $HOME
and the `install` target will fail, when DESTDIR doesn't exist in
advance. (occured with automake 1.14 and autoconf 2.69)
Initial patch by: Alain Kalker <a.c.kalker@gmail.com>
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Tested-By: Ran Benita <ran234@gmail.com>
|
|
Fix Bug 23863 - xcb still checks for xsltproc:
https://bugs.freedesktop.org/show_bug.cgi?id=23863
xsltproc is used to generate the optional html page for `check` results,
only. So, it's not a hard build dependency.
Additionally, use yes/no instead of true/false in the HTML_CHECK_RESULT
variable for consistent output after a configure run.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
|
|
Do not create pointers in unions for fields of variadic length.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
|
|
to get rid of:
warning: 'xcb_align_to' may be used uninitialized in this function
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
|
|
Fixes Solaris Studio compiler warning:
"xcb_list.c", line 50: warning: old style function definition
and gcc warning:
xcb_list.c: In function '_xcb_map_new':
xcb_list.c:50:11: warning: old-style function definition [-Wold-style-definition]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
|
|
There have not been any big issues with xcb-xkb recently.
Also, Wayland is using xcb-xkb actively, making distributions compile
libxcb with xkb support anyway, so let’s reflect reality :).
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
|
|
The generic event structure xcb_ge_event_t has the full_sequence field
at the 32byte boundary. That's why we've to inject this field into GE
events while generating the structure for them. Otherwise we would read
garbage (the internal full_sequence) when accessing normal event fields
there.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Debian Bug #710344
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
|
|
To prevent different threads from stealing the socket from each other the
caller of "xcb_take_socket" must hold a lock that is also acquired in
"return_socket". Unfortunately xcb tries to prevent calling return_socket
from multiple threads and this can lead to a deadlock situation.
A simple example:
- X11 has taken the socket
- Thread A has locked the display.
- Thread B does xcb_no_operation() and thus ends up in libX11's return_socket(),
waiting for the display lock.
- Thread A calls e.g. xcb_no_operation(), too, ends up in return_socket() and
because socket_moving == 1, ends up waiting for thread B
=> Deadlock
This patch allows calling return_socket from different threads at the same time
an so resolves the deadlock situation.
Partially fixes: https://bugs.freedesktop.org/show_bug.cgi?id=20708
v2: fixes additional pthread_cond_wait dependencies,
rework comments and patch description
v3: separate pthread_cond_wait dependencies and unrelated whitespace
change into their own patch, use unsigned for socket_seq
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
Ensure that when calculating the size of the incoming response from the
Xserver, we don't overflow the integer used in the calculations when we
multiply the int32_t length by 4 and add it to the default response size.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Adopt a change from xcbgen. With that modification the expression in a
bitcase became a list of expressions to support multiple <enumref> in a
<bitcase>.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
|
|
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
|
|
http://people.gnome.org/~walters/docs/build-api.txt
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Replace except statement with a PEP-3110 compliant one. This fixes a regression
introduced by c3deeaf714630531d693a6a902b8dabf791858b1
https://bugs.freedesktop.org/show_bug.cgi?id=55690
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
'iteritems'
This fixes a regression introduced by ea71d7d7e3f5d8189b80747678e9ca9a417b1d37
https://bugs.freedesktop.org/show_bug.cgi?id=55690
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
This was found by distcheck. It tried to install src/man/xcb-examples.3 and
src/man/xcb-requests.3, but those files weren't in the distribution.
Fix this by explicitly telling automake to distribute those files.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
This fixes a deadlock which was seen in-the-wild with wine.
It could happen that two threads tried to read from the socket at the same time
and one of the thread got stuck inside of poll()/select().
The fix works by making sure that the writing thread doesn't steal the reading
thread's reply.
Debugged-by: Erich Hoover <ehoover@mines.edu>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54671
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
This allows an application to do a scatter/gather operation on a large
image buffer to avoid the extra memcpy.
Use autoconf to use UIO_MAXIOV where IOV_MAX is not available (and the
POSIX minimum of 16 where neither are available).
Reviewed-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Peter Harris <pharris@opentext.com>
|
|
Matches the behaviour of Xlib - if you set DISPLAY to :0.1 but only have
one screen, closes connection and returns error.
This introduces a new connection error code:
XCB_CONN_CLOSED_INVALID_SCREEN
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
|
|
Copied from libX11 configure.ac
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Allows configure to set defines such as _POSIX_SOURCE in config.h
that affect functions exposed by system headers and get consistent
results across all the source files.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
With make -j, it was possible to hit a race condition in the code to
make the 'man' directory.
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|
launchd socket
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|
On FreeBSD MSG_WAITALL on a non-blocking socket fails immediately if less bytes
than were asked for are available. This is different than the behavior on linux
where as many bytes as are available are returned in this case. Other OS
apparently follow the FreeBSD behavior.
_xcb_in_read() is used to fill xcb's read buffer, thus this function will call
recv() with a big length argument (xcb's read buffer is by default 16 KiB
large). That many bytes are highly unlikely to be available in the kernel
buffer.
This means that _xcb_in_read() always failed on FreeBSD. Since the socket was
still signaled as readable by poll(), this bug even resulted in a busy loop.
The same issue is present in read_block(), but here it is slightly different.
read_block() is called when we read the first few bytes of an event or a reply,
so that we already know its length. This means that we should be able to use
MSG_WAITALL here, because we know how many bytes there have to be.
However, that function could busy loop, too, when only the first few bytes of
the packet were sent while the rest is stuck somewhere on the way to us. Thus,
MSG_WAITALL should be removed here, too.
Thanks to Christoph Egger from Debian for noticing the problem, doing all the
necessary debugging and figuring out what the problem was! This patch is 99%
from debian. Thanks for all the work.
This bug was introduced in commit 2dcf8b025be88a25d4333abdc28d425b88238d96.
This commit also reverts commit 9061ee45b8dbe5431c23e3f628089d703ccad0b1.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45776
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
|
|
2dcf8b025be88a25d4333abdc28d425b88238d96 was causing some regressions on
darwin, so go back to using read(2) there until I have time to investigate
further.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
|
|
|
|
Unfortunately, commit 31b57676 adding WSACleanup/WSAShutdown on Win32 adds a new use
of error_connection, which was removed in commit 769acff0, applied 5 minutes earlier.
src/xcb_util.c: In function 'xcb_connect_to_display_with_auth_info':
src/xcb_util.c:433:39: error: 'error_connection' undeclared (first use in this function)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Arvind Umrao <arvind.umrao@oracle.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
Fix a redefinition problem which shows up when building for _WIN32 and
libXdmcp is installed, so HASXDMAUTH is enabled
It seems this is a special place in xcb as it uses other X11 library headers here
If HASXDMAUTH is defined, include the wrapped windows.h before any header which
includes it unwrapped, to avoid conflicts with types defined in X headers
We need to include config.h and check HASXDMAUTH to avoid an unconditional dependency
on x11proto headers
In file included from install/include/X11/Xdmcp.h:19:0,
from git/xcb/libxcb/src/xcb_auth.c:52:
install/include/X11/Xmd.h:120:14: error: conflicting types for 'INT32'
/usr/i686-pc-mingw32/sys-root/mingw/include/basetsd.h:54:13: note: previous declaration of 'INT32' was here
install/include/X11/Xmd.h:143:15: error: conflicting types for 'BOOL'
/usr/i686-pc-mingw32/sys-root/mingw/include/windef.h:234:17: note: previous declaration of 'BOOL' was here
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
This reverts commit 0e9246def562be97cc816f824f702233a826ec56.
This change caused build failures because <X11/Xdmcp.h> was never
included under any circumstance. This is because the check for
HASXDMAUTH was moved before the inclusion of config.h (via xcbint.h)
which defined it.
Found-by: Tinderbox
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|