diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-11-06 18:39:26 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-11-06 18:39:26 +0000 |
commit | 8ff46deb09fbd4ec82db0744ef89d3f86f32a2a5 (patch) | |
tree | f0fcbb56c9dbadc8536dc55eec2747568d8d8ba4 /lib | |
parent | b8744f8d26b760957ba39c224aa8948040516ac7 (diff) |
merge libxshmfence version 1.3.1
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libxshmfence/ChangeLog | 69 | ||||
-rw-r--r-- | lib/libxshmfence/Makefile.am | 2 | ||||
-rw-r--r-- | lib/libxshmfence/Makefile.in | 11 | ||||
-rw-r--r-- | lib/libxshmfence/README.md (renamed from lib/libxshmfence/README) | 19 | ||||
-rw-r--r-- | lib/libxshmfence/aclocal.m4 | 222 | ||||
-rw-r--r-- | lib/libxshmfence/compile | 12 | ||||
-rw-r--r-- | lib/libxshmfence/config.h.in | 3 | ||||
-rw-r--r-- | lib/libxshmfence/configure | 67 | ||||
-rw-r--r-- | lib/libxshmfence/configure.ac | 11 | ||||
-rw-r--r-- | lib/libxshmfence/src/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libxshmfence/src/xshmfence_alloc.c | 20 | ||||
-rw-r--r-- | lib/libxshmfence/test-driver | 25 | ||||
-rw-r--r-- | lib/libxshmfence/test/Makefile.in | 1 |
13 files changed, 322 insertions, 141 deletions
diff --git a/lib/libxshmfence/ChangeLog b/lib/libxshmfence/ChangeLog index 99c8834c0..a37cbf71e 100644 --- a/lib/libxshmfence/ChangeLog +++ b/lib/libxshmfence/ChangeLog @@ -1,3 +1,70 @@ +commit 43749ba6a7631f5060ef85c93942ec32dfd39bf8 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Oct 18 09:38:22 2022 -0700 + + libxshmfence 1.3.1 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit bff067edd6c9ad231affd29283757fe6b431bc54 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Jul 17 18:05:30 2022 -0700 + + gitlab CI: add a basic build test + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7aa043acaff88d5ee5a18e40796acf0da1d98a6c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Jul 17 18:03:52 2022 -0700 + + Fix spelling/wording issues + + Found by using: + codespell --builtin clear,rare,usage,informal,code,names + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 48446b1610f3d4e4236bd83143718042cd6460a8 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Jul 17 18:02:46 2022 -0700 + + Build xz tarballs instead of bzip2 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 946f99b9e4e80d98e5af96bf7f4b0b0107cf25de +Author: Jan Beich <jbeich@FreeBSD.org> +Date: Sat Aug 3 21:40:37 2019 +0000 + + alloc: prefer SHM_ANON on FreeBSD a la memfd_create + + Signed-off-by: Jan Beich <jbeich@FreeBSD.org> + +commit 51d4b7eafef091bd77c59777537e762fe3e586a8 +Author: Jan Beich <jbeich@FreeBSD.org> +Date: Fri Jul 7 13:57:56 2017 +0000 + + alloc: prefer atomic close-on-exec without O_TMPFILE as well + + Signed-off-by: Jan Beich <jbeich@FreeBSD.org> + +commit 87a66f2eae8016a62d1b29e38160ed38de3144ef +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Dec 7 19:50:56 2018 -0800 + + Update configure.ac bug URL for gitlab migration + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 40f80ca096251353977d3d75e63e6efd5e2321dc +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Nov 19 23:08:58 2018 -0800 + + Update README for gitlab migration + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + commit f38b2e73071ba516127f8f5ae47f48df58dc9d53 Author: Matt Turner <mattst88@gmail.com> Date: Mon Feb 26 09:26:06 2018 -0800 @@ -7,7 +74,7 @@ Date: Mon Feb 26 09:26:06 2018 -0800 Signed-off-by: Matt Turner <mattst88@gmail.com> commit 30d946bc7b522ada9ec2fdbd502f9e36aae21bba -Author: Michał Górny <mgorny@gentoo.org> +Author: Michał Górny < <mgorny@gentoo.org> Date: Thu Feb 22 19:23:38 2018 +0100 Fix missing <limits.h> include for HAVE_UMTX branch of futex diff --git a/lib/libxshmfence/Makefile.am b/lib/libxshmfence/Makefile.am index 670cdcbb8..1d7043b13 100644 --- a/lib/libxshmfence/Makefile.am +++ b/lib/libxshmfence/Makefile.am @@ -25,7 +25,7 @@ SUBDIRS = src test pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xshmfence.pc -EXTRA_DIST = xshmfence.pc.in ChangeLog +EXTRA_DIST = xshmfence.pc.in ChangeLog README.md MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog diff --git a/lib/libxshmfence/Makefile.in b/lib/libxshmfence/Makefile.in index 518ac36f1..42c25b300 100644 --- a/lib/libxshmfence/Makefile.in +++ b/lib/libxshmfence/Makefile.in @@ -73,7 +73,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/xshmfence.pc.in $(top_srcdir)/configure COPYING \ ChangeLog compile config.guess config.sub depcomp install-sh \ @@ -187,9 +187,9 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best -DIST_TARGETS = dist-bzip2 dist-gzip +DIST_TARGETS = dist-xz dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -328,6 +328,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -339,7 +340,7 @@ top_srcdir = @top_srcdir@ SUBDIRS = src test pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xshmfence.pc -EXTRA_DIST = xshmfence.pc.in ChangeLog +EXTRA_DIST = xshmfence.pc.in ChangeLog README.md MAINTAINERCLEANFILES = ChangeLog all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -633,6 +634,7 @@ distdir: $(DISTFILES) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) + dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) @@ -640,7 +642,6 @@ dist-bzip2: distdir dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) - dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) diff --git a/lib/libxshmfence/README b/lib/libxshmfence/README.md index db193b7be..e28a62d8f 100644 --- a/lib/libxshmfence/README +++ b/lib/libxshmfence/README.md @@ -1,4 +1,5 @@ libxshmfence - Shared memory 'SyncFence' synchronization primitive +------------------------------------------------------------------ This library offers a CPU-based synchronization primitive compatible with the X SyncFence objects that can be shared between processes @@ -14,23 +15,15 @@ There are two underlying implementations: All questions regarding this software should be directed at the Xorg mailing list: - http://lists.freedesktop.org/mailman/listinfo/xorg + https://lists.x.org/mailman/listinfo/xorg -Please submit bug reports to the Xorg bugzilla: +The primary development code repository can be found at: - https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + https://gitlab.freedesktop.org/xorg/lib/libxshmfence -The master development code repository can be found at: - - git://anongit.freedesktop.org/git/xorg/lib/libxshmfence - - http://cgit.freedesktop.org/xorg/lib/libxshmfence +Please submit bug reports and requests to merge patches there. For patch submission instructions, see: - http://www.x.org/wiki/Development/Documentation/SubmittingPatches - -For more information on the git code manager, see: - - http://wiki.x.org/wiki/GitPage + https://www.x.org/wiki/Development/Documentation/SubmittingPatches diff --git a/lib/libxshmfence/aclocal.m4 b/lib/libxshmfence/aclocal.m4 index fbfdcb44e..ff9ff5994 100644 --- a/lib/libxshmfence/aclocal.m4 +++ b/lib/libxshmfence/aclocal.m4 @@ -8606,32 +8606,63 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -# -# 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 -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 12 (pkg-config-0.29.2) -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- +dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29.2]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -8653,18 +8684,19 @@ if test -n "$PKG_CONFIG"; then PKG_CONFIG="" fi fi[]dnl -])# PKG_PROG_PKG_CONFIG +])dnl PKG_PROG_PKG_CONFIG -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -8674,8 +8706,10 @@ m4_ifvaln([$3], [else $3])dnl fi]) -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -8687,10 +8721,11 @@ m4_define([_PKG_CONFIG], else pkg_failed=untried fi[]dnl -])# _PKG_CONFIG +])dnl _PKG_CONFIG -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -8698,26 +8733,24 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then else _pkg_short_errors_supported=no fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED +])dnl _PKG_SHORT_ERRORS_SUPPORTED -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -8727,11 +8760,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -8748,7 +8781,7 @@ installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full @@ -8764,16 +8797,40 @@ else AC_MSG_RESULT([yes]) $3 fi[]dnl -])# PKG_CHECK_MODULES +])dnl PKG_CHECK_MODULES -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# parameter. +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -8784,16 +8841,18 @@ AC_ARG_WITH([pkgconfigdir], AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_INSTALLDIR +])dnl PKG_INSTALLDIR -# PKG_NOARCH_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable noarch_pkgconfigdir as the location where a -# module should install arch-independent pkg-config .pc files. By -# default the directory is $datadir/pkgconfig, but the default can be -# changed by passing DIRECTORY. The user can override through the -# --with-noarch-pkgconfigdir parameter. +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -8804,7 +8863,24 @@ AC_ARG_WITH([noarch-pkgconfigdir], AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_NOARCH_INSTALLDIR +])dnl PKG_NOARCH_INSTALLDIR + + +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR # Copyright (C) 2002-2012 Free Software Foundation, Inc. # diff --git a/lib/libxshmfence/compile b/lib/libxshmfence/compile index 2ab71e4ea..df363c8fb 100644 --- a/lib/libxshmfence/compile +++ b/lib/libxshmfence/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2016-01-11.22; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) @@ -340,7 +340,7 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/libxshmfence/config.h.in b/lib/libxshmfence/config.h.in index 1923b0eff..a88ec9148 100644 --- a/lib/libxshmfence/config.h.in +++ b/lib/libxshmfence/config.h.in @@ -22,6 +22,9 @@ /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `mkostemp' function. */ +#undef HAVE_MKOSTEMP + /* Use pthread primitives */ #undef HAVE_PTHREAD diff --git a/lib/libxshmfence/configure b/lib/libxshmfence/configure index 4a02cf3ef..7de8cf3a0 100644 --- a/lib/libxshmfence/configure +++ b/lib/libxshmfence/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libxshmfence 1.3. +# Generated by GNU Autoconf 2.69 for libxshmfence 1.3.1. # -# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. +# Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/issues>. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -275,7 +275,7 @@ fi $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=xorg +$0: https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/issues $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 @@ -591,9 +591,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libxshmfence' PACKAGE_TARNAME='libxshmfence' -PACKAGE_VERSION='1.3' -PACKAGE_STRING='libxshmfence 1.3' -PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' +PACKAGE_VERSION='1.3.1' +PACKAGE_STRING='libxshmfence 1.3.1' +PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/issues' PACKAGE_URL='' ac_unique_file="Makefile.am" @@ -766,6 +766,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -859,6 +860,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1111,6 +1113,15 @@ do | -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=* \ @@ -1248,7 +1259,7 @@ fi 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 + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1361,7 +1372,7 @@ if test "$ac_init_help" = "long"; then # 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 libxshmfence 1.3 to adapt to many kinds of systems. +\`configure' configures libxshmfence 1.3.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1401,6 +1412,7 @@ Fine tuning of the installation directories: --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] @@ -1431,7 +1443,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libxshmfence 1.3:";; + short | recursive ) echo "Configuration of libxshmfence 1.3.1:";; esac cat <<\_ACEOF @@ -1500,7 +1512,7 @@ Some influential environment variables: 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 <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. +Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/issues>. _ACEOF ac_status=$? fi @@ -1563,7 +1575,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libxshmfence configure 1.3 +libxshmfence configure 1.3.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1722,9 +1734,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $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=xorg ## -## ---------------------------------------------------------------------- ##" +( $as_echo "## ---------------------------------------------------------------------------- ## +## Report this to https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/issues ## +## ---------------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -1978,7 +1990,7 @@ 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 libxshmfence $as_me 1.3, which was +It was created by libxshmfence $as_me 1.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4119,7 +4131,7 @@ fi # Define the identity of the package. PACKAGE='libxshmfence' - VERSION='1.3' + VERSION='1.3.1' cat >>confdefs.h <<_ACEOF @@ -17989,8 +18001,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPROTO" >&5 -$as_echo_n "checking for XPROTO... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xproto" >&5 +$as_echo_n "checking for xproto... " >&6; } if test -n "$XPROTO_CFLAGS"; then pkg_cv_XPROTO_CFLAGS="$XPROTO_CFLAGS" @@ -18030,7 +18042,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -18057,7 +18069,7 @@ Alternatively, you may set the environment variables XPROTO_CFLAGS and XPROTO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -18083,12 +18095,13 @@ fi CFLAGS="$CFLAGS $XPROTO_CFLAGS" -for ac_func in memfd_create +for ac_func in memfd_create mkostemp do : - ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create" -if test "x$ac_cv_func_memfd_create" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_MEMFD_CREATE 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -18776,7 +18789,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libxshmfence $as_me 1.3, which was +This file was extended by libxshmfence $as_me 1.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18836,13 +18849,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>." +Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/issues>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libxshmfence config.status 1.3 +libxshmfence config.status 1.3.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/lib/libxshmfence/configure.ac b/lib/libxshmfence/configure.ac index 568842bb6..3a568d54f 100644 --- a/lib/libxshmfence/configure.ac +++ b/lib/libxshmfence/configure.ac @@ -23,15 +23,16 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) -AC_INIT([libxshmfence], [1.3], - [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libxshmfence]) +AC_INIT([libxshmfence], [1.3.1], + [https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/issues], + [libxshmfence]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) AC_USE_SYSTEM_EXTENSIONS # Initialize Automake -AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_INIT_AUTOMAKE([foreign dist-xz]) AM_MAINTAINER_MODE # Initialize libtool @@ -49,7 +50,7 @@ LINT_FLAGS="${LINT_FLAGS} ${FONTENC_CFLAGS}" dnl -dnl Locate a suitable tmp file system for creating shared memeory files +dnl Locate a suitable tmp file system for creating shared memory files dnl AC_ARG_ENABLE(futex, AS_HELP_STRING([--enable-futex], [Enable futexes (default: auto)]), @@ -99,7 +100,7 @@ AC_SUBST([XPROTO_CFLAGS]) CFLAGS="$CFLAGS $XPROTO_CFLAGS" -AC_CHECK_FUNCS(memfd_create) +AC_CHECK_FUNCS(memfd_create mkostemp) AC_CHECK_DECLS([__NR_memfd_create], [], [], [[#include <asm/unistd.h>]]) diff --git a/lib/libxshmfence/src/Makefile.in b/lib/libxshmfence/src/Makefile.in index dcd14d8ab..811b3b901 100644 --- a/lib/libxshmfence/src/Makefile.in +++ b/lib/libxshmfence/src/Makefile.in @@ -288,6 +288,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libxshmfence/src/xshmfence_alloc.c b/lib/libxshmfence/src/xshmfence_alloc.c index f95d1885d..55cd3bd2c 100644 --- a/lib/libxshmfence/src/xshmfence_alloc.c +++ b/lib/libxshmfence/src/xshmfence_alloc.c @@ -30,6 +30,8 @@ #define __MAP_NOFAULT 0 #endif +#include <fcntl.h> + #if !HAVE_MEMFD_CREATE #if HAVE_DECL___NR_MEMFD_CREATE #include <asm/unistd.h> @@ -72,21 +74,39 @@ xshmfence_alloc_shm(void) { char template[] = SHMDIR "/shmfd-XXXXXX"; int fd; +#ifndef HAVE_MKOSTEMP + int flags; +#endif #if HAVE_MEMFD_CREATE fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING); if (fd < 0) #endif +#ifdef SHM_ANON + fd = shm_open(SHM_ANON, O_RDWR|O_CLOEXEC, 0600); + if (fd < 0) +#endif { #ifdef O_TMPFILE fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); if (fd < 0) #endif { +#ifdef HAVE_MKOSTEMP + fd = mkostemp(template, O_CLOEXEC); +#else fd = mkstemp(template); +#endif if (fd < 0) return fd; unlink(template); +#ifndef HAVE_MKOSTEMP + flags = fcntl(fd, F_GETFD); + if (flags != -1) { + flags |= FD_CLOEXEC; + fcntl(fd, F_SETFD, &flags); + } +#endif } } if (ftruncate(fd, sizeof (struct xshmfence)) < 0) { diff --git a/lib/libxshmfence/test-driver b/lib/libxshmfence/test-driver index 0218a01f6..be73b80ad 100644 --- a/lib/libxshmfence/test-driver +++ b/lib/libxshmfence/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 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 @@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -42,11 +42,13 @@ print_usage () { cat <<END Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] + test-driver --test-name NAME --log-file PATH --trs-file PATH + [--expect-failure {yes|no}] [--color-tests {yes|no}] + [--enable-hard-errors {yes|no}] [--] TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] + The '--test-name', '--log-file' and '--trs-file' options are mandatory. +See the GNU Automake documentation for information. END } @@ -103,8 +105,11 @@ trap "st=130; $do_exit" 2 trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 -# Test script is run here. -"$@" >$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +131,7 @@ esac # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" @@ -140,7 +145,7 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/libxshmfence/test/Makefile.in b/lib/libxshmfence/test/Makefile.in index f74fc0239..1c83e6230 100644 --- a/lib/libxshmfence/test/Makefile.in +++ b/lib/libxshmfence/test/Makefile.in @@ -254,6 +254,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ |