diff -Nru wayland-1.14.0/aclocal.m4 wayland-1.15.0/aclocal.m4 --- wayland-1.14.0/aclocal.m4 2017-08-08 18:20:59.000000000 +0000 +++ wayland-1.15.0/aclocal.m4 2018-04-09 17:19:30.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,9 +20,9 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 11 (pkg-config-0.29.1) + dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl @@ -296,7 +296,75 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------ +dnl +dnl Prepare a "--with-" configure option using the lowercase +dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and +dnl PKG_CHECK_MODULES in a single macro. +AC_DEFUN([PKG_WITH_MODULES], +[ +m4_pushdef([with_arg], m4_tolower([$1])) + +m4_pushdef([description], + [m4_default([$5], [build with ]with_arg[ support])]) + +m4_pushdef([def_arg], [m4_default([$6], [auto])]) +m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) +m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) + +m4_case(def_arg, + [yes],[m4_pushdef([with_without], [--without-]with_arg)], + [m4_pushdef([with_without],[--with-]with_arg)]) + +AC_ARG_WITH(with_arg, + AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, + [AS_TR_SH([with_]with_arg)=def_arg]) + +AS_CASE([$AS_TR_SH([with_]with_arg)], + [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [auto],[PKG_CHECK_MODULES([$1],[$2], + [m4_n([def_action_if_found]) $3], + [m4_n([def_action_if_not_found]) $4])]) + +m4_popdef([with_arg]) +m4_popdef([description]) +m4_popdef([def_arg]) + +])dnl PKG_WITH_MODULES + +dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ----------------------------------------------- +dnl +dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES +dnl check._[VARIABLE-PREFIX] is exported as make variable. +AC_DEFUN([PKG_HAVE_WITH_MODULES], +[ +PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) + +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +])dnl PKG_HAVE_WITH_MODULES + +dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------------------ +dnl +dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after +dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make +dnl and preprocessor variable. +AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], +[ +PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) + +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +])dnl PKG_HAVE_DEFINE_WITH_MODULES + +# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -311,7 +379,7 @@ [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -327,14 +395,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -354,7 +422,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -406,7 +474,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -437,7 +505,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -628,7 +696,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -704,7 +772,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -901,7 +969,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -922,7 +990,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -943,7 +1011,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -993,7 +1061,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1032,7 +1100,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1061,7 +1129,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1108,7 +1176,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1127,7 +1195,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1208,7 +1276,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1268,7 +1336,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1296,7 +1364,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1315,7 +1383,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru wayland-1.14.0/compile wayland-1.15.0/compile --- wayland-1.14.0/compile 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/compile 2018-04-09 17:19:31.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -342,6 +343,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru wayland-1.14.0/config.guess wayland-1.15.0/config.guess --- wayland-1.14.0/config.guess 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/config.guess 2018-04-09 17:19:31.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2015-08-20' +timestamp='2017-08-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -186,9 +186,12 @@ *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in - arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -237,6 +240,10 @@ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -252,6 +259,9 @@ *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; + *:Redox:*:*) + echo ${UNAME_MACHINE}-unknown-redox + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -268,42 +278,42 @@ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -376,16 +386,16 @@ exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -410,7 +420,7 @@ exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -635,13 +645,13 @@ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -680,11 +690,11 @@ exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -697,12 +707,12 @@ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -807,14 +817,14 @@ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -830,10 +840,11 @@ UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -896,7 +907,7 @@ exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix @@ -919,7 +930,7 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) @@ -965,6 +976,9 @@ ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -990,6 +1004,9 @@ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; @@ -1022,6 +1039,9 @@ ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; @@ -1120,7 +1140,7 @@ # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1269,6 +1289,9 @@ SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1282,16 +1305,23 @@ UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1306,7 +1336,7 @@ exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1315,15 +1345,18 @@ *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) + NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; @@ -1337,7 +1370,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1379,7 +1412,7 @@ echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1390,23 +1423,25 @@ x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp diff -Nru wayland-1.14.0/config.h.in wayland-1.15.0/config.h.in --- wayland-1.14.0/config.h.in 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/config.h.in 2018-04-09 17:19:35.000000000 +0000 @@ -27,6 +27,9 @@ /* Define to 1 if you have the `posix_fallocate' function. */ #undef HAVE_POSIX_FALLOCATE +/* Define to 1 if you have the `prctl' function. */ +#undef HAVE_PRCTL + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -39,6 +42,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PRCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H diff -Nru wayland-1.14.0/config.sub wayland-1.15.0/config.sub --- wayland-1.14.0/config.sub 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/config.sub 2018-04-09 17:19:31.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2015-08-20' +timestamp='2017-04-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,8 +53,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -68,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -118,7 +117,7 @@ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -264,7 +263,7 @@ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -302,6 +301,7 @@ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ @@ -315,6 +315,7 @@ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ + | wasm32 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -388,7 +389,7 @@ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -429,6 +430,7 @@ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ @@ -445,6 +447,7 @@ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -521,7 +524,7 @@ basic_machine=i386-pc os=-aros ;; - asmjs) + asmjs) basic_machine=asmjs-unknown ;; aux) @@ -644,6 +647,14 @@ basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -939,6 +950,9 @@ nsr-tandem) basic_machine=nsr-tandem ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -1023,7 +1037,7 @@ ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -1031,9 +1045,9 @@ ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -1234,6 +1248,9 @@ basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none @@ -1383,14 +1400,14 @@ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ @@ -1399,7 +1416,8 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1531,6 +1549,8 @@ ;; -nacl*) ;; + -ios) + ;; -none) ;; *) @@ -1626,6 +1646,9 @@ sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; diff -Nru wayland-1.14.0/configure wayland-1.15.0/configure --- wayland-1.14.0/configure 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/configure 2018-04-09 17:19:30.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for wayland 1.14.0. +# Generated by GNU Autoconf 2.69 for wayland 1.15.0. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -275,7 +275,7 @@ $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.14.0 +$0: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0 $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -651,9 +651,9 @@ # Identity of this package. PACKAGE_NAME='wayland' PACKAGE_TARNAME='wayland' -PACKAGE_VERSION='1.14.0' -PACKAGE_STRING='wayland 1.14.0' -PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.14.0' +PACKAGE_VERSION='1.15.0' +PACKAGE_STRING='wayland 1.15.0' +PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0' PACKAGE_URL='http://wayland.freedesktop.org/' # Factoring default headers for most tests. @@ -741,9 +741,6 @@ DLLTOOL OBJDUMP LN_S -NM -ac_ct_DUMPBIN -DUMPBIN LD FGREP EGREP @@ -759,6 +756,9 @@ LIBTOOL ENABLE_CPP_TEST_FALSE ENABLE_CPP_TEST_TRUE +NM +ac_ct_DUMPBIN +DUMPBIN am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE @@ -838,7 +838,6 @@ docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -863,8 +862,8 @@ enable_option_checking enable_silent_rules enable_dependency_tracking -enable_shared enable_static +enable_shared with_pic enable_fast_install with_aix_soname @@ -941,7 +940,6 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1194,15 +1192,6 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1340,7 +1329,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1453,7 +1442,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures wayland 1.14.0 to adapt to many kinds of systems. +\`configure' configures wayland 1.15.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1493,7 +1482,6 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1524,7 +1512,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of wayland 1.14.0:";; + short | recursive ) echo "Configuration of wayland 1.15.0:";; esac cat <<\_ACEOF @@ -1538,8 +1526,8 @@ do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) @@ -1597,7 +1585,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . wayland home page: . _ACEOF ac_status=$? @@ -1661,7 +1649,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -wayland configure 1.14.0 +wayland configure 1.15.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2057,52 +2045,6 @@ } # ac_fn_cxx_try_link -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl - # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using @@ -2174,7 +2116,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------------------------------------------------------------------------------- ## -## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.14.0 ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0 ## ## ---------------------------------------------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; @@ -2193,11 +2135,57 @@ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by wayland $as_me 1.14.0, which was +It was created by wayland $as_me 1.15.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2548,11 +2536,11 @@ WAYLAND_VERSION_MAJOR=1 -WAYLAND_VERSION_MINOR=14 +WAYLAND_VERSION_MINOR=15 WAYLAND_VERSION_MICRO=0 -WAYLAND_VERSION=1.14.0 +WAYLAND_VERSION=1.15.0 ac_config_headers="$ac_config_headers config.h" @@ -3074,7 +3062,7 @@ # Define the identity of the package. PACKAGE='wayland' - VERSION='1.14.0' + VERSION='1.15.0' cat >>confdefs.h <<_ACEOF @@ -4829,29 +4817,236 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + 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 + *$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 + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# check if we have C++ compiler. This is hacky workaround, -# for a reason why it is this way see -# http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html -have_cpp_compiler=yes -if ! which "$CXX" &>/dev/null; then - have_cpp_compiler=no + test -n "$DUMPBIN" && break + done fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - if test "x$have_cpp_compiler" = "xyes"; then - ENABLE_CPP_TEST_TRUE= - ENABLE_CPP_TEST_FALSE='#' +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else - ENABLE_CPP_TEST_TRUE='#' - ENABLE_CPP_TEST_FALSE= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -# Initialize libtool + test -n "$ac_ct_DUMPBIN" && break +done -case `pwd` in - *\ * | *\ *) + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + + +# check if we have C++ compiler. This is hacky workaround, +# for a reason why it is this way see +# http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html +have_cpp_compiler=yes + +if ! which "$CXX" &>/dev/null; then + have_cpp_compiler=no +fi + + if test "x$have_cpp_compiler" = "xyes"; then + ENABLE_CPP_TEST_TRUE= + ENABLE_CPP_TEST_FALSE='#' +else + ENABLE_CPP_TEST_TRUE='#' + ENABLE_CPP_TEST_FALSE= +fi + + +# Initialize libtool + +case `pwd` in + *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -5258,316 +5453,109 @@ with_gnu_ld=no fi -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - 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 - *$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 - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$ac_ct_DUMPBIN" >&6; } + +LD=$lt_cv_path_LD +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } @@ -6096,7 +6084,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -8572,36 +8560,27 @@ # Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; + yes) enable_static=yes ;; + no) enable_static=no ;; *) - enable_shared=no + enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then - enable_shared=yes + enable_static=yes fi done IFS=$lt_save_ifs ;; esac else - enable_shared=yes + enable_static=no fi @@ -8612,27 +8591,34 @@ - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; + yes) enable_shared=yes ;; + no) enable_shared=no ;; *) - enable_static=no + enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then - enable_static=yes + enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else - enable_static=yes + enable_shared=yes fi @@ -8644,6 +8630,7 @@ + # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} @@ -9800,9 +9787,6 @@ openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; esac ld_shlibs=yes @@ -10057,7 +10041,7 @@ fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -10727,7 +10711,6 @@ if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -10749,7 +10732,7 @@ esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -11844,6 +11827,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -11852,7 +11838,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -11864,18 +11850,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -14770,7 +14744,7 @@ ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -15145,9 +15119,6 @@ ;; esac ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs_CXX=no - ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -15821,6 +15792,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -15829,7 +15803,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15841,18 +15815,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -16342,7 +16304,19 @@ fi -for ac_func in accept4 mkostemp posix_fallocate +for ac_header in sys/prctl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_prctl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_PRCTL_H 1 +_ACEOF + +fi + +done + +for ac_func in accept4 mkostemp posix_fallocate prctl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -17178,7 +17152,7 @@ fi -ac_config_files="$ac_config_files Makefile cursor/wayland-cursor.pc cursor/wayland-cursor-uninstalled.pc doc/Makefile doc/publican/Makefile doc/doxygen/Makefile doc/man/Makefile src/wayland-server-uninstalled.pc src/wayland-client-uninstalled.pc src/wayland-scanner-uninstalled.pc src/wayland-server.pc src/wayland-client.pc src/wayland-scanner.pc src/wayland-version.h" +ac_config_files="$ac_config_files Makefile cursor/wayland-cursor.pc cursor/wayland-cursor-uninstalled.pc doc/Makefile doc/publican/Makefile doc/doxygen/Makefile doc/man/Makefile egl/wayland-egl.pc egl/wayland-egl-backend.pc src/wayland-server-uninstalled.pc src/wayland-client-uninstalled.pc src/wayland-scanner-uninstalled.pc src/wayland-server.pc src/wayland-client.pc src/wayland-scanner.pc src/wayland-version.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -17754,7 +17728,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by wayland $as_me 1.14.0, which was +This file was extended by wayland $as_me 1.15.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17818,14 +17792,14 @@ Configuration commands: $config_commands -Report bugs to . +Report bugs to . wayland home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -wayland config.status 1.14.0 +wayland config.status 1.15.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -17954,10 +17928,11 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' @@ -17976,7 +17951,6 @@ EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' @@ -18157,7 +18131,8 @@ } # Quote evaled strings. -for var in SHELL \ +for var in NM \ +SHELL \ ECHO \ PATH_SEPARATOR \ SED \ @@ -18165,7 +18140,6 @@ EGREP \ FGREP \ LD \ -NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ @@ -18347,6 +18321,8 @@ "doc/publican/Makefile") CONFIG_FILES="$CONFIG_FILES doc/publican/Makefile" ;; "doc/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES doc/doxygen/Makefile" ;; "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile" ;; + "egl/wayland-egl.pc") CONFIG_FILES="$CONFIG_FILES egl/wayland-egl.pc" ;; + "egl/wayland-egl-backend.pc") CONFIG_FILES="$CONFIG_FILES egl/wayland-egl-backend.pc" ;; "src/wayland-server-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES src/wayland-server-uninstalled.pc" ;; "src/wayland-client-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES src/wayland-client-uninstalled.pc" ;; "src/wayland-scanner-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES src/wayland-scanner-uninstalled.pc" ;; @@ -19126,16 +19102,19 @@ # ### BEGIN LIBTOOL CONFIG +# A BSD- or MS-compatible name lister. +NM=$lt_NM + # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - # Whether or not to build static libraries. build_old_libs=$enable_static +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + # What type of objects to build. pic_mode=$pic_mode @@ -19179,9 +19158,6 @@ # A literal string matcher. FGREP=$lt_FGREP -# A BSD- or MS-compatible name lister. -NM=$lt_NM - # Whether we need soft or hard links. LN_S=$lt_LN_S diff -Nru wayland-1.14.0/configure.ac wayland-1.15.0/configure.ac --- wayland-1.14.0/configure.ac 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/configure.ac 2018-04-09 17:19:26.000000000 +0000 @@ -1,7 +1,7 @@ AC_PREREQ([2.64]) m4_define([wayland_major_version], [1]) -m4_define([wayland_minor_version], [14]) +m4_define([wayland_minor_version], [15]) m4_define([wayland_micro_version], [0]) m4_define([wayland_version], [wayland_major_version.wayland_minor_version.wayland_micro_version]) @@ -29,6 +29,7 @@ AC_PROG_CXX AC_PROG_GREP AM_PROG_AS +AC_PROG_NM # check if we have C++ compiler. This is hacky workaround, # for a reason why it is this way see @@ -43,7 +44,7 @@ # Initialize libtool LT_PREREQ([2.2]) -LT_INIT +LT_INIT([disable-static]) PKG_PROG_PKG_CONFIG() @@ -61,7 +62,8 @@ fi AC_SUBST(GCC_CFLAGS) -AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate]) +AC_CHECK_HEADERS([sys/prctl.h]) +AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate prctl]) AC_ARG_ENABLE([libraries], [AC_HELP_STRING([--disable-libraries], @@ -193,6 +195,8 @@ doc/publican/Makefile doc/doxygen/Makefile doc/man/Makefile + egl/wayland-egl.pc + egl/wayland-egl-backend.pc src/wayland-server-uninstalled.pc src/wayland-client-uninstalled.pc src/wayland-scanner-uninstalled.pc diff -Nru wayland-1.14.0/cursor/wayland-cursor.h wayland-1.15.0/cursor/wayland-cursor.h --- wayland-1.14.0/cursor/wayland-cursor.h 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/cursor/wayland-cursor.h 2018-04-09 17:19:26.000000000 +0000 @@ -33,6 +33,8 @@ #endif struct wl_cursor_theme; +struct wl_buffer; +struct wl_shm; struct wl_cursor_image { uint32_t width; /* actual width */ @@ -48,8 +50,6 @@ char *name; }; -struct wl_shm; - struct wl_cursor_theme * wl_cursor_theme_load(const char *name, int size, struct wl_shm *shm); diff -Nru wayland-1.14.0/cursor/xcursor.c wayland-1.15.0/cursor/xcursor.c --- wayland-1.14.0/cursor/xcursor.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/cursor/xcursor.c 2018-04-09 17:19:26.000000000 +0000 @@ -202,6 +202,11 @@ { XcursorImage *image; + if (width < 0 || height < 0) + return NULL; + if (width > XCURSOR_IMAGE_MAX_SIZE || height > XCURSOR_IMAGE_MAX_SIZE) + return NULL; + image = malloc (sizeof (XcursorImage) + width * height * sizeof (XcursorPixel)); if (!image) @@ -482,7 +487,8 @@ if (!_XcursorReadUInt (file, &head.delay)) return NULL; /* sanity check data */ - if (head.width >= 0x10000 || head.height > 0x10000) + if (head.width > XCURSOR_IMAGE_MAX_SIZE || + head.height > XCURSOR_IMAGE_MAX_SIZE) return NULL; if (head.width == 0 || head.height == 0) return NULL; diff -Nru wayland-1.14.0/debian/changelog wayland-1.15.0/debian/changelog --- wayland-1.14.0/debian/changelog 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/changelog 2018-06-07 09:09:14.000000000 +0000 @@ -1,15 +1,62 @@ -wayland (1.14.0-2) unstable; urgency=medium +wayland (1.15.0-2~oibaf~b) bionic; urgency=medium - * debian/patches/CVE-2017-16612.patch: (Closes: #889681) - - libXcursor before 1.1.15 has various integer overflows that could lead - to heap buffer overflows when processing malicious cursors, e.g., with - programs like GIMP. It is also possible that an attack vector exists - against the related code in cursor/xcursor.c in Wayland through - 1.14.0. - * switch back to use upstream tarball - * debian/control: bump standards version, drop priority stanzas + * No-change backport to bionic - -- Héctor Orón Martínez Sun, 04 Mar 2018 11:56:31 +0100 + -- Fabio Pedretti Thu, 07 Jun 2018 11:05:54 +0200 + +wayland (1.15.0-2) unstable; urgency=medium + + * debian/copyright: add missing copyright holders. Closes: #897362. + * Update Vcs-* for salsa. + + -- Emilio Pozuelo Monfort Sat, 19 May 2018 12:34:01 +0200 + +wayland (1.15.0-1) unstable; urgency=medium + + * New upstream release. + * Put wayland-egl-backend.* to a separate dev-package. + * libwayland-egl1.symbols: Fixed. + * control: Bump Breaks/Replaces on libegl1-mesa-dev, so that this can + be synced to Ubuntu. + + -- Timo Aaltonen Wed, 18 Apr 2018 10:41:38 +0300 + +wayland (1.14.93-1) experimental; urgency=medium + + * New upstrem release candidate. + + -- Timo Aaltonen Tue, 03 Apr 2018 10:53:33 +0300 + +wayland (1.14.92-1) experimental; urgency=medium + + [ Timo Aaltonen ] + * New upstream pre-release. + * signing-keys.asc: Updated. + * libwayland-dev.install: Drop static libs, they're not provided + anymore. + * libwayland-egl1.symbols: Updated. + * control: Adjust Breaks/Provides for libwayland-egl migration. + + [ Héctor Orón Martínez ] + * control: Fix uninstallability issues. (Closes: #893366) + + -- Timo Aaltonen Wed, 21 Mar 2018 21:42:58 +0200 + +wayland (1.14.91-1) experimental; urgency=medium + + [ Helmut Grohne ] + * Use wayland-scanner from libwayland-bin (Closes: #836687) + - Fixes cross builds + + [ Héctor Orón Martínez ] + * New upstream pre-release + * debian/control: libwayland-dev suggests libwayland-doc (Closes: #857139) + * debian/libwayland-server0.symbols: update + * debian/control: update priority from extra to optional + * libwayland-egl1: add new package + * debian/control: bump standards version + + -- Héctor Orón Martínez Tue, 13 Mar 2018 16:01:40 +0100 wayland (1.14.0-1) unstable; urgency=medium diff -Nru wayland-1.14.0/debian/control wayland-1.15.0/debian/control --- wayland-1.14.0/debian/control 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/control 2018-06-07 09:09:14.000000000 +0000 @@ -11,6 +11,7 @@ libexpat1-dev, libffi-dev, libxml2-dev, + libwayland-bin , Build-Depends-Indep: doxygen, graphviz, @@ -18,8 +19,8 @@ xsltproc, docbook-xsl, Standards-Version: 4.1.3 -Vcs-Git: https://anonscm.debian.org/git/pkg-xorg/wayland/wayland -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-xorg/wayland/wayland.git +Vcs-Git: https://salsa.debian.org/xorg-team/wayland/wayland.git +Vcs-Browser: https://salsa.debian.org/xorg-team/wayland/wayland Homepage: https://wayland.freedesktop.org/ Package: libwayland-client0 @@ -43,6 +44,28 @@ This package ships the library that implements the client side of the Wayland protocol. +Package: libwayland-egl1 +Section: libs +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Depends: + ${shlibs:Depends}, + ${misc:Depends}, +Breaks: libwayland-egl1-mesa (<< 18.0.0~rc5-1) +Replaces: libwayland-egl1-mesa (<< 18.0.0~rc5-1) +Provides: libwayland-egl1-mesa +Description: wayland compositor infrastructure - EGL library + Wayland is a protocol for a compositor to talk to its clients as well + as a C library implementation of that protocol. The compositor can be + a standalone display server running on Linux kernel modesetting and + evdev input devices, an X application, or a wayland client + itself. The clients can be traditional applications, X servers + (rootless or fullscreen) or other display servers. + . + This package ships the library that implements the Wayland EGL platform + of the Wayland protocol. + Package: libwayland-server0 Section: libs Architecture: any @@ -88,13 +111,17 @@ Package: libwayland-dev Section: libdevel Architecture: any +Suggests: libwayland-doc Depends: libwayland-client0 (= ${binary:Version}), libwayland-server0 (= ${binary:Version}), libwayland-cursor0 (= ${binary:Version}), + libwayland-egl1 (= ${binary:Version}), libwayland-bin (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, +Breaks: libegl1-mesa-dev (<< 18.0.0-1), +Replaces: libegl1-mesa-dev (<< 18.0.0-1), Multi-Arch: same Description: wayland compositor infrastructure - development files Wayland is a protocol for a compositor to talk to its clients as well @@ -107,6 +134,27 @@ This package contains the development headers for the Wayland libraries. Non-developers likely have little use for this package. +Package: libwayland-egl-backend-dev +Section: libdevel +Architecture: any +Depends: + ${shlibs:Depends}, + ${misc:Depends}, +Breaks: libegl1-mesa-dev (<< 18.0.0-1), + libwayland-dev (<< 1.15.0) +Replaces: libegl1-mesa-dev (<< 18.0.0-1), + libwayland-dev (<< 1.15.0) +Multi-Arch: same +Description: wayland compositor infrastructure - EGL backend development files + Wayland is a protocol for a compositor to talk to its clients as well + as a C library implementation of that protocol. The compositor can be + a standalone display server running on Linux kernel modesetting and + evdev input devices, an X application, or a wayland client + itself. The clients can be traditional applications, X servers + (rootless or fullscreen) or other display servers. + . + This package contains the development headers for the Wayland EGL backend. + Package: libwayland-doc Section: doc Architecture: all diff -Nru wayland-1.14.0/debian/copyright wayland-1.15.0/debian/copyright --- wayland-1.14.0/debian/copyright 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/copyright 2018-06-07 09:09:14.000000000 +0000 @@ -7,13 +7,23 @@ License: X11 Files: * -Copyright: © 2008-2012 Kristian Høgsberg - © 2010-2012 Intel Corporation - © 2011 Benjamin Franzke - © 2012 Collabora, Ltd. - © 2012 Jonas Ådahl - © 2002 Keith Packard - © 1999 SuSE, Inc. +Copyright: + © 1999 SuSE, Inc. + © 2002 Keith Packard + © 2006, 2008 Junio C Hamano + © 2008-2012 Kristian Høgsberg + © 2010-2012 Intel Corporation + © 2011 Benjamin Franzke + © 2012-2013, 2016 Collabora, Ltd + © 2012-2013 Jason Ekstrand + © 2012-2014 Jonas Ådahl + © 2013 Marek Chalupa + © 2014-2015 Red Hat, Inc. + © 2015 Giulio Camuffo + © 2016 Klarälvdalens Datakonsult AB + © 2016 Yong Bakos + © 2017 NVIDIA CORPORATION + © 2017 Samsung Electronics Co., Ltd License: X11 License: X11 diff -Nru wayland-1.14.0/debian/libwayland-dev.install wayland-1.15.0/debian/libwayland-dev.install --- wayland-1.14.0/debian/libwayland-dev.install 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/libwayland-dev.install 2018-06-07 09:09:14.000000000 +0000 @@ -1,15 +1,20 @@ # Headers: -usr/include +usr/include/wayland-client* +usr/include/wayland-cursor.h +usr/include/wayland-egl.h +usr/include/wayland-egl-core.h +usr/include/wayland-server* +usr/include/wayland-util.h +usr/include/wayland-version.h # Use no wildcards to ensure we spot any update: -usr/lib/*/libwayland-client.a usr/lib/*/libwayland-client.so -usr/lib/*/libwayland-cursor.a usr/lib/*/libwayland-cursor.so -usr/lib/*/libwayland-server.a +usr/lib/*/libwayland-egl.so usr/lib/*/libwayland-server.so usr/lib/*/pkgconfig/wayland-client.pc usr/lib/*/pkgconfig/wayland-cursor.pc +usr/lib/*/pkgconfig/wayland-egl.pc usr/lib/*/pkgconfig/wayland-server.pc usr/lib/*/pkgconfig/wayland-scanner.pc diff -Nru wayland-1.14.0/debian/libwayland-egl1.install wayland-1.15.0/debian/libwayland-egl1.install --- wayland-1.14.0/debian/libwayland-egl1.install 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/debian/libwayland-egl1.install 2018-06-07 09:09:14.000000000 +0000 @@ -0,0 +1,2 @@ +# Be careful with wildcards to ensure we spot any ABI bump: +usr/lib/*/libwayland-egl.so.1* diff -Nru wayland-1.14.0/debian/libwayland-egl1.symbols wayland-1.15.0/debian/libwayland-egl1.symbols --- wayland-1.14.0/debian/libwayland-egl1.symbols 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/debian/libwayland-egl1.symbols 2018-06-07 09:09:14.000000000 +0000 @@ -0,0 +1,6 @@ +libwayland-egl.so.1 libwayland-egl1 #MINVER# +* Build-Depends-Package: libwayland-dev + wl_egl_window_create@Base 1.15.0 + wl_egl_window_destroy@Base 1.15.0 + wl_egl_window_get_attached_size@Base 1.15.0 + wl_egl_window_resize@Base 1.15.0 diff -Nru wayland-1.14.0/debian/libwayland-egl-backend-dev.install wayland-1.15.0/debian/libwayland-egl-backend-dev.install --- wayland-1.14.0/debian/libwayland-egl-backend-dev.install 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/debian/libwayland-egl-backend-dev.install 2018-06-07 09:09:14.000000000 +0000 @@ -0,0 +1,2 @@ +usr/include/wayland-egl-backend.h +usr/lib/*/pkgconfig/wayland-egl-backend.pc diff -Nru wayland-1.14.0/debian/libwayland-server0.symbols wayland-1.15.0/debian/libwayland-server0.symbols --- wayland-1.14.0/debian/libwayland-server0.symbols 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/libwayland-server0.symbols 2018-06-07 09:09:14.000000000 +0000 @@ -38,6 +38,7 @@ wl_display_add_socket_fd@Base 1.9.91 wl_display_create@Base 1.0.2 wl_display_destroy@Base 1.0.2 + wl_display_destroy_clients@Base 1.14.91 wl_display_flush_clients@Base 1.0.2 wl_display_get_client_list@Base 1.11.91 wl_display_get_destroy_listener@Base 1.0.4 diff -Nru wayland-1.14.0/debian/patches/CVE-2017-16612.patch wayland-1.15.0/debian/patches/CVE-2017-16612.patch --- wayland-1.14.0/debian/patches/CVE-2017-16612.patch 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/patches/CVE-2017-16612.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -commit 5d201df72f3d4f4cb8b8f75f980169b03507da38 -Author: Tobias Stoeckmann -Date: Tue Nov 28 21:38:07 2017 +0100 - - cursor: Fix heap overflows when parsing malicious files. - - It is possible to trigger heap overflows due to an integer overflow - while parsing images. - - The integer overflow occurs because the chosen limit 0x10000 for - dimensions is too large for 32 bit systems, because each pixel takes - 4 bytes. Properly chosen values allow an overflow which in turn will - lead to less allocated memory than needed for subsequent reads. - - See also: https://cgit.freedesktop.org/xorg/lib/libXcursor/commit/?id=4794b5dd34688158fb51a2943032569d3780c4b8 - Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103961 - - Signed-off-by: Tobias Stoeckmann - [Pekka: add link to the corresponding libXcursor commit] - Signed-off-by: Pekka Paalanen - -diff --git a/cursor/xcursor.c b/cursor/xcursor.c -index ca41c4a..689c702 100644 ---- a/cursor/xcursor.c -+++ b/cursor/xcursor.c -@@ -202,6 +202,11 @@ XcursorImageCreate (int width, int height) - { - XcursorImage *image; - -+ if (width < 0 || height < 0) -+ return NULL; -+ if (width > XCURSOR_IMAGE_MAX_SIZE || height > XCURSOR_IMAGE_MAX_SIZE) -+ return NULL; -+ - image = malloc (sizeof (XcursorImage) + - width * height * sizeof (XcursorPixel)); - if (!image) -@@ -482,7 +487,8 @@ _XcursorReadImage (XcursorFile *file, - if (!_XcursorReadUInt (file, &head.delay)) - return NULL; - /* sanity check data */ -- if (head.width >= 0x10000 || head.height > 0x10000) -+ if (head.width > XCURSOR_IMAGE_MAX_SIZE || -+ head.height > XCURSOR_IMAGE_MAX_SIZE) - return NULL; - if (head.width == 0 || head.height == 0) - return NULL; diff -Nru wayland-1.14.0/debian/patches/series wayland-1.15.0/debian/patches/series --- wayland-1.14.0/debian/patches/series 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -CVE-2017-16612.patch diff -Nru wayland-1.14.0/debian/rules wayland-1.15.0/debian/rules --- wayland-1.14.0/debian/rules 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/rules 2018-06-07 09:09:14.000000000 +0000 @@ -2,9 +2,16 @@ SOURCE=wayland +ifneq (,$(filter cross,$(DEB_BUILD_PROFILES))) +configure_flags += --with-host-scanner +endif # Don't build the documentation when not building arch:all packages -override_dh_auto_configure-arch: - dh_auto_configure -- --disable-documentation +ifeq (,$(filter libwayland-doc,$(shell dh_listpackages))) +configure_flags += --disable-documentation +endif + +override_dh_auto_configure: + dh_auto_configure -- $(configure_flags) # Kill *.la files, and forget no-one: override_dh_install: @@ -16,6 +23,8 @@ -V 'libwayland-client0 (>= 1.2.0)' -- -c4 dh_makeshlibs -plibwayland-cursor0 \ -V 'libwayland-cursor0 (>= 1.0.4)' -- -c4 + dh_makeshlibs -plibwayland-egl1 \ + -V 'libwayland-egl1 (>= 1.14.91)' -- -c4 dh_makeshlibs -plibwayland-server0 \ -V 'libwayland-server0 (>= 1.2.0)' -- -c4 diff -Nru wayland-1.14.0/debian/upstream/signing-key.asc wayland-1.15.0/debian/upstream/signing-key.asc --- wayland-1.14.0/debian/upstream/signing-key.asc 2018-06-07 09:09:14.000000000 +0000 +++ wayland-1.15.0/debian/upstream/signing-key.asc 2018-06-07 09:09:14.000000000 +0000 @@ -42,3 +42,33 @@ F9GzWqNd =LLvz -----END PGP PUBLIC KEY BLOCK----- +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBFPqgXYBCAC0sUvZrj31IAB8LzM8tR3KS6njXsX0zRCDYYCcE/bNsWlvfo5M +YNxiR/PYDgvN8SAoDt9r7xb8a0Q9tAG326d13RStQSsaY2EvcBLMBgzXO4pFQ3pm +gLuK6NFZKz4qNle2kaq+KndTawGHAk0O9epsUYJUfcKj4bMLm3uZVRzJsfy5P8Qx +E4yLfBZgtdMnYXY9PHjqiFAtu4d//wNMSJ9Hv43eumVP3W28hFD5ZAsvyL3yL6rz +t+MtJrAYqSTgV0PrtR0JU3hAWAupW6SxmjeQHdMPJy4NbFCckdoNigid6FjsjjtW +uNuWtEa/lg58e5eyxKu6/KRmooqoyo6BOB53ABEBAAG0JkRlcmVrIEZvcmVtYW4g +PGRlcmVrZkBvc2cuc2Ftc3VuZy5jb20+iQE3BBMBAgAiBQJT6oF2AhsDBgsJCAcD +AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBeVEmOaX8R1+CFB/dYZDkH0Ne2hsjwRQBg +i7sL2fuyNlRLO0xAnii3vhDQ+yv6VLOb16eSqs8AcwKpLJMh+C8jrj2J8F8LYC0c +y0HRLZAJAn13q3/xsG550ZlDsy9Suq2U5KdGivCmsBfvvE8Qt4l0P0Ut0QJczo4h +ZywKxOAe3IjByXeeElsg+vW5dG+YWqhQde07XP5qzfZXmsevIPdVyg9+y3Ack8EM +Uk017ZzYfnOMysyOZAh8dXIW5uCFlN9s2plaKdVpvvnhe9JsQnL9btDcyOVYEHvn +RGA7HZwFDynJ+q5hfvNDcI2a0N5IRsT4mTAh+wwNFblAhJVX4LirxaHH9ZVS3vTo +HoK5AQ0EU+qBdgEIALV7qjn4lAzS8uqmNbNZqjH+juHorkYaoRN7idlBItujs7pe +72rJhF1dp4NIHuNh60aUu0IggjuGXF0r6YeoE5N9NwkBoLvOIx7EqodJM5yUmR+e +rYqiJOF4LDR2iaErBIrrpIXAyHnzUPToopXQxx4eMYpoDfN2zoJZlFHRpiy25aFc +P4hA7K1+Gb2YGhIvenDqPeGQJ3sr4FozMv0eqNKqqaj3oq11UrY5xRLWeoK7Y3H0 +e7zMukXZ3q1RfMxWDkSdDDkS8P1F7vVsAlluC/GJg1SOcQIK/hfbJGxiMsKYy5vd +iss8+etu8EDDkFzGQ4GirSP35rTVqpRXUnn0iSsAEQEAAYkBHwQYAQIACQUCU+qB +dgIbDAAKCRBeVEmOaX8R1/hyB/wLgXoRsHaE6AFcwzBfl8+KgPK3/VDcEBHslX3w +fYbXRrwuLUcyQO/lZiFIbZ9jNlcKH2zVd9Cu8QtYxCGF5lMGHW5K+aSiOe0AFDkO +X8auKZKskjhyGqSPtmNPeiuwOJI1nPaw7wochwBl2L7SdT20IPdwuUOOGymj0VYe +3QlxQ3tOG2WjMMYoCHIqOnJA0BP5HxTJob2cB7oraOc0QKHOS6KVJAovTrjJllFE +ncwhWUq20xh3NxSQKE8OpSQPv1mG8QmB+iThSeRarixXCvy/1GZb6HzFdaozj5Iy +T61de1eQ+/rLgixBkkiLtm6kkl8HlyJUNZGofRtAc7k7OkXo +=/RHj +-----END PGP PUBLIC KEY BLOCK----- diff -Nru wayland-1.14.0/depcomp wayland-1.15.0/depcomp --- wayland-1.14.0/depcomp 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/depcomp 2018-04-09 17:19:31.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -786,6 +786,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru wayland-1.14.0/doc/doxygen/mainpage.dox wayland-1.15.0/doc/doxygen/mainpage.dox --- wayland-1.14.0/doc/doxygen/mainpage.dox 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/doc/doxygen/mainpage.dox 2018-06-07 09:09:14.000000000 +0000 @@ -0,0 +1,22 @@ +/** + * @mainpage + * Wayland protocol API documentation. + * + * This documentation is available for the Server- and the Client-side APIs. + * + * - Server-side API + * - Client-side API + * + * Further documentation about the architecture and principles of Wayland is + * available in the + * Wayland Book + * + * @section ifaces Interfaces + * For the list of available interfaces, please see the + * modules list. + * + * @section protocols Protocols + * For the list of protocols, please see the + * Related Pages. + * + */ diff -Nru wayland-1.14.0/doc/doxygen/Makefile.am wayland-1.15.0/doc/doxygen/Makefile.am --- wayland-1.14.0/doc/doxygen/Makefile.am 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/doc/doxygen/Makefile.am 2018-04-09 17:19:26.000000000 +0000 @@ -19,6 +19,7 @@ scanned_src_files_Server = \ $(scanned_src_files_shared) \ + $(top_srcdir)/src/event-loop.c \ $(top_srcdir)/src/wayland-server.c \ $(top_srcdir)/src/wayland-server.h \ $(top_srcdir)/src/wayland-server-core.h \ diff -Nru wayland-1.14.0/doc/doxygen/Makefile.in wayland-1.15.0/doc/doxygen/Makefile.in --- wayland-1.14.0/doc/doxygen/Makefile.in 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/doc/doxygen/Makefile.in 2018-04-09 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -292,7 +292,6 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -320,6 +319,7 @@ scanned_src_files_Server = \ $(scanned_src_files_shared) \ + $(top_srcdir)/src/event-loop.c \ $(top_srcdir)/src/wayland-server.c \ $(top_srcdir)/src/wayland-server.h \ $(top_srcdir)/src/wayland-server-core.h \ diff -Nru wayland-1.14.0/doc/doxygen/wayland.doxygen.in wayland-1.15.0/doc/doxygen/wayland.doxygen.in --- wayland-1.14.0/doc/doxygen/wayland.doxygen.in 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/doc/doxygen/wayland.doxygen.in 2018-04-09 17:19:26.000000000 +0000 @@ -7,7 +7,7 @@ QUIET = YES HTML_TIMESTAMP = YES GENERATE_LATEX = NO -MAN_LINKS = YES +MAN_LINKS = NO PREDEFINED = WL_EXPORT= \ WL_PRINTF(x,y)= MACRO_EXPANSION = YES diff -Nru wayland-1.14.0/doc/Makefile.in wayland-1.15.0/doc/Makefile.in --- wayland-1.14.0/doc/Makefile.in 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/doc/Makefile.in 2018-04-09 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -317,7 +317,6 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru wayland-1.14.0/doc/man/Makefile.in wayland-1.15.0/doc/man/Makefile.in --- wayland-1.14.0/doc/man/Makefile.in 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/doc/man/Makefile.in 2018-04-09 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -296,7 +296,6 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru wayland-1.14.0/doc/man/wl_display_connect.3 wayland-1.15.0/doc/man/wl_display_connect.3 --- wayland-1.14.0/doc/man/wl_display_connect.3 2017-08-08 18:21:03.000000000 +0000 +++ wayland-1.15.0/doc/man/wl_display_connect.3 2018-04-09 17:19:36.000000000 +0000 @@ -1,7 +1,7 @@ '\" t .\" Title: wl_display_connect .\" Author: David Herrmann -.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: September 2012 .\" Manual: wl_display_connect .\" Source: wayland-client @@ -45,7 +45,12 @@ \fBwl_display_connect\fR connects to a Wayland socket that was previously opened by a Wayland server\&. The server socket must be placed in \fBXDG_RUNTIME_DIR\fR -for this function to find it\&. The +when +\fBWAYLAND_DISPLAY\fR +(or +\fIname\fR, see below) is a simple name, for this function to find it\&. The server socket is also allowed to exist at an arbitrary path; usage details follow\&. See below for compatibility issue details\&. +.PP +The \fIname\fR argument specifies the name of the socket or \fBNULL\fR @@ -53,11 +58,30 @@ \fB"wayland\-0"\fR)\&. The environment variable \fBWAYLAND_DISPLAY\fR replaces the default value\&. If +\fIname\fR +is an absolute path, then that path is used as the Wayland socket to which the connection is attempted\&. Note that in combination with the default\-value behavior described above, this implies that setting +\fBWAYLAND_DISPLAY\fR +to an absolute path will implicitly cause +\fIname\fR +to take on that absolute path if +\fIname\fR +is +\fBNULL\fR\&. If \fBWAYLAND_SOCKET\fR is set, this function behaves like \fBwl_display_connect_to_fd\fR with the file\-descriptor number taken from the environment variable\&. .PP +Support for interpreting +\fBWAYLAND_DISPLAY\fR +as an absolute path is a change in behavior compared to +\fBwl_display_connect\fR\*(Aqs behavior in versions 1\&.14 and older of Wayland\&. It is no longer guaranteed in versions 1\&.15 and higher that the Wayland socket chosen is equivalent to manually constructing a socket pathname by concatenating +\fBXDG_RUNTIME_DIR\fR +and +\fBWAYLAND_DISPLAY\fR\&. Manual construction of the socket path must account for the possibility that +\fBWAYLAND_DISPLAY\fR +contains an absolute path\&. +.PP \fBwl_display_connect_to_fd\fR connects to a Wayland socket with an explicit file\-descriptor\&. The file\-descriptor is passed as argument \fIfd\fR\&. diff -Nru wayland-1.14.0/doc/man/wl_display_connect_to_fd.3 wayland-1.15.0/doc/man/wl_display_connect_to_fd.3 --- wayland-1.14.0/doc/man/wl_display_connect_to_fd.3 2017-08-08 18:21:03.000000000 +0000 +++ wayland-1.15.0/doc/man/wl_display_connect_to_fd.3 2018-04-09 17:19:36.000000000 +0000 @@ -1 +1 @@ -.so man3/wl_display_connect.3 +.so man3/man3/wl_display_connect.3 diff -Nru wayland-1.14.0/doc/man/wl_display_connect.xml wayland-1.15.0/doc/man/wl_display_connect.xml --- wayland-1.14.0/doc/man/wl_display_connect.xml 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/doc/man/wl_display_connect.xml 2018-04-09 17:19:26.000000000 +0000 @@ -55,15 +55,39 @@ Description wl_display_connect connects to a Wayland socket that was previously opened by a Wayland server. The server socket must - be placed in XDG_RUNTIME_DIR for this function to - find it. The name argument specifies the name of + be placed in XDG_RUNTIME_DIR when WAYLAND_DISPLAY + (or name, see below) is a simple name, for this + function to find it. The server socket is also allowed to exist at an + arbitrary path; usage details follow. See below for compatibility issue + details. + + The name argument specifies the name of the socket or NULL to use the default (which is "wayland-0"). The environment variable - WAYLAND_DISPLAY replaces the default value. If - WAYLAND_SOCKET is set, this function behaves like + WAYLAND_DISPLAY replaces the default value. + + If name is an absolute path, then that path is used + as the Wayland socket to which the connection is attempted. Note that + in combination with the default-value behavior described above, this + implies that setting WAYLAND_DISPLAY to an absolute + path will implicitly cause name to take on that + absolute path if name is NULL. + + If WAYLAND_SOCKET is set, this function behaves like wl_display_connect_to_fd with the file-descriptor number taken from the environment variable. + Support for interpreting WAYLAND_DISPLAY as an + absolute path is a change in behavior compared to + wl_display_connect's behavior in versions + 1.14 and older of Wayland. It is no longer guaranteed in versions + 1.15 and higher that the Wayland socket chosen is equivalent to + manually constructing a socket pathname by concatenating + XDG_RUNTIME_DIR and WAYLAND_DISPLAY. + Manual construction of the socket path must account for the + possibility that WAYLAND_DISPLAY contains an absolute + path. + wl_display_connect_to_fd connects to a Wayland socket with an explicit file-descriptor. The file-descriptor is passed as argument fd. diff -Nru wayland-1.14.0/doc/publican/Makefile.am wayland-1.15.0/doc/publican/Makefile.am --- wayland-1.14.0/doc/publican/Makefile.am 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/doc/publican/Makefile.am 2018-04-09 17:19:26.000000000 +0000 @@ -24,9 +24,11 @@ $(srcdir)/sources/Preface.xml \ $(srcdir)/sources/Revision_History.xml \ $(srcdir)/sources/Protocol.xml \ + $(srcdir)/sources/Xwayland.xml \ $(srcdir)/sources/Compositors.xml \ $(srcdir)/sources/images/icon.svg \ $(srcdir)/sources/images/wayland.png \ + $(srcdir)/sources/images/xwayland-architecture.png \ $(srcdir)/sources/Client.xml \ $(srcdir)/sources/Server.xml @@ -43,7 +45,8 @@ img_sources = \ $(srcdir)/sources/images/icon.svg \ - $(srcdir)/sources/images/wayland.png + $(srcdir)/sources/images/wayland.png \ + $(srcdir)/sources/images/xwayland-architecture.png doxygen_img_sources := \ $(doxydir)/xml/wayland-architecture.png \ diff -Nru wayland-1.14.0/doc/publican/Makefile.in wayland-1.15.0/doc/publican/Makefile.in --- wayland-1.14.0/doc/publican/Makefile.in 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/doc/publican/Makefile.in 2018-04-09 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -273,7 +273,6 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -293,9 +292,11 @@ $(srcdir)/sources/Preface.xml \ $(srcdir)/sources/Revision_History.xml \ $(srcdir)/sources/Protocol.xml \ + $(srcdir)/sources/Xwayland.xml \ $(srcdir)/sources/Compositors.xml \ $(srcdir)/sources/images/icon.svg \ $(srcdir)/sources/images/wayland.png \ + $(srcdir)/sources/images/xwayland-architecture.png \ $(srcdir)/sources/Client.xml \ $(srcdir)/sources/Server.xml @@ -312,7 +313,8 @@ img_sources = \ $(srcdir)/sources/images/icon.svg \ - $(srcdir)/sources/images/wayland.png + $(srcdir)/sources/images/wayland.png \ + $(srcdir)/sources/images/xwayland-architecture.png doxygen_img_sources := \ $(doxydir)/xml/wayland-architecture.png \ @@ -462,12 +464,12 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@HAVE_XMLTO_FALSE@install-data-local: -@HAVE_XSLTPROC_FALSE@install-data-local: @HAVE_XMLTO_FALSE@uninstall-local: @HAVE_XSLTPROC_FALSE@uninstall-local: @HAVE_XMLTO_FALSE@clean-local: @HAVE_XSLTPROC_FALSE@clean-local: +@HAVE_XMLTO_FALSE@install-data-local: +@HAVE_XSLTPROC_FALSE@install-data-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am Binary files /tmp/tmpzCBsE8/GpRqbLxDAF/wayland-1.14.0/doc/publican/sources/images/xwayland-architecture.png and /tmp/tmpzCBsE8/jwzKq5wbc2/wayland-1.15.0/doc/publican/sources/images/xwayland-architecture.png differ diff -Nru wayland-1.14.0/doc/publican/sources/Protocol.xml wayland-1.15.0/doc/publican/sources/Protocol.xml --- wayland-1.14.0/doc/publican/sources/Protocol.xml 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/doc/publican/sources/Protocol.xml 2018-04-09 17:19:26.000000000 +0000 @@ -94,7 +94,10 @@ The protocol is sent over a UNIX domain stream socket, where the endpoint usually is named wayland-0 (although it can be changed via WAYLAND_DISPLAY - in the environment). + in the environment). Beginning in Wayland 1.15, implementations can + optionally support server socket endpoints located at arbitrary + locations in the filesystem by setting WAYLAND_DISPLAY + to the absolute path at which the server endpoint listens. Every message is structured as 32-bit words; values are represented in the diff -Nru wayland-1.14.0/doc/publican/sources/Wayland.xml wayland-1.15.0/doc/publican/sources/Wayland.xml --- wayland-1.14.0/doc/publican/sources/Wayland.xml 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/doc/publican/sources/Wayland.xml 2018-04-09 17:19:26.000000000 +0000 @@ -11,6 +11,7 @@ + diff -Nru wayland-1.14.0/doc/publican/sources/Xwayland.xml wayland-1.15.0/doc/publican/sources/Xwayland.xml --- wayland-1.14.0/doc/publican/sources/Xwayland.xml 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/doc/publican/sources/Xwayland.xml 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,170 @@ + + +%BOOK_ENTITIES; +]> + + X11 Application Support +
+ Introduction + + Being able to run existing X11 applications is crucial for the adoption + of Wayland, especially on desktops, as there will always be X11 + applications that have not been or cannot be converted into Wayland + applications, and throwing them all away would be prohibitive. + Therefore a Wayland compositor often needs to support running X11 + applications. + + + X11 and Wayland are different enough that there is no "simple" way to + translate between them. Most of X11 is uninteresting to a Wayland + compositor. That, combined with the gigantic implementation effort needed + to support X11, makes it intractable to just write X11 support directly in + a Wayland compositor. The implementation would be nothing short of a + real X11 server. + + + Therefore, Wayland compositors should use Xwayland, the X11 server that + lives in the Xorg server source code repository and shares most of the + implementation with the Xorg server. Xwayland is a complete X11 server, + just like Xorg is, but instead of driving the displays and opening input + devices, it acts as a Wayland client. The rest of this chapter talks + about how Xwayland works. + + + For integration and architecture reasons, while Xwayland is a Wayland + client of the Wayland compositor, the Wayland compositor is an X11 client + of Xwayland. This circular dependency requires special care from the + Wayland compositor. + +
+
+ Two Modes for Foreign Windows + + In general, windows from a foreign window system can be presented in one + of two ways: rootless and rootful (not rootless). + + + In rootful mode, the foreign window system as a whole is represented as a + window (or more) of its own. You have a native window, inside which all + the foreign windows are. The advantage of this approach in Xwayland's + case is that you can run your favourite X11 window manager to manage your + X11 applications. The disadvantage is that the foreign windows do not + integrate with the native desktop. Therefore this mode is not usually + used. + + + In rootless mode, each foreign window is a first-class resident among the + native windows. Foreign windows are not confined inside a native window + but act as if they were native windows. The advantage is that one can + freely stack and mix native and foreign windows, which is not possible in + rootful mode. The disadvantage is that this mode is harder to implement + and fundamental differences in window systems may prevent some things + from working. With rootless Xwayland, the Wayland compositor must take + the role as the X11 window manager, and one cannot use any other X11 + window manager in its place. + + + This chapter concentrates on the rootless mode, and ignores the rootful + mode. + +
+
+ Architecture + + A Wayland compositor usually takes care of launching Xwayland. + Xwayland works in cooperation with a Wayland compositor as follows: + +
+ Xwayland architecture diagram + + + + + + + +
+ + An X11 application connects to Xwayland just like it would connect to any + X server. Xwayland processes all the X11 requests. On the other end, + Xwayland is a Wayland client that connects to the Wayland compositor. + + + The X11 window manager (XWM) is an integral part of the Wayland + compositor. XWM uses the usual X11 window management protocol to manage + all X11 windows in Xwayland. Most importantly, XWM acts as a bridge + between Xwayland window state and the Wayland compositor's window manager + (WWM). This way WWM can manage all windows, both native Wayland and X11 + (Xwayland) windows. This is very important for a coherent user + experience. + + + Since Xwayland uses Wayland for input and output, it does not have any + use for the device drivers that Xorg uses. None of the xf86-video-* or + xf86-input-* modules are used. There also is no configuration file for + the Xwayland server. For optional hardware accelerated rendering, + Xwayland uses GLAMOR. + + + A Wayland compositor usually spawns only one Xwayland instance. This is + because many X11 applications assume they can communicate with other X11 + applications through the X server, and this requires a shared X server + instance. This also means that Xwayland does not protect nor isolate X11 + clients from each other, unless the Wayland compositor specifically + chooses to break the X11 client intercommunications by spawning + application specific Xwayland instances. X11 clients are naturally + isolated from Wayland clients. + + + Xwayland compatibility compared to a native X server will probably never + reach 100%. Desktop environment (DE) components, specifically X11 window + managers, are practically never supported. An X11 window manager would + not know about native Wayland windows, so it could manage only X11 + windows. On the other hand, there must be an XWM that reserves the + exclusive window manager role so that the Wayland compositor could show + the X11 windows appropriately. For other DE components, like pagers and + panels, adding the necessary interfaces to support them in WWM through XWM + is often considered not worthwhile. + +
+
+ X Window Manager (XWM) + + From the X11 point of view, the X window manager (XWM) living inside a + Wayland compositor is just like any other window manager. The difference + is mostly in which process it resides in, and the few extra conventions + in the X11 protocol to support Wayland window management (WWM) + specifically. + + + There are two separate asynchronous communication channels between + Xwayland and a Wayland compositor: one uses the Wayland protocol, and the + other one, solely for XWM, uses X11 protocol. This setting demands great + care from the XWM implementation to avoid (random) deadlocks with + Xwayland. It is often nearly impossible to prove that synchronous or + blocking X11 calls from XWM cannot cause a deadlock, and therefore it is + strongly recommended to make all X11 communications asynchronous. All + Wayland communications are already asynchonous by design. + +
+ Window identification + + In Xwayland, an X11 window may have a corresponding wl_surface object + in Wayland. The wl_surface object is used for input and output: it is + referenced by input events and used to provide the X11 window content + to the Wayland compositor. The X11 window and the wl_surface live in + different protocol streams, and they need to be matched for XWM to do + its job. + + + When Xwayland creates a wl_surface on Wayland, it will also send an X11 + ClientMessage of type atom "WL_SURFACE_ID" to the X11 window carrying + the wl_surface Wayland object ID as the first 32-bit data element. This + is how XWM can associate a wl_surface with an X11 window. Note that + the request to create a wl_surface and the ID message may arrive in any + order in the Wayland compositor. + +
+
+
diff -Nru wayland-1.14.0/egl/wayland-egl-abi-check.c wayland-1.15.0/egl/wayland-egl-abi-check.c --- wayland-1.14.0/egl/wayland-egl-abi-check.c 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/egl/wayland-egl-abi-check.c 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include /* offsetof */ +#include /* printf */ + +#include "wayland-egl-backend.h" /* Current struct wl_egl_window implementation */ + +/* + * Following are previous implementations of wl_egl_window. + * + * DO NOT EVER CHANGE! + */ + +/* From: 214fc6e850 - Benjamin Franzke : egl: Implement libwayland-egl */ +struct wl_egl_window_v0 { + struct wl_surface *surface; + + int width; + int height; + int dx; + int dy; + + int attached_width; + int attached_height; +}; + +/* From: ca3ed3e024 - Ander Conselvan de Oliveira : egl/wayland: Don't invalidate drawable on swap buffers */ +struct wl_egl_window_v1 { + struct wl_surface *surface; + + int width; + int height; + int dx; + int dy; + + int attached_width; + int attached_height; + + void *private; + void (*resize_callback)(struct wl_egl_window *, void *); +}; + +/* From: 690ead4a13 - Stencel, Joanna : egl/wayland-egl: Fix for segfault in dri2_wl_destroy_surface. */ +#define WL_EGL_WINDOW_VERSION_v2 2 +struct wl_egl_window_v2 { + struct wl_surface *surface; + + int width; + int height; + int dx; + int dy; + + int attached_width; + int attached_height; + + void *private; + void (*resize_callback)(struct wl_egl_window *, void *); + void (*destroy_window_callback)(void *); +}; + +/* From: 2d5d61bc49 - Miguel A. Vico : wayland-egl: Make wl_egl_window a versioned struct */ +#define WL_EGL_WINDOW_VERSION_v3 3 +struct wl_egl_window_v3 { + const intptr_t version; + + int width; + int height; + int dx; + int dy; + + int attached_width; + int attached_height; + + void *driver_private; + void (*resize_callback)(struct wl_egl_window *, void *); + void (*destroy_window_callback)(void *); + + struct wl_surface *surface; +}; + + +/* This program checks we keep a backwards-compatible struct wl_egl_window + * definition whenever it is modified in wayland-egl-backend.h. + * + * The previous definition should be added above as a new struct + * wl_egl_window_vN, and the appropriate checks should be added below + */ + +#define MEMBER_SIZE(type, member) sizeof(((type *)0)->member) + +#define CHECK_RENAMED_MEMBER(a_ver, b_ver, a_member, b_member) \ + do { \ + if (offsetof(struct wl_egl_window ## a_ver, a_member) != \ + offsetof(struct wl_egl_window ## b_ver, b_member)) { \ + printf("Backards incompatible change detected!\n " \ + "offsetof(struct wl_egl_window" #a_ver "::" #a_member ") != " \ + "offsetof(struct wl_egl_window" #b_ver "::" #b_member ")\n"); \ + return 1; \ + } \ + \ + if (MEMBER_SIZE(struct wl_egl_window ## a_ver, a_member) != \ + MEMBER_SIZE(struct wl_egl_window ## b_ver, b_member)) { \ + printf("Backards incompatible change detected!\n " \ + "MEMBER_SIZE(struct wl_egl_window" #a_ver "::" #a_member ") != " \ + "MEMBER_SIZE(struct wl_egl_window" #b_ver "::" #b_member ")\n"); \ + return 1; \ + } \ + } while (0) + +#define CHECK_MEMBER(a_ver, b_ver, member) CHECK_RENAMED_MEMBER(a_ver, b_ver, member, member) +#define CHECK_MEMBER_CURRENT(a_ver, member) CHECK_MEMBER(a_ver,, member) + +#define CHECK_SIZE(a_ver, b_ver) \ + do { \ + if (sizeof(struct wl_egl_window ## a_ver) > \ + sizeof(struct wl_egl_window ## b_ver)) { \ + printf("Backards incompatible change detected!\n " \ + "sizeof(struct wl_egl_window" #a_ver ") > " \ + "sizeof(struct wl_egl_window" #b_ver ")\n"); \ + return 1; \ + } \ + } while (0) + +#define CHECK_SIZE_CURRENT(a_ver) \ + do { \ + if (sizeof(struct wl_egl_window ## a_ver) != \ + sizeof(struct wl_egl_window)) { \ + printf("Backards incompatible change detected!\n " \ + "sizeof(struct wl_egl_window" #a_ver ") != " \ + "sizeof(struct wl_egl_window)\n"); \ + return 1; \ + } \ + } while (0) + +#define CHECK_VERSION(a_ver, b_ver) \ + do { \ + if ((WL_EGL_WINDOW_VERSION ## a_ver) >= \ + (WL_EGL_WINDOW_VERSION ## b_ver)) { \ + printf("Backards incompatible change detected!\n " \ + "WL_EGL_WINDOW_VERSION" #a_ver " >= " \ + "WL_EGL_WINDOW_VERSION" #b_ver "\n"); \ + return 1; \ + } \ + } while (0) + +#define CHECK_VERSION_CURRENT(a_ver) \ + do { \ + if ((WL_EGL_WINDOW_VERSION ## a_ver) != \ + (WL_EGL_WINDOW_VERSION)) { \ + printf("Backards incompatible change detected!\n " \ + "WL_EGL_WINDOW_VERSION" #a_ver " != " \ + "WL_EGL_WINDOW_VERSION\n"); \ + return 1; \ + } \ + } while (0) + +int main(int argc, char **argv) +{ + /* Check wl_egl_window_v1 ABI against wl_egl_window_v0 */ + CHECK_MEMBER(_v0, _v1, surface); + CHECK_MEMBER(_v0, _v1, width); + CHECK_MEMBER(_v0, _v1, height); + CHECK_MEMBER(_v0, _v1, dx); + CHECK_MEMBER(_v0, _v1, dy); + CHECK_MEMBER(_v0, _v1, attached_width); + CHECK_MEMBER(_v0, _v1, attached_height); + + CHECK_SIZE(_v0, _v1); + + /* Check wl_egl_window_v2 ABI against wl_egl_window_v1 */ + CHECK_MEMBER(_v1, _v2, surface); + CHECK_MEMBER(_v1, _v2, width); + CHECK_MEMBER(_v1, _v2, height); + CHECK_MEMBER(_v1, _v2, dx); + CHECK_MEMBER(_v1, _v2, dy); + CHECK_MEMBER(_v1, _v2, attached_width); + CHECK_MEMBER(_v1, _v2, attached_height); + CHECK_MEMBER(_v1, _v2, private); + CHECK_MEMBER(_v1, _v2, resize_callback); + + CHECK_SIZE(_v1, _v2); + + /* Check wl_egl_window_v3 ABI against wl_egl_window_v2 */ + CHECK_RENAMED_MEMBER(_v2, _v3, surface, version); + CHECK_MEMBER (_v2, _v3, width); + CHECK_MEMBER (_v2, _v3, height); + CHECK_MEMBER (_v2, _v3, dx); + CHECK_MEMBER (_v2, _v3, dy); + CHECK_MEMBER (_v2, _v3, attached_width); + CHECK_MEMBER (_v2, _v3, attached_height); + CHECK_RENAMED_MEMBER(_v2, _v3, private, driver_private); + CHECK_MEMBER (_v2, _v3, resize_callback); + CHECK_MEMBER (_v2, _v3, destroy_window_callback); + + CHECK_SIZE (_v2, _v3); + CHECK_VERSION(_v2, _v3); + + /* Check current wl_egl_window ABI against wl_egl_window_v3 */ + CHECK_MEMBER_CURRENT(_v3, version); + CHECK_MEMBER_CURRENT(_v3, width); + CHECK_MEMBER_CURRENT(_v3, height); + CHECK_MEMBER_CURRENT(_v3, dx); + CHECK_MEMBER_CURRENT(_v3, dy); + CHECK_MEMBER_CURRENT(_v3, attached_width); + CHECK_MEMBER_CURRENT(_v3, attached_height); + CHECK_MEMBER_CURRENT(_v3, driver_private); + CHECK_MEMBER_CURRENT(_v3, resize_callback); + CHECK_MEMBER_CURRENT(_v3, destroy_window_callback); + CHECK_MEMBER_CURRENT(_v3, surface); + + CHECK_SIZE_CURRENT (_v3); + CHECK_VERSION_CURRENT(_v3); + + return 0; +} diff -Nru wayland-1.14.0/egl/wayland-egl-backend.h wayland-1.15.0/egl/wayland-egl-backend.h --- wayland-1.14.0/egl/wayland-egl-backend.h 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/egl/wayland-egl-backend.h 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * Copyright © 2011 Benjamin Franzke + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: + * Benjamin Franzke + */ + +#ifndef _WAYLAND_EGL_PRIV_H +#define _WAYLAND_EGL_PRIV_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * NOTE: This version must be kept in sync with the Version field in the + * wayland-egl-backend.pc.in file. + */ +#define WL_EGL_WINDOW_VERSION 3 + +struct wl_surface; + +struct wl_egl_window { + const intptr_t version; + + int width; + int height; + int dx; + int dy; + + int attached_width; + int attached_height; + + void *driver_private; + void (*resize_callback)(struct wl_egl_window *, void *); + void (*destroy_window_callback)(void *); + + struct wl_surface *surface; +}; + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru wayland-1.14.0/egl/wayland-egl-backend.pc.in wayland-1.15.0/egl/wayland-egl-backend.pc.in --- wayland-1.14.0/egl/wayland-egl-backend.pc.in 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/egl/wayland-egl-backend.pc.in 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ + +Name: wayland-egl-backend +Description: Backend wayland-egl interface +Version: 3 +Libs: +Cflags: -I${includedir} diff -Nru wayland-1.14.0/egl/wayland-egl.c wayland-1.15.0/egl/wayland-egl.c --- wayland-1.14.0/egl/wayland-egl.c 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/egl/wayland-egl.c 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,104 @@ +/* + * Copyright © 2011 Kristian Høgsberg + * Copyright © 2011 Benjamin Franzke + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: + * Kristian Høgsberg + * Benjamin Franzke + */ + +#include +#include + +#include "wayland-egl.h" +#include "wayland-egl-backend.h" +#include "wayland-util.h" + + +WL_EXPORT void +wl_egl_window_resize(struct wl_egl_window *egl_window, + int width, int height, + int dx, int dy) +{ + if (width <= 0 || height <= 0) + return; + + egl_window->width = width; + egl_window->height = height; + egl_window->dx = dx; + egl_window->dy = dy; + + if (egl_window->resize_callback) + egl_window->resize_callback(egl_window, egl_window->driver_private); +} + +WL_EXPORT struct wl_egl_window * +wl_egl_window_create(struct wl_surface *surface, + int width, int height) +{ + struct wl_egl_window *egl_window; + + if (width <= 0 || height <= 0) + return NULL; + + egl_window = calloc(1, sizeof *egl_window); + if (!egl_window) + return NULL; + + /* Cast away the constness to set the version number. + * + * We want the const notation since it gives an explicit + * feedback to the backend implementation, should it try to + * change it. + * + * The latter in itself is not too surprising as these days APIs + * tend to provide bidirectional version field. + */ + intptr_t *version = (intptr_t *)&egl_window->version; + *version = WL_EGL_WINDOW_VERSION; + + egl_window->surface = surface; + + egl_window->width = width; + egl_window->height = height; + + return egl_window; +} + +WL_EXPORT void +wl_egl_window_destroy(struct wl_egl_window *egl_window) +{ + if (egl_window->destroy_window_callback) + egl_window->destroy_window_callback(egl_window->driver_private); + free(egl_window); +} + +WL_EXPORT void +wl_egl_window_get_attached_size(struct wl_egl_window *egl_window, + int *width, int *height) +{ + if (width) + *width = egl_window->attached_width; + if (height) + *height = egl_window->attached_height; +} diff -Nru wayland-1.14.0/egl/wayland-egl-core.h wayland-1.15.0/egl/wayland-egl-core.h --- wayland-1.14.0/egl/wayland-egl-core.h 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/egl/wayland-egl-core.h 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright © 2011 Kristian Høgsberg + * Copyright © 2011 Benjamin Franzke + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef WAYLAND_EGL_CORE_H +#define WAYLAND_EGL_CORE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define WL_EGL_PLATFORM 1 + +struct wl_egl_window; +struct wl_surface; + +struct wl_egl_window * +wl_egl_window_create(struct wl_surface *surface, + int width, int height); + +void +wl_egl_window_destroy(struct wl_egl_window *egl_window); + +void +wl_egl_window_resize(struct wl_egl_window *egl_window, + int width, int height, + int dx, int dy); + +void +wl_egl_window_get_attached_size(struct wl_egl_window *egl_window, + int *width, int *height); + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru wayland-1.14.0/egl/wayland-egl.h wayland-1.15.0/egl/wayland-egl.h --- wayland-1.14.0/egl/wayland-egl.h 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/egl/wayland-egl.h 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * Copyright © 2011 Kristian Høgsberg + * Copyright © 2011 Benjamin Franzke + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef WAYLAND_EGL_H +#define WAYLAND_EGL_H + +#include +#include "wayland-egl-core.h" + +#endif diff -Nru wayland-1.14.0/egl/wayland-egl.pc.in wayland-1.15.0/egl/wayland-egl.pc.in --- wayland-1.14.0/egl/wayland-egl.pc.in 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/egl/wayland-egl.pc.in 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: wayland-egl +Description: Frontend wayland-egl library +Version: 18.1.0 +Requires: wayland-client +Libs: -L${libdir} -lwayland-egl +Cflags: -I${includedir} diff -Nru wayland-1.14.0/egl/wayland-egl-symbols-check wayland-1.15.0/egl/wayland-egl-symbols-check --- wayland-1.14.0/egl/wayland-egl-symbols-check 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/egl/wayland-egl-symbols-check 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,51 @@ +#!/bin/sh +set -eu + +RET=0 +LIB=${WAYLAND_EGL_LIB} + +if ! test -f "$LIB"; then + echo "Test binary \"$LIB\" does not exist" + exit 99 +fi + +if ! test -n "$NM"; then + echo "nm environment variable not set" + exit 99 +fi + +AVAIL_FUNCS="$($NM -D --format=bsd --defined-only $LIB | awk '{print $3}')" + +# Official ABI, taken from the header. +REQ_FUNCS="wl_egl_window_resize +wl_egl_window_create +wl_egl_window_destroy +wl_egl_window_get_attached_size +" + +NEW_ABI=$(echo "$AVAIL_FUNCS" | while read func; do + echo "$func" | grep -q "^_" && continue + echo "$REQ_FUNCS" | grep -q "^$func$" && continue + + echo $func +done) + +if test -n "$NEW_ABI"; then + echo "New ABI detected - If intentional, update the test." + echo "$NEW_ABI" + RET=1 +fi + +REMOVED_ABI=$(echo "$REQ_FUNCS" | while read func; do + echo "$AVAIL_FUNCS" | grep -q "^$func$" && continue + + echo $func +done) + +if test -n "$REMOVED_ABI"; then + echo "ABI break detected - Required symbol(s) no longer exported!" + echo "$REMOVED_ABI" + RET=1 +fi + +exit $RET diff -Nru wayland-1.14.0/install-sh wayland-1.15.0/install-sh --- wayland-1.14.0/install-sh 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/install-sh 2018-04-09 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2014-09-12.12; # UTC +scriptversion=2016-01-11.22; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -324,41 +324,34 @@ # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; @@ -503,6 +496,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru wayland-1.14.0/ltmain.sh wayland-1.15.0/ltmain.sh --- wayland-1.14.0/ltmain.sh 2017-08-08 18:20:57.000000000 +0000 +++ wayland-1.15.0/ltmain.sh 2018-04-09 17:19:29.000000000 +0000 @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-0.1" +VERSION=2.4.6 package_revision=2.4.6 @@ -2073,7 +2073,7 @@ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . -GNU libtool home page: . +GNU libtool home page: . General help using GNU software: ." exit 0 } @@ -7272,13 +7272,10 @@ # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" @@ -7571,10 +7568,7 @@ case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then @@ -7893,19 +7887,19 @@ # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done continue fi # $pass = conv @@ -8829,9 +8823,6 @@ revision=$number_minor lt_irix_increment=no ;; - *) - func_fatal_configuration "$modename: unknown library version type '$version_type'" - ;; esac ;; no) diff -Nru wayland-1.14.0/m4/libtool.m4 wayland-1.15.0/m4/libtool.m4 --- wayland-1.14.0/m4/libtool.m4 2017-08-08 18:20:57.000000000 +0000 +++ wayland-1.15.0/m4/libtool.m4 2018-04-09 17:19:29.000000000 +0000 @@ -2867,6 +2867,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -2875,7 +2878,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2887,18 +2890,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -3558,7 +3549,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4436,7 +4427,7 @@ ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4948,9 +4939,6 @@ ;; esac ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -5013,9 +5001,6 @@ openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -5270,7 +5255,7 @@ fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5791,7 +5776,6 @@ if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -5813,7 +5797,7 @@ esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else diff -Nru wayland-1.14.0/Makefile.am wayland-1.15.0/Makefile.am --- wayland-1.14.0/Makefile.am 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/Makefile.am 2018-04-09 17:19:26.000000000 +0000 @@ -64,8 +64,6 @@ src/wayland-server-core.h \ src/wayland-client.h \ src/wayland-client-core.h \ - src/wayland-egl.h \ - src/wayland-egl-core.h \ src/wayland-version.h nodist_include_HEADERS = \ @@ -97,13 +95,17 @@ pkgconfig_DATA += src/wayland-client.pc src/wayland-server.pc protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml - $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@ +if USE_HOST_SCANNER + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code $< $@ +else + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) public-code $< $@ +endif protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml - $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@ + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header $< $@ protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml - $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@ + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header $< $@ protocol/%-server-protocol-core.h : $(top_srcdir)/protocol/%.xml $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header -c < $< > $@ @@ -114,11 +116,12 @@ BUILT_SOURCES = \ $(nodist_libwayland_server_la_SOURCES) \ $(nodist_libwayland_client_la_SOURCES) \ - $(nodist_headers_test_SOURCES) + $(nodist_headers_test_SOURCES) \ + $(nodist_display_test_SOURCES) CLEANFILES = $(BUILT_SOURCES) doc/doxygen/doxygen_sqlite3.db DISTCLEANFILES = src/wayland-version.h -EXTRA_DIST = src/wayland-version.h.in +EXTRA_DIST = @@ -143,6 +146,19 @@ -I$(top_srcdir)/src \ -DICONDIR=\"$(ICONDIR)\" +lib_LTLIBRARIES += libwayland-egl.la + +include_HEADERS += egl/wayland-egl.h +include_HEADERS += egl/wayland-egl-core.h + +libwayland_egl_la_SOURCES = egl/wayland-egl.c +libwayland_egl_la_LDFLAGS = -version-info 1 + +pkgconfig_DATA += egl/wayland-egl.pc + +## XXX: backend interface +include_HEADERS += egl/wayland-egl-backend.h +pkgconfig_DATA += egl/wayland-egl-backend.pc built_test_programs = \ array-test \ @@ -164,7 +180,13 @@ message-test \ headers-test \ compositor-introspection-test \ - protocol-logger-test + protocol-logger-test \ + wayland-egl-abi-check + +EXTRA_DIST += egl/wayland-egl-symbols-check + +check_PROGRAMS = wayland-egl-abi-check +wayland_egl_abi_check_SOURCES = egl/wayland-egl-abi-check.c if ENABLE_CPP_TEST built_test_programs += cpp-compile-test @@ -174,10 +196,13 @@ export WAYLAND_SCANNER='$(top_builddir)/wayland-scanner' \ TEST_DATA_DIR='$(top_srcdir)/tests/data' \ TEST_OUTPUT_DIR='$(top_builddir)/tests/output' \ + WAYLAND_EGL_LIB='$(top_builddir)/.libs/libwayland-egl.so' \ SED=$(SED) \ + NM='$(NM)' \ ; TESTS = $(built_test_programs) \ + egl/wayland-egl-symbols-check \ tests/scanner-test.sh noinst_PROGRAMS = \ @@ -207,6 +232,10 @@ client_test_LDADD = libtest-runner.la display_test_SOURCES = tests/display-test.c display_test_LDADD = libtest-runner.la +nodist_display_test_SOURCES = \ + protocol/tests-server-protocol.h \ + protocol/tests-client-protocol.h \ + protocol/tests-protocol.c connection_test_SOURCES = tests/connection-test.c connection_test_LDADD = libtest-runner.la event_loop_test_SOURCES = tests/event-loop-test.c @@ -260,6 +289,7 @@ exec_fd_leak_checker_LDADD = libtest-runner.la EXTRA_DIST += tests/scanner-test.sh \ + protocol/tests.xml \ tests/data/example.xml \ tests/data/example-client.h \ tests/data/example-server.h \ @@ -270,7 +300,8 @@ tests/data/small-server.h \ tests/data/small-code-core.c \ tests/data/small-client-core.h \ - tests/data/small-server-core.h + tests/data/small-server-core.h \ + tests/data/small-private-code.c tests/scanner-test.sh: $(top_builddir)/wayland-scanner diff -Nru wayland-1.14.0/Makefile.in wayland-1.15.0/Makefile.in --- wayland-1.14.0/Makefile.in 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/Makefile.in 2018-04-09 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -97,9 +97,15 @@ @ENABLE_LIBRARIES_TRUE@ libtest-runner.la @ENABLE_LIBRARIES_TRUE@am__append_3 = src/wayland-client.pc \ @ENABLE_LIBRARIES_TRUE@ src/wayland-server.pc \ -@ENABLE_LIBRARIES_TRUE@ cursor/wayland-cursor.pc +@ENABLE_LIBRARIES_TRUE@ cursor/wayland-cursor.pc \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl.pc \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl-backend.pc +@ENABLE_LIBRARIES_TRUE@check_PROGRAMS = \ +@ENABLE_LIBRARIES_TRUE@ wayland-egl-abi-check$(EXEEXT) @ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_4 = cpp-compile-test -@ENABLE_LIBRARIES_TRUE@TESTS = $(am__EXEEXT_2) tests/scanner-test.sh +@ENABLE_LIBRARIES_TRUE@TESTS = $(am__EXEEXT_2) \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl-symbols-check \ +@ENABLE_LIBRARIES_TRUE@ tests/scanner-test.sh @ENABLE_LIBRARIES_TRUE@noinst_PROGRAMS = $(am__EXEEXT_2) \ @ENABLE_LIBRARIES_TRUE@ exec-fd-leak-checker$(EXEEXT) \ @ENABLE_LIBRARIES_TRUE@ fixed-benchmark$(EXEEXT) @@ -120,8 +126,8 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = cursor/wayland-cursor.pc \ - cursor/wayland-cursor-uninstalled.pc \ - src/wayland-server-uninstalled.pc \ + cursor/wayland-cursor-uninstalled.pc egl/wayland-egl.pc \ + egl/wayland-egl-backend.pc src/wayland-server-uninstalled.pc \ src/wayland-client-uninstalled.pc \ src/wayland-scanner-uninstalled.pc src/wayland-server.pc \ src/wayland-client.pc src/wayland-scanner.pc \ @@ -209,6 +215,16 @@ $(LDFLAGS) -o $@ @ENABLE_LIBRARIES_TRUE@am_libwayland_cursor_la_rpath = -rpath \ @ENABLE_LIBRARIES_TRUE@ $(libdir) +libwayland_egl_la_LIBADD = +am__libwayland_egl_la_SOURCES_DIST = egl/wayland-egl.c +@ENABLE_LIBRARIES_TRUE@am_libwayland_egl_la_OBJECTS = \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl.lo +libwayland_egl_la_OBJECTS = $(am_libwayland_egl_la_OBJECTS) +libwayland_egl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libwayland_egl_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +@ENABLE_LIBRARIES_TRUE@am_libwayland_egl_la_rpath = -rpath $(libdir) libwayland_private_la_LIBADD = am__libwayland_private_la_SOURCES_DIST = src/connection.c \ src/wayland-os.c src/wayland-os.h src/wayland-private.h @@ -266,6 +282,7 @@ @ENABLE_LIBRARIES_TRUE@ headers-test$(EXEEXT) \ @ENABLE_LIBRARIES_TRUE@ compositor-introspection-test$(EXEEXT) \ @ENABLE_LIBRARIES_TRUE@ protocol-logger-test$(EXEEXT) \ +@ENABLE_LIBRARIES_TRUE@ wayland-egl-abi-check$(EXEEXT) \ @ENABLE_LIBRARIES_TRUE@ $(am__EXEEXT_1) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am__array_test_SOURCES_DIST = tests/array-test.c @@ -298,7 +315,10 @@ am__display_test_SOURCES_DIST = tests/display-test.c @ENABLE_LIBRARIES_TRUE@am_display_test_OBJECTS = \ @ENABLE_LIBRARIES_TRUE@ tests/display-test.$(OBJEXT) -display_test_OBJECTS = $(am_display_test_OBJECTS) +@ENABLE_LIBRARIES_TRUE@nodist_display_test_OBJECTS = \ +@ENABLE_LIBRARIES_TRUE@ protocol/tests-protocol.$(OBJEXT) +display_test_OBJECTS = $(am_display_test_OBJECTS) \ + $(nodist_display_test_OBJECTS) @ENABLE_LIBRARIES_TRUE@display_test_DEPENDENCIES = libtest-runner.la am__event_loop_test_SOURCES_DIST = tests/event-loop-test.c @ENABLE_LIBRARIES_TRUE@am_event_loop_test_OBJECTS = \ @@ -400,6 +420,11 @@ @ENABLE_LIBRARIES_TRUE@ tests/socket-test.$(OBJEXT) socket_test_OBJECTS = $(am_socket_test_OBJECTS) @ENABLE_LIBRARIES_TRUE@socket_test_DEPENDENCIES = libtest-runner.la +am__wayland_egl_abi_check_SOURCES_DIST = egl/wayland-egl-abi-check.c +@ENABLE_LIBRARIES_TRUE@am_wayland_egl_abi_check_OBJECTS = \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl-abi-check.$(OBJEXT) +wayland_egl_abi_check_OBJECTS = $(am_wayland_egl_abi_check_OBJECTS) +wayland_egl_abi_check_LDADD = $(LDADD) am__wayland_scanner_SOURCES_DIST = src/scanner.c src/dtddata.S @DTD_VALIDATION_TRUE@am__objects_1 = src/dtddata.$(OBJEXT) am_wayland_scanner_OBJECTS = src/wayland_scanner-scanner.$(OBJEXT) \ @@ -475,7 +500,7 @@ am__v_CXXLD_1 = SOURCES = $(libtest_runner_la_SOURCES) $(libwayland_client_la_SOURCES) \ $(nodist_libwayland_client_la_SOURCES) \ - $(libwayland_cursor_la_SOURCES) \ + $(libwayland_cursor_la_SOURCES) $(libwayland_egl_la_SOURCES) \ $(libwayland_private_la_SOURCES) \ $(libwayland_server_la_SOURCES) \ $(nodist_libwayland_server_la_SOURCES) \ @@ -483,19 +508,21 @@ $(client_test_SOURCES) \ $(compositor_introspection_test_SOURCES) \ $(connection_test_SOURCES) $(cpp_compile_test_SOURCES) \ - $(display_test_SOURCES) $(event_loop_test_SOURCES) \ - $(exec_fd_leak_checker_SOURCES) $(fixed_benchmark_SOURCES) \ - $(fixed_test_SOURCES) $(headers_test_SOURCES) \ - $(nodist_headers_test_SOURCES) $(interface_test_SOURCES) \ - $(list_test_SOURCES) $(map_test_SOURCES) \ - $(message_test_SOURCES) $(newsignal_test_SOURCES) \ - $(os_wrappers_test_SOURCES) $(protocol_logger_test_SOURCES) \ - $(queue_test_SOURCES) $(resources_test_SOURCES) \ - $(sanity_test_SOURCES) $(signal_test_SOURCES) \ - $(socket_test_SOURCES) $(wayland_scanner_SOURCES) + $(display_test_SOURCES) $(nodist_display_test_SOURCES) \ + $(event_loop_test_SOURCES) $(exec_fd_leak_checker_SOURCES) \ + $(fixed_benchmark_SOURCES) $(fixed_test_SOURCES) \ + $(headers_test_SOURCES) $(nodist_headers_test_SOURCES) \ + $(interface_test_SOURCES) $(list_test_SOURCES) \ + $(map_test_SOURCES) $(message_test_SOURCES) \ + $(newsignal_test_SOURCES) $(os_wrappers_test_SOURCES) \ + $(protocol_logger_test_SOURCES) $(queue_test_SOURCES) \ + $(resources_test_SOURCES) $(sanity_test_SOURCES) \ + $(signal_test_SOURCES) $(socket_test_SOURCES) \ + $(wayland_egl_abi_check_SOURCES) $(wayland_scanner_SOURCES) DIST_SOURCES = $(am__libtest_runner_la_SOURCES_DIST) \ $(am__libwayland_client_la_SOURCES_DIST) \ $(am__libwayland_cursor_la_SOURCES_DIST) \ + $(am__libwayland_egl_la_SOURCES_DIST) \ $(am__libwayland_private_la_SOURCES_DIST) \ $(am__libwayland_server_la_SOURCES_DIST) \ $(libwayland_util_la_SOURCES) $(am__array_test_SOURCES_DIST) \ @@ -520,6 +547,7 @@ $(am__sanity_test_SOURCES_DIST) \ $(am__signal_test_SOURCES_DIST) \ $(am__socket_test_SOURCES_DIST) \ + $(am__wayland_egl_abi_check_SOURCES_DIST) \ $(am__wayland_scanner_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ @@ -537,9 +565,9 @@ DATA = $(dist_aclocal_DATA) $(dist_pkgdata_DATA) $(pkgconfig_DATA) am__include_HEADERS_DIST = src/wayland-util.h src/wayland-server.h \ src/wayland-server-core.h src/wayland-client.h \ - src/wayland-client-core.h src/wayland-egl.h \ - src/wayland-egl-core.h src/wayland-version.h \ - cursor/wayland-cursor.h + src/wayland-client-core.h src/wayland-version.h \ + cursor/wayland-cursor.h egl/wayland-egl.h \ + egl/wayland-egl-core.h egl/wayland-egl-backend.h HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive @@ -750,6 +778,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/cursor/wayland-cursor-uninstalled.pc.in \ $(top_srcdir)/cursor/wayland-cursor.pc.in \ + $(top_srcdir)/egl/wayland-egl-backend.pc.in \ + $(top_srcdir)/egl/wayland-egl.pc.in \ $(top_srcdir)/protocol/wayland.dtd \ $(top_srcdir)/src/wayland-client-uninstalled.pc.in \ $(top_srcdir)/src/wayland-client.pc.in \ @@ -937,7 +967,6 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -976,7 +1005,7 @@ noinst_LTLIBRARIES = libwayland-util.la $(am__append_2) @ENABLE_LIBRARIES_TRUE@lib_LTLIBRARIES = libwayland-server.la \ @ENABLE_LIBRARIES_TRUE@ libwayland-client.la \ -@ENABLE_LIBRARIES_TRUE@ libwayland-cursor.la +@ENABLE_LIBRARIES_TRUE@ libwayland-cursor.la libwayland-egl.la @ENABLE_LIBRARIES_TRUE@libwayland_private_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) @ENABLE_LIBRARIES_TRUE@libwayland_private_la_SOURCES = \ @ENABLE_LIBRARIES_TRUE@ src/connection.c \ @@ -989,10 +1018,11 @@ @ENABLE_LIBRARIES_TRUE@ src/wayland-server-core.h \ @ENABLE_LIBRARIES_TRUE@ src/wayland-client.h \ @ENABLE_LIBRARIES_TRUE@ src/wayland-client-core.h \ -@ENABLE_LIBRARIES_TRUE@ src/wayland-egl.h \ -@ENABLE_LIBRARIES_TRUE@ src/wayland-egl-core.h \ @ENABLE_LIBRARIES_TRUE@ src/wayland-version.h \ -@ENABLE_LIBRARIES_TRUE@ cursor/wayland-cursor.h +@ENABLE_LIBRARIES_TRUE@ cursor/wayland-cursor.h \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl.h \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl-core.h \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl-backend.h @ENABLE_LIBRARIES_TRUE@nodist_include_HEADERS = \ @ENABLE_LIBRARIES_TRUE@ protocol/wayland-server-protocol.h \ @ENABLE_LIBRARIES_TRUE@ protocol/wayland-client-protocol.h @@ -1022,12 +1052,14 @@ @ENABLE_LIBRARIES_TRUE@BUILT_SOURCES = \ @ENABLE_LIBRARIES_TRUE@ $(nodist_libwayland_server_la_SOURCES) \ @ENABLE_LIBRARIES_TRUE@ $(nodist_libwayland_client_la_SOURCES) \ -@ENABLE_LIBRARIES_TRUE@ $(nodist_headers_test_SOURCES) +@ENABLE_LIBRARIES_TRUE@ $(nodist_headers_test_SOURCES) \ +@ENABLE_LIBRARIES_TRUE@ $(nodist_display_test_SOURCES) @ENABLE_LIBRARIES_TRUE@CLEANFILES = $(BUILT_SOURCES) doc/doxygen/doxygen_sqlite3.db @ENABLE_LIBRARIES_TRUE@DISTCLEANFILES = src/wayland-version.h -@ENABLE_LIBRARIES_TRUE@EXTRA_DIST = src/wayland-version.h.in \ +@ENABLE_LIBRARIES_TRUE@EXTRA_DIST = egl/wayland-egl-symbols-check \ @ENABLE_LIBRARIES_TRUE@ tests/scanner-test.sh \ +@ENABLE_LIBRARIES_TRUE@ protocol/tests.xml \ @ENABLE_LIBRARIES_TRUE@ tests/data/example.xml \ @ENABLE_LIBRARIES_TRUE@ tests/data/example-client.h \ @ENABLE_LIBRARIES_TRUE@ tests/data/example-server.h \ @@ -1038,7 +1070,8 @@ @ENABLE_LIBRARIES_TRUE@ tests/data/small-server.h \ @ENABLE_LIBRARIES_TRUE@ tests/data/small-code-core.c \ @ENABLE_LIBRARIES_TRUE@ tests/data/small-client-core.h \ -@ENABLE_LIBRARIES_TRUE@ tests/data/small-server-core.h +@ENABLE_LIBRARIES_TRUE@ tests/data/small-server-core.h \ +@ENABLE_LIBRARIES_TRUE@ tests/data/small-private-code.c @ENABLE_LIBRARIES_TRUE@libwayland_cursor_la_SOURCES = \ @ENABLE_LIBRARIES_TRUE@ cursor/wayland-cursor.c \ @ENABLE_LIBRARIES_TRUE@ cursor/os-compatibility.c \ @@ -1054,6 +1087,8 @@ @ENABLE_LIBRARIES_TRUE@ -I$(top_srcdir)/src \ @ENABLE_LIBRARIES_TRUE@ -DICONDIR=\"$(ICONDIR)\" +@ENABLE_LIBRARIES_TRUE@libwayland_egl_la_SOURCES = egl/wayland-egl.c +@ENABLE_LIBRARIES_TRUE@libwayland_egl_la_LDFLAGS = -version-info 1 @ENABLE_LIBRARIES_TRUE@built_test_programs = array-test client-test \ @ENABLE_LIBRARIES_TRUE@ display-test connection-test \ @ENABLE_LIBRARIES_TRUE@ event-loop-test fixed-test \ @@ -1063,12 +1098,16 @@ @ENABLE_LIBRARIES_TRUE@ newsignal-test resources-test \ @ENABLE_LIBRARIES_TRUE@ message-test headers-test \ @ENABLE_LIBRARIES_TRUE@ compositor-introspection-test \ -@ENABLE_LIBRARIES_TRUE@ protocol-logger-test $(am__append_4) +@ENABLE_LIBRARIES_TRUE@ protocol-logger-test \ +@ENABLE_LIBRARIES_TRUE@ wayland-egl-abi-check $(am__append_4) +@ENABLE_LIBRARIES_TRUE@wayland_egl_abi_check_SOURCES = egl/wayland-egl-abi-check.c @ENABLE_LIBRARIES_TRUE@AM_TESTS_ENVIRONMENT = \ @ENABLE_LIBRARIES_TRUE@ export WAYLAND_SCANNER='$(top_builddir)/wayland-scanner' \ @ENABLE_LIBRARIES_TRUE@ TEST_DATA_DIR='$(top_srcdir)/tests/data' \ @ENABLE_LIBRARIES_TRUE@ TEST_OUTPUT_DIR='$(top_builddir)/tests/output' \ +@ENABLE_LIBRARIES_TRUE@ WAYLAND_EGL_LIB='$(top_builddir)/.libs/libwayland-egl.so' \ @ENABLE_LIBRARIES_TRUE@ SED=$(SED) \ +@ENABLE_LIBRARIES_TRUE@ NM='$(NM)' \ @ENABLE_LIBRARIES_TRUE@ ; @ENABLE_LIBRARIES_TRUE@libtest_runner_la_SOURCES = \ @@ -1091,6 +1130,11 @@ @ENABLE_LIBRARIES_TRUE@client_test_LDADD = libtest-runner.la @ENABLE_LIBRARIES_TRUE@display_test_SOURCES = tests/display-test.c @ENABLE_LIBRARIES_TRUE@display_test_LDADD = libtest-runner.la +@ENABLE_LIBRARIES_TRUE@nodist_display_test_SOURCES = \ +@ENABLE_LIBRARIES_TRUE@ protocol/tests-server-protocol.h \ +@ENABLE_LIBRARIES_TRUE@ protocol/tests-client-protocol.h \ +@ENABLE_LIBRARIES_TRUE@ protocol/tests-protocol.c + @ENABLE_LIBRARIES_TRUE@connection_test_SOURCES = tests/connection-test.c @ENABLE_LIBRARIES_TRUE@connection_test_LDADD = libtest-runner.la @ENABLE_LIBRARIES_TRUE@event_loop_test_SOURCES = tests/event-loop-test.c @@ -1195,6 +1239,10 @@ cd $(top_builddir) && $(SHELL) ./config.status $@ cursor/wayland-cursor-uninstalled.pc: $(top_builddir)/config.status $(top_srcdir)/cursor/wayland-cursor-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +egl/wayland-egl.pc: $(top_builddir)/config.status $(top_srcdir)/egl/wayland-egl.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +egl/wayland-egl-backend.pc: $(top_builddir)/config.status $(top_srcdir)/egl/wayland-egl-backend.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ src/wayland-server-uninstalled.pc: $(top_builddir)/config.status $(top_srcdir)/src/wayland-server-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ src/wayland-client-uninstalled.pc: $(top_builddir)/config.status $(top_srcdir)/src/wayland-client-uninstalled.pc.in @@ -1304,6 +1352,16 @@ libwayland-cursor.la: $(libwayland_cursor_la_OBJECTS) $(libwayland_cursor_la_DEPENDENCIES) $(EXTRA_libwayland_cursor_la_DEPENDENCIES) $(AM_V_CCLD)$(libwayland_cursor_la_LINK) $(am_libwayland_cursor_la_rpath) $(libwayland_cursor_la_OBJECTS) $(libwayland_cursor_la_LIBADD) $(LIBS) +egl/$(am__dirstamp): + @$(MKDIR_P) egl + @: > egl/$(am__dirstamp) +egl/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) egl/$(DEPDIR) + @: > egl/$(DEPDIR)/$(am__dirstamp) +egl/wayland-egl.lo: egl/$(am__dirstamp) egl/$(DEPDIR)/$(am__dirstamp) + +libwayland-egl.la: $(libwayland_egl_la_OBJECTS) $(libwayland_egl_la_DEPENDENCIES) $(EXTRA_libwayland_egl_la_DEPENDENCIES) + $(AM_V_CCLD)$(libwayland_egl_la_LINK) $(am_libwayland_egl_la_rpath) $(libwayland_egl_la_OBJECTS) $(libwayland_egl_la_LIBADD) $(LIBS) src/libwayland_private_la-connection.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/libwayland_private_la-wayland-os.lo: src/$(am__dirstamp) \ @@ -1377,6 +1435,15 @@ echo " rm -f" $$list; \ rm -f $$list +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ @@ -1417,6 +1484,8 @@ $(AM_V_CXXLD)$(CXXLINK) $(cpp_compile_test_OBJECTS) $(cpp_compile_test_LDADD) $(LIBS) tests/display-test.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) +protocol/tests-protocol.$(OBJEXT): protocol/$(am__dirstamp) \ + protocol/$(DEPDIR)/$(am__dirstamp) display-test$(EXEEXT): $(display_test_OBJECTS) $(display_test_DEPENDENCIES) $(EXTRA_display_test_DEPENDENCIES) @rm -f display-test$(EXEEXT) @@ -1529,6 +1598,12 @@ socket-test$(EXEEXT): $(socket_test_OBJECTS) $(socket_test_DEPENDENCIES) $(EXTRA_socket_test_DEPENDENCIES) @rm -f socket-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(socket_test_OBJECTS) $(socket_test_LDADD) $(LIBS) +egl/wayland-egl-abi-check.$(OBJEXT): egl/$(am__dirstamp) \ + egl/$(DEPDIR)/$(am__dirstamp) + +wayland-egl-abi-check$(EXEEXT): $(wayland_egl_abi_check_OBJECTS) $(wayland_egl_abi_check_DEPENDENCIES) $(EXTRA_wayland_egl_abi_check_DEPENDENCIES) + @rm -f wayland-egl-abi-check$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wayland_egl_abi_check_OBJECTS) $(wayland_egl_abi_check_LDADD) $(LIBS) src/wayland_scanner-scanner.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dtddata.$(OBJEXT): src/$(am__dirstamp) \ @@ -1542,6 +1617,8 @@ -rm -f *.$(OBJEXT) -rm -f cursor/*.$(OBJEXT) -rm -f cursor/*.lo + -rm -f egl/*.$(OBJEXT) + -rm -f egl/*.lo -rm -f protocol/*.$(OBJEXT) -rm -f protocol/*.lo -rm -f src/*.$(OBJEXT) @@ -1555,8 +1632,11 @@ @AMDEP_TRUE@@am__include@ @am__quote@cursor/$(DEPDIR)/libwayland_cursor_la-os-compatibility.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cursor/$(DEPDIR)/libwayland_cursor_la-wayland-cursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cursor/$(DEPDIR)/libwayland_cursor_la-xcursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@egl/$(DEPDIR)/wayland-egl-abi-check.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@egl/$(DEPDIR)/wayland-egl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@protocol/$(DEPDIR)/libwayland_client_la-wayland-protocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@protocol/$(DEPDIR)/libwayland_server_la-wayland-protocol.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@protocol/$(DEPDIR)/tests-protocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dtddata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwayland_client_la-wayland-client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwayland_private_la-connection.Plo@am__quote@ @@ -1772,6 +1852,7 @@ clean-libtool: -rm -rf .libs _libs -rm -rf cursor/.libs cursor/_libs + -rm -rf egl/.libs egl/_libs -rm -rf protocol/.libs protocol/_libs -rm -rf src/.libs src/_libs -rm -rf tests/.libs tests/_libs @@ -2120,7 +2201,7 @@ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; -recheck: all +recheck: all $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ @@ -2271,6 +2352,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +wayland-egl-abi-check.log: wayland-egl-abi-check$(EXEEXT) + @p='wayland-egl-abi-check$(EXEEXT)'; \ + b='wayland-egl-abi-check'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) cpp-compile-test.log: cpp-compile-test$(EXEEXT) @p='cpp-compile-test$(EXEEXT)'; \ b='cpp-compile-test'; \ @@ -2278,6 +2366,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +egl/wayland-egl-symbols-check.log: egl/wayland-egl-symbols-check + @p='egl/wayland-egl-symbols-check'; \ + b='egl/wayland-egl-symbols-check'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tests/scanner-test.sh.log: tests/scanner-test.sh @p='tests/scanner-test.sh'; \ b='tests/scanner-test.sh'; \ @@ -2365,7 +2460,7 @@ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -2390,7 +2485,7 @@ @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -2408,7 +2503,7 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -2418,7 +2513,7 @@ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -2488,6 +2583,7 @@ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive @@ -2533,6 +2629,8 @@ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f cursor/$(DEPDIR)/$(am__dirstamp) -rm -f cursor/$(am__dirstamp) + -rm -f egl/$(DEPDIR)/$(am__dirstamp) + -rm -f egl/$(am__dirstamp) -rm -f protocol/$(DEPDIR)/$(am__dirstamp) -rm -f protocol/$(am__dirstamp) -rm -f src/$(DEPDIR)/$(am__dirstamp) @@ -2548,13 +2646,13 @@ @ENABLE_LIBRARIES_FALSE@clean-local: clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-local clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS mostlyclean-am +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf cursor/$(DEPDIR) protocol/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) + -rm -rf cursor/$(DEPDIR) egl/$(DEPDIR) protocol/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags @@ -2604,7 +2702,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf cursor/$(DEPDIR) protocol/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) + -rm -rf cursor/$(DEPDIR) egl/$(DEPDIR) protocol/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -2631,9 +2729,10 @@ .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-TESTS check-am clean clean-binPROGRAMS \ - clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-local clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + clean-checkPROGRAMS clean-cscope clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ @@ -2661,13 +2760,14 @@ @USE_HOST_SCANNER_FALSE@$(BUILT_SOURCES) : wayland-scanner @ENABLE_LIBRARIES_TRUE@protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml -@ENABLE_LIBRARIES_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@ +@ENABLE_LIBRARIES_TRUE@@USE_HOST_SCANNER_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code $< $@ +@ENABLE_LIBRARIES_TRUE@@USE_HOST_SCANNER_FALSE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) public-code $< $@ @ENABLE_LIBRARIES_TRUE@protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml -@ENABLE_LIBRARIES_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@ +@ENABLE_LIBRARIES_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header $< $@ @ENABLE_LIBRARIES_TRUE@protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml -@ENABLE_LIBRARIES_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@ +@ENABLE_LIBRARIES_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header $< $@ @ENABLE_LIBRARIES_TRUE@protocol/%-server-protocol-core.h : $(top_srcdir)/protocol/%.xml @ENABLE_LIBRARIES_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header -c < $< > $@ diff -Nru wayland-1.14.0/missing wayland-1.15.0/missing --- wayland-1.14.0/missing 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/missing 2018-04-09 17:19:31.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -210,6 +210,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru wayland-1.14.0/protocol/tests.xml wayland-1.15.0/protocol/tests.xml --- wayland-1.14.0/protocol/tests.xml 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/protocol/tests.xml 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,52 @@ + + + + + Copyright © 2017 Samsung Electronics Co., Ltd + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice (including the + next paragraph) shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + + A trivial interface for fd passing tests. + + + + + + + + + + + + + + + Tells this fd passer object about another one to send events + to for more complicated fd leak tests. + + + + + diff -Nru wayland-1.14.0/protocol/wayland.xml wayland-1.15.0/protocol/wayland.xml --- wayland-1.14.0/protocol/wayland.xml 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/protocol/wayland.xml 2018-04-09 17:19:26.000000000 +0000 @@ -57,6 +57,12 @@ This request creates a registry object that allows the client to list and bind the global objects available from the compositor. + + It should be noted that the server side resources consumed in + response to a get_registry request can only be released when the + client disconnects, not when the client side proxy is destroyed. + Therefore, clients should invoke get_registry as infrequently as + possible to avoid wasting memory. @@ -970,6 +976,9 @@ It allows clients to associate a wl_shell_surface with a basic surface. + + Note! This protocol is deprecated and not intended for production use. + For desktop-style user interfaces, use xdg_shell. @@ -2568,6 +2577,14 @@ The to-be sub-surface must not already have another role, and it must not have an existing wl_subsurface object. Otherwise a protocol error is raised. + + Adding sub-surfaces to a parent is a double-buffered operation on the + parent (see wl_surface.commit). The effect of adding a sub-surface + becomes visible on the next time the state of the parent surface is + applied. + + This request modifies the behaviour of wl_surface.commit request on + the sub-surface, see the documentation on wl_subsurface interface. @@ -2637,7 +2654,7 @@ that was turned into a sub-surface with a wl_subcompositor.get_subsurface request. The wl_surface's association to the parent is deleted, and the wl_surface loses its role as - a sub-surface. The wl_surface is unmapped. + a sub-surface. The wl_surface is unmapped immediately. diff -Nru wayland-1.14.0/publish-doc wayland-1.15.0/publish-doc --- wayland-1.14.0/publish-doc 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/publish-doc 2018-06-07 09:09:14.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +[ -e doc ] || (echo "Run this from the project root" && exit 1) + +make + +DOC_HTML=./doc/publican/Wayland/en-US/html/ + +[ -e "${DOC_HTML}" ] || (echo "HTML documentation failed to build at ${DOC_HTML}" && exit 1) + +chmod -R g+x ${DOC_HTML} + +rsync --delete -avz ${DOC_HTML} freedesktop.org:/srv/wayland.freedesktop.org/www/docs/html/ diff -Nru wayland-1.14.0/src/connection.c wayland-1.15.0/src/connection.c --- wayland-1.14.0/src/connection.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/connection.c 2018-04-09 17:19:26.000000000 +0000 @@ -178,7 +178,7 @@ int32_t fds[sizeof(buffer->data) / sizeof(int32_t)], i, count; size_t size; - size = buffer->head - buffer->tail; + size = wl_buffer_size(buffer); if (size == 0) return; @@ -186,11 +186,18 @@ count = size / sizeof fds[0]; if (max > 0 && max < count) count = max; + size = count * sizeof fds[0]; for (i = 0; i < count; i++) close(fds[i]); buffer->tail += size; } +void +wl_connection_close_fds_in(struct wl_connection *connection, int max) +{ + close_fds(&connection->fds_in, max); +} + int wl_connection_destroy(struct wl_connection *connection) { @@ -221,7 +228,7 @@ struct cmsghdr *cmsg; size_t size; - size = buffer->head - buffer->tail; + size = wl_buffer_size(buffer); if (size > MAX_FDS_OUT * sizeof(int32_t)) size = MAX_FDS_OUT * sizeof(int32_t); @@ -523,16 +530,26 @@ } } -struct wl_closure * -wl_closure_marshal(struct wl_object *sender, uint32_t opcode, - union wl_argument *args, - const struct wl_message *message) +static void +wl_closure_clear_fds(struct wl_closure *closure) { - struct wl_closure *closure; - struct wl_object *object; - int i, count, fd, dup_fd; - const char *signature; + const char *signature = closure->message->signature; struct argument_details arg; + int i; + + for (i = 0; i < closure->count; i++) { + signature = get_next_argument(signature, &arg); + if (arg.type == 'h') + closure->args[i].h = -1; + } +} + +static struct wl_closure * +wl_closure_init(const struct wl_message *message, uint32_t size, + int *num_arrays, union wl_argument *args) +{ + struct wl_closure *closure; + int count; count = arg_count_for_signature(message->signature); if (count > WL_CLOSURE_MAX_ARGS) { @@ -541,13 +558,52 @@ return NULL; } - closure = malloc(sizeof *closure); - if (closure == NULL) { + if (size) { + *num_arrays = wl_message_count_arrays(message); + closure = malloc(sizeof *closure + size + + *num_arrays * sizeof(struct wl_array)); + } else { + closure = malloc(sizeof *closure); + } + + if (!closure) { errno = ENOMEM; return NULL; } - memcpy(closure->args, args, count * sizeof *args); + if (args) + memcpy(closure->args, args, count * sizeof *args); + + closure->message = message; + closure->count = count; + + /* Set these all to -1 so we can close any that have been + * set to a real value during wl_closure_destroy(). + * We may have copied a bunch of fds into the closure with + * memcpy previously, but those are undup()d client fds + * that we would have replaced anyway. + */ + wl_closure_clear_fds(closure); + + return closure; +} + +struct wl_closure * +wl_closure_marshal(struct wl_object *sender, uint32_t opcode, + union wl_argument *args, + const struct wl_message *message) +{ + struct wl_closure *closure; + struct wl_object *object; + int i, count, fd, dup_fd; + const char *signature; + struct argument_details arg; + + closure = wl_closure_init(message, 0, NULL, args); + if (closure == NULL) + return NULL; + + count = closure->count; signature = message->signature; for (i = 0; i < count; i++) { @@ -592,8 +648,6 @@ closure->sender_id = sender->id; closure->opcode = opcode; - closure->message = message; - closure->count = count; return closure; @@ -627,28 +681,20 @@ uint32_t *p, *next, *end, length, id; int fd; char *s; - unsigned int i, count, num_arrays; + int i, count, num_arrays; const char *signature; struct argument_details arg; struct wl_closure *closure; - struct wl_array *array, *array_extra; - - count = arg_count_for_signature(message->signature); - if (count > WL_CLOSURE_MAX_ARGS) { - wl_log("too many args (%d)\n", count); - errno = EINVAL; - wl_connection_consume(connection, size); - return NULL; - } + struct wl_array *array_extra; - num_arrays = wl_message_count_arrays(message); - closure = malloc(sizeof *closure + size + num_arrays * sizeof *array); + closure = wl_closure_init(message, size, &num_arrays, NULL); if (closure == NULL) { - errno = ENOMEM; wl_connection_consume(connection, size); return NULL; } + count = closure->count; + array_extra = closure->extra; p = (uint32_t *)(closure->extra + num_arrays); end = p + size / sizeof *p; @@ -664,7 +710,8 @@ if (arg.type != 'h' && p + 1 > end) { wl_log("message too short, " "object (%d), message %s(%s)\n", - *p, message->name, message->signature); + closure->sender_id, message->name, + message->signature); errno = EINVAL; goto err; } @@ -783,9 +830,6 @@ } } - closure->count = count; - closure->message = message; - wl_connection_consume(connection, size); return closure; @@ -797,6 +841,23 @@ return NULL; } +bool +wl_object_is_zombie(struct wl_map *map, uint32_t id) +{ + uint32_t flags; + + /* Zombie objects only exist on the client side. */ + if (map->side == WL_MAP_SERVER_SIDE) + return false; + + /* Zombie objects can only have been created by the client. */ + if (id >= WL_SERVER_ID_START) + return false; + + flags = wl_map_lookup_flags(map, id); + return !!(flags & WL_MAP_ENTRY_ZOMBIE); +} + int wl_closure_lookup_objects(struct wl_closure *closure, struct wl_map *objects) { @@ -818,7 +879,7 @@ closure->args[i].o = NULL; object = wl_map_lookup(objects, id); - if (object == WL_ZOMBIE_OBJECT) { + if (wl_object_is_zombie(objects, id)) { /* references object we've already * destroyed client side */ object = NULL; @@ -933,6 +994,8 @@ opcode, target->interface->name); } ffi_call(&cif, implementation[opcode], NULL, ffi_args); + + wl_closure_clear_fds(closure); } void @@ -941,6 +1004,8 @@ { dispatcher(target->implementation, target, opcode, closure->message, closure->args); + + wl_closure_clear_fds(closure); } static int @@ -965,6 +1030,7 @@ "can't send file descriptor"); return -1; } + closure->args[i].h = -1; } return 0; @@ -1234,8 +1300,29 @@ fprintf(stderr, ")\n"); } +static int +wl_closure_close_fds(struct wl_closure *closure) +{ + int i; + struct argument_details arg; + const char *signature = closure->message->signature; + + for (i = 0; i < closure->count; i++) { + signature = get_next_argument(signature, &arg); + if (arg.type == 'h' && closure->args[i].h != -1) + close(closure->args[i].h); + } + + return 0; +} + void wl_closure_destroy(struct wl_closure *closure) { + /* wl_closure_destroy has free() semantics */ + if (!closure) + return; + + wl_closure_close_fds(closure); free(closure); } diff -Nru wayland-1.14.0/src/event-loop.c wayland-1.15.0/src/event-loop.c --- wayland-1.14.0/src/event-loop.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/event-loop.c 2018-04-09 17:19:26.000000000 +0000 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -42,6 +43,8 @@ #include "wayland-server-core.h" #include "wayland-os.h" +/** \cond INTERNAL */ + struct wl_event_loop { int epoll_fd; struct wl_list check_list; @@ -70,6 +73,8 @@ int fd; }; +/** \endcond */ + static int wl_event_source_fd_dispatch(struct wl_event_source *source, struct epoll_event *ep) @@ -125,6 +130,30 @@ return source; } +/** Create a file descriptor event source + * + * \param loop The event loop that will process the new source. + * \param fd The file descriptor to watch. + * \param mask A bitwise-or of which events to watch for: \c WL_EVENT_READABLE, + * \c WL_EVENT_WRITABLE. + * \param func The file descriptor dispatch function. + * \param data User data. + * \return A new file descriptor event source. + * + * The given file descriptor is initially watched for the events given in + * \c mask. This can be changed as needed with wl_event_source_fd_update(). + * + * If it is possible that program execution causes the file descriptor to be + * read while leaving the data in a buffer without actually processing it, + * it may be necessary to register the file descriptor source to be re-checked, + * see wl_event_source_check(). This will ensure that the dispatch function + * gets called even if the file descriptor is not readable or writable + * anymore. This is especially useful with IPC libraries that automatically + * buffer incoming data, possibly as a side-effect of other operations. + * + * \sa wl_event_loop_fd_func_t + * \memberof wl_event_source + */ WL_EXPORT struct wl_event_source * wl_event_loop_add_fd(struct wl_event_loop *loop, int fd, uint32_t mask, @@ -145,6 +174,26 @@ return add_source(loop, &source->base, mask, data); } +/** Update a file descriptor source's event mask + * + * \param source The file descriptor event source to update. + * \param mask The new mask, a bitwise-or of: \c WL_EVENT_READABLE, + * \c WL_EVENT_WRITABLE. + * \return 0 on success, -1 on failure. + * + * This changes which events, readable and/or writable, cause the dispatch + * callback to be called on. + * + * File descriptors are usually writable to begin with, so they do not need to + * be polled for writable until a write actually fails. When a write fails, + * the event mask can be changed to poll for readable and writable, delivering + * a dispatch callback when it is possible to write more. Once all data has + * been written, the mask can be changed to poll only for readable to avoid + * busy-looping on dispatch. + * + * \sa wl_event_loop_add_fd() + * \memberof wl_event_source + */ WL_EXPORT int wl_event_source_fd_update(struct wl_event_source *source, uint32_t mask) { @@ -161,11 +210,15 @@ return epoll_ctl(loop->epoll_fd, EPOLL_CTL_MOD, source->fd, &ep); } +/** \cond INTERNAL */ + struct wl_event_source_timer { struct wl_event_source base; wl_event_loop_timer_func_t func; }; +/** \endcond */ + static int wl_event_source_timer_dispatch(struct wl_event_source *source, struct epoll_event *ep) @@ -187,6 +240,19 @@ wl_event_source_timer_dispatch, }; +/** Create a timer event source + * + * \param loop The event loop that will process the new source. + * \param func The timer dispatch function. + * \param data User data. + * \return A new timer event source. + * + * The timer is initially disarmed. It needs to be armed with a call to + * wl_event_source_timer_update() before it can trigger a dispatch call. + * + * \sa wl_event_loop_timer_func_t + * \memberof wl_event_source + */ WL_EXPORT struct wl_event_source * wl_event_loop_add_timer(struct wl_event_loop *loop, wl_event_loop_timer_func_t func, @@ -206,6 +272,22 @@ return add_source(loop, &source->base, WL_EVENT_READABLE, data); } +/** Arm or disarm a timer + * + * \param source The timer event source to modify. + * \param ms_delay The timeout in milliseconds. + * \return 0 on success, -1 on failure. + * + * If the timeout is zero, the timer is disarmed. + * + * If the timeout is non-zero, the timer is set to expire after the given + * timeout in milliseconds. When the timer expires, the dispatch function + * set with wl_event_loop_add_timer() is called once from + * wl_event_loop_dispatch(). If another dispatch is desired after another + * expiry, wl_event_source_timer_update() needs to be called again. + * + * \memberof wl_event_source + */ WL_EXPORT int wl_event_source_timer_update(struct wl_event_source *source, int ms_delay) { @@ -221,12 +303,16 @@ return 0; } +/** \cond INTERNAL */ + struct wl_event_source_signal { struct wl_event_source base; int signal_number; wl_event_loop_signal_func_t func; }; +/** \endcond */ + static int wl_event_source_signal_dispatch(struct wl_event_source *source, struct epoll_event *ep) @@ -249,6 +335,25 @@ wl_event_source_signal_dispatch, }; +/** Create a POSIX signal event source + * + * \param loop The event loop that will process the new source. + * \param signal_number Number of the signal to watch for. + * \param func The signal dispatch function. + * \param data User data. + * \return A new signal event source. + * + * This function blocks the normal delivery of the given signal in the calling + * thread, and creates a "watch" for it. Signal delivery no longer happens + * asynchronously, but by wl_event_loop_dispatch() calling the dispatch + * callback function \c func. + * + * It is the caller's responsibility to ensure that all other threads have + * also blocked the signal. + * + * \sa wl_event_loop_signal_func_t + * \memberof wl_event_source + */ WL_EXPORT struct wl_event_source * wl_event_loop_add_signal(struct wl_event_loop *loop, int signal_number, @@ -275,15 +380,39 @@ return add_source(loop, &source->base, WL_EVENT_READABLE, data); } +/** \cond INTERNAL */ + struct wl_event_source_idle { struct wl_event_source base; wl_event_loop_idle_func_t func; }; +/** \endcond */ + struct wl_event_source_interface idle_source_interface = { NULL, }; +/** Create an idle task + * + * \param loop The event loop that will process the new task. + * \param func The idle task dispatch function. + * \param data User data. + * \return A new idle task (an event source). + * + * Idle tasks are dispatched before wl_event_loop_dispatch() goes to sleep. + * See wl_event_loop_dispatch() for more details. + * + * Idle tasks fire once, and are automatically destroyed right after the + * callback function has been called. + * + * An idle task can be cancelled before the callback has been called by + * wl_event_source_remove(). Calling wl_event_source_remove() after or from + * within the callback results in undefined behaviour. + * + * \sa wl_event_loop_idle_func_t + * \memberof wl_event_source + */ WL_EXPORT struct wl_event_source * wl_event_loop_add_idle(struct wl_event_loop *loop, wl_event_loop_idle_func_t func, @@ -307,12 +436,40 @@ return &source->base; } +/** Mark event source to be re-checked + * + * \param source The event source to be re-checked. + * + * This function permanently marks the event source to be re-checked after + * the normal dispatch of sources in wl_event_loop_dispatch(). Re-checking + * will keep iterating over all such event sources until the dispatch + * function for them all returns zero. + * + * Re-checking is used on sources that may become ready to dispatch as a + * side-effect of dispatching themselves or other event sources, including idle + * sources. Re-checking ensures all the incoming events have been fully drained + * before wl_event_loop_dispatch() returns. + * + * \memberof wl_event_source + */ WL_EXPORT void wl_event_source_check(struct wl_event_source *source) { wl_list_insert(source->loop->check_list.prev, &source->link); } +/** Remove an event source from its event loop + * + * \param source The event source to be removed. + * \return Zero. + * + * The event source is removed from the event loop it was created for, + * and is effectively destroyed. This invalidates \c source . + * The dispatch function of the source will no longer be called through this + * source. + * + * \memberof wl_event_source + */ WL_EXPORT int wl_event_source_remove(struct wl_event_source *source) { @@ -343,6 +500,20 @@ wl_list_init(&loop->destroy_list); } +/** Create a new event loop context + * + * \return A new event loop context object. + * + * This creates a new event loop context. Initially this context is empty. + * Event sources need to be explicitly added to it. + * + * Normally the event loop is run by calling wl_event_loop_dispatch() in + * a loop until the program terminates. Alternatively, an event loop can be + * embedded in another event loop by its file descriptor, see + * wl_event_loop_get_fd(). + * + * \memberof wl_event_loop + */ WL_EXPORT struct wl_event_loop * wl_event_loop_create(void) { @@ -366,6 +537,19 @@ return loop; } +/** Destroy an event loop context + * + * \param loop The event loop to be destroyed. + * + * This emits the event loop destroy signal, closes the event loop file + * descriptor, and frees \c loop. + * + * If the event loop has existing sources, those cannot be safely removed + * afterwards. Therefore one must call wl_event_source_remove() on all + * event sources before destroying the event loop context. + * + * \memberof wl_event_loop + */ WL_EXPORT void wl_event_loop_destroy(struct wl_event_loop *loop) { @@ -376,21 +560,35 @@ free(loop); } -static int +static bool post_dispatch_check(struct wl_event_loop *loop) { struct epoll_event ep; struct wl_event_source *source, *next; - int n; + bool needs_recheck = false; ep.events = 0; - n = 0; - wl_list_for_each_safe(source, next, &loop->check_list, link) - n += source->interface->dispatch(source, &ep); + wl_list_for_each_safe(source, next, &loop->check_list, link) { + int dispatch_result; - return n; + dispatch_result = source->interface->dispatch(source, &ep); + if (dispatch_result < 0) { + wl_log("Source dispatch function returned negative value!"); + wl_log("This would previously accidentally suppress a follow-up dispatch"); + } + needs_recheck |= dispatch_result != 0; + } + + return needs_recheck; } +/** Dispatch the idle sources + * + * \param loop The event loop whose idle sources are dispatched. + * + * \sa wl_event_loop_add_idle() + * \memberof wl_event_loop + */ WL_EXPORT void wl_event_loop_dispatch_idle(struct wl_event_loop *loop) { @@ -404,12 +602,32 @@ } } +/** Wait for events and dispatch them + * + * \param loop The event loop whose sources to wait for. + * \param timeout The polling timeout in milliseconds. + * \return 0 for success, -1 for polling error. + * + * All the associated event sources are polled. This function blocks until + * any event source delivers an event (idle sources excluded), or the timeout + * expires. A timeout of -1 disables the timeout, causing the function to block + * indefinitely. A timeout of zero causes the poll to always return immediately. + * + * All idle sources are dispatched before blocking. An idle source is destroyed + * when it is dispatched. After blocking, all other ready sources are + * dispatched. Then, idle sources are dispatched again, in case the dispatched + * events created idle sources. Finally, all sources marked with + * wl_event_source_check() are dispatched in a loop until their dispatch + * functions all return zero. + * + * \memberof wl_event_loop + */ WL_EXPORT int wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout) { struct epoll_event ep[32]; struct wl_event_source *source; - int i, count, n; + int i, count; wl_event_loop_dispatch_idle(loop); @@ -427,19 +645,41 @@ wl_event_loop_dispatch_idle(loop); - do { - n = post_dispatch_check(loop); - } while (n > 0); + while (post_dispatch_check(loop)); return 0; } +/** Get the event loop file descriptor + * + * \param loop The event loop context. + * \return The aggregate file descriptor. + * + * This function returns the aggregate file descriptor, that represents all + * the event sources (idle sources excluded) associated with the given event + * loop context. When any event source makes an event available, it will be + * reflected in the aggregate file descriptor. + * + * When the aggregate file descriptor delivers an event, one can call + * wl_event_loop_dispatch() on the event loop context to dispatch all the + * available events. + * + * \memberof wl_event_loop + */ WL_EXPORT int wl_event_loop_get_fd(struct wl_event_loop *loop) { return loop->epoll_fd; } +/** Register a destroy listener for an event loop context + * + * \param loop The event loop context whose destruction to listen for. + * \param listener The listener with the callback to be called. + * + * \sa wl_listener + * \memberof wl_event_loop + */ WL_EXPORT void wl_event_loop_add_destroy_listener(struct wl_event_loop *loop, struct wl_listener *listener) @@ -447,10 +687,18 @@ wl_signal_add(&loop->destroy_signal, listener); } +/** Get the listener struct for the specified callback + * + * \param loop The event loop context to inspect. + * \param notify The destroy callback to find. + * \return The wl_listener registered to the event loop context with + * the given callback pointer. + * + * \memberof wl_event_loop + */ WL_EXPORT struct wl_listener * wl_event_loop_get_destroy_listener(struct wl_event_loop *loop, wl_notify_func_t notify) { return wl_signal_get(&loop->destroy_signal, notify); } - diff -Nru wayland-1.14.0/src/scanner.c wayland-1.15.0/src/scanner.c --- wayland-1.14.0/src/scanner.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/scanner.c 2018-04-09 17:19:26.000000000 +0000 @@ -57,22 +57,32 @@ SERVER, }; +enum visibility { + PRIVATE, + PUBLIC, +}; + static int usage(int ret) { - fprintf(stderr, "usage: %s [OPTION] [client-header|server-header|code]" + fprintf(stderr, "usage: %s [OPTION] [client-header|server-header|private-code|public-code]" " [input_file output_file]\n", PROGRAM_NAME); fprintf(stderr, "\n"); fprintf(stderr, "Converts XML protocol descriptions supplied on " "stdin or input file to client\n" - "headers, server headers, or protocol marshalling code.\n\n"); + "headers, server headers, or protocol marshalling code.\n\n" + "Use \"public-code\" only if the marshalling code will be public - " + "aka DSO will export it while other components will be using it.\n" + "Using \"private-code\" is strongly recommended.\n\n"); fprintf(stderr, "options:\n"); fprintf(stderr, " -h, --help display this help and exit.\n" " -v, --version print the wayland library version that\n" " the scanner was built against.\n" - " -c, --include-core-only include the core version of the headers,\n" - " that is e.g. wayland-client-core.h instead\n" - " of wayland-client.h.\n"); + " -c, --include-core-only include the core version of the headers,\n" + " that is e.g. wayland-client-core.h instead\n" + " of wayland-client.h.\n" + " -s, --strict exit immediately with an error if DTD\n" + " verification fails.\n"); exit(ret); } @@ -1712,9 +1722,11 @@ printf("};\n\n"); } + static void -emit_code(struct protocol *protocol) +emit_code(struct protocol *protocol, enum visibility vis) { + const char *symbol_visibility; struct interface *i, *next; struct wl_array types; char **p, *prev; @@ -1728,6 +1740,23 @@ "#include \n" "#include \"wayland-util.h\"\n\n"); + /* When building a shared library symbols must be exported, otherwise + * we want to have the symbols hidden. */ + if (vis == PRIVATE) { + symbol_visibility = "WL_PRIVATE"; + printf("#ifndef __has_attribute\n" + "# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */\n" + "#endif\n\n"); + + printf("#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)\n" + "#define WL_PRIVATE __attribute__ ((visibility(\"hidden\")))\n" + "#else\n" + "#define WL_PRIVATE\n" + "#endif\n\n"); + } else { + symbol_visibility = "WL_EXPORT"; + } + wl_array_init(&types); wl_list_for_each(i, &protocol->interface_list, link) { emit_types_forward_declarations(protocol, &i->request_list, &types); @@ -1757,10 +1786,10 @@ emit_messages(&i->request_list, i, "requests"); emit_messages(&i->event_list, i, "events"); - printf("WL_EXPORT const struct wl_interface " + printf("%s const struct wl_interface " "%s_interface = {\n" "\t\"%s\", %d,\n", - i->name, i->name, i->version); + symbol_visibility, i->name, i->name, i->version); if (!wl_list_empty(&i->request_list)) printf("\t%d, %s_requests,\n", @@ -1801,11 +1830,14 @@ bool help = false; bool core_headers = false; bool version = false; + bool strict = false; bool fail = false; int opt; enum { CLIENT_HEADER, SERVER_HEADER, + PRIVATE_CODE, + PUBLIC_CODE, CODE, } mode; @@ -1813,11 +1845,12 @@ { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'v' }, { "include-core-only", no_argument, NULL, 'c' }, + { "strict", no_argument, NULL, 's' }, { 0, 0, NULL, 0 } }; while (1) { - opt = getopt_long(argc, argv, "hvc", options, NULL); + opt = getopt_long(argc, argv, "hvcs", options, NULL); if (opt == -1) break; @@ -1832,6 +1865,9 @@ case 'c': core_headers = true; break; + case 's': + strict = true; + break; default: fail = true; break; @@ -1853,6 +1889,10 @@ mode = CLIENT_HEADER; else if (strcmp(argv[0], "server-header") == 0) mode = SERVER_HEADER; + else if (strcmp(argv[0], "private-code") == 0) + mode = PRIVATE_CODE; + else if (strcmp(argv[0], "public-code") == 0) + mode = PUBLIC_CODE; else if (strcmp(argv[0], "code") == 0) mode = CODE; else @@ -1894,6 +1934,10 @@ "* WARNING: XML failed validation against built-in DTD *\n" "* *\n" "*******************************************************\n"); + if (strict) { + fclose(input); + exit(EXIT_FAILURE); + } } /* create XML parser */ @@ -1936,8 +1980,17 @@ case SERVER_HEADER: emit_header(&protocol, SERVER); break; + case PRIVATE_CODE: + emit_code(&protocol, PRIVATE); + break; case CODE: - emit_code(&protocol); + fprintf(stderr, + "Using \"code\" is deprecated - use " + "private-code or public-code.\n" + "See the help page for details.\n"); + /* fallthrough */ + case PUBLIC_CODE: + emit_code(&protocol, PUBLIC); break; } diff -Nru wayland-1.14.0/src/wayland-client.c wayland-1.15.0/src/wayland-client.c --- wayland-1.14.0/src/wayland-client.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-client.c 2018-04-09 17:19:26.000000000 +0000 @@ -55,6 +55,11 @@ WL_PROXY_FLAG_WRAPPER = (1 << 2), }; +struct wl_zombie { + int event_count; + int *fd_count; +}; + struct wl_proxy { struct wl_object object; struct wl_display *display; @@ -223,7 +228,20 @@ } static void -decrease_closure_args_refcount(struct wl_closure *closure) +wl_proxy_unref(struct wl_proxy *proxy) +{ + assert(proxy->refcount > 0); + if (--proxy->refcount > 0) + return; + + /* If we get here, the client must have explicitly requested + * deletion. */ + assert(proxy->flags & WL_PROXY_FLAG_DESTROYED); + free(proxy); +} + +static void +validate_closure_objects(struct wl_closure *closure) { const char *signature; struct argument_details arg; @@ -238,14 +256,8 @@ case 'n': case 'o': proxy = (struct wl_proxy *) closure->args[i].o; - if (proxy) { - if (proxy->flags & WL_PROXY_FLAG_DESTROYED) - closure->args[i].o = NULL; - - proxy->refcount--; - if (!proxy->refcount) - free(proxy); - } + if (proxy && proxy->flags & WL_PROXY_FLAG_DESTROYED) + closure->args[i].o = NULL; break; default: break; @@ -253,28 +265,47 @@ } } +/* Destroys a closure which was demarshaled for dispatch; unrefs all the + * proxies in its arguments, as well as its own proxy, and destroys the + * closure itself. */ +static void +destroy_queued_closure(struct wl_closure *closure) +{ + const char *signature; + struct argument_details arg; + struct wl_proxy *proxy; + int i, count; + + signature = closure->message->signature; + count = arg_count_for_signature(signature); + for (i = 0; i < count; i++) { + signature = get_next_argument(signature, &arg); + switch (arg.type) { + case 'n': + case 'o': + proxy = (struct wl_proxy *) closure->args[i].o; + if (proxy) + wl_proxy_unref(proxy); + break; + default: + break; + } + } + + wl_proxy_unref(closure->proxy); + wl_closure_destroy(closure); +} + static void wl_event_queue_release(struct wl_event_queue *queue) { struct wl_closure *closure; - struct wl_proxy *proxy; - bool proxy_destroyed; while (!wl_list_empty(&queue->event_list)) { closure = container_of(queue->event_list.next, struct wl_closure, link); wl_list_remove(&closure->link); - - decrease_closure_args_refcount(closure); - - proxy = closure->proxy; - proxy_destroyed = !!(proxy->flags & WL_PROXY_FLAG_DESTROYED); - - proxy->refcount--; - if (proxy_destroyed && !proxy->refcount) - free(proxy); - - wl_closure_destroy(closure); + destroy_queued_closure(closure); } } @@ -324,6 +355,66 @@ return queue; } +static int +message_count_fds(const char *signature) +{ + unsigned int count, i, fds = 0; + struct argument_details arg; + + count = arg_count_for_signature(signature); + for (i = 0; i < count; i++) { + signature = get_next_argument(signature, &arg); + if (arg.type == 'h') + fds++; + } + + return fds; +} + +static struct wl_zombie * +prepare_zombie(struct wl_proxy *proxy) +{ + const struct wl_interface *interface = proxy->object.interface; + const struct wl_message *message; + int i, count; + struct wl_zombie *zombie = NULL; + + /* If we hit an event with an FD, ensure we have a zombie object and + * fill the fd_count slot for that event with the number of FDs for + * that event. Interfaces with no events containing FDs will not have + * zombie objects created. */ + for (i = 0; i < interface->event_count; i++) { + message = &interface->events[i]; + count = message_count_fds(message->signature); + + if (!count) + continue; + + if (!zombie) { + zombie = zalloc(sizeof(*zombie) + + (interface->event_count * sizeof(int))); + if (!zombie) + return NULL; + + zombie->event_count = interface->event_count; + zombie->fd_count = (int *) &zombie[1]; + } + + zombie->fd_count[i] = count; + } + + return zombie; +} + +static enum wl_iterator_result +free_zombies(void *element, void *data, uint32_t flags) +{ + if (flags & WL_MAP_ENTRY_ZOMBIE) + free(element); + + return WL_ITERATOR_CONTINUE; +} + static struct wl_proxy * proxy_create(struct wl_proxy *factory, const struct wl_interface *interface, uint32_t version) @@ -405,21 +496,25 @@ static void proxy_destroy(struct wl_proxy *proxy) { - if (proxy->flags & WL_PROXY_FLAG_ID_DELETED) + if (proxy->flags & WL_PROXY_FLAG_ID_DELETED) { wl_map_remove(&proxy->display->objects, proxy->object.id); - else if (proxy->object.id < WL_SERVER_ID_START) - wl_map_insert_at(&proxy->display->objects, 0, - proxy->object.id, WL_ZOMBIE_OBJECT); - else + } else if (proxy->object.id < WL_SERVER_ID_START) { + struct wl_zombie *zombie = prepare_zombie(proxy); + + /* The map now contains the zombie entry, until the delete_id + * event arrives. */ + wl_map_insert_at(&proxy->display->objects, + WL_MAP_ENTRY_ZOMBIE, + proxy->object.id, + zombie); + } else { wl_map_insert_at(&proxy->display->objects, 0, proxy->object.id, NULL); - + } proxy->flags |= WL_PROXY_FLAG_DESTROYED; - proxy->refcount--; - if (!proxy->refcount) - free(proxy); + wl_proxy_unref(proxy); } /** Destroy a proxy object @@ -834,13 +929,16 @@ proxy = wl_map_lookup(&display->objects, id); - if (!proxy) - wl_log("error: received delete_id for unknown id (%u)\n", id); - - if (proxy && proxy != WL_ZOMBIE_OBJECT) - proxy->flags |= WL_PROXY_FLAG_ID_DELETED; - else + if (wl_object_is_zombie(&display->objects, id)) { + /* For zombie objects, the 'proxy' is actually the zombie + * event-information structure, which we can free. */ + free(proxy); wl_map_remove(&display->objects, id); + } else if (proxy) { + proxy->flags |= WL_PROXY_FLAG_ID_DELETED; + } else { + wl_log("error: received delete_id for unknown id (%u)\n", id); + } pthread_mutex_unlock(&display->mutex); } @@ -857,9 +955,17 @@ socklen_t size; const char *runtime_dir; int name_size, fd; + bool path_is_absolute; + + if (name == NULL) + name = getenv("WAYLAND_DISPLAY"); + if (name == NULL) + name = "wayland-0"; + + path_is_absolute = name[0] == '/'; runtime_dir = getenv("XDG_RUNTIME_DIR"); - if (!runtime_dir) { + if (!runtime_dir && !path_is_absolute) { wl_log("error: XDG_RUNTIME_DIR not set in the environment.\n"); /* to prevent programs reporting * "failed to create display: Success" */ @@ -867,25 +973,32 @@ return -1; } - if (name == NULL) - name = getenv("WAYLAND_DISPLAY"); - if (name == NULL) - name = "wayland-0"; - fd = wl_os_socket_cloexec(PF_LOCAL, SOCK_STREAM, 0); if (fd < 0) return -1; memset(&addr, 0, sizeof addr); addr.sun_family = AF_LOCAL; - name_size = - snprintf(addr.sun_path, sizeof addr.sun_path, - "%s/%s", runtime_dir, name) + 1; + if (!path_is_absolute) { + name_size = + snprintf(addr.sun_path, sizeof addr.sun_path, + "%s/%s", runtime_dir, name) + 1; + } else { + /* absolute path */ + name_size = + snprintf(addr.sun_path, sizeof addr.sun_path, + "%s", name) + 1; + } assert(name_size > 0); if (name_size > (int)sizeof addr.sun_path) { - wl_log("error: socket path \"%s/%s\" plus null terminator" - " exceeds 108 bytes\n", runtime_dir, name); + if (!path_is_absolute) { + wl_log("error: socket path \"%s/%s\" plus null terminator" + " exceeds %i bytes\n", runtime_dir, name, (int) sizeof(addr.sun_path)); + } else { + wl_log("error: socket path \"%s\" plus null terminator" + " exceeds %i bytes\n", name, (int) sizeof(addr.sun_path)); + } close(fd); /* to prevent programs reporting * "failed to add socket: Success" */ @@ -994,6 +1107,16 @@ * its value will be replaced with the WAYLAND_DISPLAY environment * variable if it is set, otherwise display "wayland-0" will be used. * + * If \c name is an absolute path, then that path is used as-is for + * the location of the socket at which the Wayland server is listening; + * no qualification inside XDG_RUNTIME_DIR is attempted. + * + * If \c name is \c NULL and the WAYLAND_DISPLAY environment variable + * is set to an absolute pathname, then that pathname is used as-is + * for the socket in the same manner as if \c name held an absolute + * path. Support for absolute paths in \c name and WAYLAND_DISPLAY + * is present since Wayland version 1.15. + * * \memberof wl_display */ WL_EXPORT struct wl_display * @@ -1037,6 +1160,7 @@ wl_display_disconnect(struct wl_display *display) { wl_connection_destroy(display->connection); + wl_map_for_each(&display->objects, free_zombies, NULL); wl_map_release(&display->objects); wl_event_queue_release(&display->default_queue); wl_event_queue_release(&display->display_queue); @@ -1208,6 +1332,8 @@ break; } } + + closure->proxy->refcount++; } static int @@ -1227,11 +1353,16 @@ if (len < size) return 0; + /* If our proxy is gone or a zombie, just eat the event (and any FDs, + * if applicable). */ proxy = wl_map_lookup(&display->objects, id); - if (proxy == WL_ZOMBIE_OBJECT) { - wl_connection_consume(display->connection, size); - return size; - } else if (proxy == NULL) { + if (!proxy || wl_object_is_zombie(&display->objects, id)) { + struct wl_zombie *zombie = wl_map_lookup(&display->objects, id); + + if (zombie && zombie->fd_count[opcode]) + wl_connection_close_fds_in(display->connection, + zombie->fd_count[opcode]); + wl_connection_consume(display->connection, size); return size; } @@ -1252,9 +1383,8 @@ return -1; } - increase_closure_args_refcount(closure); - proxy->refcount++; closure->proxy = proxy; + increase_closure_args_refcount(closure); if (proxy == &display->proxy) queue = &display->display_queue; @@ -1281,17 +1411,11 @@ /* Verify that the receiving object is still valid by checking if has * been destroyed by the application. */ - - decrease_closure_args_refcount(closure); + validate_closure_objects(closure); proxy = closure->proxy; proxy_destroyed = !!(proxy->flags & WL_PROXY_FLAG_DESTROYED); - - proxy->refcount--; if (proxy_destroyed) { - if (!proxy->refcount) - free(proxy); - - wl_closure_destroy(closure); + destroy_queued_closure(closure); return; } @@ -1311,9 +1435,9 @@ &proxy->object, opcode, proxy->user_data); } - wl_closure_destroy(closure); - pthread_mutex_lock(&display->mutex); + + destroy_queued_closure(closure); } static int diff -Nru wayland-1.14.0/src/wayland-client-uninstalled.pc.in wayland-1.15.0/src/wayland-client-uninstalled.pc.in --- wayland-1.14.0/src/wayland-client-uninstalled.pc.in 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-client-uninstalled.pc.in 2018-04-09 17:19:26.000000000 +0000 @@ -1,7 +1,7 @@ libdir=@abs_builddir@/.libs includedir=@abs_srcdir@ protocoldir=@abs_top_builddir@/protocol - + Name: Wayland Client Description: Wayland client side library (not installed) Version: @PACKAGE_VERSION@ diff -Nru wayland-1.14.0/src/wayland-egl-core.h wayland-1.15.0/src/wayland-egl-core.h --- wayland-1.14.0/src/wayland-egl-core.h 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-egl-core.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -/* - * Copyright © 2011 Kristian Høgsberg - * Copyright © 2011 Benjamin Franzke - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef WAYLAND_EGL_CORE_H -#define WAYLAND_EGL_CORE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define WL_EGL_PLATFORM 1 - -struct wl_egl_window; -struct wl_surface; - -struct wl_egl_window * -wl_egl_window_create(struct wl_surface *surface, - int width, int height); - -void -wl_egl_window_destroy(struct wl_egl_window *egl_window); - -void -wl_egl_window_resize(struct wl_egl_window *egl_window, - int width, int height, - int dx, int dy); - -void -wl_egl_window_get_attached_size(struct wl_egl_window *egl_window, - int *width, int *height); - -#ifdef __cplusplus -} -#endif - -#endif diff -Nru wayland-1.14.0/src/wayland-egl.h wayland-1.15.0/src/wayland-egl.h --- wayland-1.14.0/src/wayland-egl.h 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-egl.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/* - * Copyright © 2011 Kristian Høgsberg - * Copyright © 2011 Benjamin Franzke - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef WAYLAND_EGL_H -#define WAYLAND_EGL_H - -#include -#include "wayland-egl-core.h" - -#endif diff -Nru wayland-1.14.0/src/wayland-private.h wayland-1.15.0/src/wayland-private.h --- wayland-1.14.0/src/wayland-private.h 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-private.h 2018-04-09 17:19:26.000000000 +0000 @@ -57,9 +57,6 @@ uint32_t id; }; -extern struct wl_object global_zombie_object; -#define WL_ZOMBIE_OBJECT ((void*)&global_zombie_object) - int wl_interface_equal(const struct wl_interface *iface1, const struct wl_interface *iface2); @@ -69,7 +66,8 @@ * flags. If more flags are ever added, the implementation of wl_map will have * to change to allow for new flags */ enum wl_map_entry_flags { - WL_MAP_ENTRY_LEGACY = (1 << 0) + WL_MAP_ENTRY_LEGACY = (1 << 0), /* Server side only */ + WL_MAP_ENTRY_ZOMBIE = (1 << 0) /* Client side only */ }; struct wl_map { @@ -80,7 +78,8 @@ }; typedef enum wl_iterator_result (*wl_iterator_func_t)(void *element, - void *data); + void *data, + uint32_t flags); void wl_map_init(struct wl_map *map, uint32_t side); @@ -189,6 +188,9 @@ struct wl_map *objects, const struct wl_message *message); +bool +wl_object_is_zombie(struct wl_map *map, uint32_t id); + int wl_closure_lookup_objects(struct wl_closure *closure, struct wl_map *objects); @@ -251,4 +253,7 @@ void wl_priv_signal_emit(struct wl_priv_signal *signal, void *data); +void +wl_connection_close_fds_in(struct wl_connection *connection, int max); + #endif diff -Nru wayland-1.14.0/src/wayland-scanner-uninstalled.pc.in wayland-1.15.0/src/wayland-scanner-uninstalled.pc.in --- wayland-1.14.0/src/wayland-scanner-uninstalled.pc.in 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-scanner-uninstalled.pc.in 2018-04-09 17:19:26.000000000 +0000 @@ -1,6 +1,6 @@ pkgdatadir=@abs_top_srcdir@ wayland_scanner=@abs_top_builddir@/wayland-scanner - + Name: Wayland Scanner Description: Wayland scanner (not installed) Version: @PACKAGE_VERSION@ diff -Nru wayland-1.14.0/src/wayland-server.c wayland-1.15.0/src/wayland-server.c --- wayland-1.14.0/src/wayland-server.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-server.c 2018-04-09 17:19:26.000000000 +0000 @@ -220,11 +220,11 @@ return; } + log_closure(resource, closure, true); + if (send_func(closure, resource->client->connection)) resource->client->error = 1; - log_closure(resource, closure, true); - wl_closure_destroy(closure); } @@ -300,6 +300,13 @@ client->error = 1; } +static void +destroy_client_with_error(struct wl_client *client, const char *reason) +{ + wl_log("%s (pid %u)\n", reason, client->ucred.pid); + wl_client_destroy(client); +} + static int wl_client_connection_data(int fd, uint32_t mask, void *data) { @@ -314,15 +321,21 @@ int opcode, size, since; int len; - if (mask & (WL_EVENT_ERROR | WL_EVENT_HANGUP)) { + if (mask & WL_EVENT_HANGUP) { wl_client_destroy(client); return 1; } + if (mask & WL_EVENT_ERROR) { + destroy_client_with_error(client, "socket error"); + return 1; + } + if (mask & WL_EVENT_WRITABLE) { len = wl_connection_flush(connection); if (len < 0 && errno != EAGAIN) { - wl_client_destroy(client); + destroy_client_with_error( + client, "failed to flush client connection"); return 1; } else if (len >= 0) { wl_event_source_fd_update(client->source, @@ -334,7 +347,8 @@ if (mask & WL_EVENT_READABLE) { len = wl_connection_read(connection); if (len == 0 || (len < 0 && errno != EAGAIN)) { - wl_client_destroy(client); + destroy_client_with_error( + client, "failed to read client connection"); return 1; } } @@ -418,8 +432,10 @@ len = wl_connection_pending_input(connection); } - if (client->error) - wl_client_destroy(client); + if (client->error) { + destroy_client_with_error(client, + "error in client communication"); + } return 1; } @@ -658,11 +674,9 @@ } static enum wl_iterator_result -destroy_resource(void *element, void *data) +destroy_resource(void *element, void *data, uint32_t flags) { struct wl_resource *resource = element; - struct wl_client *client = resource->client; - uint32_t flags; wl_signal_emit(&resource->deprecated_destroy_signal, resource); /* Don't emit the new signal for deprecated resources, as that would @@ -670,7 +684,6 @@ if (!resource_is_deprecated(resource)) wl_priv_signal_emit(&resource->destroy_signal, resource); - flags = wl_map_lookup_flags(&client->objects, resource->object.id); if (resource->destroy) resource->destroy(resource); @@ -685,9 +698,11 @@ { struct wl_client *client = resource->client; uint32_t id; + uint32_t flags; id = resource->object.id; - destroy_resource(resource, NULL); + flags = wl_map_lookup_flags(&client->objects, id); + destroy_resource(resource, NULL, flags); if (id < WL_SERVER_ID_START) { if (client->display_resource) { @@ -1264,6 +1279,44 @@ } } +/** Destroy all clients connected to the display + * + * \param display The display object + * + * This function should be called right before wl_display_destroy() to ensure + * all client resources are closed properly. Destroying a client from within + * wl_display_destroy_clients() is safe, but creating one will leak resources + * and raise a warning. + * + * \memberof wl_display + */ +WL_EXPORT void +wl_display_destroy_clients(struct wl_display *display) +{ + struct wl_list tmp_client_list, *pos; + struct wl_client *client; + + /* Move the whole client list to a temporary head because some new clients + * might be added to the original head. */ + wl_list_init(&tmp_client_list); + wl_list_insert_list(&tmp_client_list, &display->client_list); + wl_list_init(&display->client_list); + + /* wl_list_for_each_safe isn't enough here: it fails if the next client is + * destroyed by the destroy handler of the current one. */ + while (!wl_list_empty(&tmp_client_list)) { + pos = tmp_client_list.next; + client = wl_container_of(pos, client, link); + + wl_client_destroy(client); + } + + if (!wl_list_empty(&display->client_list)) { + wl_log("wl_display_destroy_clients: cannot destroy all clients because " + "new ones were created by destroy callbacks\n"); + } +} + static int socket_data(int fd, uint32_t mask, void *data) { @@ -1839,7 +1892,7 @@ }; static enum wl_iterator_result -resource_iterator_helper(void *res, void *user_data) +resource_iterator_helper(void *res, void *user_data, uint32_t flags) { struct wl_resource_iterator_context *context = user_data; struct wl_resource *resource = res; diff -Nru wayland-1.14.0/src/wayland-server-core.h wayland-1.15.0/src/wayland-server-core.h --- wayland-1.14.0/src/wayland-server-core.h 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-server-core.h 2018-04-09 17:19:26.000000000 +0000 @@ -43,11 +43,88 @@ WL_EVENT_ERROR = 0x08 }; +/** File descriptor dispatch function type + * + * Functions of this type are used as callbacks for file descriptor events. + * + * \param fd The file descriptor delivering the event. + * \param mask Describes the kind of the event as a bitwise-or of: + * \c WL_EVENT_READABLE, \c WL_EVENT_WRITABLE, \c WL_EVENT_HANGUP, + * \c WL_EVENT_ERROR. + * \param data The user data argument of the related wl_event_loop_add_fd() + * call. + * \return If the event source is registered for re-check with + * wl_event_source_check(): 0 for all done, 1 for needing a re-check. + * If not registered, the return value is ignored and should be zero. + * + * \sa wl_event_loop_add_fd() + * \memberof wl_event_source + */ typedef int (*wl_event_loop_fd_func_t)(int fd, uint32_t mask, void *data); + +/** Timer dispatch function type + * + * Functions of this type are used as callbacks for timer expiry. + * + * \param data The user data argument of the related wl_event_loop_add_timer() + * call. + * \return If the event source is registered for re-check with + * wl_event_source_check(): 0 for all done, 1 for needing a re-check. + * If not registered, the return value is ignored and should be zero. + * + * \sa wl_event_loop_add_timer() + * \memberof wl_event_source + */ typedef int (*wl_event_loop_timer_func_t)(void *data); + +/** Signal dispatch function type + * + * Functions of this type are used as callbacks for (POSIX) signals. + * + * \param signal_number + * \param data The user data argument of the related wl_event_loop_add_signal() + * call. + * \return If the event source is registered for re-check with + * wl_event_source_check(): 0 for all done, 1 for needing a re-check. + * If not registered, the return value is ignored and should be zero. + * + * \sa wl_event_loop_add_signal() + * \memberof wl_event_source + */ typedef int (*wl_event_loop_signal_func_t)(int signal_number, void *data); + +/** Idle task function type + * + * Functions of this type are used as callbacks before blocking in + * wl_event_loop_dispatch(). + * + * \param data The user data argument of the related wl_event_loop_add_idle() + * call. + * + * \sa wl_event_loop_add_idle() wl_event_loop_dispatch() + * \memberof wl_event_source + */ typedef void (*wl_event_loop_idle_func_t)(void *data); +/** \struct wl_event_loop + * + * \brief An event loop context + * + * Usually you create an event loop context, add sources to it, and call + * wl_event_loop_dispatch() in a loop to process events. + * + * \sa wl_event_source + */ + +/** \struct wl_event_source + * + * \brief An abstract event source + * + * This is the generic type for fd, timer, signal, and idle sources. + * Functions that operate on specific source types must not be used with + * a different type, even if the function signature allows it. + */ + struct wl_event_loop * wl_event_loop_create(void); @@ -137,6 +214,9 @@ void wl_display_flush_clients(struct wl_display *display); +void +wl_display_destroy_clients(struct wl_display *display); + struct wl_client; typedef void (*wl_global_bind_func_t)(struct wl_client *client, void *data, diff -Nru wayland-1.14.0/src/wayland-server.h wayland-1.15.0/src/wayland-server.h --- wayland-1.14.0/src/wayland-server.h 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-server.h 2018-04-09 17:19:26.000000000 +0000 @@ -43,6 +43,16 @@ extern "C" { #endif +/* + * The user can set this macro to hide the wl_object, wl_resource and wl_buffer + * objects alongside the associated API. + * + * The structs were meant to be opaque, although we missed that in the early days. + * + * NOTE: the list of structs, functions, etc in this section MUST NEVER GROW. + * Otherwise we will break forward compatibility and applications that used to + * build fine will no longer be able to do so. + */ #ifndef WL_HIDE_DEPRECATED struct wl_object { diff -Nru wayland-1.14.0/src/wayland-server-uninstalled.pc.in wayland-1.15.0/src/wayland-server-uninstalled.pc.in --- wayland-1.14.0/src/wayland-server-uninstalled.pc.in 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-server-uninstalled.pc.in 2018-04-09 17:19:26.000000000 +0000 @@ -1,7 +1,7 @@ libdir=@abs_builddir@/.libs includedir=@abs_srcdir@ protocoldir=@abs_top_builddir@/protocol - + Name: Wayland Server Description: Server side implementation of the Wayland protocol (not installed) Version: @PACKAGE_VERSION@ diff -Nru wayland-1.14.0/src/wayland-shm.c wayland-1.15.0/src/wayland-shm.c --- wayland-1.14.0/src/wayland-shm.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-shm.c 2018-04-09 17:19:26.000000000 +0000 @@ -281,7 +281,7 @@ if (pool->data == MAP_FAILED) { wl_resource_post_error(resource, WL_SHM_ERROR_INVALID_FD, - "failed mmap fd %d", fd); + "failed mmap fd %d: %m", fd); goto err_free; } close(fd); diff -Nru wayland-1.14.0/src/wayland-util.c wayland-1.15.0/src/wayland-util.c --- wayland-1.14.0/src/wayland-util.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-util.c 2018-04-09 17:19:26.000000000 +0000 @@ -153,8 +153,6 @@ /** \cond */ -struct wl_object global_zombie_object; - int wl_interface_equal(const struct wl_interface *a, const struct wl_interface *b) { @@ -371,7 +369,7 @@ for (p = start; p < end; p++) if (p->data && !map_entry_is_free(*p)) { - ret = func(map_entry_get_data(*p), data); + ret = func(map_entry_get_data(*p), data, map_entry_get_flags(*p)); if (ret != WL_ITERATOR_CONTINUE) break; } diff -Nru wayland-1.14.0/src/wayland-util.h wayland-1.15.0/src/wayland-util.h --- wayland-1.14.0/src/wayland-util.h 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/src/wayland-util.h 2018-04-09 17:19:26.000000000 +0000 @@ -78,12 +78,23 @@ * wl_message is to a protocol message like a class is to an object. * * The `name` of a wl_message is the name of the corresponding protocol message. + * * The `signature` is an ordered list of symbols representing the data types * of message arguments and, optionally, a protocol version and indicators for * nullability. A leading integer in the `signature` indicates the _since_ * version of the protocol message. A `?` preceding a data type symbol indicates - * that the following argument type is nullable. When no arguments accompany a - * message, `signature` is an empty string. + * that the following argument type is nullable. While it is a protocol violation + * to send messages with non-nullable arguments set to `NULL`, event handlers in + * clients might still get called with non-nullable object arguments set to + * `NULL`. This can happen when the client destroyed the object being used as + * argument on its side and an event referencing that object was sent before the + * server knew about its destruction. As this race cannot be prevented, clients + * should - as a general rule - program their event handlers such that they can + * handle object arguments declared non-nullable being `NULL` gracefully. + * + * When no arguments accompany a message, `signature` is an empty string. + * + * Symbols: * * * `i`: int * * `u`: uint diff -Nru wayland-1.14.0/src/wayland-version.h wayland-1.15.0/src/wayland-version.h --- wayland-1.14.0/src/wayland-version.h 2017-08-08 18:21:02.000000000 +0000 +++ wayland-1.15.0/src/wayland-version.h 2018-04-09 17:19:34.000000000 +0000 @@ -27,8 +27,8 @@ #define WAYLAND_VERSION_H #define WAYLAND_VERSION_MAJOR 1 -#define WAYLAND_VERSION_MINOR 14 +#define WAYLAND_VERSION_MINOR 15 #define WAYLAND_VERSION_MICRO 0 -#define WAYLAND_VERSION "1.14.0" +#define WAYLAND_VERSION "1.15.0" #endif diff -Nru wayland-1.14.0/test-driver wayland-1.15.0/test-driver --- wayland-1.14.0/test-driver 2017-08-08 18:21:00.000000000 +0000 +++ wayland-1.15.0/test-driver 2018-04-09 17:19:31.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -143,6 +143,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru wayland-1.14.0/tests/data/small-private-code.c wayland-1.15.0/tests/data/small-private-code.c --- wayland-1.14.0/tests/data/small-private-code.c 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.15.0/tests/data/small-private-code.c 2018-04-09 17:19:26.000000000 +0000 @@ -0,0 +1,71 @@ +/* SCANNER TEST */ + +/* + * Copyright © 2016 Collabora, Ltd. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include "wayland-util.h" + +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif + +#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) +#define WL_PRIVATE __attribute__ ((visibility("hidden"))) +#else +#define WL_PRIVATE +#endif + +extern const struct wl_interface another_intf_interface; +extern const struct wl_interface intf_not_here_interface; + +static const struct wl_interface *types[] = { + NULL, + &intf_not_here_interface, + NULL, + NULL, + NULL, + NULL, + NULL, + &another_intf_interface, +}; + +static const struct wl_message intf_A_requests[] = { + { "rq1", "sun", types + 0 }, + { "rq2", "nsiufho", types + 1 }, + { "destroy", "", types + 0 }, +}; + +static const struct wl_message intf_A_events[] = { + { "hey", "", types + 0 }, +}; + +WL_PRIVATE const struct wl_interface intf_A_interface = { + "intf_A", 3, + 3, intf_A_requests, + 1, intf_A_events, +}; + diff -Nru wayland-1.14.0/tests/display-test.c wayland-1.15.0/tests/display-test.c --- wayland-1.14.0/tests/display-test.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/tests/display-test.c 2018-04-09 17:19:26.000000000 +0000 @@ -47,6 +47,9 @@ #include "test-runner.h" #include "test-compositor.h" +#include "tests-server-protocol.h" +#include "tests-client-protocol.h" + struct display_destroy_listener { struct wl_listener listener; int done; @@ -1063,6 +1066,252 @@ display_run(d); wl_global_destroy(g); + + display_destroy(d); +} + +static void +pre_fd(void *data, struct fd_passer *fdp) +{ + fd_passer_destroy(fdp); +} + +static void +fd(void *data, struct fd_passer *fdp, int32_t fd) +{ + /* We destroyed the resource before this event */ + assert(false); +} + +struct fd_passer_listener fd_passer_listener = { + pre_fd, + fd, +}; + +static void +zombie_fd_handle_globals(void *data, struct wl_registry *registry, + uint32_t id, const char *intf, uint32_t ver) +{ + struct fd_passer *fdp; + + if (!strcmp(intf, "fd_passer")) { + fdp = wl_registry_bind(registry, id, &fd_passer_interface, 1); + fd_passer_add_listener(fdp, &fd_passer_listener, NULL); + } +} + +static const struct wl_registry_listener zombie_fd_registry_listener = { + zombie_fd_handle_globals, + NULL +}; + +static void +zombie_client(void *data) +{ + struct client *c = client_connect(); + struct wl_registry *registry; + + registry = wl_display_get_registry(c->wl_display); + wl_registry_add_listener(registry, &zombie_fd_registry_listener, NULL); + + /* Gets the registry */ + wl_display_roundtrip(c->wl_display); + + /* push out the fd_passer bind */ + wl_display_roundtrip(c->wl_display); + + /* push out our fd_passer.destroy */ + wl_display_roundtrip(c->wl_display); + + wl_registry_destroy(registry); + + client_disconnect_nocheck(c); +} + +struct passer_data { + struct wl_resource *conjoined_passer; +}; + +static void +feed_pipe(int fd, char tosend) +{ + int count; + + do { + count = write(fd, &tosend, 1); + } while (count != 1 && errno == EAGAIN); + assert(count == 1); + close(fd); +} + +static void +fd_passer_clobber(struct wl_client *client, struct wl_resource *res) +{ + struct passer_data *pdata = wl_resource_get_user_data(res); + int pipes1[2], pipes2[2], ret; + + if (pdata->conjoined_passer) { + ret = pipe(pipes1); + assert(ret == 0); + ret = pipe(pipes2); + assert(ret == 0); + + wl_resource_queue_event(res, FD_PASSER_FD, pipes1[0]); + fd_passer_send_fd(pdata->conjoined_passer, pipes2[0]); + feed_pipe(pipes1[1], '1'); + feed_pipe(pipes2[1], '2'); + close(pipes1[0]); + close(pipes2[0]); + } + wl_resource_destroy(res); +} + +static void +fd_passer_twin(struct wl_client *client, struct wl_resource *res, struct wl_resource *passer) +{ + struct passer_data *pdata = wl_resource_get_user_data(res); + + pdata->conjoined_passer = passer; +} + +static const struct fd_passer_interface fdp_interface = { + fd_passer_clobber, + fd_passer_twin +}; + +static void +pdata_destroy(struct wl_resource *res) +{ + struct passer_data *pdata = wl_resource_get_user_data(res); + + free(pdata); +} + +static void +bind_fd_passer(struct wl_client *client, void *data, + uint32_t vers, uint32_t id) +{ + struct wl_resource *res; + struct passer_data *pdata; + + pdata = malloc(sizeof(*pdata)); + assert(pdata); + pdata->conjoined_passer = NULL; + + res = wl_resource_create(client, &fd_passer_interface, vers, id); + wl_resource_set_implementation(res, &fdp_interface, pdata, pdata_destroy); + assert(res); + if (vers == 1) { + fd_passer_send_pre_fd(res); + fd_passer_send_fd(res, fileno(stdin)); + } +} + +TEST(zombie_fd) +{ + struct display *d; + struct wl_global *g; + + d = display_create(); + + g = wl_global_create(d->wl_display, &fd_passer_interface, + 1, d, bind_fd_passer); + + client_create_noarg(d, zombie_client); + display_run(d); + + wl_global_destroy(g); + + display_destroy(d); +} + + +static void +double_pre_fd(void *data, struct fd_passer *fdp) +{ + assert(false); +} + +static void +double_fd(void *data, struct fd_passer *fdp, int32_t fd) +{ + char buf; + int count; + + do { + count = read(fd, &buf, 1); + } while (count != 1 && errno == EAGAIN); + assert(count == 1); + + close(fd); + fd_passer_destroy(fdp); + assert(buf == '2'); +} + +struct fd_passer_listener double_fd_passer_listener = { + double_pre_fd, + double_fd, +}; + + +static void +double_zombie_fd_handle_globals(void *data, struct wl_registry *registry, + uint32_t id, const char *intf, uint32_t ver) +{ + struct fd_passer *fdp1, *fdp2; + + if (!strcmp(intf, "fd_passer")) { + fdp1 = wl_registry_bind(registry, id, &fd_passer_interface, 2); + fd_passer_add_listener(fdp1, &double_fd_passer_listener, NULL); + fdp2 = wl_registry_bind(registry, id, &fd_passer_interface, 2); + fd_passer_add_listener(fdp2, &double_fd_passer_listener, NULL); + fd_passer_conjoin(fdp1, fdp2); + fd_passer_destroy(fdp1); + } +} + +static const struct wl_registry_listener double_zombie_fd_registry_listener = { + double_zombie_fd_handle_globals, + NULL +}; + +static void +double_zombie_client(void *data) +{ + struct client *c = client_connect(); + struct wl_registry *registry; + + registry = wl_display_get_registry(c->wl_display); + wl_registry_add_listener(registry, &double_zombie_fd_registry_listener, NULL); + + /* Gets the registry */ + wl_display_roundtrip(c->wl_display); + + /* One more so server can respond to conjoin+destroy */ + wl_display_roundtrip(c->wl_display); + + /* And finally push out our last fd_passer.destroy */ + wl_display_roundtrip(c->wl_display); + + wl_registry_destroy(registry); + + client_disconnect_nocheck(c); +} + +TEST(zombie_fd_errant_consumption) +{ + struct display *d; + struct wl_global *g; + + d = display_create(); + + g = wl_global_create(d->wl_display, &fd_passer_interface, + 2, d, bind_fd_passer); + + client_create_noarg(d, double_zombie_client); + display_run(d); + + wl_global_destroy(g); display_destroy(d); } diff -Nru wayland-1.14.0/tests/sanity-test.c wayland-1.15.0/tests/sanity-test.c --- wayland-1.14.0/tests/sanity-test.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/tests/sanity-test.c 2018-04-09 17:19:26.000000000 +0000 @@ -53,11 +53,13 @@ FAIL_TEST(fail_abort) { + test_disable_coredumps(); abort(); } FAIL_TEST(fail_wl_abort) { + test_disable_coredumps(); wl_abort("Abort the program\n"); } @@ -68,11 +70,13 @@ FAIL_TEST(fail_segv) { + test_disable_coredumps(); * (char **) 0 = "Goodbye, world"; } FAIL_TEST(sanity_assert) { + test_disable_coredumps(); /* must fail */ assert(0); } @@ -87,6 +91,7 @@ assert(p); /* assert that we got memory, also prevents * the malloc from getting optimized away. */ free(NULL); /* NULL must not be counted */ + test_disable_coredumps(); } TEST(disable_leak_checks) @@ -114,6 +119,8 @@ wl_array_add(&array, 14); /* not freeing array, must leak */ + + test_disable_coredumps(); } FAIL_TEST(tc_client_memory_leaks) @@ -121,6 +128,7 @@ struct display *d = display_create(); client_create_noarg(d, sanity_malloc_direct); display_run(d); + test_disable_coredumps(); display_destroy(d); } @@ -129,6 +137,7 @@ struct display *d = display_create(); client_create_noarg(d, sanity_malloc_indirect); display_run(d); + test_disable_coredumps(); display_destroy(d); } @@ -141,6 +150,8 @@ /* leak 2 file descriptors */ if (pipe(fd) < 0) exit(EXIT_SUCCESS); /* failed to fail */ + + test_disable_coredumps(); } FAIL_TEST(sanity_fd_leak_exec) @@ -152,6 +163,7 @@ if (pipe(fd) < 0) exit(EXIT_SUCCESS); /* failed to fail */ + test_disable_coredumps(); exec_fd_leak_check(nr_fds); } @@ -212,6 +224,7 @@ client_create_noarg(d, sanity_fd_leak); display_run(d); + test_disable_coredumps(); display_destroy(d); } @@ -222,12 +235,14 @@ client_create_noarg(d, sanity_fd_leak); display_run(d); + test_disable_coredumps(); display_destroy(d); } FAIL_TEST(timeout_tst) { test_set_timeout(1); + test_disable_coredumps(); /* test should reach timeout */ test_sleep(2); } @@ -247,6 +262,7 @@ test_set_timeout(10); test_set_timeout(1); + test_disable_coredumps(); /* test should fail on timeout */ test_sleep(2); } @@ -265,6 +281,7 @@ struct display *d = display_create(); client_create_noarg(d, timeout_tst); display_run(d); + test_disable_coredumps(); display_destroy(d); } @@ -273,6 +290,7 @@ struct display *d = display_create(); client_create_noarg(d, timeout_reset_tst); display_run(d); + test_disable_coredumps(); display_destroy(d); } diff -Nru wayland-1.14.0/tests/scanner-test.sh wayland-1.15.0/tests/scanner-test.sh --- wayland-1.14.0/tests/scanner-test.sh 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/tests/scanner-test.sh 2018-04-09 17:19:26.000000000 +0000 @@ -48,4 +48,8 @@ generate_and_compare "-c client-header" "small.xml" "small-client-core.h" generate_and_compare "-c server-header" "small.xml" "small-server-core.h" +# The existing "code" must produce result identical to "public-code" +generate_and_compare "code" "small.xml" "small-code.c" +generate_and_compare "public-code" "small.xml" "small-code.c" +generate_and_compare "private-code" "small.xml" "small-private-code.c" exit $RETCODE diff -Nru wayland-1.14.0/tests/socket-test.c wayland-1.15.0/tests/socket-test.c --- wayland-1.14.0/tests/socket-test.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/tests/socket-test.c 2018-04-09 17:19:26.000000000 +0000 @@ -26,10 +26,14 @@ #include #include #include +#include +#include +#include #include #include #include "wayland-client.h" +#include "wayland-os.h" #include "wayland-server.h" #include "test-runner.h" @@ -173,3 +177,108 @@ wl_display_destroy(d); } + +struct client_create_listener { + struct wl_listener listener; + struct wl_display *display; +}; + +struct client_destroy_listener { + struct wl_listener listener; + struct wl_display *display; +}; + +static void +client_destroy_notify(struct wl_listener *l, void *data) +{ + struct client_destroy_listener *listener = + wl_container_of(l, listener, listener); + wl_display_terminate(listener->display); + free(listener); +} + +static void +client_create_notify(struct wl_listener *l, void *data) +{ + struct wl_client *client = data; + struct client_create_listener *listener = + wl_container_of(l, listener, listener); + struct client_destroy_listener *destroy_listener = (struct client_destroy_listener *)malloc(sizeof *destroy_listener); + assert(destroy_listener != NULL); + destroy_listener->display = listener->display; + destroy_listener->listener.notify = client_destroy_notify; + wl_client_add_destroy_listener(client, &destroy_listener->listener); +} + +TEST(absolute_socket_path) +{ + struct wl_display *display; + struct client_create_listener client_create_listener; + struct sockaddr_un addr; + int fd; + socklen_t size; + const char *xdg_runtime_dir; + size_t len; + int ret; + pid_t pid; + + /* It's a little weird that this test about absolute socket paths + * uses XDG_RUNTIME_DIR, but that's the only location guaranteed + * by test-runner to be both writable and unique. This isn't + * really a problem; we'll just take care that the leaf-level + * filename used for the socket isn't anything that would + * accidentally be generated by a default usage of wl_display_connect(). */ + xdg_runtime_dir = require_xdg_runtime_dir(); + memset(&addr, 0, sizeof addr); + len = snprintf(addr.sun_path, sizeof addr.sun_path, + "%s/%s", xdg_runtime_dir, "wayland-absolute-0"); + assert(len < sizeof addr.sun_path + && "Bug in test. Path too long"); + + /* The path must not exist prior to binding. */ + assert(access(addr.sun_path, F_OK) == -1); + + size = offsetof (struct sockaddr_un, sun_path) + strlen(addr.sun_path); + addr.sun_family = AF_LOCAL; + fd = wl_os_socket_cloexec(PF_LOCAL, SOCK_STREAM, 0); + assert(fd >= 0 ); + ret = bind(fd, (struct sockaddr *) &addr, size); + assert(ret >= 0); + ret = listen(fd, 128); + assert(ret >= 0); + + /* Start server display. Be careful (by avoiding wl_display_add_socket_auto() + * to offer only the absolutely qualified socket made above. */ + display = wl_display_create(); + assert(display != NULL); + client_create_listener.listener.notify = client_create_notify; + client_create_listener.display = display; + wl_display_add_client_created_listener(display, &client_create_listener.listener); + ret = wl_display_add_socket_fd(display, fd); + assert(ret == 0); + + /* Execute client that connects to the absolutely qualified server socket path. */ + pid = fork(); + assert(pid != -1); + + if (pid == 0) { + ret = setenv("WAYLAND_DISPLAY", addr.sun_path, 1); + assert(ret == 0); + struct wl_display *client_display = wl_display_connect(NULL); + assert(client_display != NULL); + ret = wl_display_roundtrip(client_display); + assert(ret != -1); + wl_display_disconnect(client_display); + exit(0); + assert(false); + } + + wl_display_run(display); + ret = waitpid(pid, NULL, 0); + assert(ret == pid); + + wl_display_destroy(display); + + ret = unlink(addr.sun_path); + assert(ret == 0); +} diff -Nru wayland-1.14.0/tests/test-helpers.c wayland-1.15.0/tests/test-helpers.c --- wayland-1.14.0/tests/test-helpers.c 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/tests/test-helpers.c 2018-04-09 17:19:26.000000000 +0000 @@ -23,12 +23,20 @@ * SOFTWARE. */ +#include "config.h" + #include #include #include #include #include #include +#include +#include + +#ifdef HAVE_SYS_PRCTL_H +#include +#endif #include "test-runner.h" @@ -97,3 +105,25 @@ assert(nanosleep(&ts, NULL) == 0); } + +/** Try to disable coredumps + * + * Useful for tests that crash on purpose, to avoid creating a core file + * or launching an application crash handler service or cluttering coredumpctl. + * + * NOTE: Calling this may make the process undebuggable. + */ +void +test_disable_coredumps(void) +{ + struct rlimit r; + + if (getrlimit(RLIMIT_CORE, &r) == 0) { + r.rlim_cur = 0; + setrlimit(RLIMIT_CORE, &r); + } + +#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) + prctl(PR_SET_DUMPABLE, 0, 0, 0, 0); +#endif +} diff -Nru wayland-1.14.0/tests/test-runner.h wayland-1.15.0/tests/test-runner.h --- wayland-1.14.0/tests/test-runner.h 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/tests/test-runner.h 2018-04-09 17:19:26.000000000 +0000 @@ -37,24 +37,24 @@ int must_fail; } __attribute__ ((aligned (16))); -#define TEST(name) \ - static void name(void); \ - \ - const struct test test##name \ - __attribute__ ((section ("test_section"))) = { \ - #name, name, 0 \ - }; \ - \ +#define TEST(name) \ + static void name(void); \ + \ + const struct test test##name \ + __attribute__ ((used, section ("test_section"))) = { \ + #name, name, 0 \ + }; \ + \ static void name(void) -#define FAIL_TEST(name) \ - static void name(void); \ - \ - const struct test test##name \ - __attribute__ ((section ("test_section"))) = { \ - #name, name, 1 \ - }; \ - \ +#define FAIL_TEST(name) \ + static void name(void); \ + \ + const struct test test##name \ + __attribute__ ((used, section ("test_section"))) = { \ + #name, name, 1 \ + }; \ + \ static void name(void) int @@ -86,6 +86,9 @@ void test_sleep(unsigned int); +void +test_disable_coredumps(void); + #define DISABLE_LEAK_CHECKS \ do { \ extern int leak_check_enabled; \ diff -Nru wayland-1.14.0/wayland-scanner.mk wayland-1.15.0/wayland-scanner.mk --- wayland-1.14.0/wayland-scanner.mk 2017-08-08 18:20:52.000000000 +0000 +++ wayland-1.15.0/wayland-scanner.mk 2018-04-09 17:19:26.000000000 +0000 @@ -1,8 +1,8 @@ %-protocol.c : $(wayland_protocoldir)/%.xml - $(AM_V_GEN)$(wayland_scanner) code < $< > $@ + $(AM_V_GEN)$(wayland_scanner) code $< $@ %-server-protocol.h : $(wayland_protocoldir)/%.xml - $(AM_V_GEN)$(wayland_scanner) server-header < $< > $@ + $(AM_V_GEN)$(wayland_scanner) server-header $< $@ %-client-protocol.h : $(wayland_protocoldir)/%.xml - $(AM_V_GEN)$(wayland_scanner) client-header < $< > $@ + $(AM_V_GEN)$(wayland_scanner) client-header $< $@