summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-12-14Add NEWS for 1.10HEADmasterJulien Cristau1-3/+18
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-12-14Add NEWS entries for releases 1.9.1 to 1.9.3Uli Schlachter1-1/+23
libxcb 1.9.1 was released from a branch and thus its NEWS entries never made it into the master branch. The other releases didn't update NEWS. Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-12-14Bump xcb-proto requirement to 1.10Julien Cristau1-1/+1
Makes sure we generate the new generic event struct. Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-12-14Test the value of msg_controllen for platforms whose CMSG_FIRSTHDR() does ↵PHO1-5/+7
not test it for us As RFC 2292 points out, some platforms (e.g. Darwin 9.8.0) provide CMSG_FIRSTHDR(msg) which just returns msg.msg_control without first checking if msg.msg_controllen is non-zero. We need a workaround for such platforms not to let _xcb_in_read() segfault. https://bugs.freedesktop.org/show_bug.cgi?id=72253 Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-12-14Increment the "current" version info for sync, xinput and xkbUli Schlachter1-3/+3
Sync: Due to commit e6a246e50e62cbcba3 "sync: Change value list param of CreateAlarm and ChangeAlarm into switch", various symbols disappeared, for example xcb_sync_{change,create}_alarm_sizeof. xinput: This extension was updated from version 1.4 to 2.3. This means that lots of new things are generated. However, this change is backwards-compatible and thus age gets set to 1. xkb: In commit 37d0f55392d6 "xkb: Work around alignment problems in GetNames and GetMap replies", some padding fields were introduced into structures for which an _unpack() function is generated. This changed the size of the struct and caused offsets into this struct to change. https://bugs.freedesktop.org/show_bug.cgi?id=71507 Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-12-14Revert "Remove xcb_ge_event_t from xcb.h"Uli Schlachter1-0/+20
This reverts commit f4d5b84800f960831e4fbb3ad9848bbb701020be. The version of this struct that the code generator produces breaks the API, because it gives the fields different (albeit better) names. Thus, we need to restore the old version of this struct. Additionally to the revert, this struct is documented as being deprecated. The replacement was added to xcb-proto. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71502 Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-12-12c_client.py: Fix _sizeof() functionsDaniel Martin1-2/+2
Currently, it is not possible to correctly iterate over the replies of some requests. For example, the list of XIDeviceInfo returned by the XIQueryDevice request from xinput2 is read as garbage starting from the second entry. The culprits are the _sizeof() used by the iterators. In the above case: int xcb_input_xi_device_info_sizeof (const void *_buffer /**< */) { char *xcb_tmp = (char *)_buffer; [...] unsigned int xcb_block_len = 0; [...] xcb_block_len += sizeof(xcb_input_xi_device_info_t); xcb_tmp += xcb_block_len; /* name */ xcb_block_len += (((_aux->name_len + 3) / 4) * 4) * sizeof(char); xcb_tmp += xcb_block_len; [...] } The problem here is that `xcb_block_len` is not zero'd right above the `/* name */` comment, causing `xcb_tmp` to be incremented by `sizeof(xcb_input_xi_device_info_t)` twice. The returned size is too large. https://bugs.freedesktop.org/show_bug.cgi?id=68387 Tested-by: Ran Benita <ran234@gmail.com> Reviewed-by: Ran Benita <ran234@gmail.com> Reviewed-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-11-18Revert "fix deadlock with xcb_take_socket/return_socket v3"Uli Schlachter3-25/+21
This reverts commit 9ae84ad187e2ba440c40f44b8eb21c82c2fdbf12. After this patch was merged, there were complaints about it not being a good idea. Revert this for now until we can agree on this. References: http://lists.freedesktop.org/archives/xcb/2013-June/008340.html Signed-off-by: Uli Schlachter <psychon@znc.in> Conflicts: src/xcbint.h
2013-11-18Fix alignment issues in FD passing codeMark Kettenis2-4/+10
A char array on the stack is not guaranteed to have more than byte alignment. This means that casting it to a 'struct cmsghdr' and accessing its members may result in unaligned access. This will generate SIGBUS on struct alignment architectures like OpenBSD/sparc64. The canonical solution is to use a union to force proper alignment. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-11-07Check if we need to define _XOPEN_SOURCE for struct msghdr.msg_controlAlan Coopersmith1-0/+34
Required to expose the structure members in Solaris headers, since it was an XPG4/UNIX95 addition to the Solaris ABI. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-11-07Add configure option to enable or disable fd passing with sendmsgKeith Packard1-8/+10
--disable-sendfds or --enable-sendfds By default, configure auto-detects based on whether your system supports sendmsg at all. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-11-07Switch to using the CMSG_* macros for FD passingKeith Packard3-25/+19
Use these instead of computing the values directly so that it might work on BSD or other non-Linux systems Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-11-07Add Present extensionKeith Packard5-0/+25
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-By: Uli Schlachter <psychon@znc.in>
2013-11-07Add DRI3 libraryKeith Packard5-0/+26
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-By: Uli Schlachter <psychon@znc.in>
2013-11-07Require xcb proto version 1.9Keith Packard1-1/+1
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-07Add event queue splittingKeith Packard3-12/+107
This allows apps to peel off certain XGE events into separate queues for custom handling. Designed to support the Present extension Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-By: Uli Schlachter <psychon@znc.in>
2013-11-07Add support for receiving fds in repliesKeith Packard4-9/+288
Requests signal which replies will have fds, and the replies report how many fds they expect in byte 1. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-By: Uli Schlachter <psychon@znc.in>
2013-11-07Add xcb_send_fd APIKeith Packard7-3/+86
This uses sendmsg to transmit file descriptors from the application to the X server Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-By: Uli Schlachter <psychon@znc.in>
2013-11-07-pendantic is too pendanticKeith Packard1-1/+1
Many system headers have warnings when compiled with this flag. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-By: Uli Schlachter <psychon@znc.in>
2013-11-07Make protocol C files depend on protocol XML filesKeith Packard1-1/+1
When new XML files get installed, make sure the C files are regenerated Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-By: Uli Schlachter <psychon@znc.in>
2013-11-07Remove xcb_ge_event_t from xcb.hKeith Packard1-17/+0
xcb proto now publishes this structure from an XML description Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-11Use /usr/spool/sockets/X11/ on HP-UX for UNIX sockets (#69118).Daphne Pfister1-0/+4
2013-09-08Fix poll() if POLLIN == ROLLRDNORM|POLLRDBANDDaphne Pfister1-2/+2
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>
2013-09-08Fix documentation of xcb_poll_for_event()Uli Schlachter1-1/+0
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>
2013-08-15tests: Add files to .gitignoreDaniel Martin1-0/+3
Add check_all.log, check_all.trs and test-suite.log to tests/.gitignore. Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15Sort gitignore, adjust pattern for config.hDaniel Martin1-17/+16
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>
2013-08-15Use m4 directoryDaniel Martin4-0/+4
- 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>
2013-08-15Use build-aux as autom4te cache directoryDaniel Martin2-1/+3
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>
2013-08-15Set AC_CONFIG_AUX_DIR to build-auxDaniel Martin2-7/+2
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>
2013-08-15Remove second AC_PREREQ, require version 2.60Daniel Martin1-8/+1
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>
2013-08-15Initialize automake earlier (bugfix for #66413)Daniel Martin1-4/+5
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>
2013-08-15Make xsltproc optionalDaniel Martin2-8/+6
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>
2013-08-15c_client.py: Do not create pointers in unionsDaniel Martin1-2/+2
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>
2013-08-15c_client.py: Always initialize xcb_align_toDaniel Martin1-4/+4
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>
2013-08-06Define _xcb_map_new with explicit void arg list instead of empty oneAlan Coopersmith1-1/+1
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>
2013-08-06Enable warnings for pre-C89 style definitions for gcc & Solaris StudioAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-06Build xcb-xkb by defaultMichael Stapelberg1-1/+1
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>
2013-07-12c_client.py: Inject full_sequence into GE eventsDaniel Martin1-0/+17
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>
2013-07-08Fix "indention" typos in xcb-examples.3 man pageAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-03Update Makefile.am for newer automakeMarc Deslauriers1-3/+0
Debian Bug #710344 Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2013-06-01fix deadlock with xcb_take_socket/return_socket v3Christian König3-21/+25
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>
2013-05-23integer overflow in read_packet() [CVE-2013-2064]Alan Coopersmith1-4/+9
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>
2013-05-23c_client.py: Handle multiple expr. in a bitcaseDaniel Martin1-4/+14
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>
2013-05-15whitespace fix in xcb_take_socketChristian König1-1/+1
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Jamey Sharp <jamey@minilop.net>
2013-01-16autogen.sh: Implement GNOME Build APIColin Walters1-1/+3
http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-11-10c_client.py: Fix python-3 invalid except statementChí-Thanh Christopher Nguyễn1-1/+1
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>
2012-11-10c-client.py: Fix python-3 AttributeError: 'dict' object has no attribute ↵Chí-Thanh Christopher Nguyễn1-3/+3
'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>
2012-10-05Release libxcb 1.9Uli Schlachter2-1/+14
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-05Include static man pages in "make dist"Uli Schlachter1-1/+2
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>
2012-09-30Fix a multi-thread deadlockUli Schlachter1-2/+12
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>