summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dist/libxcb/ChangeLog441
-rw-r--r--dist/libxcb/Makefile.am3
-rw-r--r--dist/libxcb/autogen.sh11
-rw-r--r--dist/libxcb/configure.ac25
-rw-r--r--dist/libxcb/doc/tutorial/index.html4
-rw-r--r--dist/libxcb/m4/libtool.m4232
-rw-r--r--dist/libxcb/m4/ltoptions.m44
-rw-r--r--dist/libxcb/m4/ltsugar.m42
-rw-r--r--dist/libxcb/m4/ltversion.m413
-rw-r--r--dist/libxcb/m4/lt~obsolete.m44
-rw-r--r--dist/libxcb/src/Makefile.am8
-rw-r--r--dist/libxcb/src/c_client.py15
-rw-r--r--dist/libxcb/src/xcb_auth.c4
-rw-r--r--dist/libxcb/src/xcb_conn.c8
-rw-r--r--dist/libxcb/src/xcb_util.c153
-rw-r--r--dist/libxcb/tests/check_public.c49
-rw-r--r--dist/libxcb/xcb-dbe.pc.in11
-rw-r--r--dist/libxcb/xcb-present.pc.in2
-rw-r--r--lib/libxcb/libxcb-dpms/shlib_version2
-rw-r--r--lib/libxcb/libxcb-dri3/shlib_version2
-rw-r--r--lib/libxcb/libxcb-present/shlib_version2
-rw-r--r--lib/libxcb/src/Makefile4
-rw-r--r--lib/libxcb/src/bigreq.h12
-rw-r--r--lib/libxcb/src/composite.h96
-rw-r--r--lib/libxcb/src/damage.h108
-rw-r--r--lib/libxcb/src/dpms.c53
-rw-r--r--lib/libxcb/src/dpms.h68
-rw-r--r--lib/libxcb/src/dri3.c134
-rw-r--r--lib/libxcb/src/dri3.h121
-rw-r--r--lib/libxcb/src/present.c182
-rw-r--r--lib/libxcb/src/present.h113
-rw-r--r--lib/libxcb/src/randr.c8
-rw-r--r--lib/libxcb/src/shm.h176
-rw-r--r--lib/libxcb/src/xfixes.h16
-rw-r--r--lib/libxcb/src/xinput.c16
35 files changed, 1821 insertions, 281 deletions
diff --git a/dist/libxcb/ChangeLog b/dist/libxcb/ChangeLog
index 8722e5a52..fb8275669 100644
--- a/dist/libxcb/ChangeLog
+++ b/dist/libxcb/ChangeLog
@@ -1,3 +1,444 @@
+commit 622152ee42a310876f10602601206954b8d0613e
+Author: Matt Turner <mattst88@gmail.com>
+Date: Fri Apr 12 12:35:55 2024 -0400
+
+ libxcb 1.17.0
+
+commit 4574ab269b082bf412e1b6fb5f09daf8134acd0b
+Author: Matt Turner <mattst88@gmail.com>
+Date: Fri Apr 12 12:35:32 2024 -0400
+
+ configure.ac: Require xcb-proto >= 1.17.0
+
+ Signed-off-by: Matt Turner <mattst88@gmail.com>
+
+commit b78d304531bfe2359baf40db06099d9158d398d4
+Author: Uli Schlachter <psychon@znc.in>
+Date: Sun Sep 17 12:43:43 2023 +0200
+
+ Always write C code in UTF-8
+
+ Some people apparently use non-utf8 locales and this caused errors when
+ xcb-proto started using some "fancy" quote marks. Fix this by always
+ using utf8 encoding.
+
+ Fixes: https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/72
+ Signed-off-by: Uli Schlachter <psychon@znc.in>
+
+commit 389f22d1cb53e47337e96d9f78a3ef0001e8e588
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date: Wed Mar 20 07:06:01 2024 -0700
+
+ Add xcb-dri3 dependency to xcb-present.pc.in
+
+ Present version 1.4 introduces a dependency on DRI3 for the DRI3Syncobj
+ protocol type.
+
+ Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
+
+commit 86a478032ba93f30adbc0ce96eecd3420fdf7ed1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Mar 2 12:01:54 2024 -0800
+
+ xcb_popcount: Use __builtin_popcount if compiler supports it
+
+ If the compiler knows of a better implementation for counting the number
+ of bits set in a word for the target CPU, let it use that, instead of the
+ classic algorithm optimized for PDP-6.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c268499c305317d2e9a67cc590c9147e11438fc7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Mar 2 11:47:47 2024 -0800
+
+ tests: fix -Werror=discarded-qualifiers errors in check_public.c
+
+ check_public.c: In function ‘parse_display_pass’:
+ check_public.c:32:32: error: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
+ 32 | putenv("DISPLAY=");
+ | ^~~~~~~~~~
+ In file included from check_public.c:4:
+ /usr/include/stdlib.h:148:19: note: expected ‘char *’ but argument is of type ‘const char *’
+ 148 | extern int putenv(char *);
+ | ^~~~~~
+ check_public.c:57:16: error: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
+ 57 | putenv("DISPLAY=");
+ | ^~~~~~~~~~
+ /usr/include/stdlib.h:148:19: note: expected ‘char *’ but argument is of type ‘const char *’
+ 148 | extern int putenv(char *);
+ | ^~~~~~
+ check_public.c: In function ‘parse_display_fail’:
+ check_public.c:73:32: error: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
+ 73 | putenv("DISPLAY=");
+ | ^~~~~~~~~~
+ /usr/include/stdlib.h:148:19: note: expected ‘char *’ but argument is of type ‘const char *’
+ 148 | extern int putenv(char *);
+ | ^~~~~~
+ check_public.c:99:16: error: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
+ 99 | putenv("DISPLAY=");
+ | ^~~~~~~~~~
+ /usr/include/stdlib.h:148:19: note: expected ‘char *’ but argument is of type ‘const char *’
+ 148 | extern int putenv(char *);
+ | ^~~~~~
+ check_public.c: In function ‘public_suite’:
+ check_public.c:244:16: error: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
+ 244 | putenv("DISPLAY=");
+ | ^~~~~~~~~~
+ /usr/include/stdlib.h:148:19: note: expected ‘char *’ but argument is of type ‘const char *’
+ 148 | extern int putenv(char *);
+ | ^~~~~~
+ cc1: all warnings being treated as errors
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c671b9b30aecada4e43cb48e0dee46d19fb5cb9c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Mar 2 11:13:37 2024 -0800
+
+ libxcb 1.16.1
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3c946010c8521497b0fba2c8bc9bde184622345a
+Author: Fergus Dall <sidereal@google.com>
+Date: Tue Nov 7 17:42:42 2023 +1100
+
+ Enable large file support
+
+ Signed-off-by: Fergus Dall <sidereal@google.com>
+
+commit 02a7bbed391859c79864b9aacf040d84f103d38a
+Author: Peter Williams <peter@newton.cx>
+Date: Thu Aug 24 21:50:29 2023 -0400
+
+ Fix compilation on Windows
+
+ Merge request !30 broke compilation on Windows by introducing unbalanced
+ curly braces. This change restores the previous behavior on Windows:
+ only TCP is supported.
+
+commit 18c3f055e7c02db6f15ae56f6995639635d1b055
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun Aug 20 11:34:31 2023 -0700
+
+ gitlab CI: use latest xcbproto from git to build against
+
+ Closes issue #70
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 453115f7eeb694de9f41ea842a29bbb31b90c8dd
+Author: Thomas Klausner <wiz@gatalith.at>
+Date: Sat Aug 19 19:34:51 2023 +0200
+
+ configure.ac: drop `pthread-stubs` dependency on NetBSD
+
+commit f11691a09893d2329948521e32a18c13b0b03d01
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun Aug 20 10:22:19 2023 -0700
+
+ gitlab CI: regenerate container used for builds
+
+ This updates the included xcb-proto to the newly required 1.16.
+ As explained in issue #70, this is a quick workaround, not the
+ long-term fix for this problem.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cc4b93c9cd93bad15b7106747b0213e4b9c53a1c
+Author: Matt Turner <mattst88@gmail.com>
+Date: Wed Aug 16 16:09:50 2023 -0400
+
+ libxcb 1.16
+
+ Signed-off-by: Matt Turner <mattst88@gmail.com>
+
+commit 1519334652837cb7b2a8f8117628ea3cc744f7cb
+Author: Matt Turner <mattst88@gmail.com>
+Date: Wed Aug 16 16:08:46 2023 -0400
+
+ configure.ac: Require xcb-proto >= 1.16.0
+
+ Signed-off-by: Matt Turner <mattst88@gmail.com>
+
+commit 038636786ad1914f3daf3503ae9611f40dffbb8f
+Author: Ilya Pominov <ipominov@astralinux.ru>
+Date: Sun Apr 2 11:35:16 2023 +0300
+
+ c_client: Fix crash in xcb_randr_set_monitor
+
+ Take into account c_need_sizeof when evaluating
+ xcb_protocol_request_t.count
+
+ Incorrect xcb_protocol_request_t.count causes a segmentation fault when
+ calling functions:
+ - xcb_randr_set_monitor{_checked}
+ - xcb_input_change_feedback_control{_checked}
+ - xcb_input_change_device_control{_unchecked}
+
+ Steps to reproduce:
+ Call xcb_randr_set_monitor() with valid arguments
+
+ OBSERVED RESULT
+ Segmentation fault
+ ```
+ Process terminating with default action of signal 11 (SIGSEGV)
+ Access not within mapped region at address 0x780
+ at 0x4852925: memmove (in /usr/libexec/valgrind/vgpreload_memcheck-
+ amd64-linux.so)
+ by 0x486967C: memcpy (string_fortified.h:29)
+ by 0x486967C: send_request (xcb_out.c:59)
+ by 0x486967C: send_request (xcb_out.c:46)
+ by 0x486967C: xcb_send_request_with_fds64 (xcb_out.c:338)
+ by 0x48699FC: xcb_send_request (xcb_out.c:359)
+ by 0x4891F11: xcb_randr_set_monitor_checked (randr.c:5350)
+ ```
+
+ EXPECTED RESULT
+ Function returns cookie
+
+ Amend: 77b594f9583ea0247ff27130316d8e045da7f921
+
+ Signed-off-by: Ilya Pominov <ipominov@astralinux.ru>
+
+commit 8935793f1f3751a6aa9d78955c7d6236177986de
+Author: Demi Marie Obenour <demiobenour@gmail.com>
+Date: Sat Mar 25 15:27:33 2023 -0400
+
+ Add tests for unix socket parsing
+
+ Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
+
+commit 095255531b90f0b442e6ca41fb3752a058562d07
+Author: Demi Marie Obenour <demiobenour@gmail.com>
+Date: Fri Aug 12 22:02:02 2022 -0400
+
+ DISPLAY starting with / or unix: is always a socket path
+
+ If DISPLAY starts with / or unix:, do not check for anything but a full
+ filesystem socket path. In particular, abstract AF_UNIX sockets and TCP
+ sockets will not be used in this case. Also be stricter about parsing
+ the screen part of /path.screen displays, and bail out after all stat()
+ errors other than ENOENT.
+
+ Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
+
+commit ccdef1a8a5b6956a3fb7115d634db213433dca75
+Author: Demi Marie Obenour <demiobenour@gmail.com>
+Date: Sun Jul 3 17:57:11 2022 -0400
+
+ Allow full paths to sockets on non-macOS
+
+ When combined with xorg/lib/libxtrans!7, this allows CVE-2020-25697 to
+ be mitigated by placing the AF_UNIX socket in a secure directory on the
+ filesystem.
+
+ This enables HAVE_LAUNCHD unconditionally and deletes the configure
+ switch.
+
+ Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
+
+commit 18e109d755c5ce18157fdabb6de8ee6845b348ff
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date: Tue Feb 28 14:19:21 2023 +0100
+
+ Fix xcb_connect() call with a custom xcb_auth_info_t
+
+ If the function implementing xcb_connect is called directly with a
+ custom xcb_auth_info_t then checking that the screen in $DISPLAY
+ is valid is skipped.
+
+ Reported by chohag AT jtan DOT com
+
+ Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit fd04ab24a5e99d53874789439d3ffb0eb82574f7
+Author: Jan Beich <jbeich@FreeBSD.org>
+Date: Fri Feb 10 14:16:20 2023 +0000
+
+ configure.ac: drop `pthread-stubs` dependency on DragonFly and FreeBSD
+
+ All `pthread_*` symbols used by libxcb have stubs in libc. So, stop
+ linking against libpthread.
+
+commit 4d1a578dd5348909ade2a853d806272326d228d7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Feb 9 14:56:38 2023 -0800
+
+ Raise minimum required version of Python from 2.6 to 3.0
+
+ Trying to build with Python 2.7.14 fails with:
+ File "./c_client.py", line 2270
+ key = (*self.name[:-1], field.enum)
+ ^
+ SyntaxError: invalid syntax
+
+ Fixes: 33f3dbe ("Fix handling of documented enum parameters")
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e2a3e80eb837eaaa834a01a2741d4c249c984442
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Feb 6 15:48:49 2023 -0800
+
+ configure.ac: Remove obsolete AC_HEADER_STDC
+
+ Nothing checks for the STDC_HEADERS flag this set, and all supported
+ systems have C89 compatible headers now.
+
+ Clears autoconf warnings of:
+ configure.ac:93: warning: The macro `AC_HEADER_STDC' is obsolete.
+ configure.ac:93: You should run autoupdate.
+ ./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
+ configure.ac:93: the top level
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3333d5bde8baaca8981e806ef86b74f4adb77ba7
+Author: Daniel G <giri@nwrk.biz>
+Date: Mon Jan 9 16:21:35 2023 +0000
+
+ Fix indentation.
+
+commit 973b510e954f6989ed773f8b357ca50fbc99bced
+Author: Daniel G <giri@nwrk.biz>
+Date: Sat Jan 7 19:35:47 2023 +0000
+
+ Fix windows build.
+
+commit cb8c70f5a65b4bd68b449dcaa637c3c4753e2f81
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date: Sat Nov 26 14:55:07 2022 -0800
+
+ xcb_conn: Add a check for NULL to silence a UBSan runtime error
+
+ xcb_conn.c:314:60: runtime error: applying zero offset to null pointer
+
+ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 33f3dbe3699a92e8ca18f470adac456e0b935e75
+Author: Demi Marie Obenour <demiobenour@gmail.com>
+Date: Sun Oct 16 01:50:53 2022 -0400
+
+ Fix handling of documented enum parameters
+
+ Previously this would crash the code generator.
+
+ Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
+
+commit c9513aac2d78808f63b83d71072c2c483b20162d
+Author: Demi Marie Obenour <demi@invisiblethingslab.com>
+Date: Sat Aug 28 12:25:05 2021 -0400
+
+ Fix a compiler warning
+
+ The warning is harmless but annoying.
+
+ Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
+
+commit 06e1ef43bbb8c84fc243fa6a53c81147a3a24273
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Oct 4 11:30:09 2022 -0700
+
+ configure.ac: drop dependency `pthread-stubs` on Solaris
+
+ On Solaris 10 and later, the pthread functions are directly in libc,
+ and libpthread only has metadata to redirect calls from it to the
+ libc functions.
+
+ On Solaris 9 and older (no longer supported), libc contained its own
+ thread stubs that libpthread then overrode.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d53ad60d774176c5b057e2ed4d03a4658ee13690
+Author: PaperChalice <lgamma@163.com>
+Date: Sat Aug 13 13:11:10 2022 +0800
+
+ configure.ac: drop dependency `pthread-stubs` on macOS
+
+ `libpthread.dylib` on macOS is an alias of `libSystem.B.dylib`,
+ every program should link against `libSystem.B.dylib`.
+
+commit e2ee5aabe9f731b7231b0d4a5a21367d1aced6ed
+Author: Uli Schlachter <psychon@znc.in>
+Date: Wed Sep 14 14:53:35 2022 +0200
+
+ Improve tutorial example
+
+ This tutorial example only handles XCB_EXPOSURE and XCB_KEY_RELEASE
+ events and ignores everything else. Thus, there is no point in asking
+ for more kinds of events.
+
+ A while ago, I ported this tutorial to x11rb [1]. Recently, I received a
+ pull request [2] removing these unnecessary event masks. This commit is
+ thus only partially by me and the 'issue' was originally found by the
+ author of [2].
+
+ [1]: https://github.com/psychon/x11rb/blob/master/x11rb/examples/tutorial.rs
+ [2]: https://github.com/psychon/x11rb/pull/754
+
+ Signed-off-by: Uli Schlachter <psychon@znc.in>
+
+commit 9dcb08170898d3bd5ddb3bc26c514a6bfccf3fae
+Author: Mihail Konev <k.mvc@ya.ru>
+Date: Thu Jan 26 13:52:49 2017 +1000
+
+ autogen: add default patch prefix
+
+ Signed-off-by: Mihail Konev <k.mvc@ya.ru>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7d798d3ccbe537f2f102665447ec3e15a8cdb1a1
+Author: Emil Velikov <emil.l.velikov@gmail.com>
+Date: Mon Mar 9 12:00:52 2015 +0000
+
+ autogen.sh: use quoted string variables
+
+ Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
+ fall-outs, when they contain space.
+
+ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7071b4a13c1e4df13b138748feebadc17fe2522b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jan 24 10:32:07 2017 +1000
+
+ autogen.sh: use exec instead of waiting for configure to finish
+
+ Syncs the invocation of configure with the one from the server.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ee60239b7308f98a7a32e2a567681e00c6b652f5
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Jul 18 17:55:43 2022 -0700
+
+ gitlab CI: add a basic build test
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3123dfe723648c5abeab429e7cb4bd194ceeb8f6
+Author: Mike Sharov <msharov@users.sourceforge.net>
+Date: Wed Jun 22 10:56:37 2022 -0400
+
+ Require xcb-proto >= 1.15.1, which has Dbe
+
+ Signed-off-by: Mike Sharov <msharov@users.sourceforge.net>
+
+commit 816407655f75cf8ae505432cb743c316e009679d
+Author: Mike Sharov <msharov@users.sourceforge.net>
+Date: Thu Jun 2 13:27:48 2022 -0400
+
+ Build DOUBLE-BUFFER extension.
+
+ Signed-off-by: Mike Sharov <msharov@users.sourceforge.net>
+
commit c2c4a2cd1947e559718acdba19ef6e7db731dbeb
Author: Matt Turner <mattst88@gmail.com>
Date: Tue May 3 15:09:54 2022 -0700
diff --git a/dist/libxcb/Makefile.am b/dist/libxcb/Makefile.am
index fbf6e048b..499c652fe 100644
--- a/dist/libxcb/Makefile.am
+++ b/dist/libxcb/Makefile.am
@@ -12,6 +12,9 @@ endif
if BUILD_DAMAGE
pkgconfig_DATA += xcb-damage.pc
endif
+if BUILD_DBE
+pkgconfig_DATA += xcb-dbe.pc
+endif
if BUILD_DPMS
pkgconfig_DATA += xcb-dpms.pc
endif
diff --git a/dist/libxcb/autogen.sh b/dist/libxcb/autogen.sh
index fc34bd55c..cb039471f 100644
--- a/dist/libxcb/autogen.sh
+++ b/dist/libxcb/autogen.sh
@@ -1,14 +1,17 @@
#! /bin/sh
-srcdir=`dirname $0`
+srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
-cd $srcdir
+cd "$srcdir"
autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH libxcb"
if test -z "$NOCONFIGURE"; then
- $srcdir/configure "$@"
+ exec "$srcdir"/configure "$@"
fi
diff --git a/dist/libxcb/configure.ac b/dist/libxcb/configure.ac
index 4198a508c..4e6f028f4 100644
--- a/dist/libxcb/configure.ac
+++ b/dist/libxcb/configure.ac
@@ -2,8 +2,8 @@ dnl Process this file with autoconf to produce a configure script.
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libxcb],[1.15],
- [https://gitlab.freedesktop.org/xorg/lib/libxcb/issues],
+AC_INIT([libxcb],[1.17.0],
+ [https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues],
[libxcb])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
@@ -12,12 +12,13 @@ AC_CONFIG_HEADERS([src/config.h])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-xz])
-AM_PATH_PYTHON([2.6])
+AM_PATH_PYTHON([3.0])
# Set common system defines for POSIX extensions, such as _GNU_SOURCE
# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
# to avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
# Initialize libtool
LT_PREREQ([2.2])
@@ -50,10 +51,10 @@ fi
AC_SUBST(HTML_CHECK_RESULT)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.14)
+PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.17.0)
NEEDED="xau >= 0.99.2"
case $host_os in
-linux*) ;;
+linux*|darwin*|solaris*|dragonfly*|freebsd*|netbsd*) ;;
*) NEEDED="$NEEDED pthread-stubs" ;;
esac
PKG_CHECK_MODULES(NEEDED, $NEEDED)
@@ -90,7 +91,6 @@ XCBPROTO_XCBPYTHONDIR=`$PKG_CONFIG --variable=pythondir xcb-proto`
AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
AC_SUBST(XCBPROTO_XCBPYTHONDIR)
-AC_HEADER_STDC
AC_SEARCH_LIBS(getaddrinfo, socket)
AC_SEARCH_LIBS(connect, socket)
@@ -221,6 +221,7 @@ esac
XCB_EXTENSION(Composite, yes)
XCB_EXTENSION(Damage, yes)
+XCB_EXTENSION(Dbe, yes)
XCB_EXTENSION(DPMS, yes)
XCB_EXTENSION(DRI2, yes)
XCB_EXTENSION(DRI3, $have_sendmsg)
@@ -247,16 +248,6 @@ XCB_EXTENSION(XTest, yes)
XCB_EXTENSION(Xv, yes)
XCB_EXTENSION(XvMC, yes)
-AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
-if test "x$LAUNCHD" = xauto; then
- unset LAUNCHD
- AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no], [$PATH$PATH_SEPARATOR/sbin])
-fi
-
-if test "x$LAUNCHD" = xyes ; then
- AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
-fi
-
AC_ARG_WITH(serverside-support, AS_HELP_STRING([--with-serverside-support], [Build with support for server-side usage of xcb. This is still EXPERIMENTAL! ABI/API may change! (default: no)]), [XCB_SERVERSIDE_SUPPORT=$withval], [XCB_SERVERSIDE_SUPPORT=no])
AM_CONDITIONAL(XCB_SERVERSIDE_SUPPORT, test "x$XCB_SERVERSIDE_SUPPORT" = "xyes")
@@ -273,6 +264,7 @@ AC_CONFIG_FILES([
xcb.pc
xcb-composite.pc
xcb-damage.pc
+xcb-dbe.pc
xcb-dpms.pc
xcb-dri2.pc
xcb-dri3.pc
@@ -321,6 +313,7 @@ echo ""
echo " X11 extensions"
echo " Composite...........: ${BUILD_COMPOSITE}"
echo " Damage..............: ${BUILD_DAMAGE}"
+echo " Dbe.................: ${BUILD_DBE}"
echo " Dpms................: ${BUILD_DPMS}"
echo " Dri2................: ${BUILD_DRI2}"
echo " Dri3................: ${BUILD_DRI3}"
diff --git a/dist/libxcb/doc/tutorial/index.html b/dist/libxcb/doc/tutorial/index.html
index ea0833745..1bc9f2e67 100644
--- a/dist/libxcb/doc/tutorial/index.html
+++ b/dist/libxcb/doc/tutorial/index.html
@@ -2297,9 +2297,7 @@ int main ()
values[0] = screen->white_pixel;
values[1] =
XCB_EVENT_MASK_KEY_RELEASE |
- XCB_EVENT_MASK_BUTTON_PRESS |
- XCB_EVENT_MASK_EXPOSURE |
- XCB_EVENT_MASK_POINTER_MOTION;
+ XCB_EVENT_MASK_EXPOSURE;
cookie_window = xcb_create_window_checked (c,
screen->root_depth,
window, screen->root,
diff --git a/dist/libxcb/m4/libtool.m4 b/dist/libxcb/m4/libtool.m4
index a70aea9fe..12ba34c9b 100644
--- a/dist/libxcb/m4/libtool.m4
+++ b/dist/libxcb/m4/libtool.m4
@@ -1,6 +1,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -31,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
# along with this program. If not, see <http://www.gnu.org/licenses/>.
])
-# serial 58 LT_INIT
+# serial 59 LT_INIT
# LT_PREREQ(VERSION)
@@ -181,6 +182,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_DECL_FILECMD])dnl
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
@@ -219,8 +221,8 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
libext=a
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -778,7 +780,7 @@ _LT_EOF
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" \
+ $SED '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
mv -f "$cfgfile" "$ofile" ||
@@ -1042,8 +1044,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@@ -1067,17 +1069,12 @@ _LT_EOF
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]][[,.]]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- 10.*|11.*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ darwin*)
+ case $MACOSX_DEPLOYMENT_TARGET,$host in
+ 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ *)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
@@ -1126,12 +1123,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
output_verbose_link_cmd=func_echo_all
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
m4_if([$1], [CXX],
[ if test yes != "$lt_cv_apple_cc_single_mod"; then
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
],[])
else
@@ -1245,7 +1242,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
# _LT_WITH_SYSROOT
# ----------------
AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
+[m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([for sysroot])
AC_ARG_WITH([sysroot],
[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
[Search for dependent libraries within DIR (or the compiler's sysroot
@@ -1262,7 +1260,7 @@ case $with_sysroot in #(
fi
;; #(
/*)
- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
;; #(
no|'')
;; #(
@@ -1292,7 +1290,7 @@ ia64-*-hpux*)
# options accordingly.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*ELF-32*)
HPUX_IA64_MODE=32
;;
@@ -1309,7 +1307,7 @@ ia64-*-hpux*)
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
if test yes = "$lt_cv_prog_gnu_ld"; then
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
@@ -1321,7 +1319,7 @@ ia64-*-hpux*)
;;
esac
else
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -1343,7 +1341,7 @@ mips64*-*linux*)
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
emul=elf
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
emul="${emul}32"
;;
@@ -1351,7 +1349,7 @@ mips64*-*linux*)
emul="${emul}64"
;;
esac
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*MSB*)
emul="${emul}btsmip"
;;
@@ -1359,7 +1357,7 @@ mips64*-*linux*)
emul="${emul}ltsmip"
;;
esac
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*N32*)
emul="${emul}n32"
;;
@@ -1379,14 +1377,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# not appear in the list.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*32-bit*)
case $host in
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
;;
@@ -1454,7 +1452,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# options accordingly.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*)
@@ -1493,9 +1491,22 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
-: ${AR_FLAGS=cru}
_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
+
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
+_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
+ [Flags to create an archive])
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
[lt_cv_ar_at_file=no
@@ -1708,18 +1719,13 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192;
;;
- mint*)
- # On MiNT this can take a long time and run out of memory.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
amigaos*)
# On AmigaOS with pdksh, this test takes hours, literally.
# So we just punt and use a minimum line length of 8192.
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1762,7 +1768,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
sysv5* | sco5v6* | sysv4.2uw2*)
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
else
lt_cv_sys_max_cmd_len=32768
fi
@@ -2212,26 +2218,35 @@ m4_defun([_LT_CMD_STRIPLIB],
striplib=
old_striplib=
AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
+if test -z "$STRIP"; then
+ AC_MSG_RESULT([no])
else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP"; then
+ if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+ else
+ case $host_os in
+ darwin*)
+ # FIXME - insert some real tests, host_os isn't really good enough
striplib="$STRIP -x"
old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
- else
+ ;;
+ freebsd*)
+ if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
+ ;;
+ esac
+ fi
fi
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
_LT_DECL([], [striplib], [1])
@@ -2554,7 +2569,7 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
@@ -2564,14 +2579,14 @@ m4_if([$1], [],[
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
;;
- *,cl*)
- # Native MSVC
+ *,cl* | *,icl*)
+ # Native MSVC or ICC
libname_spec='$name'
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
library_names_spec='$libname.dll.lib'
@@ -2590,7 +2605,7 @@ m4_if([$1], [],[
done
IFS=$lt_save_ifs
# Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
;;
cygwin*)
# Convert to unix form, then to dos form, then back to unix form
@@ -2627,7 +2642,7 @@ m4_if([$1], [],[
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
@@ -2660,7 +2675,7 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
if test -x /usr/bin/objformat; then
@@ -3472,7 +3487,7 @@ beos*)
bsdi[[45]]*)
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_cmd='$FILECMD -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -3506,14 +3521,14 @@ darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@@ -3527,7 +3542,7 @@ haiku*)
;;
hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
case $host_cpu in
ia64*)
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
@@ -3574,7 +3589,7 @@ netbsd*)
newos6*)
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
@@ -3701,13 +3716,13 @@ else
mingw*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
- case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
*$lt_bad_file* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
break 2
;;
*)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
break 2
@@ -3733,7 +3748,7 @@ else
# Let the user override the test.
else
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
- case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
*COFF*)
DUMPBIN="$DUMPBIN -symbols -headers"
;;
@@ -3973,7 +3988,7 @@ esac
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Gets list of data symbols to import.
- lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
# Adjust the below global symbol transforms to fixup imported variables.
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
@@ -3991,20 +4006,20 @@ fi
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
$lt_cdecl_hook\
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
$lt_c_name_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
# Transform an extracted symbol line into symbol name with lib prefix and
# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
$lt_c_name_lib_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
@@ -4028,7 +4043,7 @@ for ac_symprfx in "" "_"; do
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Fake it for dumpbin and say T for any non-static function,
# D for any global variable and I for any imported variable.
- # Also find C++ and __fastcall symbols from MSVC++,
+ # Also find C++ and __fastcall symbols from MSVC++ or ICC,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK ['"\
" {last_section=section; section=\$ 3};"\
@@ -4046,9 +4061,9 @@ for ac_symprfx in "" "_"; do
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx]"
else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
- lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
# Check to see that the pipe works correctly.
pipe_works=no
@@ -4335,7 +4350,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -4418,7 +4433,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*)
# Sun C++ 5.9
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4754,7 +4769,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4937,7 +4952,7 @@ m4_if([$1], [CXX], [
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
@@ -4945,7 +4960,7 @@ m4_if([$1], [CXX], [
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl*)
+ cl* | icl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
;;
*)
@@ -5002,15 +5017,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
+ # Microsoft Visual C++ or Intel C++ Compiler.
if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
+ # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
openbsd* | bitrig*)
@@ -5062,7 +5077,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
_LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
supports_anon_versioning=no
- case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+ case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -5174,6 +5189,7 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
interix[[3-9]]*)
@@ -5188,7 +5204,7 @@ _LT_EOF
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -5231,7 +5247,7 @@ _LT_EOF
_LT_TAGVAR(compiler_needs_object, $1)=yes
;;
esac
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*) # Sun C 5.9
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
@@ -5243,7 +5259,7 @@ _LT_EOF
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
@@ -5259,7 +5275,7 @@ _LT_EOF
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
@@ -5391,7 +5407,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -5574,12 +5590,12 @@ _LT_EOF
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
+ # Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
case $cc_basename in
- cl*)
- # Native MSVC
+ cl* | icl*)
+ # Native MSVC or ICC
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=yes
@@ -5620,7 +5636,7 @@ _LT_EOF
fi'
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Tell ltmain to make .lib files, not .a files.
@@ -5668,7 +5684,7 @@ _LT_EOF
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_TAGVAR(hardcode_direct, $1)=yes
@@ -5879,6 +5895,7 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
osf3*)
@@ -6649,8 +6666,8 @@ if test yes != "$_lt_caught_CXX_error"; then
cygwin* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
- ,cl* | no,cl*)
- # Native MSVC
+ ,cl* | no,cl* | ,icl* | no,icl*)
+ # Native MSVC or ICC
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
@@ -6748,6 +6765,7 @@ if test yes != "$_lt_caught_CXX_error"; then
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
dgux*)
@@ -6778,7 +6796,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -6915,7 +6933,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
@@ -7055,13 +7073,13 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*)
# Sun C++ 5.9
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -8207,6 +8225,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
AC_SUBST([DLLTOOL])
])
+# _LT_DECL_FILECMD
+# ----------------
+# Check for a file(cmd) program that can be used to detect file type and magic
+m4_defun([_LT_DECL_FILECMD],
+[AC_CHECK_TOOL([FILECMD], [file], [:])
+_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
+])# _LD_DECL_FILECMD
+
# _LT_DECL_SED
# ------------
# Check for a fully-functional sed program, that truncates
diff --git a/dist/libxcb/m4/ltoptions.m4 b/dist/libxcb/m4/ltoptions.m4
index 94b082976..b0b5e9c21 100644
--- a/dist/libxcb/m4/ltoptions.m4
+++ b/dist/libxcb/m4/ltoptions.m4
@@ -1,7 +1,7 @@
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
+# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
diff --git a/dist/libxcb/m4/ltsugar.m4 b/dist/libxcb/m4/ltsugar.m4
index 48bc9344a..902508bd9 100644
--- a/dist/libxcb/m4/ltsugar.m4
+++ b/dist/libxcb/m4/ltsugar.m4
@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
diff --git a/dist/libxcb/m4/ltversion.m4 b/dist/libxcb/m4/ltversion.m4
index fa04b52a3..b155d0ace 100644
--- a/dist/libxcb/m4/ltversion.m4
+++ b/dist/libxcb/m4/ltversion.m4
@@ -1,6 +1,7 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
+# Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -9,15 +10,15 @@
# @configure_input@
-# serial 4179 ltversion.m4
+# serial 4245 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.6])
-m4_define([LT_PACKAGE_REVISION], [2.4.6])
+m4_define([LT_PACKAGE_VERSION], [2.4.7])
+m4_define([LT_PACKAGE_REVISION], [2.4.7])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6'
-macro_revision='2.4.6'
+[macro_version='2.4.7'
+macro_revision='2.4.7'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/dist/libxcb/m4/lt~obsolete.m4 b/dist/libxcb/m4/lt~obsolete.m4
index c6b26f88f..0f7a8759d 100644
--- a/dist/libxcb/m4/lt~obsolete.m4
+++ b/dist/libxcb/m4/lt~obsolete.m4
@@ -1,7 +1,7 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
+# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
diff --git a/dist/libxcb/src/Makefile.am b/dist/libxcb/src/Makefile.am
index c2984b3f0..9861a2dd0 100644
--- a/dist/libxcb/src/Makefile.am
+++ b/dist/libxcb/src/Makefile.am
@@ -40,6 +40,14 @@ libxcb_damage_la_LIBADD = $(XCB_LIBS)
nodist_libxcb_damage_la_SOURCES = damage.c damage.h
endif
+EXTSOURCES += dbe.c
+if BUILD_DBE
+lib_LTLIBRARIES += libxcb-dbe.la
+libxcb_dbe_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_dbe_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_dbe_la_SOURCES = dbe.c dbe.h
+endif
+
EXTSOURCES += dpms.c
if BUILD_DPMS
lib_LTLIBRARIES += libxcb-dpms.la
diff --git a/dist/libxcb/src/c_client.py b/dist/libxcb/src/c_client.py
index fd256f015..b7db543d2 100644
--- a/dist/libxcb/src/c_client.py
+++ b/dist/libxcb/src/c_client.py
@@ -331,7 +331,7 @@ def c_close(self):
_h(' */')
# Write header file
- hfile = open('%s.h' % _ns.header, 'w')
+ hfile = open('%s.h' % _ns.header, 'w', encoding='UTF-8')
for list in _hlines:
for line in list:
hfile.write(line)
@@ -339,7 +339,7 @@ def c_close(self):
hfile.close()
# Write source file
- cfile = open('%s.c' % _ns.header, 'w')
+ cfile = open('%s.c' % _ns.header, 'w', encoding='UTF-8')
for list in _clines:
for line in list:
cfile.write(line)
@@ -2266,13 +2266,13 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
elif base_func_name == 'xcb_create_window' and field.c_field_name == 'value_mask':
field.enum = 'CW'
if field.enum:
- # XXX: why the 'xcb' prefix?
- key = ('xcb', field.enum)
+ assert 2 <= len(self.name) <= 3
+ key = (*self.name[:-1], field.enum)
tname = _t(key)
if namecount[tname] > 1:
tname = _t(key + ('enum',))
- _h(' * @param %s A bitmask of #%s values.' % (field.c_field_name, tname))
+ _h(' * @param %s A bitmask of #%s values.', field.c_field_name, tname)
if self.doc and field.field_name in self.doc.fields:
desc = self.doc.fields[field.field_name]
@@ -2280,7 +2280,8 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
desc = desc.replace('`%s`' % name, '\\a %s' % (name))
desc = desc.split("\n")
desc = [line if line != '' else '\\n' for line in desc]
- _h(' * @param %s %s' % (field.c_field_name, "\n * ".join(desc)))
+ _h(' * @param %s %s', field.c_field_name, "\n * ".join(desc))
+
# If there is no documentation yet, we simply don't generate an
# @param tag. Doxygen will then warn about missing documentation.
@@ -2339,7 +2340,7 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
for field in param_fields:
if not field.type.fixed_size() and field.wire:
count = count + 2
- if field.type.c_need_serialize:
+ if field.type.c_need_serialize or field.type.c_need_sizeof:
# _serialize() keeps track of padding automatically
count -= 1
dimension = count + 2
diff --git a/dist/libxcb/src/xcb_auth.c b/dist/libxcb/src/xcb_auth.c
index 8ebe9a437..8c6e9b9e9 100644
--- a/dist/libxcb/src/xcb_auth.c
+++ b/dist/libxcb/src/xcb_auth.c
@@ -73,7 +73,7 @@ enum auth_protos {
#define AUTH_PROTO_XDM_AUTHORIZATION "XDM-AUTHORIZATION-1"
#define AUTH_PROTO_MIT_MAGIC_COOKIE "MIT-MAGIC-COOKIE-1"
-static char *authnames[N_AUTH_PROTOS] = {
+static const char *authnames[N_AUTH_PROTOS] = {
#ifdef HASXDMAUTH
AUTH_PROTO_XDM_AUTHORIZATION,
#endif
@@ -165,7 +165,7 @@ static Xauth *get_authptr(struct sockaddr *sockname, int display)
return XauGetBestAuthByAddr (family,
(unsigned short) addrlen, addr,
(unsigned short) dispbuflen, dispbuf,
- N_AUTH_PROTOS, authnames, authnameslen);
+ N_AUTH_PROTOS, (char **)authnames, authnameslen);
}
#ifdef HASXDMAUTH
diff --git a/dist/libxcb/src/xcb_conn.c b/dist/libxcb/src/xcb_conn.c
index 3084c18fd..8f91f4312 100644
--- a/dist/libxcb/src/xcb_conn.c
+++ b/dist/libxcb/src/xcb_conn.c
@@ -310,9 +310,11 @@ static int write_vec(xcb_connection_t *c, struct iovec **vector, int *count)
int cur = (*vector)->iov_len;
if(cur > n)
cur = n;
- (*vector)->iov_len -= cur;
- (*vector)->iov_base = (char *) (*vector)->iov_base + cur;
- n -= cur;
+ if(cur) {
+ (*vector)->iov_len -= cur;
+ (*vector)->iov_base = (char *) (*vector)->iov_base + cur;
+ n -= cur;
+ }
if((*vector)->iov_len)
break;
}
diff --git a/dist/libxcb/src/xcb_util.c b/dist/libxcb/src/xcb_util.c
index 0296ce0dd..5124d144b 100644
--- a/dist/libxcb/src/xcb_util.c
+++ b/dist/libxcb/src/xcb_util.c
@@ -60,16 +60,27 @@
# include <sys/stat.h>
#endif
-#ifdef HAVE_LAUNCHD
#include <sys/stat.h>
+
+#ifndef __has_builtin
+# define __has_builtin(x) 0
#endif
int xcb_popcount(uint32_t mask)
{
+#if __has_builtin(__builtin_popcount)
+ return __builtin_popcount(mask);
+#else
+ /*
+ * Count the number of bits set to 1 in a 32-bit word.
+ * Algorithm from MIT AI Lab Memo 239: "HAKMEM", ITEM 169.
+ * https://dspace.mit.edu/handle/1721.1/6086
+ */
uint32_t y;
y = (mask >> 1) & 033333333333;
y = mask - y - ((y >> 1) & 033333333333);
return ((y + (y >> 3)) & 030707070707) % 077;
+#endif
}
int xcb_sumof(uint8_t *list, int len)
@@ -82,7 +93,6 @@ int xcb_sumof(uint8_t *list, int len)
return s;
}
-#ifdef HAVE_LAUNCHD
/* Return true and parse if name matches <path to socket>[.<screen>]
* Upon success:
* host = <path to socket>
@@ -95,19 +105,30 @@ static int _xcb_parse_display_path_to_socket(const char *name, char **host, char
{
struct stat sbuf;
char path[PATH_MAX];
- int _screen = 0;
+ size_t len;
+ int _screen = 0, res;
- strlcpy(path, name, sizeof(path));
- if (0 != stat(path, &sbuf)) {
- char *dot = strrchr(path, '.');
- if (!dot)
+ len = strlen(name);
+ if (len >= sizeof(path))
+ return 0;
+ memcpy(path, name, len + 1);
+ res = stat(path, &sbuf);
+ if (0 != res) {
+ unsigned long lscreen;
+ char *dot, *endptr;
+ if (res != -1 || (errno != ENOENT && errno != ENOTDIR))
+ return 0;
+ dot = strrchr(path, '.');
+ if (!dot || dot[1] < '1' || dot[1] > '9')
return 0;
*dot = '\0';
-
+ errno = 0;
+ lscreen = strtoul(dot + 1, &endptr, 10);
+ if (lscreen > INT_MAX || !endptr || *endptr || errno)
+ return 0;
if (0 != stat(path, &sbuf))
return 0;
-
- _screen = atoi(dot + 1);
+ _screen = (int)lscreen;
}
if (host) {
@@ -133,7 +154,6 @@ static int _xcb_parse_display_path_to_socket(const char *name, char **host, char
return 1;
}
-#endif
static int _xcb_parse_display(const char *name, char **host, char **protocol,
int *displayp, int *screenp)
@@ -146,11 +166,12 @@ static int _xcb_parse_display(const char *name, char **host, char **protocol,
if(!name)
return 0;
-#ifdef HAVE_LAUNCHD
/* First check for <path to socket>[.<screen>] */
- if (_xcb_parse_display_path_to_socket(name, host, protocol, displayp, screenp))
- return 1;
-#endif
+ if (name[0] == '/')
+ return _xcb_parse_display_path_to_socket(name, host, protocol, displayp, screenp);
+
+ if (strncmp(name, "unix:", 5) == 0)
+ return _xcb_parse_display_path_to_socket(name + 5, host, protocol, displayp, screenp);
slash = strrchr(name, '/');
@@ -236,41 +257,46 @@ static int _xcb_open(const char *host, char *protocol, const int display)
char *file = NULL;
int actual_filelen;
- /* If protocol or host is "unix", fall through to Unix socket code below */
- if ((!protocol || (strcmp("unix",protocol) != 0)) &&
- (*host != '\0') && (strcmp("unix",host) != 0))
- {
- /* display specifies TCP */
- unsigned short port = X_TCP_PORT + display;
- return _xcb_open_tcp(host, protocol, port);
- }
+#ifndef _WIN32
+ if (protocol && strcmp("unix", protocol) == 0 && host && host[0] == '/') {
+ /* Full path to socket provided, ignore everything else */
+ filelen = strlen(host) + 1;
+ if (filelen > INT_MAX)
+ return -1;
+ file = malloc(filelen);
+ if (file == NULL)
+ return -1;
+ memcpy(file, host, filelen);
+ actual_filelen = (int)(filelen - 1);
+ } else {
+#endif
+ /* If protocol or host is "unix", fall through to Unix socket code below */
+ if ((!protocol || (strcmp("unix",protocol) != 0)) &&
+ (*host != '\0') && (strcmp("unix",host) != 0))
+ {
+ /* display specifies TCP */
+ unsigned short port = X_TCP_PORT + display;
+ return _xcb_open_tcp(host, protocol, port);
+ }
#ifndef _WIN32
#if defined(HAVE_TSOL_LABEL_H) && defined(HAVE_IS_SYSTEM_LABELED)
- /* Check special path for Unix sockets under Solaris Trusted Extensions */
- if (is_system_labeled())
- {
- struct stat sbuf;
- const char *tsol_base = "/var/tsol/doors/.X11-unix/X";
- char tsol_socket[PATH_MAX];
-
- snprintf(tsol_socket, sizeof(tsol_socket), "%s%d", tsol_base, display);
-
- if (stat(tsol_socket, &sbuf) == 0)
- base = tsol_base;
- }
+ /* Check special path for Unix sockets under Solaris Trusted Extensions */
+ if (is_system_labeled())
+ {
+ const char *tsol_base = "/var/tsol/doors/.X11-unix/X";
+ char tsol_socket[PATH_MAX];
+ struct stat sbuf;
+
+ snprintf(tsol_socket, sizeof(tsol_socket), "%s%d", tsol_base, display);
+
+ if (stat(tsol_socket, &sbuf) == 0)
+ base = tsol_base;
+ else if (errno != ENOENT)
+ return 0;
+ }
#endif
-#ifdef HAVE_LAUNCHD
- struct stat sbuf;
- if (0 == stat(host, &sbuf)) {
- file = strdup(host);
- if(file == NULL)
- return -1;
- filelen = actual_filelen = strlen(file);
- } else
-#endif
- {
filelen = strlen(base) + 1 + sizeof(display) * 3 + 1;
file = malloc(filelen);
if(file == NULL)
@@ -278,24 +304,23 @@ static int _xcb_open(const char *host, char *protocol, const int display)
/* display specifies Unix socket */
actual_filelen = snprintf(file, filelen, "%s%d", base, display);
- }
- if(actual_filelen < 0)
- {
- free(file);
- return -1;
- }
- /* snprintf may truncate the file */
- filelen = MIN(actual_filelen, filelen - 1);
+ if(actual_filelen < 0)
+ {
+ free(file);
+ return -1;
+ }
+ /* snprintf may truncate the file */
+ filelen = MIN(actual_filelen, filelen - 1);
#ifdef HAVE_ABSTRACT_SOCKETS
- fd = _xcb_open_abstract(protocol, file, filelen);
- if (fd >= 0 || (errno != ENOENT && errno != ECONNREFUSED))
- {
- free(file);
- return fd;
- }
-
+ fd = _xcb_open_abstract(protocol, file, filelen);
+ if (fd >= 0 || (errno != ENOENT && errno != ECONNREFUSED))
+ {
+ free(file);
+ return fd;
+ }
#endif
+ }
fd = _xcb_open_unix(protocol, file);
free(file);
@@ -389,7 +414,11 @@ static int _xcb_open_tcp(const char *host, char *protocol, const unsigned short
fd = _xcb_socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
if (_xcb_do_connect(fd, addr->ai_addr, addr->ai_addrlen) >= 0)
break;
+#ifdef _WIN32
+ closesocket(fd);
+#else
close(fd);
+#endif
fd = -1;
}
freeaddrinfo(results);
@@ -528,10 +557,8 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname,
if(auth) {
c = xcb_connect_to_fd(fd, auth);
- goto out;
}
-
- if(_xcb_get_auth_info(fd, &ourauth, display))
+ else if(_xcb_get_auth_info(fd, &ourauth, display))
{
c = xcb_connect_to_fd(fd, &ourauth);
free(ourauth.name);
diff --git a/dist/libxcb/tests/check_public.c b/dist/libxcb/tests/check_public.c
index aed40c8fb..e0b374b64 100644
--- a/dist/libxcb/tests/check_public.c
+++ b/dist/libxcb/tests/check_public.c
@@ -1,6 +1,10 @@
#include <check.h>
+#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#ifdef __unix__
+#include <unistd.h>
+#endif
#include "check_suites.h"
#include "xcb.h"
#include "xcbext.h"
@@ -12,6 +16,10 @@ typedef enum test_type_t {
} test_type_t;
static const char *const test_string[] = { "", "via $DISPLAY " };
+/* putenv(3) takes a pointer to a writable string that it adds directly
+ to the environment, so it must be in persistent memory, not on the stack */
+static char display_env[] = "DISPLAY=";
+
static void parse_display_pass(const char *name, const char *host, const int display, const int screen)
{
int success;
@@ -25,7 +33,7 @@ static void parse_display_pass(const char *name, const char *host, const int dis
if(test_type == TEST_ARGUMENT)
{
argument = name;
- putenv("DISPLAY=");
+ putenv(display_env);
}
else if(test_type == TEST_ENVIRONMENT)
{
@@ -50,7 +58,7 @@ static void parse_display_pass(const char *name, const char *host, const int dis
ck_assert_msg(strcmp(host, got_host) == 0, "screenless parse %sproduced unexpected hostname '%s' for '%s': expected '%s'", test_string[test_type], got_host, name, host);
ck_assert_msg(display == got_display, "screenless parse %sproduced unexpected display '%d' for '%s': expected '%d'", test_string[test_type], got_display, name, display);
}
- putenv("DISPLAY=");
+ putenv(display_env);
}
static void parse_display_fail(const char *name)
@@ -66,7 +74,7 @@ static void parse_display_fail(const char *name)
if(test_type == TEST_ARGUMENT)
{
argument = name;
- putenv("DISPLAY=");
+ putenv(display_env);
}
else if(test_type == TEST_ENVIRONMENT)
{
@@ -92,11 +100,42 @@ static void parse_display_fail(const char *name)
ck_assert_msg(got_host == (char *) -1, "host changed on parse failure %sfor '%s': got %p", test_string[test_type], name, got_host);
ck_assert_msg(got_display == -42, "display changed on parse failure %sfor '%s': got %d", test_string[test_type], name, got_display);
}
- putenv("DISPLAY=");
+ putenv(display_env);
}
START_TEST(parse_display_unix)
{
+#ifdef __unix__
+ char buf[sizeof "/tmp/xcb-test.XXXXXXX"];
+ char buf2[sizeof(buf) + 7];
+ int r, v;
+ memcpy(buf, "/tmp/xcb-test.XXXXXXX", sizeof buf);
+ v = mkstemp(buf);
+ ck_assert_msg(v >= 0, "cannot create temporary file");
+ parse_display_pass(buf, buf, 0, 0);
+ r = snprintf(buf2, sizeof buf2, "unix:%s", buf);
+ if (r < 5 || r >= (int)sizeof buf2) {
+ ck_assert_msg(0, "snprintf() failed (return value %d)", r);
+ unlink(buf);
+ return;
+ }
+ parse_display_pass(buf2, buf, 0, 0);
+ r = snprintf(buf2, sizeof buf2, "unix:%s.1", buf);
+ if (r < 7 || r >= (int)sizeof buf2) {
+ ck_assert_msg(0, "snprintf() failed (return value %d)", r);
+ unlink(buf);
+ return;
+ }
+ parse_display_pass(buf2, buf, 0, 1);
+ r = snprintf(buf2, sizeof buf2, "%s.1", buf);
+ if (r < 2 || r >= (int)sizeof buf2) {
+ ck_assert_msg(0, "snprintf() failed (return value %d)", r);
+ unlink(buf);
+ return;
+ }
+ parse_display_pass(buf2, buf, 0, 1);
+ unlink(buf);
+#endif
parse_display_pass(":0", "", 0, 0);
parse_display_pass(":1", "", 1, 0);
parse_display_pass(":0.1", "", 0, 1);
@@ -206,7 +245,7 @@ END_TEST
Suite *public_suite(void)
{
Suite *s = suite_create("Public API");
- putenv("DISPLAY=");
+ putenv(display_env);
suite_add_test(s, parse_display_unix, "xcb_parse_display unix");
suite_add_test(s, parse_display_ip, "xcb_parse_display ip");
suite_add_test(s, parse_display_ipv4, "xcb_parse_display ipv4");
diff --git a/dist/libxcb/xcb-dbe.pc.in b/dist/libxcb/xcb-dbe.pc.in
new file mode 100644
index 000000000..05df0d5dd
--- /dev/null
+++ b/dist/libxcb/xcb-dbe.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: XCB Dbe
+Description: XCB Double Buffer Extension
+Version: @PACKAGE_VERSION@
+Requires.private: xcb
+Libs: -L${libdir} -lxcb-dbe
+Cflags: -I${includedir}
diff --git a/dist/libxcb/xcb-present.pc.in b/dist/libxcb/xcb-present.pc.in
index 2e0cff8e7..2459d1d6d 100644
--- a/dist/libxcb/xcb-present.pc.in
+++ b/dist/libxcb/xcb-present.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Present
Description: XCB Present Extension
Version: @PACKAGE_VERSION@
-Requires.private: xcb xcb-randr xcb-xfixes xcb-sync
+Requires.private: xcb xcb-randr xcb-xfixes xcb-sync xcb-dri3
Libs: -L${libdir} -lxcb-present
Cflags: -I${includedir}
diff --git a/lib/libxcb/libxcb-dpms/shlib_version b/lib/libxcb/libxcb-dpms/shlib_version
index 1edea46de..893819d18 100644
--- a/lib/libxcb/libxcb-dpms/shlib_version
+++ b/lib/libxcb/libxcb-dpms/shlib_version
@@ -1,2 +1,2 @@
major=1
-minor=0
+minor=1
diff --git a/lib/libxcb/libxcb-dri3/shlib_version b/lib/libxcb/libxcb-dri3/shlib_version
index dea2b62ca..97247abae 100644
--- a/lib/libxcb/libxcb-dri3/shlib_version
+++ b/lib/libxcb/libxcb-dri3/shlib_version
@@ -1,2 +1,2 @@
major=0
-minor=2
+minor=3
diff --git a/lib/libxcb/libxcb-present/shlib_version b/lib/libxcb/libxcb-present/shlib_version
index 3d7c908e4..dea2b62ca 100644
--- a/lib/libxcb/libxcb-present/shlib_version
+++ b/lib/libxcb/libxcb-present/shlib_version
@@ -1,2 +1,2 @@
major=0
-minor=1
+minor=2
diff --git a/lib/libxcb/src/Makefile b/lib/libxcb/src/Makefile
index 99063e2f9..a1c4e33e9 100644
--- a/lib/libxcb/src/Makefile
+++ b/lib/libxcb/src/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.13 2022/07/17 08:31:10 matthieu Exp $
+# $OpenBSD: Makefile,v 1.14 2024/07/11 08:05:32 matthieu Exp $
# This Makefile is used to generate the sources files with xcbgen
# The x11/py-xcbgen package needs to be installed
@@ -6,7 +6,7 @@
DATADIR= ${X11BASE}/share
PYTHON= python${PYTHON_VERSION}
-MANOPTIONS= -c 'libxcb 1.15' -l 'X Version 11' -s 3
+MANOPTIONS= -c 'libxcb 1.17.0' -l 'X Version 11' -s 3
SRCS= \
bigreq.c \
diff --git a/lib/libxcb/src/bigreq.h b/lib/libxcb/src/bigreq.h
index bfb9527ba..becd16de8 100644
--- a/lib/libxcb/src/bigreq.h
+++ b/lib/libxcb/src/bigreq.h
@@ -54,22 +54,30 @@ typedef struct xcb_big_requests_enable_reply_t {
} xcb_big_requests_enable_reply_t;
/**
+ * @brief Enable the BIG-REQUESTS extension
*
* @param c The connection
* @return A cookie
*
- * Delivers a request to the X server.
+ * This enables the BIG-REQUESTS extension, which allows for requests larger than
+ * 262140 bytes in length. When enabled, if the 16-bit length field is zero, it
+ * is immediately followed by a 32-bit length field specifying the length of the
+ * request in 4-byte units.
*
*/
xcb_big_requests_enable_cookie_t
xcb_big_requests_enable (xcb_connection_t *c);
/**
+ * @brief Enable the BIG-REQUESTS extension
*
* @param c The connection
* @return A cookie
*
- * Delivers a request to the X server.
+ * This enables the BIG-REQUESTS extension, which allows for requests larger than
+ * 262140 bytes in length. When enabled, if the 16-bit length field is zero, it
+ * is immediately followed by a 32-bit length field specifying the length of the
+ * request in 4-byte units.
*
* This form can be used only if the request will cause
* a reply to be generated. Any returned error will be
diff --git a/lib/libxcb/src/composite.h b/lib/libxcb/src/composite.h
index 6daddeab8..d05d0729d 100644
--- a/lib/libxcb/src/composite.h
+++ b/lib/libxcb/src/composite.h
@@ -198,11 +198,15 @@ typedef struct xcb_composite_release_overlay_window_request_t {
} xcb_composite_release_overlay_window_request_t;
/**
+ * @brief Negotiate the version of Composite
*
* @param c The connection
+ * @param client_major_version The major version supported by the client.
+ * @param client_minor_version The minor version supported by the client.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This negotiates the version of the Composite extension. It must be precede all
+ * other requests using Composite. Failure to do so will cause a BadRequest error.
*
*/
xcb_composite_query_version_cookie_t
@@ -211,11 +215,15 @@ xcb_composite_query_version (xcb_connection_t *c,
uint32_t client_minor_version);
/**
+ * @brief Negotiate the version of Composite
*
* @param c The connection
+ * @param client_major_version The major version supported by the client.
+ * @param client_minor_version The minor version supported by the client.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This negotiates the version of the Composite extension. It must be precede all
+ * other requests using Composite. Failure to do so will cause a BadRequest error.
*
* This form can be used only if the request will cause
* a reply to be generated. Any returned error will be
@@ -246,11 +254,22 @@ xcb_composite_query_version_reply (xcb_connection_t *c,
xcb_generic_error_t **e);
/**
+ * @brief Redirect the hierarchy starting at "window" to off-screen storage.
*
* @param c The connection
+ * @param window The root of the hierarchy to redirect to off-screen storage.
+ * @param update A bitmask of #xcb_composite_redirect_t values.
+ * @param update Whether contents are automatically mirrored to the parent window. If one client
+ * already specifies an update type of Manual, any attempt by another to specify a
+ * mode of Manual so will result in an Access error.
* @return A cookie
*
- * Delivers a request to the X server.
+ * The hierarchy starting at 'window' is directed to off-screen
+ * storage. When all clients enabling redirection terminate,
+ * the redirection will automatically be disabled.
+ *
+ * The root window may not be redirected. Doing so results in a Match
+ * error.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -262,11 +281,22 @@ xcb_composite_redirect_window_checked (xcb_connection_t *c,
uint8_t update);
/**
+ * @brief Redirect the hierarchy starting at "window" to off-screen storage.
*
* @param c The connection
+ * @param window The root of the hierarchy to redirect to off-screen storage.
+ * @param update A bitmask of #xcb_composite_redirect_t values.
+ * @param update Whether contents are automatically mirrored to the parent window. If one client
+ * already specifies an update type of Manual, any attempt by another to specify a
+ * mode of Manual so will result in an Access error.
* @return A cookie
*
- * Delivers a request to the X server.
+ * The hierarchy starting at 'window' is directed to off-screen
+ * storage. When all clients enabling redirection terminate,
+ * the redirection will automatically be disabled.
+ *
+ * The root window may not be redirected. Doing so results in a Match
+ * error.
*
*/
xcb_void_cookie_t
@@ -275,11 +305,20 @@ xcb_composite_redirect_window (xcb_connection_t *c,
uint8_t update);
/**
+ * @brief Redirect all current and future children of ‘window’
*
* @param c The connection
+ * @param window The root of the hierarchy to redirect to off-screen storage.
+ * @param update A bitmask of #xcb_composite_redirect_t values.
+ * @param update Whether contents are automatically mirrored to the parent window. If one client
+ * already specifies an update type of Manual, any attempt by another to specify a
+ * mode of Manual so will result in an Access error.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Hierarchies starting at all current and future children of window
+ * will be redirected as in RedirectWindow. If update is Manual,
+ * then painting of the window background during window manipulation
+ * and ClearArea requests is inhibited.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -291,11 +330,20 @@ xcb_composite_redirect_subwindows_checked (xcb_connection_t *c,
uint8_t update);
/**
+ * @brief Redirect all current and future children of ‘window’
*
* @param c The connection
+ * @param window The root of the hierarchy to redirect to off-screen storage.
+ * @param update A bitmask of #xcb_composite_redirect_t values.
+ * @param update Whether contents are automatically mirrored to the parent window. If one client
+ * already specifies an update type of Manual, any attempt by another to specify a
+ * mode of Manual so will result in an Access error.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Hierarchies starting at all current and future children of window
+ * will be redirected as in RedirectWindow. If update is Manual,
+ * then painting of the window background during window manipulation
+ * and ClearArea requests is inhibited.
*
*/
xcb_void_cookie_t
@@ -304,11 +352,18 @@ xcb_composite_redirect_subwindows (xcb_connection_t *c,
uint8_t update);
/**
+ * @brief Terminate redirection of the specified window.
*
* @param c The connection
+ * @param window The window to terminate redirection of. Must be redirected by the
+ * current client, or a Value error results.
+ * @param update A bitmask of #xcb_composite_redirect_t values.
+ * @param update The update type passed to RedirectWindows. If this does not match the
+ * previously requested update type, a Value error results.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Redirection of the specified window will be terminated. This cannot be
+ * used if the window was redirected with RedirectSubwindows.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -320,11 +375,18 @@ xcb_composite_unredirect_window_checked (xcb_connection_t *c,
uint8_t update);
/**
+ * @brief Terminate redirection of the specified window.
*
* @param c The connection
+ * @param window The window to terminate redirection of. Must be redirected by the
+ * current client, or a Value error results.
+ * @param update A bitmask of #xcb_composite_redirect_t values.
+ * @param update The update type passed to RedirectWindows. If this does not match the
+ * previously requested update type, a Value error results.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Redirection of the specified window will be terminated. This cannot be
+ * used if the window was redirected with RedirectSubwindows.
*
*/
xcb_void_cookie_t
@@ -333,11 +395,18 @@ xcb_composite_unredirect_window (xcb_connection_t *c,
uint8_t update);
/**
+ * @brief Terminate redirection of the specified window’s children
*
* @param c The connection
+ * @param window The window to terminate redirection of. Must have previously been
+ * selected for sub-redirection by the current client, or a Value error
+ * results.
+ * @param update A bitmask of #xcb_composite_redirect_t values.
+ * @param update The update type passed to RedirectSubWindows. If this does not match
+ * the previously requested update type, a Value error results.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Redirection of all children of window will be terminated.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -349,11 +418,18 @@ xcb_composite_unredirect_subwindows_checked (xcb_connection_t *c,
uint8_t update);
/**
+ * @brief Terminate redirection of the specified window’s children
*
* @param c The connection
+ * @param window The window to terminate redirection of. Must have previously been
+ * selected for sub-redirection by the current client, or a Value error
+ * results.
+ * @param update A bitmask of #xcb_composite_redirect_t values.
+ * @param update The update type passed to RedirectSubWindows. If this does not match
+ * the previously requested update type, a Value error results.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Redirection of all children of window will be terminated.
*
*/
xcb_void_cookie_t
diff --git a/lib/libxcb/src/damage.h b/lib/libxcb/src/damage.h
index ff99ccbc3..0f432b9ad 100644
--- a/lib/libxcb/src/damage.h
+++ b/lib/libxcb/src/damage.h
@@ -191,11 +191,16 @@ xcb_generic_iterator_t
xcb_damage_damage_end (xcb_damage_damage_iterator_t i);
/**
+ * @brief Negotiate the version of the DAMAGE extension
*
* @param c The connection
+ * @param client_major_version The major version supported by the client.
+ * @param client_minor_version The minor version supported by the client.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This negotiates the version of the DAMAGE extension. It must precede any other
+ * request using the DAMAGE extension. Failure to do so will cause a BadRequest
+ * error for those requests.
*
*/
xcb_damage_query_version_cookie_t
@@ -204,11 +209,16 @@ xcb_damage_query_version (xcb_connection_t *c,
uint32_t client_minor_version);
/**
+ * @brief Negotiate the version of the DAMAGE extension
*
* @param c The connection
+ * @param client_major_version The major version supported by the client.
+ * @param client_minor_version The minor version supported by the client.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This negotiates the version of the DAMAGE extension. It must precede any other
+ * request using the DAMAGE extension. Failure to do so will cause a BadRequest
+ * error for those requests.
*
* This form can be used only if the request will cause
* a reply to be generated. Any returned error will be
@@ -239,11 +249,40 @@ xcb_damage_query_version_reply (xcb_connection_t *c,
xcb_generic_error_t **e);
/**
+ * @brief Creates a Damage object to monitor changes to a drawable.
*
* @param c The connection
+ * @param damage The ID with which you will refer to the new Damage object, created by
+ * `xcb_generate_id`.
+ * @param drawable The ID of the drawable to be monitored.
+ * @param level A bitmask of #xcb_damage_report_level_t values.
+ * @param level The level of detail to be provided in Damage events.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This creates a Damage object to monitor changes to a drawable, and specifies
+ * the level of detail to be reported for changes.
+ *
+ * We call changes made to pixel contents of windows and pixmaps 'damage'
+ * throughout this extension.
+ *
+ * Damage accumulates as drawing occurs in the drawable. Each drawing operation
+ * 'damages' one or more rectangular areas within the drawable. The rectangles
+ * are guaranteed to include the set of pixels modified by each operation, but
+ * may include significantly more than just those pixels. The desire is for
+ * the damage to strike a balance between the number of rectangles reported and
+ * the extraneous area included. A reasonable goal is for each primitive
+ * object drawn (line, string, rectangle) to be represented as a single
+ * rectangle and for the damage area of the operation to be the union of these
+ * rectangles.
+ *
+ * The DAMAGE extension allows applications to either receive the raw
+ * rectangles as a stream of events, or to have them partially processed within
+ * the X server to reduce the amount of data transmitted as well as reduce the
+ * processing latency once the repaint operation has started.
+ *
+ * The Damage object holds any accumulated damage region and reflects the
+ * relationship between the drawable selected for damage notification and the
+ * drawable for which damage is tracked.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -256,11 +295,40 @@ xcb_damage_create_checked (xcb_connection_t *c,
uint8_t level);
/**
+ * @brief Creates a Damage object to monitor changes to a drawable.
*
* @param c The connection
+ * @param damage The ID with which you will refer to the new Damage object, created by
+ * `xcb_generate_id`.
+ * @param drawable The ID of the drawable to be monitored.
+ * @param level A bitmask of #xcb_damage_report_level_t values.
+ * @param level The level of detail to be provided in Damage events.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This creates a Damage object to monitor changes to a drawable, and specifies
+ * the level of detail to be reported for changes.
+ *
+ * We call changes made to pixel contents of windows and pixmaps 'damage'
+ * throughout this extension.
+ *
+ * Damage accumulates as drawing occurs in the drawable. Each drawing operation
+ * 'damages' one or more rectangular areas within the drawable. The rectangles
+ * are guaranteed to include the set of pixels modified by each operation, but
+ * may include significantly more than just those pixels. The desire is for
+ * the damage to strike a balance between the number of rectangles reported and
+ * the extraneous area included. A reasonable goal is for each primitive
+ * object drawn (line, string, rectangle) to be represented as a single
+ * rectangle and for the damage area of the operation to be the union of these
+ * rectangles.
+ *
+ * The DAMAGE extension allows applications to either receive the raw
+ * rectangles as a stream of events, or to have them partially processed within
+ * the X server to reduce the amount of data transmitted as well as reduce the
+ * processing latency once the repaint operation has started.
+ *
+ * The Damage object holds any accumulated damage region and reflects the
+ * relationship between the drawable selected for damage notification and the
+ * drawable for which damage is tracked.
*
*/
xcb_void_cookie_t
@@ -270,11 +338,14 @@ xcb_damage_create (xcb_connection_t *c,
uint8_t level);
/**
+ * @brief Destroys a previously created Damage object.
*
* @param c The connection
+ * @param damage The ID you provided to `xcb_create_damage`.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This destroys a Damage object and requests the X server stop reporting
+ * the changes it was tracking.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -285,11 +356,14 @@ xcb_damage_destroy_checked (xcb_connection_t *c,
xcb_damage_damage_t damage);
/**
+ * @brief Destroys a previously created Damage object.
*
* @param c The connection
+ * @param damage The ID you provided to `xcb_create_damage`.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This destroys a Damage object and requests the X server stop reporting
+ * the changes it was tracking.
*
*/
xcb_void_cookie_t
@@ -297,11 +371,15 @@ xcb_damage_destroy (xcb_connection_t *c,
xcb_damage_damage_t damage);
/**
+ * @brief Remove regions from a previously created Damage object.
*
* @param c The connection
+ * @param damage The ID you provided to `xcb_create_damage`.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This updates the regions of damage recorded in a a Damage object.
+ * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
+ * for details.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -314,11 +392,15 @@ xcb_damage_subtract_checked (xcb_connection_t *c,
xcb_xfixes_region_t parts);
/**
+ * @brief Remove regions from a previously created Damage object.
*
* @param c The connection
+ * @param damage The ID you provided to `xcb_create_damage`.
* @return A cookie
*
- * Delivers a request to the X server.
+ * This updates the regions of damage recorded in a a Damage object.
+ * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
+ * for details.
*
*/
xcb_void_cookie_t
@@ -328,11 +410,14 @@ xcb_damage_subtract (xcb_connection_t *c,
xcb_xfixes_region_t parts);
/**
+ * @brief Add a region to a previously created Damage object.
*
* @param c The connection
* @return A cookie
*
- * Delivers a request to the X server.
+ * This updates the regions of damage recorded in a a Damage object.
+ * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
+ * for details.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -344,11 +429,14 @@ xcb_damage_add_checked (xcb_connection_t *c,
xcb_xfixes_region_t region);
/**
+ * @brief Add a region to a previously created Damage object.
*
* @param c The connection
* @return A cookie
*
- * Delivers a request to the X server.
+ * This updates the regions of damage recorded in a a Damage object.
+ * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
+ * for details.
*
*/
xcb_void_cookie_t
diff --git a/lib/libxcb/src/dpms.c b/lib/libxcb/src/dpms.c
index e1020d4df..7155a69a2 100644
--- a/lib/libxcb/src/dpms.c
+++ b/lib/libxcb/src/dpms.c
@@ -14,6 +14,7 @@
#include "dpms.h"
#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
+#include "xproto.h"
xcb_extension_t xcb_dpms_id = { "DPMS", 0 };
@@ -457,3 +458,55 @@ xcb_dpms_info_reply (xcb_connection_t *c,
return (xcb_dpms_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+xcb_void_cookie_t
+xcb_dpms_select_input_checked (xcb_connection_t *c,
+ uint32_t event_mask)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_dpms_id,
+ .opcode = XCB_DPMS_SELECT_INPUT,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_dpms_select_input_request_t xcb_out;
+
+ xcb_out.event_mask = event_mask;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_dpms_select_input (xcb_connection_t *c,
+ uint32_t event_mask)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_dpms_id,
+ .opcode = XCB_DPMS_SELECT_INPUT,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_dpms_select_input_request_t xcb_out;
+
+ xcb_out.event_mask = event_mask;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
diff --git a/lib/libxcb/src/dpms.h b/lib/libxcb/src/dpms.h
index 95aa91d78..42c56e985 100644
--- a/lib/libxcb/src/dpms.h
+++ b/lib/libxcb/src/dpms.h
@@ -13,13 +13,14 @@
#define __DPMS_H
#include "xcb.h"
+#include "xproto.h"
#ifdef __cplusplus
extern "C" {
#endif
-#define XCB_DPMS_MAJOR_VERSION 0
-#define XCB_DPMS_MINOR_VERSION 0
+#define XCB_DPMS_MAJOR_VERSION 1
+#define XCB_DPMS_MINOR_VERSION 2
extern xcb_extension_t xcb_dpms_id;
@@ -211,6 +212,42 @@ typedef struct xcb_dpms_info_reply_t {
uint8_t pad1[21];
} xcb_dpms_info_reply_t;
+typedef enum xcb_dpms_event_mask_t {
+ XCB_DPMS_EVENT_MASK_INFO_NOTIFY = 1
+} xcb_dpms_event_mask_t;
+
+/** Opcode for xcb_dpms_select_input. */
+#define XCB_DPMS_SELECT_INPUT 8
+
+/**
+ * @brief xcb_dpms_select_input_request_t
+ **/
+typedef struct xcb_dpms_select_input_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint32_t event_mask;
+} xcb_dpms_select_input_request_t;
+
+/** Opcode for xcb_dpms_info_notify. */
+#define XCB_DPMS_INFO_NOTIFY 0
+
+/**
+ * @brief xcb_dpms_info_notify_event_t
+ **/
+typedef struct xcb_dpms_info_notify_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ uint8_t pad0[2];
+ xcb_timestamp_t timestamp;
+ uint16_t power_level;
+ uint8_t state;
+ uint8_t pad1[21];
+} xcb_dpms_info_notify_event_t;
+
/**
*
* @param c The connection
@@ -499,6 +536,33 @@ xcb_dpms_info_reply (xcb_connection_t *c,
xcb_dpms_info_cookie_t cookie /**< */,
xcb_generic_error_t **e);
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+xcb_void_cookie_t
+xcb_dpms_select_input_checked (xcb_connection_t *c,
+ uint32_t event_mask);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_dpms_select_input (xcb_connection_t *c,
+ uint32_t event_mask);
+
#ifdef __cplusplus
}
diff --git a/lib/libxcb/src/dri3.c b/lib/libxcb/src/dri3.c
index d42393505..ad33aa60f 100644
--- a/lib/libxcb/src/dri3.c
+++ b/lib/libxcb/src/dri3.c
@@ -18,6 +18,24 @@
xcb_extension_t xcb_dri3_id = { "DRI3", 0 };
+void
+xcb_dri3_syncobj_next (xcb_dri3_syncobj_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_dri3_syncobj_t);
+}
+
+xcb_generic_iterator_t
+xcb_dri3_syncobj_end (xcb_dri3_syncobj_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
xcb_dri3_query_version_cookie_t
xcb_dri3_query_version (xcb_connection_t *c,
uint32_t major_version,
@@ -977,3 +995,119 @@ xcb_dri3_set_drm_device_in_use (xcb_connection_t *c,
return xcb_ret;
}
+xcb_void_cookie_t
+xcb_dri3_import_syncobj_checked (xcb_connection_t *c,
+ xcb_dri3_syncobj_t syncobj,
+ xcb_drawable_t drawable,
+ int32_t syncobj_fd)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_dri3_id,
+ .opcode = XCB_DRI3_IMPORT_SYNCOBJ,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_dri3_import_syncobj_request_t xcb_out;
+ int fds[1];
+ int fd_index = 0;
+
+ xcb_out.syncobj = syncobj;
+ xcb_out.drawable = drawable;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ fds[fd_index++] = syncobj_fd;
+ xcb_ret.sequence = xcb_send_request_with_fds(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req, 1, fds);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_dri3_import_syncobj (xcb_connection_t *c,
+ xcb_dri3_syncobj_t syncobj,
+ xcb_drawable_t drawable,
+ int32_t syncobj_fd)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_dri3_id,
+ .opcode = XCB_DRI3_IMPORT_SYNCOBJ,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_dri3_import_syncobj_request_t xcb_out;
+ int fds[1];
+ int fd_index = 0;
+
+ xcb_out.syncobj = syncobj;
+ xcb_out.drawable = drawable;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ fds[fd_index++] = syncobj_fd;
+ xcb_ret.sequence = xcb_send_request_with_fds(c, 0, xcb_parts + 2, &xcb_req, 1, fds);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_dri3_free_syncobj_checked (xcb_connection_t *c,
+ xcb_dri3_syncobj_t syncobj)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_dri3_id,
+ .opcode = XCB_DRI3_FREE_SYNCOBJ,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_dri3_free_syncobj_request_t xcb_out;
+
+ xcb_out.syncobj = syncobj;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_dri3_free_syncobj (xcb_connection_t *c,
+ xcb_dri3_syncobj_t syncobj)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_dri3_id,
+ .opcode = XCB_DRI3_FREE_SYNCOBJ,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_dri3_free_syncobj_request_t xcb_out;
+
+ xcb_out.syncobj = syncobj;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
diff --git a/lib/libxcb/src/dri3.h b/lib/libxcb/src/dri3.h
index a4038f6d6..0968a1e1a 100644
--- a/lib/libxcb/src/dri3.h
+++ b/lib/libxcb/src/dri3.h
@@ -20,10 +20,21 @@ extern "C" {
#endif
#define XCB_DRI3_MAJOR_VERSION 1
-#define XCB_DRI3_MINOR_VERSION 3
+#define XCB_DRI3_MINOR_VERSION 4
extern xcb_extension_t xcb_dri3_id;
+typedef uint32_t xcb_dri3_syncobj_t;
+
+/**
+ * @brief xcb_dri3_syncobj_iterator_t
+ **/
+typedef struct xcb_dri3_syncobj_iterator_t {
+ xcb_dri3_syncobj_t *data;
+ int rem;
+ int index;
+} xcb_dri3_syncobj_iterator_t;
+
/**
* @brief xcb_dri3_query_version_cookie_t
**/
@@ -312,6 +323,56 @@ typedef struct xcb_dri3_set_drm_device_in_use_request_t {
uint32_t drmMinor;
} xcb_dri3_set_drm_device_in_use_request_t;
+/** Opcode for xcb_dri3_import_syncobj. */
+#define XCB_DRI3_IMPORT_SYNCOBJ 10
+
+/**
+ * @brief xcb_dri3_import_syncobj_request_t
+ **/
+typedef struct xcb_dri3_import_syncobj_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_dri3_syncobj_t syncobj;
+ xcb_drawable_t drawable;
+} xcb_dri3_import_syncobj_request_t;
+
+/** Opcode for xcb_dri3_free_syncobj. */
+#define XCB_DRI3_FREE_SYNCOBJ 11
+
+/**
+ * @brief xcb_dri3_free_syncobj_request_t
+ **/
+typedef struct xcb_dri3_free_syncobj_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_dri3_syncobj_t syncobj;
+} xcb_dri3_free_syncobj_request_t;
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_dri3_syncobj_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_dri3_syncobj_t)
+ */
+void
+xcb_dri3_syncobj_next (xcb_dri3_syncobj_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_dri3_syncobj_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_dri3_syncobj_end (xcb_dri3_syncobj_iterator_t i);
+
/**
*
* @param c The connection
@@ -872,6 +933,64 @@ xcb_dri3_set_drm_device_in_use (xcb_connection_t *c,
uint32_t drmMajor,
uint32_t drmMinor);
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+xcb_void_cookie_t
+xcb_dri3_import_syncobj_checked (xcb_connection_t *c,
+ xcb_dri3_syncobj_t syncobj,
+ xcb_drawable_t drawable,
+ int32_t syncobj_fd);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_dri3_import_syncobj (xcb_connection_t *c,
+ xcb_dri3_syncobj_t syncobj,
+ xcb_drawable_t drawable,
+ int32_t syncobj_fd);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+xcb_void_cookie_t
+xcb_dri3_free_syncobj_checked (xcb_connection_t *c,
+ xcb_dri3_syncobj_t syncobj);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_dri3_free_syncobj (xcb_connection_t *c,
+ xcb_dri3_syncobj_t syncobj);
+
#ifdef __cplusplus
}
diff --git a/lib/libxcb/src/present.c b/lib/libxcb/src/present.c
index 27aeecc47..4228d7624 100644
--- a/lib/libxcb/src/present.c
+++ b/lib/libxcb/src/present.c
@@ -18,6 +18,7 @@
#include "randr.h"
#include "xfixes.h"
#include "sync.h"
+#include "dri3.h"
xcb_extension_t xcb_present_id = { "Present", 0 };
@@ -485,6 +486,187 @@ xcb_present_query_capabilities_reply (xcb_connection_t *
}
int
+xcb_present_pixmap_synced_sizeof (const void *_buffer,
+ uint32_t notifies_len)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_present_pixmap_synced_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* notifies */
+ xcb_block_len += notifies_len * sizeof(xcb_present_notify_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_present_notify_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_void_cookie_t
+xcb_present_pixmap_synced_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_pixmap_t pixmap,
+ uint32_t serial,
+ xcb_xfixes_region_t valid,
+ xcb_xfixes_region_t update,
+ int16_t x_off,
+ int16_t y_off,
+ xcb_randr_crtc_t target_crtc,
+ xcb_dri3_syncobj_t acquire_syncobj,
+ xcb_dri3_syncobj_t release_syncobj,
+ uint64_t acquire_point,
+ uint64_t release_point,
+ uint32_t options,
+ uint64_t target_msc,
+ uint64_t divisor,
+ uint64_t remainder,
+ uint32_t notifies_len,
+ const xcb_present_notify_t *notifies)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_present_id,
+ .opcode = XCB_PRESENT_PIXMAP_SYNCED,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_present_pixmap_synced_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.pixmap = pixmap;
+ xcb_out.serial = serial;
+ xcb_out.valid = valid;
+ xcb_out.update = update;
+ xcb_out.x_off = x_off;
+ xcb_out.y_off = y_off;
+ xcb_out.target_crtc = target_crtc;
+ xcb_out.acquire_syncobj = acquire_syncobj;
+ xcb_out.release_syncobj = release_syncobj;
+ xcb_out.acquire_point = acquire_point;
+ xcb_out.release_point = release_point;
+ xcb_out.options = options;
+ memset(xcb_out.pad0, 0, 4);
+ xcb_out.target_msc = target_msc;
+ xcb_out.divisor = divisor;
+ xcb_out.remainder = remainder;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_present_notify_t notifies */
+ xcb_parts[4].iov_base = (char *) notifies;
+ xcb_parts[4].iov_len = notifies_len * sizeof(xcb_present_notify_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_present_pixmap_synced (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_pixmap_t pixmap,
+ uint32_t serial,
+ xcb_xfixes_region_t valid,
+ xcb_xfixes_region_t update,
+ int16_t x_off,
+ int16_t y_off,
+ xcb_randr_crtc_t target_crtc,
+ xcb_dri3_syncobj_t acquire_syncobj,
+ xcb_dri3_syncobj_t release_syncobj,
+ uint64_t acquire_point,
+ uint64_t release_point,
+ uint32_t options,
+ uint64_t target_msc,
+ uint64_t divisor,
+ uint64_t remainder,
+ uint32_t notifies_len,
+ const xcb_present_notify_t *notifies)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_present_id,
+ .opcode = XCB_PRESENT_PIXMAP_SYNCED,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_present_pixmap_synced_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.pixmap = pixmap;
+ xcb_out.serial = serial;
+ xcb_out.valid = valid;
+ xcb_out.update = update;
+ xcb_out.x_off = x_off;
+ xcb_out.y_off = y_off;
+ xcb_out.target_crtc = target_crtc;
+ xcb_out.acquire_syncobj = acquire_syncobj;
+ xcb_out.release_syncobj = release_syncobj;
+ xcb_out.acquire_point = acquire_point;
+ xcb_out.release_point = release_point;
+ xcb_out.options = options;
+ memset(xcb_out.pad0, 0, 4);
+ xcb_out.target_msc = target_msc;
+ xcb_out.divisor = divisor;
+ xcb_out.remainder = remainder;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_present_notify_t notifies */
+ xcb_parts[4].iov_base = (char *) notifies;
+ xcb_parts[4].iov_len = notifies_len * sizeof(xcb_present_notify_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_present_notify_t *
+xcb_present_pixmap_synced_notifies (const xcb_present_pixmap_synced_request_t *R)
+{
+ return (xcb_present_notify_t *) (R + 1);
+}
+
+int
+xcb_present_pixmap_synced_notifies_length (const xcb_present_pixmap_synced_request_t *R)
+{
+ return (((R->length * 4) - sizeof(xcb_present_pixmap_synced_request_t))/sizeof(xcb_present_notify_t));
+}
+
+xcb_present_notify_iterator_t
+xcb_present_pixmap_synced_notifies_iterator (const xcb_present_pixmap_synced_request_t *R)
+{
+ xcb_present_notify_iterator_t i;
+ i.data = (xcb_present_notify_t *) (R + 1);
+ i.rem = (((R->length * 4) - sizeof(xcb_present_pixmap_synced_request_t))/sizeof(xcb_present_notify_t));
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
xcb_present_redirect_notify_sizeof (const void *_buffer,
uint32_t notifies_len)
{
diff --git a/lib/libxcb/src/present.h b/lib/libxcb/src/present.h
index e366330a0..963f03591 100644
--- a/lib/libxcb/src/present.h
+++ b/lib/libxcb/src/present.h
@@ -17,13 +17,14 @@
#include "randr.h"
#include "xfixes.h"
#include "sync.h"
+#include "dri3.h"
#ifdef __cplusplus
extern "C" {
#endif
#define XCB_PRESENT_MAJOR_VERSION 1
-#define XCB_PRESENT_MINOR_VERSION 2
+#define XCB_PRESENT_MINOR_VERSION 4
extern xcb_extension_t xcb_present_id;
@@ -47,14 +48,17 @@ typedef enum xcb_present_option_t {
XCB_PRESENT_OPTION_ASYNC = 1,
XCB_PRESENT_OPTION_COPY = 2,
XCB_PRESENT_OPTION_UST = 4,
- XCB_PRESENT_OPTION_SUBOPTIMAL = 8
+ XCB_PRESENT_OPTION_SUBOPTIMAL = 8,
+ XCB_PRESENT_OPTION_ASYNC_MAY_TEAR = 16
} xcb_present_option_t;
typedef enum xcb_present_capability_t {
XCB_PRESENT_CAPABILITY_NONE = 0,
XCB_PRESENT_CAPABILITY_ASYNC = 1,
XCB_PRESENT_CAPABILITY_FENCE = 2,
- XCB_PRESENT_CAPABILITY_UST = 4
+ XCB_PRESENT_CAPABILITY_UST = 4,
+ XCB_PRESENT_CAPABILITY_ASYNC_MAY_TEAR = 8,
+ XCB_PRESENT_CAPABILITY_SYNCOBJ = 16
} xcb_present_capability_t;
typedef enum xcb_present_complete_kind_t {
@@ -221,6 +225,35 @@ typedef struct xcb_present_query_capabilities_reply_t {
uint32_t capabilities;
} xcb_present_query_capabilities_reply_t;
+/** Opcode for xcb_present_pixmap_synced. */
+#define XCB_PRESENT_PIXMAP_SYNCED 5
+
+/**
+ * @brief xcb_present_pixmap_synced_request_t
+ **/
+typedef struct xcb_present_pixmap_synced_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ xcb_pixmap_t pixmap;
+ uint32_t serial;
+ xcb_xfixes_region_t valid;
+ xcb_xfixes_region_t update;
+ int16_t x_off;
+ int16_t y_off;
+ xcb_randr_crtc_t target_crtc;
+ xcb_dri3_syncobj_t acquire_syncobj;
+ xcb_dri3_syncobj_t release_syncobj;
+ uint64_t acquire_point;
+ uint64_t release_point;
+ uint32_t options;
+ uint8_t pad0[4];
+ uint64_t target_msc;
+ uint64_t divisor;
+ uint64_t remainder;
+} xcb_present_pixmap_synced_request_t;
+
/** Opcode for xcb_present_generic. */
#define XCB_PRESENT_GENERIC 0
@@ -620,6 +653,80 @@ xcb_present_query_capabilities_reply (xcb_connection_t *
xcb_generic_error_t **e);
int
+xcb_present_pixmap_synced_sizeof (const void *_buffer,
+ uint32_t notifies_len);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+xcb_void_cookie_t
+xcb_present_pixmap_synced_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_pixmap_t pixmap,
+ uint32_t serial,
+ xcb_xfixes_region_t valid,
+ xcb_xfixes_region_t update,
+ int16_t x_off,
+ int16_t y_off,
+ xcb_randr_crtc_t target_crtc,
+ xcb_dri3_syncobj_t acquire_syncobj,
+ xcb_dri3_syncobj_t release_syncobj,
+ uint64_t acquire_point,
+ uint64_t release_point,
+ uint32_t options,
+ uint64_t target_msc,
+ uint64_t divisor,
+ uint64_t remainder,
+ uint32_t notifies_len,
+ const xcb_present_notify_t *notifies);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_present_pixmap_synced (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_pixmap_t pixmap,
+ uint32_t serial,
+ xcb_xfixes_region_t valid,
+ xcb_xfixes_region_t update,
+ int16_t x_off,
+ int16_t y_off,
+ xcb_randr_crtc_t target_crtc,
+ xcb_dri3_syncobj_t acquire_syncobj,
+ xcb_dri3_syncobj_t release_syncobj,
+ uint64_t acquire_point,
+ uint64_t release_point,
+ uint32_t options,
+ uint64_t target_msc,
+ uint64_t divisor,
+ uint64_t remainder,
+ uint32_t notifies_len,
+ const xcb_present_notify_t *notifies);
+
+xcb_present_notify_t *
+xcb_present_pixmap_synced_notifies (const xcb_present_pixmap_synced_request_t *R);
+
+int
+xcb_present_pixmap_synced_notifies_length (const xcb_present_pixmap_synced_request_t *R);
+
+xcb_present_notify_iterator_t
+xcb_present_pixmap_synced_notifies_iterator (const xcb_present_pixmap_synced_request_t *R);
+
+int
xcb_present_redirect_notify_sizeof (const void *_buffer,
uint32_t notifies_len);
diff --git a/lib/libxcb/src/randr.c b/lib/libxcb/src/randr.c
index efff1aa6c..24679746f 100644
--- a/lib/libxcb/src/randr.c
+++ b/lib/libxcb/src/randr.c
@@ -5326,13 +5326,13 @@ xcb_randr_set_monitor_checked (xcb_connection_t *c,
xcb_randr_monitor_info_t *monitorinfo)
{
static const xcb_protocol_request_t xcb_req = {
- .count = 4,
+ .count = 3,
.ext = &xcb_randr_id,
.opcode = XCB_RANDR_SET_MONITOR,
.isvoid = 1
};
- struct iovec xcb_parts[6];
+ struct iovec xcb_parts[5];
xcb_void_cookie_t xcb_ret;
xcb_randr_set_monitor_request_t xcb_out;
@@ -5357,13 +5357,13 @@ xcb_randr_set_monitor (xcb_connection_t *c,
xcb_randr_monitor_info_t *monitorinfo)
{
static const xcb_protocol_request_t xcb_req = {
- .count = 4,
+ .count = 3,
.ext = &xcb_randr_id,
.opcode = XCB_RANDR_SET_MONITOR,
.isvoid = 1
};
- struct iovec xcb_parts[6];
+ struct iovec xcb_parts[5];
xcb_void_cookie_t xcb_ret;
xcb_randr_set_monitor_request_t xcb_out;
diff --git a/lib/libxcb/src/shm.h b/lib/libxcb/src/shm.h
index 248e0f447..1d22d3bdb 100644
--- a/lib/libxcb/src/shm.h
+++ b/lib/libxcb/src/shm.h
@@ -284,22 +284,28 @@ xcb_generic_iterator_t
xcb_shm_seg_end (xcb_shm_seg_iterator_t i);
/**
+ * @brief Query the version of the MIT-SHM extension.
*
* @param c The connection
* @return A cookie
*
- * Delivers a request to the X server.
+ * This is used to determine the version of the MIT-SHM extension supported by the
+ * X server. Clients MUST NOT make other requests in this extension until a reply
+ * to this requests indicates the X server supports them.
*
*/
xcb_shm_query_version_cookie_t
xcb_shm_query_version (xcb_connection_t *c);
/**
+ * @brief Query the version of the MIT-SHM extension.
*
* @param c The connection
* @return A cookie
*
- * Delivers a request to the X server.
+ * This is used to determine the version of the MIT-SHM extension supported by the
+ * X server. Clients MUST NOT make other requests in this extension until a reply
+ * to this requests indicates the X server supports them.
*
* This form can be used only if the request will cause
* a reply to be generated. Any returned error will be
@@ -328,11 +334,18 @@ xcb_shm_query_version_reply (xcb_connection_t *c,
xcb_generic_error_t **e);
/**
+ * @brief Attach a System V shared memory segment.
*
* @param c The connection
+ * @param shmseg A shared memory segment ID created with xcb_generate_id().
+ * @param shmid The System V shared memory segment the server should map.
+ * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Attach a System V shared memory segment to the server. This will fail unless
+ * the server has permission to map the segment. The client may destroy the segment
+ * as soon as it receives a XCB_SHM_COMPLETION event with the shmseg value in this
+ * request and with the appropriate serial number.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -345,11 +358,18 @@ xcb_shm_attach_checked (xcb_connection_t *c,
uint8_t read_only);
/**
+ * @brief Attach a System V shared memory segment.
*
* @param c The connection
+ * @param shmseg A shared memory segment ID created with xcb_generate_id().
+ * @param shmid The System V shared memory segment the server should map.
+ * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Attach a System V shared memory segment to the server. This will fail unless
+ * the server has permission to map the segment. The client may destroy the segment
+ * as soon as it receives a XCB_SHM_COMPLETION event with the shmseg value in this
+ * request and with the appropriate serial number.
*
*/
xcb_void_cookie_t
@@ -359,11 +379,14 @@ xcb_shm_attach (xcb_connection_t *c,
uint8_t read_only);
/**
+ * @brief Destroys the specified shared memory segment.
*
* @param c The connection
+ * @param shmseg The segment to be destroyed.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Destroys the specified shared memory segment. This will never fail unless the
+ * segment number is incorrect.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -374,11 +397,14 @@ xcb_shm_detach_checked (xcb_connection_t *c,
xcb_shm_seg_t shmseg);
/**
+ * @brief Destroys the specified shared memory segment.
*
* @param c The connection
+ * @param shmseg The segment to be destroyed.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Destroys the specified shared memory segment. This will never fail unless the
+ * segment number is incorrect.
*
*/
xcb_void_cookie_t
@@ -386,11 +412,37 @@ xcb_shm_detach (xcb_connection_t *c,
xcb_shm_seg_t shmseg);
/**
+ * @brief Copy data from the shared memory to the specified drawable.
*
* @param c The connection
+ * @param drawable The drawable to draw to.
+ * @param gc The graphics context to use.
+ * @param total_width The total width of the source image.
+ * @param total_height The total height of the source image.
+ * @param src_x The source X coordinate of the sub-image to copy.
+ * @param src_y The source Y coordinate of the sub-image to copy.
+ * @param src_width The width, in source image coordinates, of the data to copy from the source.
+ * The X server will use this to determine the amount of data to copy. The amount
+ * of the destination image that is overwritten is determined automatically.
+ * @param src_height The height, in source image coordinates, of the data to copy from the source.
+ * The X server will use this to determine the amount of data to copy. The amount
+ * of the destination image that is overwritten is determined automatically.
+ * @param dst_x The X coordinate on the destination drawable to copy to.
+ * @param dst_y The Y coordinate on the destination drawable to copy to.
+ * @param depth The depth to use.
+ * @param format The format of the image being drawn. If it is XYBitmap, depth must be 1, or a
+ * "BadMatch" error results. The foreground pixel in the GC determines the source
+ * for the one bits in the image, and the background pixel determines the source
+ * for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of
+ * the drawable, or a "BadMatch" error results.
+ * @param send_event True if the server should send an XCB_SHM_COMPLETION event when the blit
+ * completes.
+ * @param offset The offset that the source image starts at.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Copy data from the shared memory to the specified drawable. The amount of bytes
+ * written to the destination image is always equal to the number of bytes read
+ * from the shared memory segment.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -415,11 +467,37 @@ xcb_shm_put_image_checked (xcb_connection_t *c,
uint32_t offset);
/**
+ * @brief Copy data from the shared memory to the specified drawable.
*
* @param c The connection
+ * @param drawable The drawable to draw to.
+ * @param gc The graphics context to use.
+ * @param total_width The total width of the source image.
+ * @param total_height The total height of the source image.
+ * @param src_x The source X coordinate of the sub-image to copy.
+ * @param src_y The source Y coordinate of the sub-image to copy.
+ * @param src_width The width, in source image coordinates, of the data to copy from the source.
+ * The X server will use this to determine the amount of data to copy. The amount
+ * of the destination image that is overwritten is determined automatically.
+ * @param src_height The height, in source image coordinates, of the data to copy from the source.
+ * The X server will use this to determine the amount of data to copy. The amount
+ * of the destination image that is overwritten is determined automatically.
+ * @param dst_x The X coordinate on the destination drawable to copy to.
+ * @param dst_y The Y coordinate on the destination drawable to copy to.
+ * @param depth The depth to use.
+ * @param format The format of the image being drawn. If it is XYBitmap, depth must be 1, or a
+ * "BadMatch" error results. The foreground pixel in the GC determines the source
+ * for the one bits in the image, and the background pixel determines the source
+ * for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of
+ * the drawable, or a "BadMatch" error results.
+ * @param send_event True if the server should send an XCB_SHM_COMPLETION event when the blit
+ * completes.
+ * @param offset The offset that the source image starts at.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Copy data from the shared memory to the specified drawable. The amount of bytes
+ * written to the destination image is always equal to the number of bytes read
+ * from the shared memory segment.
*
*/
xcb_void_cookie_t
@@ -441,11 +519,23 @@ xcb_shm_put_image (xcb_connection_t *c,
uint32_t offset);
/**
+ * @brief Copies data from the specified drawable to the shared memory segment.
*
* @param c The connection
+ * @param drawable The drawable to copy the image out of.
+ * @param x The X coordinate in the drawable to begin copying at.
+ * @param y The Y coordinate in the drawable to begin copying at.
+ * @param width The width of the image to copy.
+ * @param height The height of the image to copy.
+ * @param plane_mask A mask that determines which planes are used.
+ * @param format The format to use for the copy (???).
+ * @param shmseg The destination shared memory segment.
+ * @param offset The offset in the shared memory segment to copy data to.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Copy data from the specified drawable to the shared memory segment. The amount
+ * of bytes written to the destination image is always equal to the number of bytes
+ * read from the shared memory segment.
*
*/
xcb_shm_get_image_cookie_t
@@ -461,11 +551,23 @@ xcb_shm_get_image (xcb_connection_t *c,
uint32_t offset);
/**
+ * @brief Copies data from the specified drawable to the shared memory segment.
*
* @param c The connection
+ * @param drawable The drawable to copy the image out of.
+ * @param x The X coordinate in the drawable to begin copying at.
+ * @param y The Y coordinate in the drawable to begin copying at.
+ * @param width The width of the image to copy.
+ * @param height The height of the image to copy.
+ * @param plane_mask A mask that determines which planes are used.
+ * @param format The format to use for the copy (???).
+ * @param shmseg The destination shared memory segment.
+ * @param offset The offset in the shared memory segment to copy data to.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Copy data from the specified drawable to the shared memory segment. The amount
+ * of bytes written to the destination image is always equal to the number of bytes
+ * read from the shared memory segment.
*
* This form can be used only if the request will cause
* a reply to be generated. Any returned error will be
@@ -503,11 +605,21 @@ xcb_shm_get_image_reply (xcb_connection_t *c,
xcb_generic_error_t **e);
/**
+ * @brief Create a pixmap backed by shared memory.
*
* @param c The connection
+ * @param pid A pixmap ID created with xcb_generate_id().
+ * @param drawable The drawable to create the pixmap in.
+ * @param width The width of the pixmap to create. Must be nonzero, or a Value error results.
+ * @param height The height of the pixmap to create. Must be nonzero, or a Value error results.
+ * @param depth The depth of the pixmap to create. Must be nonzero, or a Value error results.
+ * @param shmseg The shared memory segment to use to create the pixmap.
+ * @param offset The offset in the segment to create the pixmap at.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Create a pixmap backed by shared memory. Writes to the shared memory will be
+ * reflected in the contents of the pixmap, and writes to the pixmap will be
+ * reflected in the contents of the shared memory.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -524,11 +636,21 @@ xcb_shm_create_pixmap_checked (xcb_connection_t *c,
uint32_t offset);
/**
+ * @brief Create a pixmap backed by shared memory.
*
* @param c The connection
+ * @param pid A pixmap ID created with xcb_generate_id().
+ * @param drawable The drawable to create the pixmap in.
+ * @param width The width of the pixmap to create. Must be nonzero, or a Value error results.
+ * @param height The height of the pixmap to create. Must be nonzero, or a Value error results.
+ * @param depth The depth of the pixmap to create. Must be nonzero, or a Value error results.
+ * @param shmseg The shared memory segment to use to create the pixmap.
+ * @param offset The offset in the segment to create the pixmap at.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Create a pixmap backed by shared memory. Writes to the shared memory will be
+ * reflected in the contents of the pixmap, and writes to the pixmap will be
+ * reflected in the contents of the shared memory.
*
*/
xcb_void_cookie_t
@@ -542,11 +664,17 @@ xcb_shm_create_pixmap (xcb_connection_t *c,
uint32_t offset);
/**
+ * @brief Create a shared memory segment
*
* @param c The connection
+ * @param shmseg A shared memory segment ID created with xcb_generate_id().
+ * @param shm_fd The file descriptor the server should mmap().
+ * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Create a shared memory segment. The file descriptor will be mapped at offset
+ * zero, and the size will be obtained using fstat(). A zero size will result in a
+ * Value error.
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -559,11 +687,17 @@ xcb_shm_attach_fd_checked (xcb_connection_t *c,
uint8_t read_only);
/**
+ * @brief Create a shared memory segment
*
* @param c The connection
+ * @param shmseg A shared memory segment ID created with xcb_generate_id().
+ * @param shm_fd The file descriptor the server should mmap().
+ * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Create a shared memory segment. The file descriptor will be mapped at offset
+ * zero, and the size will be obtained using fstat(). A zero size will result in a
+ * Value error.
*
*/
xcb_void_cookie_t
@@ -573,11 +707,16 @@ xcb_shm_attach_fd (xcb_connection_t *c,
uint8_t read_only);
/**
+ * @brief Asks the server to allocate a shared memory segment.
*
* @param c The connection
+ * @param shmseg A shared memory segment ID created with xcb_generate_id().
+ * @param size The size of the segment to create.
+ * @param read_only True if the server should map the segment read-only; otherwise false.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Asks the server to allocate a shared memory segment. The server’s reply will
+ * include a file descriptor for the client to pass to mmap().
*
*/
xcb_shm_create_segment_cookie_t
@@ -587,11 +726,16 @@ xcb_shm_create_segment (xcb_connection_t *c,
uint8_t read_only);
/**
+ * @brief Asks the server to allocate a shared memory segment.
*
* @param c The connection
+ * @param shmseg A shared memory segment ID created with xcb_generate_id().
+ * @param size The size of the segment to create.
+ * @param read_only True if the server should map the segment read-only; otherwise false.
* @return A cookie
*
- * Delivers a request to the X server.
+ * Asks the server to allocate a shared memory segment. The server’s reply will
+ * include a file descriptor for the client to pass to mmap().
*
* This form can be used only if the request will cause
* a reply to be generated. Any returned error will be
diff --git a/lib/libxcb/src/xfixes.h b/lib/libxcb/src/xfixes.h
index cf95f63c7..574b15def 100644
--- a/lib/libxcb/src/xfixes.h
+++ b/lib/libxcb/src/xfixes.h
@@ -739,7 +739,15 @@ typedef struct xcb_xfixes_delete_pointer_barrier_request_t {
typedef enum xcb_xfixes_client_disconnect_flags_t {
XCB_XFIXES_CLIENT_DISCONNECT_FLAGS_DEFAULT = 0,
+/**< The default behavior for regular clients: the X11 server won't terminate as long
+as such clients are still connected, and should this client disconnect, the
+server will continue running so long as other clients (that have not set
+XFixesClientDisconnectFlagTerminate) are connected. */
+
XCB_XFIXES_CLIENT_DISCONNECT_FLAGS_TERMINATE = 1
+/**< Indicates to the X11 server that it can ignore the client and terminate itself
+even though the client is still connected to the X11 server. */
+
} xcb_xfixes_client_disconnect_flags_t;
/** Opcode for xcb_xfixes_set_client_disconnect_mode. */
@@ -2046,11 +2054,13 @@ xcb_xfixes_delete_pointer_barrier (xcb_connection_t *c,
xcb_xfixes_barrier_t barrier);
/**
+ * @brief Sets the disconnect mode for the client.
*
* @param c The connection
+ * @param disconnect_mode The new disconnect mode.
* @return A cookie
*
- * Delivers a request to the X server.
+ * No description yet
*
* This form can be used only if the request will not cause
* a reply to be generated. Any returned error will be
@@ -2061,11 +2071,13 @@ xcb_xfixes_set_client_disconnect_mode_checked (xcb_connection_t *c,
uint32_t disconnect_mode);
/**
+ * @brief Sets the disconnect mode for the client.
*
* @param c The connection
+ * @param disconnect_mode The new disconnect mode.
* @return A cookie
*
- * Delivers a request to the X server.
+ * No description yet
*
*/
xcb_void_cookie_t
diff --git a/lib/libxcb/src/xinput.c b/lib/libxcb/src/xinput.c
index 38fc6c486..159521a77 100644
--- a/lib/libxcb/src/xinput.c
+++ b/lib/libxcb/src/xinput.c
@@ -4325,13 +4325,13 @@ xcb_input_change_feedback_control_checked (xcb_connection_t *c,
xcb_input_feedback_ctl_t *feedback)
{
static const xcb_protocol_request_t xcb_req = {
- .count = 4,
+ .count = 3,
.ext = &xcb_input_id,
.opcode = XCB_INPUT_CHANGE_FEEDBACK_CONTROL,
.isvoid = 1
};
- struct iovec xcb_parts[6];
+ struct iovec xcb_parts[5];
xcb_void_cookie_t xcb_ret;
xcb_input_change_feedback_control_request_t xcb_out;
@@ -4361,13 +4361,13 @@ xcb_input_change_feedback_control (xcb_connection_t *c,
xcb_input_feedback_ctl_t *feedback)
{
static const xcb_protocol_request_t xcb_req = {
- .count = 4,
+ .count = 3,
.ext = &xcb_input_id,
.opcode = XCB_INPUT_CHANGE_FEEDBACK_CONTROL,
.isvoid = 1
};
- struct iovec xcb_parts[6];
+ struct iovec xcb_parts[5];
xcb_void_cookie_t xcb_ret;
xcb_input_change_feedback_control_request_t xcb_out;
@@ -7311,13 +7311,13 @@ xcb_input_change_device_control (xcb_connection_t *c,
xcb_input_device_ctl_t *control)
{
static const xcb_protocol_request_t xcb_req = {
- .count = 4,
+ .count = 3,
.ext = &xcb_input_id,
.opcode = XCB_INPUT_CHANGE_DEVICE_CONTROL,
.isvoid = 0
};
- struct iovec xcb_parts[6];
+ struct iovec xcb_parts[5];
xcb_input_change_device_control_cookie_t xcb_ret;
xcb_input_change_device_control_request_t xcb_out;
@@ -7345,13 +7345,13 @@ xcb_input_change_device_control_unchecked (xcb_connection_t *c,
xcb_input_device_ctl_t *control)
{
static const xcb_protocol_request_t xcb_req = {
- .count = 4,
+ .count = 3,
.ext = &xcb_input_id,
.opcode = XCB_INPUT_CHANGE_DEVICE_CONTROL,
.isvoid = 0
};
- struct iovec xcb_parts[6];
+ struct iovec xcb_parts[5];
xcb_input_change_device_control_cookie_t xcb_ret;
xcb_input_change_device_control_request_t xcb_out;