diff --git a/lib/libXv/ChangeLog b/lib/libXv/ChangeLog index 1ddb8745b..b8c4e8844 100644 --- a/lib/libXv/ChangeLog +++ b/lib/libXv/ChangeLog @@ -1,3 +1,195 @@ +commit 736d7ac5a94c7aa6761d50ab58339a3d9a116c51 +Author: Alan Coopersmith +Date: Sat Sep 7 22:19:48 2013 -0700 + + libXv 1.0.10 + + Signed-off-by: Alan Coopersmith + +commit 4a7d2ca2438649e61b7dcb9491391ff6fbd482ac +Author: Alan Coopersmith +Date: Fri Jul 5 21:19:29 2013 -0700 + + Remove fallback for _XEatDataWords, require libX11 1.6 for it + + _XEatDataWords was orignally introduced with the May 2013 security + patches, and in order to ease the process of delivering those, + fallback versions of _XEatDataWords were included in the X extension + library patches so they could be applied to older versions that didn't + have libX11 1.6 yet. Now that we're past that hurdle, we can drop + the fallbacks and just require libX11 1.6 for building new versions + of the extension libraries. + + Signed-off-by: Alan Coopersmith + +commit 06d275959b5dd78c319d5200ca6d986934b18920 +Author: Alan Coopersmith +Date: Sat Jun 22 23:43:58 2013 -0700 + + Refactor error handling + + Reduce code duplication, make error checking & cleanup more consistent + + Signed-off-by: Alan Coopersmith + +commit 29b23d387e32d09e1b34682f01cee899a08a1176 +Author: Alan Coopersmith +Date: Sat Jun 22 21:47:34 2013 -0700 + + Add missing calls to _XEatDataWords when we are skipping _XRead + + If we failed to allocate the buffer to _XRead into, discard the + rest of the reply, instead of leaving it to confuse the reading + of the next reply. + + Signed-off-by: Alan Coopersmith + +commit 5a09a55b5b13280990465d83205e796bb8cd68ac +Author: Alan Coopersmith +Date: Sat Jun 22 21:04:06 2013 -0700 + + Replace custom copy of GetReq macro with call to Xlib 1.5's _XGetRequest + + xvproto.h names don't match those required by the Xlibint.h GetReq* macros, + but at least we can rely on the _XGetRequest function for the bulk of the + work now, instead of duplicating it. + + Also clears clang warnings repeated for every request function: + + Xv.c:137:5: warning: cast from 'char *' to 'xvQueryExtensionReq *' increases re + quired alignment from 1 to 2 [-Wcast-align] + XvGetReq(QueryExtension, req); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ./Xvlibint.h:52:8: note: expanded from macro 'XvGetReq' + req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Xv.c:137:5: warning: implicit conversion loses integer precision: 'int' to 'CAR + D8' (aka 'unsigned char') [-Wconversion] + XvGetReq(QueryExtension, req); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ./Xvlibint.h:53:30: note: expanded from macro 'XvGetReq' + req->reqType = info->codes->major_opcode;\ + ~ ~~~~~~~~~~~~~^~~~~~~~~~~~ + + Signed-off-by: Alan Coopersmith + +commit ef2722e10b275d13d754d2b92e67f72b0716d070 +Author: Alan Coopersmith +Date: Sat Jun 22 20:33:13 2013 -0700 + + Require ANSI C89 pre-processor, drop pre-C89 token pasting support + + Signed-off-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit e73a2199f039e9ae772efb6be8d1db68eb346fa4 +Author: Alan Coopersmith +Date: Sat Jun 22 13:35:12 2013 -0700 + + Use pad_to_int32 macro instead of repeated (x + 3) & ~3 pattern + + Makes code clearer, and using ~3U instead of ~3 clears some signed int + warnings. + + Signed-off-by: Alan Coopersmith + +commit 4ced44196d6636006c9724a373c0d2ca0c12dc1e +Author: Alan Coopersmith +Date: Sat Jun 22 11:20:13 2013 -0700 + + Fix sign conversion & comparison warnings from clang + + Clears up: + Xv.c:196:21: warning: implicit conversion changes signedness: 'CARD32' (aka 'unsigned int') to 'int' [-Wsign-conversion] + size = rep.length << 2; + ~ ~~~~~~~~~~~^~~~ + Xv.c:212:41: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] + if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) { + ~~~~~~~~^~~~~ + Xv.c:236:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] + pa->num_adaptors = rep.num_adaptors - ii; + ~ ~~~~~~~~~~~~~~~~~^~~~ + Xv.c:243:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] + if ( (name = (char *)Xmalloc(size+1)) == NULL) + ~~~~~~~~~~~~^~~ + Xv.c:251:37: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] + (void)strncpy(name, u.string, size); + ~~~~~~~ ^~~~ + Xv.c:260:36: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] + if ((pfs=(XvFormat *)Xmalloc(size))==NULL) { + ~~~~~~~~^~~~~ + Xv.c:269:20: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] + for (jj=0; jjnum_formats; jj++) { + ~~^~~~~~~~~~~~~~~~ + Xv.c:259:29: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] + size = pa->num_formats*sizeof(XvFormat); + ~ ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ + Xv.c:305:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] + for (ii=0; iinum_adaptors; ii++, pa++) + ~~^~~~~~~~~~~~~~~~~~~~~~~~ + Xv.c:356:21: warning: implicit conversion changes signedness: 'CARD32' (aka 'unsigned int') to 'int' [-Wsign-conversion] + size = rep.length << 2; + ~ ~~~~~~~~~~~^~~~ + Xv.c:369:41: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] + if ( (pes = (XvEncodingInfo *)Xmalloc(size)) == NULL) { + ~~~~~~~~^~~~~ + Xv.c:392:45: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] + pe->num_encodings = rep.num_encodings - jj; + ~ ~~~~~~~~~~~~~~~~~~^~~~ + Xv.c:397:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] + if ( (name = (char *)Xmalloc(size+1)) == NULL) { + ~~~~~~~~~~~~^~~ + Xv.c:404:31: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] + strncpy(name, u.string, size); + ~~~~~~~ ^~~~ + Xv.c:433:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] + for (ii=0; iinum_encodings; ii++, pe++) { + ~~^~~~~~~~~~~~~~~~~~~~~~~~~~ + Xv.c:886:27: warning: comparison of integers of different signs: 'int' and 'CAR + D32' (aka 'unsigned int') [-Wsign-compare] + for (i = 0; i < rep.num_attributes; i++) { + ~ ^ ~~~~~~~~~~~~~~~~~~ + Xv.c:946:27: warning: comparison of integers of different signs: 'int' and 'CAR + D32' (aka 'unsigned int') [-Wsign-compare] + for (i = 0; i < rep.num_formats; i++) { + ~ ^ ~~~~~~~~~~~~~~~ + Xv.c:1100:5: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] + SetReqLen(req, len, len); + ^~~~~~~~~~~~~~~~~~~~~~~~ + X11/Xlibint.h:530:27: note: expanded from macro 'SetReqLen' + if ((req->length + n) > (unsigned)65535) { \ + ^ ~~~~~~~~~~~~~~~ + Xv.c:1100:20: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion] + SetReqLen(req, len, len); + ~~~~~~~~~~~~~~~^~~~~~~~~ + X11/Xlibint.h:532:21: note: expanded from macro 'SetReqLen' + MakeBigReq(req,n) \ + ^ + X11/Xlibint.h:505:35: note: expanded from macro 'MakeBigReq' + ((CARD32 *)req)[1] = _BRlen + n + 2; \ + ~ ^ + + Signed-off-by: Alan Coopersmith + +commit 89dc3ff457644271b1c633efa9682ae45e55d9d8 +Author: Alan Coopersmith +Date: Sat Jun 22 11:07:13 2013 -0700 + + Remove unnecessary casts from Xmalloc calls + + Signed-off-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit 54851e0e72e2017c14c504459078c97d6112696b +Author: Alan Coopersmith +Date: Sat Jun 22 19:58:20 2013 -0700 + + Adopt X.Org standard code style, with consistent indentation + + Having differing indent levels of 2, 3, & 4 spaces hurts my eyes. + + Signed-off-by: Alan Coopersmith + commit d58f74ebfd0c56ffeb8e288c65592228af197a2e Author: Alan Coopersmith Date: Sat Jun 22 19:06:09 2013 -0700 diff --git a/lib/libXv/Makefile.in b/lib/libXv/Makefile.in index dc0e852bb..be0d88072 100644 --- a/lib/libXv/Makefile.in +++ b/lib/libXv/Makefile.in @@ -75,7 +75,8 @@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in $(srcdir)/xv.pc.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - config.guess config.sub depcomp install-sh ltmain.sh missing + compile config.guess config.sub depcomp install-sh ltmain.sh \ + missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ diff --git a/lib/libXv/aclocal.m4 b/lib/libXv/aclocal.m4 index 1e23c4ddf..91089525c 100644 --- a/lib/libXv/aclocal.m4 +++ b/lib/libXv/aclocal.m4 @@ -9792,7 +9792,7 @@ AC_SUBST([am__untar]) dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. -dnl +dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation @@ -9825,10 +9825,10 @@ dnl DEALINGS IN THE SOFTWARE. # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # -# See the "minimum version" comment for each macro you use to see what +# See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.16.2]) +m4_define([vers_have], [1.17.1]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -9848,7 +9848,7 @@ m4_undefine([maj_needed]) # such as man pages and config files AC_DEFUN([XORG_PROG_RAWCPP],[ AC_REQUIRE([AC_PROG_CPP]) -AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], +AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) # Check for flag to avoid builtin definitions - assumes unix is predefined, @@ -11334,18 +11334,18 @@ fi found="no" m4_foreach([flag], m4_cdr($@), [ if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" fi PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname - AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) + AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) AC_CACHE_VAL($cacheid, [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], @@ -11604,7 +11604,7 @@ dnl # XORG_RELEASE_VERSION # -------------------- # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. - + AC_DEFUN([XORG_RELEASE_VERSION],[ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | cut -d . -f 1`], diff --git a/lib/libXv/compile b/lib/libXv/compile new file mode 100644 index 000000000..531136b06 --- /dev/null +++ b/lib/libXv/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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, 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, see . + +# 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# 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-end: "; # UTC" +# End: diff --git a/lib/libXv/config.h.in b/lib/libXv/config.h.in index cfd7853b0..4711f3dbf 100644 --- a/lib/libXv/config.h.in +++ b/lib/libXv/config.h.in @@ -30,9 +30,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `_XEatDataWords' function. */ -#undef HAVE__XEATDATAWORDS - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR diff --git a/lib/libXv/configure b/lib/libXv/configure index dc7a764f0..ecf6be2db 100644 --- a/lib/libXv/configure +++ b/lib/libXv/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libXv 1.0.9. +# Generated by GNU Autoconf 2.69 for libXv 1.0.10. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libXv' PACKAGE_TARNAME='libXv' -PACKAGE_VERSION='1.0.9' -PACKAGE_STRING='libXv 1.0.9' +PACKAGE_VERSION='1.0.10' +PACKAGE_STRING='libXv 1.0.10' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' @@ -1357,7 +1357,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 libXv 1.0.9 to adapt to many kinds of systems. +\`configure' configures libXv 1.0.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1427,7 +1427,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libXv 1.0.9:";; + short | recursive ) echo "Configuration of libXv 1.0.10:";; esac cat <<\_ACEOF @@ -1552,7 +1552,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libXv configure 1.0.9 +libXv configure 1.0.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1876,7 +1876,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 libXv $as_me 1.0.9, which was +It was created by libXv $as_me 1.0.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2705,7 +2705,7 @@ fi # Define the identity of the package. PACKAGE='libXv' - VERSION='1.0.9' + VERSION='1.0.10' cat >>confdefs.h <<_ACEOF @@ -11740,18 +11740,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wall" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wall" >&5 -$as_echo_n "checking if $CC supports-Wall... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5 +$as_echo_n "checking if $CC supports -Wall... " >&6; } cacheid=xorg_cv_cc_flag__Wall if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -11858,18 +11858,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-arith" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wpointer-arith" >&5 -$as_echo_n "checking if $CC supports-Wpointer-arith... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5 +$as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_arith if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -11976,18 +11976,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-declarations" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-declarations" >&5 -$as_echo_n "checking if $CC supports-Wmissing-declarations... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5 +$as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_declarations if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12094,18 +12094,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat=2" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wformat=2" >&5 -$as_echo_n "checking if $CC supports-Wformat=2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5 +$as_echo_n "checking if $CC supports -Wformat=2... " >&6; } cacheid=xorg_cv_cc_flag__Wformat_2 if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12143,18 +12143,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wformat" >&5 -$as_echo_n "checking if $CC supports-Wformat... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5 +$as_echo_n "checking if $CC supports -Wformat... " >&6; } cacheid=xorg_cv_cc_flag__Wformat if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12263,18 +12263,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wstrict-prototypes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wstrict-prototypes" >&5 -$as_echo_n "checking if $CC supports-Wstrict-prototypes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5 +$as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wstrict_prototypes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12381,18 +12381,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-prototypes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-prototypes" >&5 -$as_echo_n "checking if $CC supports-Wmissing-prototypes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5 +$as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_prototypes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12499,18 +12499,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnested-externs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wnested-externs" >&5 -$as_echo_n "checking if $CC supports-Wnested-externs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5 +$as_echo_n "checking if $CC supports -Wnested-externs... " >&6; } cacheid=xorg_cv_cc_flag__Wnested_externs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12617,18 +12617,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wbad-function-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wbad-function-cast" >&5 -$as_echo_n "checking if $CC supports-Wbad-function-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5 +$as_echo_n "checking if $CC supports -Wbad-function-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wbad_function_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12735,18 +12735,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wold-style-definition" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wold-style-definition" >&5 -$as_echo_n "checking if $CC supports-Wold-style-definition... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5 +$as_echo_n "checking if $CC supports -Wold-style-definition... " >&6; } cacheid=xorg_cv_cc_flag__Wold_style_definition if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12853,18 +12853,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wdeclaration-after-statement" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wdeclaration-after-statement" >&5 -$as_echo_n "checking if $CC supports-Wdeclaration-after-statement... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5 +$as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; } cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -12975,18 +12975,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wunused" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wunused" >&5 -$as_echo_n "checking if $CC supports-Wunused... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5 +$as_echo_n "checking if $CC supports -Wunused... " >&6; } cacheid=xorg_cv_cc_flag__Wunused if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13093,18 +13093,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wuninitialized" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wuninitialized" >&5 -$as_echo_n "checking if $CC supports-Wuninitialized... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5 +$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; } cacheid=xorg_cv_cc_flag__Wuninitialized if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13211,18 +13211,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wshadow" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wshadow" >&5 -$as_echo_n "checking if $CC supports-Wshadow... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5 +$as_echo_n "checking if $CC supports -Wshadow... " >&6; } cacheid=xorg_cv_cc_flag__Wshadow if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13329,18 +13329,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wcast-qual" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wcast-qual" >&5 -$as_echo_n "checking if $CC supports-Wcast-qual... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wcast-qual" >&5 +$as_echo_n "checking if $CC supports -Wcast-qual... " >&6; } cacheid=xorg_cv_cc_flag__Wcast_qual if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13447,18 +13447,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-noreturn" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-noreturn" >&5 -$as_echo_n "checking if $CC supports-Wmissing-noreturn... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5 +$as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_noreturn if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13565,18 +13565,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-format-attribute" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-format-attribute" >&5 -$as_echo_n "checking if $CC supports-Wmissing-format-attribute... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5 +$as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_format_attribute if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13695,18 +13695,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=implicit" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=implicit" >&5 -$as_echo_n "checking if $CC supports-Werror=implicit... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5 +$as_echo_n "checking if $CC supports -Werror=implicit... " >&6; } cacheid=xorg_cv_cc_flag__Werror_implicit if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13744,18 +13744,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 -$as_echo_n "checking if $CC supports-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13862,18 +13862,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=nonnull" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=nonnull" >&5 -$as_echo_n "checking if $CC supports-Werror=nonnull... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5 +$as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; } cacheid=xorg_cv_cc_flag__Werror_nonnull if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -13980,18 +13980,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=init-self" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=init-self" >&5 -$as_echo_n "checking if $CC supports-Werror=init-self... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5 +$as_echo_n "checking if $CC supports -Werror=init-self... " >&6; } cacheid=xorg_cv_cc_flag__Werror_init_self if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14098,18 +14098,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=main" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=main" >&5 -$as_echo_n "checking if $CC supports-Werror=main... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5 +$as_echo_n "checking if $CC supports -Werror=main... " >&6; } cacheid=xorg_cv_cc_flag__Werror_main if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14216,18 +14216,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=missing-braces" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=missing-braces" >&5 -$as_echo_n "checking if $CC supports-Werror=missing-braces... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5 +$as_echo_n "checking if $CC supports -Werror=missing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Werror_missing_braces if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14334,18 +14334,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=sequence-point" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=sequence-point" >&5 -$as_echo_n "checking if $CC supports-Werror=sequence-point... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5 +$as_echo_n "checking if $CC supports -Werror=sequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Werror_sequence_point if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14452,18 +14452,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=return-type" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=return-type" >&5 -$as_echo_n "checking if $CC supports-Werror=return-type... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5 +$as_echo_n "checking if $CC supports -Werror=return-type... " >&6; } cacheid=xorg_cv_cc_flag__Werror_return_type if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14501,18 +14501,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 -$as_echo_n "checking if $CC supports-errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14619,18 +14619,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=trigraphs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=trigraphs" >&5 -$as_echo_n "checking if $CC supports-Werror=trigraphs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5 +$as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Werror_trigraphs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14737,18 +14737,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=array-bounds" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=array-bounds" >&5 -$as_echo_n "checking if $CC supports-Werror=array-bounds... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5 +$as_echo_n "checking if $CC supports -Werror=array-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Werror_array_bounds if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14855,18 +14855,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=write-strings" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=write-strings" >&5 -$as_echo_n "checking if $CC supports-Werror=write-strings... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5 +$as_echo_n "checking if $CC supports -Werror=write-strings... " >&6; } cacheid=xorg_cv_cc_flag__Werror_write_strings if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -14973,18 +14973,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=address" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=address" >&5 -$as_echo_n "checking if $CC supports-Werror=address... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5 +$as_echo_n "checking if $CC supports -Werror=address... " >&6; } cacheid=xorg_cv_cc_flag__Werror_address if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15091,18 +15091,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=int-to-pointer-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=int-to-pointer-cast" >&5 -$as_echo_n "checking if $CC supports-Werror=int-to-pointer-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5 +$as_echo_n "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15140,18 +15140,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_BAD_PTR_INT_COMBINATION" >&5 -$as_echo_n "checking if $CC supports-errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15258,18 +15258,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=pointer-to-int-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=pointer-to-int-cast" >&5 -$as_echo_n "checking if $CC supports-Werror=pointer-to-int-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5 +$as_echo_n "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15379,18 +15379,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wimplicit" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wimplicit" >&5 -$as_echo_n "checking if $CC supports-Wimplicit... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5 +$as_echo_n "checking if $CC supports -Wimplicit... " >&6; } cacheid=xorg_cv_cc_flag__Wimplicit if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15497,18 +15497,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnonnull" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wnonnull" >&5 -$as_echo_n "checking if $CC supports-Wnonnull... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5 +$as_echo_n "checking if $CC supports -Wnonnull... " >&6; } cacheid=xorg_cv_cc_flag__Wnonnull if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15615,18 +15615,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Winit-self" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Winit-self" >&5 -$as_echo_n "checking if $CC supports-Winit-self... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5 +$as_echo_n "checking if $CC supports -Winit-self... " >&6; } cacheid=xorg_cv_cc_flag__Winit_self if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15733,18 +15733,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmain" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmain" >&5 -$as_echo_n "checking if $CC supports-Wmain... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5 +$as_echo_n "checking if $CC supports -Wmain... " >&6; } cacheid=xorg_cv_cc_flag__Wmain if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15851,18 +15851,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-braces" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-braces" >&5 -$as_echo_n "checking if $CC supports-Wmissing-braces... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5 +$as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_braces if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -15969,18 +15969,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wsequence-point" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wsequence-point" >&5 -$as_echo_n "checking if $CC supports-Wsequence-point... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5 +$as_echo_n "checking if $CC supports -Wsequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Wsequence_point if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -16087,18 +16087,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wreturn-type" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wreturn-type" >&5 -$as_echo_n "checking if $CC supports-Wreturn-type... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5 +$as_echo_n "checking if $CC supports -Wreturn-type... " >&6; } cacheid=xorg_cv_cc_flag__Wreturn_type if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -16205,18 +16205,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wtrigraphs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wtrigraphs" >&5 -$as_echo_n "checking if $CC supports-Wtrigraphs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5 +$as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Wtrigraphs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -16323,18 +16323,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Warray-bounds" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Warray-bounds" >&5 -$as_echo_n "checking if $CC supports-Warray-bounds... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5 +$as_echo_n "checking if $CC supports -Warray-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Warray_bounds if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -16441,18 +16441,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wwrite-strings" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wwrite-strings" >&5 -$as_echo_n "checking if $CC supports-Wwrite-strings... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5 +$as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; } cacheid=xorg_cv_cc_flag__Wwrite_strings if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -16559,18 +16559,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Waddress" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Waddress" >&5 -$as_echo_n "checking if $CC supports-Waddress... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5 +$as_echo_n "checking if $CC supports -Waddress... " >&6; } cacheid=xorg_cv_cc_flag__Waddress if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -16677,18 +16677,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wint-to-pointer-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wint-to-pointer-cast" >&5 -$as_echo_n "checking if $CC supports-Wint-to-pointer-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5 +$as_echo_n "checking if $CC supports -Wint-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -16795,18 +16795,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-to-int-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wpointer-to-int-cast" >&5 -$as_echo_n "checking if $CC supports-Wpointer-to-int-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5 +$as_echo_n "checking if $CC supports -Wpointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -16946,18 +16946,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -pedantic" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-pedantic" >&5 -$as_echo_n "checking if $CC supports-pedantic... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5 +$as_echo_n "checking if $CC supports -pedantic... " >&6; } cacheid=xorg_cv_cc_flag__pedantic if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -17064,18 +17064,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror" >&5 -$as_echo_n "checking if $CC supports-Werror... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5 +$as_echo_n "checking if $CC supports -Werror... " >&6; } cacheid=xorg_cv_cc_flag__Werror if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -17113,18 +17113,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn" >&5 -$as_echo_n "checking if $CC supports-errwarn... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5 +$as_echo_n "checking if $CC supports -errwarn... " >&6; } cacheid=xorg_cv_cc_flag__errwarn if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -17234,18 +17234,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=attributes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=attributes" >&5 -$as_echo_n "checking if $CC supports-Werror=attributes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5 +$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; } cacheid=xorg_cv_cc_flag__Werror_attributes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -17536,12 +17536,12 @@ if test -n "$XV_CFLAGS"; then pkg_cv_XV_CFLAGS="$XV_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xext xextproto videoproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11 xext xextproto videoproto") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 >= 1.6 xext xextproto videoproto\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11 >= 1.6 xext xextproto videoproto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XV_CFLAGS=`$PKG_CONFIG --cflags "x11 xext xextproto videoproto" 2>/dev/null` + pkg_cv_XV_CFLAGS=`$PKG_CONFIG --cflags "x11 >= 1.6 xext xextproto videoproto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -17553,12 +17553,12 @@ if test -n "$XV_LIBS"; then pkg_cv_XV_LIBS="$XV_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xext xextproto videoproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11 xext xextproto videoproto") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 >= 1.6 xext xextproto videoproto\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11 >= 1.6 xext xextproto videoproto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XV_LIBS=`$PKG_CONFIG --libs "x11 xext xextproto videoproto" 2>/dev/null` + pkg_cv_XV_LIBS=`$PKG_CONFIG --libs "x11 >= 1.6 xext xextproto videoproto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -17579,14 +17579,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 xext xextproto videoproto" 2>&1` + XV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 >= 1.6 xext xextproto videoproto" 2>&1` else - XV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 xext xextproto videoproto" 2>&1` + XV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 >= 1.6 xext xextproto videoproto" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XV_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (x11 xext xextproto videoproto) were not met: + as_fn_error $? "Package requirements (x11 >= 1.6 xext xextproto videoproto) were not met: $XV_PKG_ERRORS @@ -17619,22 +17619,6 @@ $as_echo "yes" >&6; } fi -# Check for _XEatDataWords function that may be patched into older Xlib release -SAVE_LIBS="$LIBS" -LIBS="$XV_LIBS" -for ac_func in _XEatDataWords -do : - ac_fn_c_check_func "$LINENO" "_XEatDataWords" "ac_cv_func__XEatDataWords" -if test "x$ac_cv_func__XEatDataWords" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE__XEATDATAWORDS 1 -_ACEOF - -fi -done - -LIBS="$SAVE_LIBS" - # Allow checking code with lint, sparse, etc. @@ -18308,7 +18292,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 libXv $as_me 1.0.9, which was +This file was extended by libXv $as_me 1.0.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18374,7 +18358,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libXv config.status 1.0.9 +libXv config.status 1.0.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/lib/libXv/configure.ac b/lib/libXv/configure.ac index 4f8c5f235..4d651b557 100644 --- a/lib/libXv/configure.ac +++ b/lib/libXv/configure.ac @@ -22,7 +22,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXv], [1.0.9], +AC_INIT([libXv], [1.0.10], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXv]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) @@ -41,13 +41,7 @@ XORG_DEFAULT_OPTIONS XORG_CHECK_MALLOC_ZERO # Obtain compiler/linker options for depedencies -PKG_CHECK_MODULES(XV, x11 xext xextproto videoproto) - -# Check for _XEatDataWords function that may be patched into older Xlib release -SAVE_LIBS="$LIBS" -LIBS="$XV_LIBS" -AC_CHECK_FUNCS([_XEatDataWords]) -LIBS="$SAVE_LIBS" +PKG_CHECK_MODULES(XV, [x11 >= 1.6 xext xextproto videoproto]) # Allow checking code with lint, sparse, etc. XORG_WITH_LINT diff --git a/lib/libXv/include/X11/extensions/Xvlib.h b/lib/libXv/include/X11/extensions/Xvlib.h index 313037ad4..32b98bff7 100644 --- a/lib/libXv/include/X11/extensions/Xvlib.h +++ b/lib/libXv/include/X11/extensions/Xvlib.h @@ -57,323 +57,323 @@ SOFTWARE. #include typedef struct { - int numerator; - int denominator; + int numerator; + int denominator; } XvRational; typedef struct { - int flags; /* XvGettable, XvSettable */ - int min_value; - int max_value; - char *name; + int flags; /* XvGettable, XvSettable */ + int min_value; + int max_value; + char *name; } XvAttribute; typedef struct { - XvEncodingID encoding_id; - char *name; - unsigned long width; - unsigned long height; - XvRational rate; - unsigned long num_encodings; + XvEncodingID encoding_id; + char *name; + unsigned long width; + unsigned long height; + XvRational rate; + unsigned long num_encodings; } XvEncodingInfo; typedef struct { - char depth; - unsigned long visual_id; + char depth; + unsigned long visual_id; } XvFormat; typedef struct { - XvPortID base_id; - unsigned long num_ports; - char type; - char *name; - unsigned long num_formats; - XvFormat *formats; - unsigned long num_adaptors; + XvPortID base_id; + unsigned long num_ports; + char type; + char *name; + unsigned long num_formats; + XvFormat *formats; + unsigned long num_adaptors; } XvAdaptorInfo; typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Drawable drawable; /* drawable */ - unsigned long reason; /* what generated this event */ - XvPortID port_id; /* what port */ - Time time; /* milliseconds */ + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Drawable drawable; /* drawable */ + unsigned long reason; /* what generated this event */ + XvPortID port_id; /* what port */ + Time time; /* milliseconds */ } XvVideoNotifyEvent; typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - XvPortID port_id; /* what port */ - Time time; /* milliseconds */ - Atom attribute; /* atom that identifies attribute */ - long value; /* value of attribute */ + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + XvPortID port_id; /* what port */ + Time time; /* milliseconds */ + Atom attribute; /* atom that identifies attribute */ + long value; /* value of attribute */ } XvPortNotifyEvent; typedef union { - int type; - XvVideoNotifyEvent xvvideo; - XvPortNotifyEvent xvport; - long pad[24]; + int type; + XvVideoNotifyEvent xvvideo; + XvPortNotifyEvent xvport; + long pad[24]; } XvEvent; typedef struct { - int id; /* Unique descriptor for the format */ - int type; /* XvRGB, XvYUV */ - int byte_order; /* LSBFirst, MSBFirst */ - char guid[16]; /* Globally Unique IDentifier */ - int bits_per_pixel; - int format; /* XvPacked, XvPlanar */ - int num_planes; + int id; /* Unique descriptor for the format */ + int type; /* XvRGB, XvYUV */ + int byte_order; /* LSBFirst, MSBFirst */ + char guid[16]; /* Globally Unique IDentifier */ + int bits_per_pixel; + int format; /* XvPacked, XvPlanar */ + int num_planes; - /* for RGB formats only */ - int depth; - unsigned int red_mask; - unsigned int green_mask; - unsigned int blue_mask; + /* for RGB formats only */ + int depth; + unsigned int red_mask; + unsigned int green_mask; + unsigned int blue_mask; - /* for YUV formats only */ - unsigned int y_sample_bits; - unsigned int u_sample_bits; - unsigned int v_sample_bits; - unsigned int horz_y_period; - unsigned int horz_u_period; - unsigned int horz_v_period; - unsigned int vert_y_period; - unsigned int vert_u_period; - unsigned int vert_v_period; - char component_order[32]; /* eg. UYVY */ - int scanline_order; /* XvTopToBottom, XvBottomToTop */ + /* for YUV formats only */ + unsigned int y_sample_bits; + unsigned int u_sample_bits; + unsigned int v_sample_bits; + unsigned int horz_y_period; + unsigned int horz_u_period; + unsigned int horz_v_period; + unsigned int vert_y_period; + unsigned int vert_u_period; + unsigned int vert_v_period; + char component_order[32]; /* eg. UYVY */ + int scanline_order; /* XvTopToBottom, XvBottomToTop */ } XvImageFormatValues; typedef struct { - int id; - int width, height; - int data_size; /* bytes */ - int num_planes; - int *pitches; /* bytes */ - int *offsets; /* bytes */ - char *data; - XPointer obdata; + int id; + int width, height; + int data_size; /* bytes */ + int num_planes; + int *pitches; /* bytes */ + int *offsets; /* bytes */ + char *data; + XPointer obdata; } XvImage; _XFUNCPROTOBEGIN extern int XvQueryExtension( - Display* /* display */, - unsigned int* /* p_version */, - unsigned int* /* p_revision */, - unsigned int* /* p_requestBase */, - unsigned int* /* p_eventBase */, - unsigned int* /* p_errorBase */ + Display * /* display */, + unsigned int * /* p_version */, + unsigned int * /* p_revision */, + unsigned int * /* p_requestBase */, + unsigned int * /* p_eventBase */, + unsigned int * /* p_errorBase */ ); extern int XvQueryAdaptors( - Display* /* display */, - Window /* window */, - unsigned int* /* p_nAdaptors */, - XvAdaptorInfo** /* p_pAdaptors */ + Display * /* display */, + Window /* window */, + unsigned int * /* p_nAdaptors */, + XvAdaptorInfo ** /* p_pAdaptors */ ); extern int XvQueryEncodings( - Display* /* display */, - XvPortID /* port */, - unsigned int* /* p_nEncoding */, - XvEncodingInfo** /* p_pEncoding */ + Display * /* display */, + XvPortID /* port */, + unsigned int * /* p_nEncoding */, + XvEncodingInfo ** /* p_pEncoding */ ); extern int XvPutVideo( - Display* /* display */, - XvPortID /* port */, - Drawable /* d */, - GC /* gc */, - int /* vx */, - int /* vy */, - unsigned int /* vw */, - unsigned int /* vh */, - int /* dx */, - int /* dy */, - unsigned int /* dw */, - unsigned int /* dh */ + Display * /* display */, + XvPortID /* port */, + Drawable /* d */, + GC /* gc */, + int /* vx */, + int /* vy */, + unsigned int /* vw */, + unsigned int /* vh */, + int /* dx */, + int /* dy */, + unsigned int /* dw */, + unsigned int /* dh */ ); extern int XvPutStill( - Display* /* display */, - XvPortID /* port */, - Drawable /* d */, - GC /* gc */, - int /* vx */, - int /* vy */, - unsigned int /* vw */, - unsigned int /* vh */, - int /* dx */, - int /* dy */, - unsigned int /* dw */, - unsigned int /* dh */ + Display * /* display */, + XvPortID /* port */, + Drawable /* d */, + GC /* gc */, + int /* vx */, + int /* vy */, + unsigned int /* vw */, + unsigned int /* vh */, + int /* dx */, + int /* dy */, + unsigned int /* dw */, + unsigned int /* dh */ ); extern int XvGetVideo( - Display* /* display */, - XvPortID /* port */, - Drawable /* d */, - GC /* gc */, - int /* vx */, - int /* vy */, - unsigned int /* vw */, - unsigned int /* vh */, - int /* dx */, - int /* dy */, - unsigned int /* dw */, - unsigned int /* dh */ + Display * /* display */, + XvPortID /* port */, + Drawable /* d */, + GC /* gc */, + int /* vx */, + int /* vy */, + unsigned int /* vw */, + unsigned int /* vh */, + int /* dx */, + int /* dy */, + unsigned int /* dw */, + unsigned int /* dh */ ); extern int XvGetStill( - Display* /* display */, - XvPortID /* port */, - Drawable /* d */, - GC /* gc */, - int /* vx */, - int /* vy */, - unsigned int /* vw */, - unsigned int /* vh */, - int /* dx */, - int /* dy */, - unsigned int /* dw */, - unsigned int /* dh */ + Display * /* display */, + XvPortID /* port */, + Drawable /* d */, + GC /* gc */, + int /* vx */, + int /* vy */, + unsigned int /* vw */, + unsigned int /* vh */, + int /* dx */, + int /* dy */, + unsigned int /* dw */, + unsigned int /* dh */ ); extern int XvStopVideo( - Display* /* display */, - XvPortID /* port */, - Drawable /* drawable */ + Display * /* display */, + XvPortID /* port */, + Drawable /* drawable */ ); extern int XvGrabPort( - Display* /* display */, - XvPortID /* port */, - Time /* time */ + Display * /* display */, + XvPortID /* port */, + Time /* time */ ); extern int XvUngrabPort( - Display* /* display */, - XvPortID /* port */, - Time /* time */ + Display * /* display */, + XvPortID /* port */, + Time /* time */ ); extern int XvSelectVideoNotify( - Display* /* display */, - Drawable /* drawable */, - Bool /* onoff */ + Display * /* display */, + Drawable /* drawable */, + Bool /* onoff */ ); extern int XvSelectPortNotify( - Display* /* display */, - XvPortID /* port */, - Bool /* onoff */ + Display * /* display */, + XvPortID /* port */, + Bool /* onoff */ ); extern int XvSetPortAttribute( - Display* /* display */, - XvPortID /* port */, - Atom /* attribute */, - int /* value */ + Display * /* display */, + XvPortID /* port */, + Atom /* attribute */, + int /* value */ ); extern int XvGetPortAttribute( - Display* /* display */, - XvPortID /* port */, - Atom /* attribute */, - int* /* p_value */ + Display * /* display */, + XvPortID /* port */, + Atom /* attribute */, + int * /* p_value */ ); extern int XvQueryBestSize( - Display* /* display */, - XvPortID /* port */, - Bool /* motion */, - unsigned int /* vid_w */, - unsigned int /* vid_h */, - unsigned int /* drw_w */, - unsigned int /* drw_h */, - unsigned int* /* p_actual_width */, - unsigned int* /* p_actual_width */ + Display * /* display */, + XvPortID /* port */, + Bool /* motion */, + unsigned int /* vid_w */, + unsigned int /* vid_h */, + unsigned int /* drw_w */, + unsigned int /* drw_h */, + unsigned int * /* p_actual_width */, + unsigned int * /* p_actual_width */ ); -extern XvAttribute* XvQueryPortAttributes( - Display* /* display */, - XvPortID /* port */, - int* /* number */ +extern XvAttribute *XvQueryPortAttributes( + Display * /* display */, + XvPortID /* port */, + int * /* number */ ); extern void XvFreeAdaptorInfo( - XvAdaptorInfo* /* adaptors */ + XvAdaptorInfo * /* adaptors */ ); extern void XvFreeEncodingInfo( - XvEncodingInfo* /* encodings */ + XvEncodingInfo * /* encodings */ ); -extern XvImageFormatValues * XvListImageFormats ( - Display *display, - XvPortID port_id, - int *count_return +extern XvImageFormatValues *XvListImageFormats ( + Display *display, + XvPortID port_id, + int *count_return ); -extern XvImage * XvCreateImage ( - Display *display, - XvPortID port, - int id, - char *data, - int width, - int height +extern XvImage *XvCreateImage ( + Display *display, + XvPortID port, + int id, + char *data, + int width, + int height ); extern int XvPutImage ( - Display *display, - XvPortID id, - Drawable d, - GC gc, - XvImage *image, - int src_x, - int src_y, - unsigned int src_w, - unsigned int src_h, - int dest_x, - int dest_y, - unsigned int dest_w, - unsigned int dest_h + Display *display, + XvPortID id, + Drawable d, + GC gc, + XvImage *image, + int src_x, + int src_y, + unsigned int src_w, + unsigned int src_h, + int dest_x, + int dest_y, + unsigned int dest_w, + unsigned int dest_h ); extern int XvShmPutImage ( - Display *display, - XvPortID id, - Drawable d, - GC gc, - XvImage *image, - int src_x, - int src_y, - unsigned int src_w, - unsigned int src_h, - int dest_x, - int dest_y, - unsigned int dest_w, - unsigned int dest_h, - Bool send_event + Display *display, + XvPortID id, + Drawable d, + GC gc, + XvImage *image, + int src_x, + int src_y, + unsigned int src_w, + unsigned int src_h, + int dest_x, + int dest_y, + unsigned int dest_w, + unsigned int dest_h, + Bool send_event ); -extern XvImage * XvShmCreateImage ( - Display *display, - XvPortID port, - int id, - char* data, - int width, - int height, - XShmSegmentInfo *shminfo +extern XvImage *XvShmCreateImage ( + Display *display, + XvPortID port, + int id, + char *data, + int width, + int height, + XShmSegmentInfo *shminfo ); diff --git a/lib/libXv/src/Xv.c b/lib/libXv/src/Xv.c index 8c45401f1..e47093a58 100644 --- a/lib/libXv/src/Xv.c +++ b/lib/libXv/src/Xv.c @@ -60,17 +60,6 @@ SOFTWARE. #include #include -#ifndef HAVE__XEATDATAWORDS -static inline void _XEatDataWords(Display *dpy, unsigned long n) -{ -# ifndef LONG64 - if (n >= (ULONG_MAX >> 2)) - _XIOError(dpy); -# endif - _XEatData (dpy, n << 2); -} -#endif - static XExtensionInfo _xv_info_data; static XExtensionInfo *xv_info = &_xv_info_data; static const char *xv_extension_name = XvName; @@ -78,1125 +67,1121 @@ static const char *xv_extension_name = XvName; #define XvCheckExtension(dpy, i, val) \ XextCheckExtension(dpy, i, xv_extension_name, val) +#define pad_to_int32(bytes) (((bytes) + 3) & ~3U) + static char *xv_error_string(Display *dpy, int code, XExtCodes *codes, - char * buf, int n); + char *buf, int n); static int xv_close_display(Display *dpy, XExtCodes *codes); static Bool xv_wire_to_event(Display *dpy, XEvent *host, xEvent *wire); static XExtensionHooks xv_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - xv_close_display, /* close_display */ - xv_wire_to_event, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - xv_error_string /* error_string */ + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + xv_close_display, /* close_display */ + xv_wire_to_event, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + xv_error_string /* error_string */ }; -static const char *xv_error_list[] = -{ - "BadPort", /* XvBadPort */ - "BadEncoding", /* XvBadEncoding */ - "BadControl" /* XvBadControl */ +static const char *xv_error_list[] = { + "BadPort", /* XvBadPort */ + "BadEncoding", /* XvBadEncoding */ + "BadControl" /* XvBadControl */ }; -static XEXT_GENERATE_CLOSE_DISPLAY (xv_close_display, xv_info) +static XEXT_GENERATE_CLOSE_DISPLAY(xv_close_display, xv_info) +static XEXT_GENERATE_FIND_DISPLAY(xv_find_display, xv_info, + xv_extension_name, &xv_extension_hooks, + XvNumEvents, NULL) -static XEXT_GENERATE_FIND_DISPLAY (xv_find_display, xv_info, - xv_extension_name, - &xv_extension_hooks, - XvNumEvents, NULL) - - -static XEXT_GENERATE_ERROR_STRING (xv_error_string, xv_extension_name, - XvNumErrors, xv_error_list) +static XEXT_GENERATE_ERROR_STRING(xv_error_string, xv_extension_name, + XvNumErrors, xv_error_list) int XvQueryExtension( - Display *dpy, - unsigned int *p_version, - unsigned int *p_revision, - unsigned int *p_requestBase, - unsigned int *p_eventBase, - unsigned int *p_errorBase -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryExtensionReq *req; - xvQueryExtensionReply rep; + Display *dpy, + unsigned int *p_version, + unsigned int *p_revision, + unsigned int *p_requestBase, + unsigned int *p_eventBase, + unsigned int *p_errorBase) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvQueryExtensionReq *req; + xvQueryExtensionReply rep; + int status; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(QueryExtension, req); + XvGetReq(QueryExtension, req); - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return XvBadExtension; - } + if (!_XReply(dpy, (xReply *) &rep, 0, xFalse)) { + status = XvBadExtension; + goto out; + } - *p_version = rep.version; - *p_revision = rep.revision; - *p_requestBase = info->codes->major_opcode; - *p_eventBase = info->codes->first_event; - *p_errorBase = info->codes->first_error; + *p_version = rep.version; + *p_revision = rep.revision; + *p_requestBase = info->codes->major_opcode; + *p_eventBase = info->codes->first_event; + *p_errorBase = info->codes->first_error; - UnlockDisplay(dpy); - SyncHandle(); + status = Success; - return Success; + out: + UnlockDisplay(dpy); + SyncHandle(); + + return status; } int XvQueryAdaptors( - Display *dpy, - Window window, - unsigned int *p_nAdaptors, - XvAdaptorInfo **p_pAdaptors -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryAdaptorsReq *req; - xvQueryAdaptorsReply rep; - int size,ii,jj; - char *name; - XvAdaptorInfo *pas, *pa; - XvFormat *pfs, *pf; - char *buffer; - union - { - char *buffer; - char *string; - xvAdaptorInfo *pa; - xvFormat *pf; + Display *dpy, + Window window, + unsigned int *p_nAdaptors, + XvAdaptorInfo **p_pAdaptors) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvQueryAdaptorsReq *req; + xvQueryAdaptorsReply rep; + size_t size; + unsigned int ii, jj; + char *name; + XvAdaptorInfo *pas = NULL, *pa; + XvFormat *pfs, *pf; + char *buffer = NULL; + union { + char *buffer; + char *string; + xvAdaptorInfo *pa; + xvFormat *pf; } u; + int status; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(QueryAdaptors, req); - req->window = window; + XvGetReq(QueryAdaptors, req); + req->window = window; - /* READ THE REPLY */ + /* READ THE REPLY */ - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadReply); - } + if (_XReply(dpy, (xReply *) &rep, 0, xFalse) == 0) { + rep.num_adaptors = 0; + status = XvBadReply; + goto out; + } - size = rep.length << 2; - if ( (buffer = (char *)Xmalloc ((unsigned) size)) == NULL) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - _XRead (dpy, buffer, size); + size = rep.length << 2; + if (size > 0) { + if ((buffer = Xmalloc(size)) == NULL) { + _XEatDataWords(dpy, rep.length); + status = XvBadAlloc; + goto out; + } + _XRead(dpy, buffer, (long) size); + } - u.buffer = buffer; + /* GET INPUT ADAPTORS */ - /* GET INPUT ADAPTORS */ + if (rep.num_adaptors == 0) { + /* If there's no adaptors, there's nothing more to do. */ + status = Success; + goto out; + } - if (rep.num_adaptors == 0) { - pas = NULL; - } else { - size = rep.num_adaptors*sizeof(XvAdaptorInfo); - if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) { - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - } + if (size < (rep.num_adaptors * sz_xvAdaptorInfo)) { + /* If there's not enough data for the number of adaptors, + then we have a problem. */ + status = XvBadReply; + goto out; + } - /* INIT ADAPTOR FIELDS */ + size = rep.num_adaptors * sizeof(XvAdaptorInfo); + if ((pas = Xmalloc(size)) == NULL) { + status = XvBadAlloc; + goto out; + } - pa = pas; - for (ii=0; iinum_adaptors = 0; - pa->name = (char *)NULL; - pa->formats = (XvFormat *)NULL; - pa++; - } + /* INIT ADAPTOR FIELDS */ - pa = pas; - for (ii=0; iitype = u.pa->type; - pa->base_id = u.pa->base_id; - pa->num_ports = u.pa->num_ports; - pa->num_formats = u.pa->num_formats; - pa->num_adaptors = rep.num_adaptors - ii; + pa = pas; + for (ii = 0; ii < rep.num_adaptors; ii++) { + pa->num_adaptors = 0; + pa->name = (char *) NULL; + pa->formats = (XvFormat *) NULL; + pa++; + } - /* GET ADAPTOR NAME */ + u.buffer = buffer; + pa = pas; + for (ii = 0; ii < rep.num_adaptors; ii++) { + pa->type = u.pa->type; + pa->base_id = u.pa->base_id; + pa->num_ports = u.pa->num_ports; + pa->num_formats = u.pa->num_formats; + pa->num_adaptors = rep.num_adaptors - ii; - size = u.pa->name_size; - u.buffer += (sz_xvAdaptorInfo + 3) & ~3; + /* GET ADAPTOR NAME */ - if ( (name = (char *)Xmalloc(size+1)) == NULL) - { - XvFreeAdaptorInfo(pas); - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - (void)strncpy(name, u.string, size); - name[size] = '\0'; - pa->name = name; + size = u.pa->name_size; + u.buffer += pad_to_int32(sz_xvAdaptorInfo); - u.buffer += (size + 3) & ~3; + if ((name = Xmalloc(size + 1)) == NULL) { + status = XvBadAlloc; + goto out; + } + (void) strncpy(name, u.string, size); + name[size] = '\0'; + pa->name = name; - /* GET FORMATS */ + u.buffer += pad_to_int32(size); - size = pa->num_formats*sizeof(XvFormat); - if ((pfs=(XvFormat *)Xmalloc(size))==NULL) { - XvFreeAdaptorInfo(pas); - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } + /* GET FORMATS */ - pf = pfs; - for (jj=0; jjnum_formats; jj++) { - pf->depth = u.pf->depth; - pf->visual_id = u.pf->visual; - pf++; + size = pa->num_formats * sizeof(XvFormat); + if ((pfs = Xmalloc(size)) == NULL) { + status = XvBadAlloc; + goto out; + } - u.buffer += (sz_xvFormat + 3) & ~3; - } + pf = pfs; + for (jj = 0; jj < pa->num_formats; jj++) { + pf->depth = u.pf->depth; + pf->visual_id = u.pf->visual; + pf++; - pa->formats = pfs; + u.buffer += pad_to_int32(sz_xvFormat); + } - pa++; + pa->formats = pfs; - } + pa++; - *p_nAdaptors = rep.num_adaptors; - *p_pAdaptors = pas; + } - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); + status = Success; - return (Success); + out: + if (status != Success) { + XvFreeAdaptorInfo(pas); + pas = NULL; + } + + *p_nAdaptors = rep.num_adaptors; + *p_pAdaptors = pas; + + Xfree(buffer); + UnlockDisplay(dpy); + SyncHandle(); + + return status; } void XvFreeAdaptorInfo(XvAdaptorInfo *pAdaptors) { + XvAdaptorInfo *pa; + unsigned int ii; - XvAdaptorInfo *pa; - int ii; + if (!pAdaptors) + return; - if (!pAdaptors) return; + pa = pAdaptors; - pa = pAdaptors; - - for (ii=0; iinum_adaptors; ii++, pa++) - { - if (pa->name) - { - Xfree(pa->name); - } - if (pa->formats) - { - Xfree(pa->formats); - } + for (ii = 0; ii < pAdaptors->num_adaptors; ii++, pa++) { + if (pa->name) { + Xfree(pa->name); + } + if (pa->formats) { + Xfree(pa->formats); + } } - Xfree(pAdaptors); + Xfree(pAdaptors); } int XvQueryEncodings( - Display *dpy, - XvPortID port, - unsigned int *p_nEncodings, - XvEncodingInfo **p_pEncodings -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryEncodingsReq *req; - xvQueryEncodingsReply rep; - int size, jj; - char *name; - XvEncodingInfo *pes, *pe; - char *buffer; - union - { - char *buffer; - char *string; - xvEncodingInfo *pe; + Display *dpy, + XvPortID port, + unsigned int *p_nEncodings, + XvEncodingInfo ** p_pEncodings) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvQueryEncodingsReq *req; + xvQueryEncodingsReply rep; + size_t size; + unsigned int jj; + char *name; + XvEncodingInfo *pes = NULL, *pe; + char *buffer = NULL; + union { + char *buffer; + char *string; + xvEncodingInfo *pe; } u; + int status; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(QueryEncodings, req); - req->port = port; + XvGetReq(QueryEncodings, req); + req->port = port; - /* READ THE REPLY */ + /* READ THE REPLY */ - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadReply); - } + if (_XReply(dpy, (xReply *) &rep, 0, xFalse) == 0) { + rep.num_encodings = 0; + status = XvBadReply; + goto out; + } - size = rep.length << 2; - if ( (buffer = (char *)Xmalloc ((unsigned) size)) == NULL) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - _XRead (dpy, buffer, size); + size = rep.length << 2; + if (size > 0) { + if ((buffer = Xmalloc(size)) == NULL) { + _XEatDataWords(dpy, rep.length); + status = XvBadAlloc; + goto out; + } + _XRead(dpy, buffer, (long) size); + } - u.buffer = buffer; + /* GET ENCODINGS */ - /* GET ENCODINGS */ + if (rep.num_encodings == 0) { + /* If there's no encodings, there's nothing more to do. */ + status = Success; + goto out; + } - size = rep.num_encodings*sizeof(XvEncodingInfo); - if ( (pes = (XvEncodingInfo *)Xmalloc(size)) == NULL) { - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } + if (size < (rep.num_encodings * sz_xvEncodingInfo)) { + /* If there's not enough data for the number of adaptors, + then we have a problem. */ + status = XvBadReply; + goto out; + } - /* INITIALIZE THE ENCODING POINTER */ + size = rep.num_encodings * sizeof(XvEncodingInfo); + if ((pes = Xmalloc(size)) == NULL) { + status = XvBadAlloc; + goto out; + } - pe = pes; - for (jj=0; jjname = (char *)NULL; - pe->num_encodings = 0; - pe++; - } + /* INITIALIZE THE ENCODING POINTER */ - pe = pes; - for (jj=0; jjencoding_id = u.pe->encoding; - pe->width = u.pe->width; - pe->height = u.pe->height; - pe->rate.numerator = u.pe->rate.numerator; - pe->rate.denominator = u.pe->rate.denominator; - pe->num_encodings = rep.num_encodings - jj; + pe = pes; + for (jj = 0; jj < rep.num_encodings; jj++) { + pe->name = (char *) NULL; + pe->num_encodings = 0; + pe++; + } - size = u.pe->name_size; - u.buffer += (sz_xvEncodingInfo + 3) & ~3; + u.buffer = buffer; - if ( (name = (char *)Xmalloc(size+1)) == NULL) { - XvFreeEncodingInfo(pes); - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - strncpy(name, u.string, size); - name[size] = '\0'; - pe->name = name; - pe++; + pe = pes; + for (jj = 0; jj < rep.num_encodings; jj++) { + pe->encoding_id = u.pe->encoding; + pe->width = u.pe->width; + pe->height = u.pe->height; + pe->rate.numerator = u.pe->rate.numerator; + pe->rate.denominator = u.pe->rate.denominator; + pe->num_encodings = rep.num_encodings - jj; - u.buffer += (size + 3) & ~3; - } + size = u.pe->name_size; + u.buffer += pad_to_int32(sz_xvEncodingInfo); - *p_nEncodings = rep.num_encodings; - *p_pEncodings = pes; + if ((name = Xmalloc(size + 1)) == NULL) { + status = XvBadAlloc; + goto out; + } + strncpy(name, u.string, size); + name[size] = '\0'; + pe->name = name; + pe++; - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); + u.buffer += pad_to_int32(size); + } - return (Success); + status = Success; + + out: + if (status != Success) { + XvFreeEncodingInfo(pes); + pes = NULL; + } + + *p_nEncodings = rep.num_encodings; + *p_pEncodings = pes; + + Xfree(buffer); + UnlockDisplay(dpy); + SyncHandle(); + + return (Success); } void XvFreeEncodingInfo(XvEncodingInfo *pEncodings) { + XvEncodingInfo *pe; + unsigned long ii; - XvEncodingInfo *pe; - int ii; + if (!pEncodings) + return; - if (!pEncodings) return; + pe = pEncodings; - pe = pEncodings; + for (ii = 0; ii < pEncodings->num_encodings; ii++, pe++) { + if (pe->name) + Xfree(pe->name); + } - for (ii=0; iinum_encodings; ii++, pe++) { - if (pe->name) Xfree(pe->name); - } - - Xfree(pEncodings); + Xfree(pEncodings); } int XvPutVideo( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - int vx, int vy, - unsigned int vw, unsigned int vh, - int dx, int dy, - unsigned int dw, unsigned int dh -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvPutVideoReq *req; + Display *dpy, + XvPortID port, + Drawable d, + GC gc, + int vx, int vy, + unsigned int vw, unsigned int vh, + int dx, int dy, + unsigned int dw, unsigned int dh) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvPutVideoReq *req; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - FlushGC(dpy, gc); + FlushGC(dpy, gc); - XvGetReq(PutVideo, req); + XvGetReq(PutVideo, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->vid_x = vx; - req->vid_y = vy; - req->vid_w = vw; - req->vid_h = vh; - req->drw_x = dx; - req->drw_y = dy; - req->drw_w = dw; - req->drw_h = dh; + req->port = port; + req->drawable = d; + req->gc = gc->gid; + req->vid_x = vx; + req->vid_y = vy; + req->vid_w = vw; + req->vid_h = vh; + req->drw_x = dx; + req->drw_y = dy; + req->drw_w = dw; + req->drw_h = dh; - UnlockDisplay(dpy); - SyncHandle(); + UnlockDisplay(dpy); + SyncHandle(); - return Success; + return Success; } int XvPutStill( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - int vx, int vy, - unsigned int vw, unsigned int vh, - int dx, int dy, - unsigned int dw, unsigned int dh -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvPutStillReq *req; + Display *dpy, + XvPortID port, + Drawable d, + GC gc, + int vx, int vy, + unsigned int vw, unsigned int vh, + int dx, int dy, + unsigned int dw, unsigned int dh) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvPutStillReq *req; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - FlushGC(dpy, gc); + FlushGC(dpy, gc); - XvGetReq(PutStill, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->vid_x = vx; - req->vid_y = vy; - req->vid_w = vw; - req->vid_h = vh; - req->drw_x = dx; - req->drw_y = dy; - req->drw_w = dw; - req->drw_h = dh; + XvGetReq(PutStill, req); + req->port = port; + req->drawable = d; + req->gc = gc->gid; + req->vid_x = vx; + req->vid_y = vy; + req->vid_w = vw; + req->vid_h = vh; + req->drw_x = dx; + req->drw_y = dy; + req->drw_w = dw; + req->drw_h = dh; - UnlockDisplay(dpy); - SyncHandle(); + UnlockDisplay(dpy); + SyncHandle(); - return Success; + return Success; } int XvGetVideo( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - int vx, int vy, - unsigned int vw, unsigned int vh, - int dx, int dy, - unsigned int dw, unsigned int dh -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvGetVideoReq *req; + Display *dpy, + XvPortID port, + Drawable d, + GC gc, + int vx, int vy, + unsigned int vw, unsigned int vh, + int dx, int dy, + unsigned int dw, unsigned int dh) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvGetVideoReq *req; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - FlushGC(dpy, gc); + FlushGC(dpy, gc); - XvGetReq(GetVideo, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->vid_x = vx; - req->vid_y = vy; - req->vid_w = vw; - req->vid_h = vh; - req->drw_x = dx; - req->drw_y = dy; - req->drw_w = dw; - req->drw_h = dh; + XvGetReq(GetVideo, req); + req->port = port; + req->drawable = d; + req->gc = gc->gid; + req->vid_x = vx; + req->vid_y = vy; + req->vid_w = vw; + req->vid_h = vh; + req->drw_x = dx; + req->drw_y = dy; + req->drw_w = dw; + req->drw_h = dh; - UnlockDisplay(dpy); - SyncHandle(); + UnlockDisplay(dpy); + SyncHandle(); - return Success; + return Success; } int XvGetStill( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - int vx, int vy, - unsigned int vw, unsigned int vh, - int dx, int dy, - unsigned int dw, unsigned int dh -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvGetStillReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - FlushGC(dpy, gc); - - XvGetReq(GetStill, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->vid_x = vx; - req->vid_y = vy; - req->vid_w = vw; - req->vid_h = vh; - req->drw_x = dx; - req->drw_y = dy; - req->drw_w = dw; - req->drw_h = dh; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -XvStopVideo( - Display *dpy, - XvPortID port, - Drawable draw -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvStopVideoReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(StopVideo, req); - req->port = port; - req->drawable = draw; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -XvGrabPort( - Display *dpy, - XvPortID port, - Time time -){ - XExtDisplayInfo *info = xv_find_display(dpy); - int result; - xvGrabPortReply rep; - xvGrabPortReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(GrabPort, req); - req->port = port; - req->time = time; - - if (_XReply (dpy, (xReply *) &rep, 0, xTrue) == 0) - rep.result = GrabSuccess; - - result = rep.result; - - UnlockDisplay(dpy); - SyncHandle(); - - return result; -} - -int -XvUngrabPort( - Display *dpy, - XvPortID port, - Time time -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvUngrabPortReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(UngrabPort, req); - req->port = port; - req->time = time; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -XvSelectVideoNotify( - Display *dpy, - Drawable drawable, - Bool onoff -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvSelectVideoNotifyReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(SelectVideoNotify, req); - req->drawable = drawable; - req->onoff = onoff; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -XvSelectPortNotify( - Display *dpy, - XvPortID port, - Bool onoff -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvSelectPortNotifyReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(SelectPortNotify, req); - req->port = port; - req->onoff = onoff; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -XvSetPortAttribute ( - Display *dpy, - XvPortID port, - Atom attribute, - int value -) + Display *dpy, + XvPortID port, + Drawable d, + GC gc, + int vx, int vy, + unsigned int vw, unsigned int vh, + int dx, int dy, + unsigned int dw, unsigned int dh) { - XExtDisplayInfo *info = xv_find_display(dpy); - xvSetPortAttributeReq *req; + XExtDisplayInfo *info = xv_find_display(dpy); + xvGetStillReq *req; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(SetPortAttribute, req); - req->port = port; - req->attribute = attribute; - req->value = value; + FlushGC(dpy, gc); - UnlockDisplay(dpy); - SyncHandle(); + XvGetReq(GetStill, req); + req->port = port; + req->drawable = d; + req->gc = gc->gid; + req->vid_x = vx; + req->vid_y = vy; + req->vid_w = vw; + req->vid_h = vh; + req->drw_x = dx; + req->drw_y = dy; + req->drw_w = dw; + req->drw_h = dh; - return (Success); + UnlockDisplay(dpy); + SyncHandle(); + + return Success; } int -XvGetPortAttribute ( - Display *dpy, - XvPortID port, - Atom attribute, - int *p_value -) +XvStopVideo(Display *dpy, XvPortID port, Drawable draw) { - XExtDisplayInfo *info = xv_find_display(dpy); - xvGetPortAttributeReq *req; - xvGetPortAttributeReply rep; + XExtDisplayInfo *info = xv_find_display(dpy); + xvStopVideoReq *req; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(GetPortAttribute, req); - req->port = port; - req->attribute = attribute; + XvGetReq(StopVideo, req); + req->port = port; + req->drawable = draw; - /* READ THE REPLY */ + UnlockDisplay(dpy); + SyncHandle(); - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadReply); - } + return Success; +} - *p_value = rep.value; +int +XvGrabPort(Display *dpy, XvPortID port, Time time) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + int result; + xvGrabPortReply rep; + xvGrabPortReq *req; - UnlockDisplay(dpy); - SyncHandle(); + XvCheckExtension(dpy, info, XvBadExtension); - return (Success); + LockDisplay(dpy); + + XvGetReq(GrabPort, req); + req->port = port; + req->time = time; + + if (_XReply(dpy, (xReply *) &rep, 0, xTrue) == 0) + rep.result = GrabSuccess; + + result = rep.result; + + UnlockDisplay(dpy); + SyncHandle(); + + return result; +} + +int +XvUngrabPort(Display *dpy, XvPortID port, Time time) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvUngrabPortReq *req; + + XvCheckExtension(dpy, info, XvBadExtension); + + LockDisplay(dpy); + + XvGetReq(UngrabPort, req); + req->port = port; + req->time = time; + + UnlockDisplay(dpy); + SyncHandle(); + + return Success; +} + +int +XvSelectVideoNotify(Display *dpy, Drawable drawable, Bool onoff) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvSelectVideoNotifyReq *req; + + XvCheckExtension(dpy, info, XvBadExtension); + + LockDisplay(dpy); + + XvGetReq(SelectVideoNotify, req); + req->drawable = drawable; + req->onoff = onoff; + + UnlockDisplay(dpy); + SyncHandle(); + + return Success; +} + +int +XvSelectPortNotify(Display *dpy, XvPortID port, Bool onoff) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvSelectPortNotifyReq *req; + + XvCheckExtension(dpy, info, XvBadExtension); + + LockDisplay(dpy); + + XvGetReq(SelectPortNotify, req); + req->port = port; + req->onoff = onoff; + + UnlockDisplay(dpy); + SyncHandle(); + + return Success; +} + +int +XvSetPortAttribute(Display *dpy, XvPortID port, Atom attribute, int value) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvSetPortAttributeReq *req; + + XvCheckExtension(dpy, info, XvBadExtension); + + LockDisplay(dpy); + + XvGetReq(SetPortAttribute, req); + req->port = port; + req->attribute = attribute; + req->value = value; + + UnlockDisplay(dpy); + SyncHandle(); + + return (Success); +} + +int +XvGetPortAttribute(Display *dpy, XvPortID port, Atom attribute, int *p_value) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvGetPortAttributeReq *req; + xvGetPortAttributeReply rep; + int status; + + XvCheckExtension(dpy, info, XvBadExtension); + + LockDisplay(dpy); + + XvGetReq(GetPortAttribute, req); + req->port = port; + req->attribute = attribute; + + /* READ THE REPLY */ + + if (_XReply(dpy, (xReply *) &rep, 0, xFalse) == 0) { + status = XvBadReply; + } + else { + *p_value = rep.value; + status = Success; + } + + UnlockDisplay(dpy); + SyncHandle(); + + return status; } int XvQueryBestSize( - Display *dpy, - XvPortID port, - Bool motion, - unsigned int vid_w, - unsigned int vid_h, - unsigned int drw_w, - unsigned int drw_h, - unsigned int *p_actual_width, - unsigned int *p_actual_height -) + Display *dpy, + XvPortID port, + Bool motion, + unsigned int vid_w, + unsigned int vid_h, + unsigned int drw_w, + unsigned int drw_h, + unsigned int *p_actual_width, + unsigned int *p_actual_height) { - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryBestSizeReq *req; - xvQueryBestSizeReply rep; + XExtDisplayInfo *info = xv_find_display(dpy); + xvQueryBestSizeReq *req; + xvQueryBestSizeReply rep; + int status; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(QueryBestSize, req); - req->port = port; - req->motion = motion; - req->vid_w = vid_w; - req->vid_h = vid_h; - req->drw_w = drw_w; - req->drw_h = drw_h; + XvGetReq(QueryBestSize, req); + req->port = port; + req->motion = motion; + req->vid_w = vid_w; + req->vid_h = vid_h; + req->drw_w = drw_w; + req->drw_h = drw_h; - /* READ THE REPLY */ + /* READ THE REPLY */ - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadReply); - } + if (_XReply(dpy, (xReply *) &rep, 0, xFalse) == 0) { + status = XvBadReply; + } + else { + *p_actual_width = rep.actual_width; + *p_actual_height = rep.actual_height; + status = Success; + } - *p_actual_width = rep.actual_width; - *p_actual_height = rep.actual_height; + UnlockDisplay(dpy); + SyncHandle(); - UnlockDisplay(dpy); - SyncHandle(); - - return (Success); + return status; } -XvAttribute* +XvAttribute * XvQueryPortAttributes(Display *dpy, XvPortID port, int *num) { - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryPortAttributesReq *req; - xvQueryPortAttributesReply rep; - XvAttribute *ret = NULL; + XExtDisplayInfo *info = xv_find_display(dpy); + xvQueryPortAttributesReq *req; + xvQueryPortAttributesReply rep; + XvAttribute *ret = NULL; - *num = 0; + *num = 0; - XvCheckExtension(dpy, info, NULL); + XvCheckExtension(dpy, info, NULL); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(QueryPortAttributes, req); - req->port = port; + XvGetReq(QueryPortAttributes, req); + req->port = port; - /* READ THE REPLY */ + /* READ THE REPLY */ - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return ret; - } + if (_XReply(dpy, (xReply *) &rep, 0, xFalse) == 0) { + goto out; + } - /* - * X server sends data packed as: - * attribute1, name1, attribute2, name2, ... - * We allocate a single buffer large enough to hold them all and - * then de-interleave the data so we return it to clients as: - * attribute1, attribute2, ..., name1, name2, ... - * so that clients may refer to attributes as a simple array of - * structs: attributes[0], attributes[1], ... - * and free it as a single/simple buffer. - */ + /* + * X server sends data packed as: + * attribute1, name1, attribute2, name2, ... + * We allocate a single buffer large enough to hold them all and + * then de-interleave the data so we return it to clients as: + * attribute1, attribute2, ..., name1, name2, ... + * so that clients may refer to attributes as a simple array of + * structs: attributes[0], attributes[1], ... + * and free it as a single/simple buffer. + */ - if(rep.num_attributes) { - unsigned long size; - /* limit each part to no more than one half the max size */ - if ((rep.num_attributes < ((INT_MAX / 2) / sizeof(XvAttribute))) && - (rep.text_size < (INT_MAX / 2)-1)) { - size = (rep.num_attributes * sizeof(XvAttribute)) + rep.text_size + 1; - ret = Xmalloc(size); - } + if (rep.num_attributes) { + unsigned long size; - if (ret != NULL) { - char* marker = (char*)(&ret[rep.num_attributes]); - xvAttributeInfo Info; - int i; + /* limit each part to no more than one half the max size */ + if ((rep.num_attributes < ((INT_MAX / 2) / sizeof(XvAttribute))) && + (rep.text_size < (INT_MAX / 2) - 1)) { + size = (rep.num_attributes * sizeof(XvAttribute)) + + rep.text_size + 1; + ret = Xmalloc(size); + } - /* keep track of remaining room for text strings */ - size = rep.text_size; + if (ret != NULL) { + char *marker = (char *) (&ret[rep.num_attributes]); + xvAttributeInfo Info; + unsigned int i; - for(i = 0; i < rep.num_attributes; i++) { - _XRead(dpy, (char*)(&Info), sz_xvAttributeInfo); - ret[i].flags = (int)Info.flags; - ret[i].min_value = Info.min; - ret[i].max_value = Info.max; - ret[i].name = marker; - if (Info.size <= size) { - _XRead(dpy, marker, Info.size); - marker += Info.size; - size -= Info.size; - } - (*num)++; - } + /* keep track of remaining room for text strings */ + size = rep.text_size; - /* ensure final string is nil-terminated to avoid exposure of - uninitialized memory */ - *marker = '\0'; - } else - _XEatDataWords(dpy, rep.length); - } + for (i = 0; i < rep.num_attributes; i++) { + _XRead(dpy, (char *) (&Info), sz_xvAttributeInfo); + ret[i].flags = (int) Info.flags; + ret[i].min_value = Info.min; + ret[i].max_value = Info.max; + ret[i].name = marker; + if (Info.size <= size) { + _XRead(dpy, marker, Info.size); + marker += Info.size; + size -= Info.size; + } + (*num)++; + } - UnlockDisplay(dpy); - SyncHandle(); + /* ensure final string is nil-terminated to avoid exposure of + uninitialized memory */ + *marker = '\0'; + } + else + _XEatDataWords(dpy, rep.length); + } - return ret; + out: + UnlockDisplay(dpy); + SyncHandle(); + + return ret; } -XvImageFormatValues * XvListImageFormats ( - Display *dpy, - XvPortID port, - int *num -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvListImageFormatsReq *req; - xvListImageFormatsReply rep; - XvImageFormatValues *ret = NULL; +XvImageFormatValues * +XvListImageFormats(Display *dpy, XvPortID port, int *num) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvListImageFormatsReq *req; + xvListImageFormatsReply rep; + XvImageFormatValues *ret = NULL; - *num = 0; + *num = 0; - XvCheckExtension(dpy, info, NULL); + XvCheckExtension(dpy, info, NULL); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(ListImageFormats, req); - req->port = port; + XvGetReq(ListImageFormats, req); + req->port = port; - /* READ THE REPLY */ + /* READ THE REPLY */ - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return NULL; - } + if (_XReply(dpy, (xReply *) &rep, 0, xFalse) == 0) { + goto out; + } - if(rep.num_formats) { - if (rep.num_formats < (INT_MAX / sizeof(XvImageFormatValues))) - ret = Xmalloc(rep.num_formats * sizeof(XvImageFormatValues)); + if (rep.num_formats) { + if (rep.num_formats < (INT_MAX / sizeof(XvImageFormatValues))) + ret = Xmalloc(rep.num_formats * sizeof(XvImageFormatValues)); - if (ret != NULL) { - xvImageFormatInfo Info; - int i; + if (ret != NULL) { + xvImageFormatInfo Info; + unsigned int i; - for(i = 0; i < rep.num_formats; i++) { - _XRead(dpy, (char*)(&Info), sz_xvImageFormatInfo); - ret[i].id = Info.id; - ret[i].type = Info.type; - ret[i].byte_order = Info.byte_order; - memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16); - ret[i].bits_per_pixel = Info.bpp; - ret[i].format = Info.format; - ret[i].num_planes = Info.num_planes; - ret[i].depth = Info.depth; - ret[i].red_mask = Info.red_mask; - ret[i].green_mask = Info.green_mask; - ret[i].blue_mask = Info.blue_mask; - ret[i].y_sample_bits = Info.y_sample_bits; - ret[i].u_sample_bits = Info.u_sample_bits; - ret[i].v_sample_bits = Info.v_sample_bits; - ret[i].horz_y_period = Info.horz_y_period; - ret[i].horz_u_period = Info.horz_u_period; - ret[i].horz_v_period = Info.horz_v_period; - ret[i].vert_y_period = Info.vert_y_period; - ret[i].vert_u_period = Info.vert_u_period; - ret[i].vert_v_period = Info.vert_v_period; - memcpy(&(ret[i].component_order[0]), &(Info.comp_order[0]), 32); - ret[i].scanline_order = Info.scanline_order; - (*num)++; - } - } else - _XEatDataWords(dpy, rep.length); - } + for (i = 0; i < rep.num_formats; i++) { + _XRead(dpy, (char *) (&Info), sz_xvImageFormatInfo); + ret[i].id = Info.id; + ret[i].type = Info.type; + ret[i].byte_order = Info.byte_order; + memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16); + ret[i].bits_per_pixel = Info.bpp; + ret[i].format = Info.format; + ret[i].num_planes = Info.num_planes; + ret[i].depth = Info.depth; + ret[i].red_mask = Info.red_mask; + ret[i].green_mask = Info.green_mask; + ret[i].blue_mask = Info.blue_mask; + ret[i].y_sample_bits = Info.y_sample_bits; + ret[i].u_sample_bits = Info.u_sample_bits; + ret[i].v_sample_bits = Info.v_sample_bits; + ret[i].horz_y_period = Info.horz_y_period; + ret[i].horz_u_period = Info.horz_u_period; + ret[i].horz_v_period = Info.horz_v_period; + ret[i].vert_y_period = Info.vert_y_period; + ret[i].vert_u_period = Info.vert_u_period; + ret[i].vert_v_period = Info.vert_v_period; + memcpy(&(ret[i].component_order[0]), &(Info.comp_order[0]), 32); + ret[i].scanline_order = Info.scanline_order; + (*num)++; + } + } + else + _XEatDataWords(dpy, rep.length); + } - UnlockDisplay(dpy); - SyncHandle(); + out: + UnlockDisplay(dpy); + SyncHandle(); - return ret; + return ret; } -XvImage * XvCreateImage ( - Display *dpy, - XvPortID port, - int id, - char *data, - int width, - int height -) { - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryImageAttributesReq *req; - xvQueryImageAttributesReply rep; - XvImage *ret = NULL; +XvImage * +XvCreateImage( + Display *dpy, + XvPortID port, + int id, + char *data, + int width, + int height) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvQueryImageAttributesReq *req; + xvQueryImageAttributesReply rep; + XvImage *ret = NULL; - XvCheckExtension(dpy, info, NULL); + XvCheckExtension(dpy, info, NULL); - LockDisplay(dpy); + LockDisplay(dpy); - XvGetReq(QueryImageAttributes, req); - req->id = id; - req->port = port; - req->width = width; - req->height = height; + XvGetReq(QueryImageAttributes, req); + req->id = id; + req->port = port; + req->width = width; + req->height = height; - /* READ THE REPLY */ + /* READ THE REPLY */ - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return NULL; - } + if (!_XReply(dpy, (xReply *) &rep, 0, xFalse)) { + goto out; + } - if (rep.num_planes < ((INT_MAX >> 3) - sizeof(XvImage))) - ret = Xmalloc(sizeof(XvImage) + (rep.num_planes << 3)); + if (rep.num_planes < ((INT_MAX >> 3) - sizeof(XvImage))) + ret = Xmalloc(sizeof(XvImage) + (rep.num_planes << 3)); - if (ret != NULL) { - ret->id = id; - ret->width = rep.width; - ret->height = rep.height; - ret->data_size = rep.data_size; - ret->num_planes = rep.num_planes; - ret->pitches = (int*)(&ret[1]); - ret->offsets = ret->pitches + rep.num_planes; - ret->data = data; - ret->obdata = NULL; - _XRead(dpy, (char*)(ret->pitches), rep.num_planes << 2); - _XRead(dpy, (char*)(ret->offsets), rep.num_planes << 2); - } else - _XEatDataWords(dpy, rep.length); + if (ret != NULL) { + ret->id = id; + ret->width = rep.width; + ret->height = rep.height; + ret->data_size = rep.data_size; + ret->num_planes = rep.num_planes; + ret->pitches = (int *) (&ret[1]); + ret->offsets = ret->pitches + rep.num_planes; + ret->data = data; + ret->obdata = NULL; + _XRead(dpy, (char *) (ret->pitches), rep.num_planes << 2); + _XRead(dpy, (char *) (ret->offsets), rep.num_planes << 2); + } + else + _XEatDataWords(dpy, rep.length); - UnlockDisplay(dpy); - SyncHandle(); + out: + UnlockDisplay(dpy); + SyncHandle(); - return ret; + return ret; } -XvImage * XvShmCreateImage ( - Display *dpy, - XvPortID port, - int id, - char *data, - int width, - int height, - XShmSegmentInfo *shminfo -){ - XvImage *ret; +XvImage * +XvShmCreateImage( + Display *dpy, + XvPortID port, + int id, + char *data, + int width, + int height, + XShmSegmentInfo *shminfo) +{ + XvImage *ret; - ret = XvCreateImage(dpy, port, id, data, width, height); + ret = XvCreateImage(dpy, port, id, data, width, height); - if(ret) ret->obdata = (XPointer)shminfo; + if (ret) + ret->obdata = (XPointer) shminfo; - return ret; + return ret; } -int XvPutImage ( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - XvImage *image, - int src_x, - int src_y, - unsigned int src_w, - unsigned int src_h, - int dest_x, - int dest_y, - unsigned int dest_w, - unsigned int dest_h -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvPutImageReq *req; - int len; +int +XvPutImage( + Display *dpy, + XvPortID port, + Drawable d, + GC gc, + XvImage *image, + int src_x, int src_y, + unsigned int src_w, unsigned int src_h, + int dest_x, int dest_y, + unsigned int dest_w, unsigned int dest_h) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + xvPutImageReq *req; + unsigned int len; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - FlushGC(dpy, gc); + FlushGC(dpy, gc); - XvGetReq(PutImage, req); + XvGetReq(PutImage, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->id = image->id; - req->src_x = src_x; - req->src_y = src_y; - req->src_w = src_w; - req->src_h = src_h; - req->drw_x = dest_x; - req->drw_y = dest_y; - req->drw_w = dest_w; - req->drw_h = dest_h; - req->width = image->width; - req->height = image->height; + req->port = port; + req->drawable = d; + req->gc = gc->gid; + req->id = image->id; + req->src_x = src_x; + req->src_y = src_y; + req->src_w = src_w; + req->src_h = src_h; + req->drw_x = dest_x; + req->drw_y = dest_y; + req->drw_w = dest_w; + req->drw_h = dest_h; + req->width = image->width; + req->height = image->height; - len = (image->data_size + 3) >> 2; - SetReqLen(req, len, len); + len = ((unsigned int) image->data_size + 3) >> 2; + SetReqLen(req, len, len); - /* Yes it's kindof lame that we are sending the whole thing, - but for video all of it may be needed even if displaying - only a subsection, and I don't want to go through the - trouble of creating subregions to send */ - Data(dpy, (char *)image->data, image->data_size); + /* Yes it's kindof lame that we are sending the whole thing, + but for video all of it may be needed even if displaying + only a subsection, and I don't want to go through the + trouble of creating subregions to send */ + Data(dpy, (char *) image->data, image->data_size); - UnlockDisplay(dpy); - SyncHandle(); + UnlockDisplay(dpy); + SyncHandle(); - return Success; + return Success; } -int XvShmPutImage ( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - XvImage *image, - int src_x, - int src_y, - unsigned int src_w, - unsigned int src_h, - int dest_x, - int dest_y, - unsigned int dest_w, - unsigned int dest_h, - Bool send_event -){ - XExtDisplayInfo *info = xv_find_display(dpy); - XShmSegmentInfo *shminfo = (XShmSegmentInfo *)image->obdata; - xvShmPutImageReq *req; +int +XvShmPutImage( + Display *dpy, + XvPortID port, + Drawable d, + GC gc, + XvImage *image, + int src_x, int src_y, + unsigned int src_w, unsigned int src_h, + int dest_x, int dest_y, + unsigned int dest_w, unsigned int dest_h, + Bool send_event) +{ + XExtDisplayInfo *info = xv_find_display(dpy); + XShmSegmentInfo *shminfo = (XShmSegmentInfo *) image->obdata; + xvShmPutImageReq *req; - XvCheckExtension(dpy, info, XvBadExtension); + XvCheckExtension(dpy, info, XvBadExtension); - LockDisplay(dpy); + LockDisplay(dpy); - FlushGC(dpy, gc); + FlushGC(dpy, gc); - XvGetReq(ShmPutImage, req); + XvGetReq(ShmPutImage, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->shmseg = shminfo->shmseg; - req->id = image->id; - req->src_x = src_x; - req->src_y = src_y; - req->src_w = src_w; - req->src_h = src_h; - req->drw_x = dest_x; - req->drw_y = dest_y; - req->drw_w = dest_w; - req->drw_h = dest_h; - req->offset = image->data - shminfo->shmaddr; - req->width = image->width; - req->height = image->height; - req->send_event = send_event; + req->port = port; + req->drawable = d; + req->gc = gc->gid; + req->shmseg = shminfo->shmseg; + req->id = image->id; + req->src_x = src_x; + req->src_y = src_y; + req->src_w = src_w; + req->src_h = src_h; + req->drw_x = dest_x; + req->drw_y = dest_y; + req->drw_w = dest_w; + req->drw_h = dest_h; + req->offset = image->data - shminfo->shmaddr; + req->width = image->width; + req->height = image->height; + req->send_event = send_event; - UnlockDisplay(dpy); - SyncHandle(); + UnlockDisplay(dpy); + SyncHandle(); - return Success; + return Success; } static Bool xv_wire_to_event(Display *dpy, XEvent *host, xEvent *wire) { - XExtDisplayInfo *info = xv_find_display(dpy); - XvEvent *re = (XvEvent *)host; - xvEvent *event = (xvEvent *)wire; + XExtDisplayInfo *info = xv_find_display(dpy); + XvEvent *re = (XvEvent *) host; + xvEvent *event = (xvEvent *) wire; - XvCheckExtension(dpy, info, False); + XvCheckExtension(dpy, info, False); - switch((event->u.u.type & 0x7F) - info->codes->first_event) - { + switch ((event->u.u.type & 0x7F) - info->codes->first_event) { case XvVideoNotify: - re->xvvideo.type = event->u.u.type & 0x7f; - re->xvvideo.serial = - _XSetLastRequestRead(dpy, (xGenericReply *)event); - re->xvvideo.send_event = ((event->u.u.type & 0x80) != 0); - re->xvvideo.display = dpy; - re->xvvideo.time = event->u.videoNotify.time; - re->xvvideo.reason = event->u.videoNotify.reason; - re->xvvideo.drawable = event->u.videoNotify.drawable; - re->xvvideo.port_id = event->u.videoNotify.port; - break; + re->xvvideo.type = event->u.u.type & 0x7f; + re->xvvideo.serial = _XSetLastRequestRead(dpy, (xGenericReply *) event); + re->xvvideo.send_event = ((event->u.u.type & 0x80) != 0); + re->xvvideo.display = dpy; + re->xvvideo.time = event->u.videoNotify.time; + re->xvvideo.reason = event->u.videoNotify.reason; + re->xvvideo.drawable = event->u.videoNotify.drawable; + re->xvvideo.port_id = event->u.videoNotify.port; + break; case XvPortNotify: - re->xvport.type = event->u.u.type & 0x7f; - re->xvport.serial = - _XSetLastRequestRead(dpy, (xGenericReply *)event); - re->xvport.send_event = ((event->u.u.type & 0x80) != 0); - re->xvport.display = dpy; - re->xvport.time = event->u.portNotify.time; - re->xvport.port_id = event->u.portNotify.port; - re->xvport.attribute = event->u.portNotify.attribute; - re->xvport.value = event->u.portNotify.value; - break; + re->xvport.type = event->u.u.type & 0x7f; + re->xvport.serial = _XSetLastRequestRead(dpy, (xGenericReply *) event); + re->xvport.send_event = ((event->u.u.type & 0x80) != 0); + re->xvport.display = dpy; + re->xvport.time = event->u.portNotify.time; + re->xvport.port_id = event->u.portNotify.port; + re->xvport.attribute = event->u.portNotify.attribute; + re->xvport.value = event->u.portNotify.value; + break; default: - return False; - } + return False; + } - return (True); + return (True); } - - diff --git a/lib/libXv/src/Xvlibint.h b/lib/libXv/src/Xvlibint.h index f16a51592..c2ae7d610 100644 --- a/lib/libXv/src/Xvlibint.h +++ b/lib/libXv/src/Xvlibint.h @@ -44,30 +44,12 @@ SOFTWARE. #include #include -#if !defined(UNIXCPP) -#define XvGetReq(name, req) \ - WORD64ALIGN\ - if ((dpy->bufptr + SIZEOF(xv##name##Req)) > dpy->bufmax)\ - _XFlush(dpy);\ - req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\ - req->reqType = info->codes->major_opcode;\ - req->xvReqType = xv_##name; \ - req->length = (SIZEOF(xv##name##Req))>>2;\ - dpy->bufptr += SIZEOF(xv##name##Req);\ - dpy->request++ +/* names in Xvproto.h don't match the expectation of Xlib's GetReq* macros, + so we have to provide our own implementation */ -#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ #define XvGetReq(name, req) \ - WORD64ALIGN\ - if ((dpy->bufptr + SIZEOF(xv/**/name/**/Req)) > dpy->bufmax)\ - _XFlush(dpy);\ - req = (xv/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ - req->reqType = info->codes->major_opcode;\ - req->xvReqType = xv_/**/name;\ - req->length = (SIZEOF(xv/**/name/**/Req))>>2;\ - dpy->bufptr += SIZEOF(xv/**/name/**/Req);\ - dpy->request++ -#endif - + req = (xv##name##Req *) _XGetRequest( \ + dpy, (CARD8) info->codes->major_opcode, SIZEOF(xv##name##Req)); \ + req->xvReqType = xv_##name; #endif /* XVLIBINT_H */