Commit Graph

405 Commits

Author SHA1 Message Date
Christoph Reimann 77b594f958 renamed most _unserialize() functions to _sizeof() and fixed _unserialize() for the special case of intermixed variable and fixed size fields 2010-08-05 15:55:28 +02:00
Christoph Reimann b187f029d6 attempt to fix special case: variable fields followed by fixed size fields 2010-08-02 23:30:42 +02:00
Christoph Reimann a700eeb502 bug fixes for all kinds of 'special cases' 2010-08-01 23:40:20 +02:00
Christoph Reimann 1c590d5a86 partial rewrite of serialize helper functions completed;
_serialize() & _unserialize() have been tested for switch derived from valueparam
2010-07-22 16:41:15 +02:00
Christoph Reimann 566ae9baee preliminary handling of further special cases in unserialize
first attempts to unify serialize and unserialize
2010-07-20 22:46:37 +02:00
Christoph Reimann 4e665e1580 added generating code for _serialize() in case of variable sized structs (largely untested) 2010-07-15 18:43:43 +02:00
Christoph Reimann d003145609 xkb: added pkg config file 2010-07-13 20:08:51 +02:00
Christoph Reimann 86704124b1 new and still preliminary functions for switch; feautures include
- API compatibility with valueparam
- request _aux() auxiliary functions
- _serialize() and _unserialize() auxiliary functions
- new data type that allows mixing of fixed and variable size members
2010-07-13 20:06:08 +02:00
Christoph Reimann 80322d1163 xkb: updated configure.ac/Makefile.am 2010-07-13 19:59:23 +02:00
Christoph Reimann 8c2707773b added xcb_sumof() with restriction to uint8_t 2010-07-13 19:56:44 +02:00
Jeremy Huddleston 3f79628bec xcb_open: Improve protocol/host parsing
Support scenarios where host is not set and protocol is.  eg:

DISPLAY=tcp/:0

as well as the "inet" and "inet6" alias for "tcp" for compatability
with Xlib

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-05-14 14:28:53 -07:00
Marcin Kościelnicki e4b746ac13 Add ~ operator support in code generator
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-14 13:19:28 +02:00
Arnaud Fontaine 5e86cb0566 Fix GCC error on undeclared variable when not using abstract socket
This is a regression found by tinderbox in previous commit:

xcb_util.c: In function '_xcb_open':
xcb_util.c:213: error: 'fd' undeclared (first use in this function)
2010-04-30 18:49:18 +01:00
Arnaud Fontaine a546d00091 Get rid of PATH_MAX and MAXPATHLEN
There could be no upper limit on the length of a path according
to POSIX, therefore these macros may not be defined at all on
some systems (such as GNU Hurd).

Signed-off-by: Arnaud Fontaine <arnau@debian.org>
Reviewed-by: Peter Harris <pharris@opentext.com>
2010-04-30 14:47:16 +02:00
Jeremy Huddleston d068572173 Use limits.h instead of syslimits.h
Regression found by tinderbox in 89b3485dad

xcb_util.c:31:27: error: sys/syslimits.h: No such file or directory
xcb_util.c: In function '_xcb_open':
xcb_util.c:148: error: 'PATH_MAX' undeclared (first use in this function)

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-23 21:57:26 -07:00
Jeremy Huddleston 89b3485dad Reworked launchd support to work better with _xcb_parse_display
Fixes: http://xquartz.macosforge.org/trac/ticket/390

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-23 17:29:25 -07:00
Jamey Sharp b0525e2423 Always wake up readers after writing.
Since writers must make sure they read as well, threads may have gone to
sleep waiting for the opportunity to read. The writer must wake up one
of those readers or the application can hang.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@freedesktop.org>
2010-04-17 18:20:41 -07:00
Jamey Sharp eff3851ba8 Fix strict-aliasing warning when getting generic event length.
xcb_ge_event_t has its length field in the same place that
xcb_generic_reply_t does, so there's no need to cast the generic reply.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Danjou <julien@danjou.info>
2010-04-17 18:20:41 -07:00
Jamey Sharp 6dd8228a13 Delete a useless level of indirection from _xcb_out_send's parameters.
_xcb_out_send needs _xcb_conn_wait to store back its progress so it can
be reinvoked to pick up where it left off---but then _xcb_out_send
guarantees that it leaves either an empty output vector or a shut-down
connection, so *its* callers never care how much progress was made.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@freedesktop.org>
2010-04-17 18:20:40 -07:00
Julien Danjou a63fbc9d6c Release libxcb 1.6 2010-04-09 16:57:51 +02:00
Rémi Denis-Courmont a1d9aa6e07 Fail if fd is too big and poll() is not available
Depending on the process file limit, a file descriptor can be larger
than the capacity of fd_set. There is no portable way to create a
large enough fd_set at run-time. So we just fail if the file descriptor
number is too high and poll() is not available.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-04-08 12:05:00 +02:00
Samuel Thibault d18d03d6f3 Fix authentication on hpux and Hurd
libxcb's 010e5661 (Fix XDM-AUTHORIZATION-1 (bug #14202)) mistakenly
inverted a few lines of code, making local socket authentication fail on
hpux and Hurd: when getpeername fails, sockname needs to be initialized
by getsockname before its address family can be checked.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-13 16:20:12 +01:00
Rémi Denis-Courmont 53a9834e4c Open the X11 socket with close-on-exec flag
This saves the X11 connection from leaking into children processes.
On Linux, this is fully thread-safe using SOCK_CLOEXEC. On other
systems, there is a small race condition.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-02-17 10:09:43 +01:00
Peter Harris 367882fa32 Support xcb_discard_reply
This function is useful for dynamic language garbage collectors. Frequently
a GC cycle may run before you want to block wainting for a reply.

This function is also marginally useful for libxcb apps that issue
speculative requests (eg. xlsclients).

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Tested-by: Eamon Walsh <efw@eamonwalsh.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2010-02-11 14:35:37 -05:00
Rémi Denis-Courmont be7e528eae xcb_connect_to_fd: fix descriptor leak on memory error path
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-07 18:03:30 +01:00
Jeremy Huddleston c7a57043da configure.ac: Fix a typo on the last commit.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-11 17:24:43 -08:00
Jeremy Huddleston 58c96da928 darwin: xnu doesn't support poll on ttys on the master side.
<rdar://problem/7360546>

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-11 17:15:16 -08:00
Jim Ingram 1e746fd89a Tutorial code fix
Accessed elements of names[] after freeing them in the first example.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-08 09:41:26 +01:00
Rémi Cardona a470579ba2 DRI2 extension requires xcb-proto 1.6 or newer
Signed-off-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-05 11:54:39 +01:00
Julien Danjou 6e875a82a8 build: simplify extension building
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-03 11:34:18 +01:00
Julien Danjou 48217ac986 Release libxcb 1.5
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-03 10:09:06 +01:00
Adam Jackson 1cf2a87def setsockopt(SO_KEEPALIVE) on TCP display connections.
This matches xtrans behaviour in SocketINETConnect, and makes it so apps
don't hang forever if their display dies.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-12-02 14:31:56 -05:00
Eric Anholt e82c34c2f7 Add DRI2 support. (v2)
v2: Build fix from jcristau.
2009-10-19 09:47:06 -07:00
Eric Anholt a27c77ccae Fix typo in the tutorial. 2009-10-15 13:49:47 -07:00
Paulo R. Zanoni 17af34b4a4 Don't build docs if 'dot' is not found Signed-off-by: Paulo R. Zanoni <pzanoni@mandriva.com> 2009-09-18 17:14:04 -04:00
Julien Cristau 29207e2943 Fix check dependency
Bugzilla #21992

make -j check fails because the check-local rule gets executed before
the tests actually ran, so CheckLog*.xml doesn't exist.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 17:51:36 +02:00
Yaakov Selkowitz ff2e2e35bc Cygwin build fix: Add -no-undefined to libtool flags
-no-undefined is needed to tell libtool a shared library can be built
on platforms which require all references to be statisfied at link time.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 17:48:32 +02:00
Arnaud Fontaine 96ff5fb635 Release libxcb 1.4 2009-07-15 16:15:02 +01:00
Arnaud Fontaine f4c2794bf5 Add majorCode, minorCode and resourceID fields to X generic error 2009-07-15 16:03:56 +01:00
Jamey Sharp e06955ed66 Fix precedence bug: wrong length for big-requests preceded by sync.
Also replace excessively clever use of bitwise OR with equivalent
addition.

Reported-by: Geoffrey Li <geoffrey@seitopos.com>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-07-06 13:14:35 -07:00
Julien Cristau 9e191c722a Fix libxcb-randr version info
The SONAME shouldn't have been bumped in 1.3, only new symbols were
added.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-29 17:05:11 +02:00
Julien Danjou f44dc519c5 Release libxcb 1.3 2009-05-29 08:28:53 +02:00
elupus ee89850e68 Disable Nagle on TCP socket
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-26 16:14:48 +02:00
Bob Ham 62fe187e2d Store xcbproto version libxcb was compiled with
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-25 12:20:23 +02:00
Julien Danjou efbe96ee0a depends on recent xcb-proto and bump version of randr
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-09 17:39:34 +02:00
Bart Massey 010e566126 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>
2009-04-21 08:41:34 +02:00
Julien Danjou ca978a9dae util: remove useless strlen calls from decnet opening
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 09:59:49 +02:00
Julien Danjou cc19143141 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>
2009-04-10 09:59:49 +02:00
Julien Danjou 8797e053b2 util: open_abstract gets filelen as parameters
That saves us from a couple of strlen() calls.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 09:59:49 +02:00
Julien Danjou f0b2981974 auth: use snprintf() return value
That save us from a strlen().

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 09:59:49 +02:00