Hello community, here is the log from the commit of package libpciaccess for openSUSE:Factory checked in at 2015-02-12 10:20:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libpciaccess (Old) and /work/SRC/openSUSE:Factory/.libpciaccess.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libpciaccess" Changes: -------- --- /work/SRC/openSUSE:Factory/libpciaccess/libpciaccess.changes 2013-08-19 13:30:00.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libpciaccess.new/libpciaccess.changes 2015-02-12 10:20:51.000000000 +0100 @@ -1,0 +2,10 @@ +Mon Feb 9 12:56:45 UTC 2015 - sndir...@suse.com + +- Update to version 0.13.3 + * This release provides a number of platform-specific improvements + for various platforms, including Linux, Solaris, OpenBSD, NetBSD, + and Hurd, plus the addition of some support for Cygwin. +- added baselibs.conf as source to specfile in order to make factory + checkin policy happy + +------------------------------------------------------------------- Old: ---- libpciaccess-0.13.2.tar.bz2 New: ---- libpciaccess-0.13.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libpciaccess.spec ++++++ --- /var/tmp/diff_new_pack.FI9Jpk/_old 2015-02-12 10:20:52.000000000 +0100 +++ /var/tmp/diff_new_pack.FI9Jpk/_new 2015-02-12 10:20:52.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libpciaccess # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: libpciaccess %define lname libpciaccess0 -Version: 0.13.2 +Version: 0.13.3 Release: 0 Summary: Generic PCI access library License: MIT @@ -28,6 +28,7 @@ #Git-Clone: git://anongit.freedesktop.org/xorg/lib/libpciaccess #Git-Web: http://cgit.freedesktop.org/xorg/lib/libpciaccess/ Source: http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.bz2 +Source1: baselibs.conf Patch0: u_libpciaccess-vgaarb-add-function-to-get-default-vga-device-and-it.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build #git#BuildRequires: autoconf >= 2.60, automake, libtool ++++++ libpciaccess-0.13.2.tar.bz2 -> libpciaccess-0.13.3.tar.bz2 ++++++ ++++ 4847 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/ChangeLog new/libpciaccess-0.13.3/ChangeLog --- old/libpciaccess-0.13.2/ChangeLog 2013-07-21 00:55:45.000000000 +0200 +++ new/libpciaccess-0.13.3/ChangeLog 2015-02-04 00:59:51.000000000 +0100 @@ -1,3 +1,123 @@ +commit f99c2e4199ce37f6f94428df504427f67c3ec543 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Tue Feb 3 15:59:10 2015 -0800 + + libpciaccess 0.13.3 + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + +commit 9b1bf11c81881c9cc6e6145011cf229978f109f4 +Author: Mark Kettenis <kette...@openbsd.org> +Date: Mon Sep 29 22:34:25 2014 +0200 + + Use PCIOCREADMASK on OpenBSD. + + If the machdep.allowaperture sysctl(8) variable is set to 0, writing to PCI + config space is not allowed. So instead of writing 0xffffffff to the BARs + in order to determine their size, use the PCIOCREADMASK ioctl(2) which + returns the mask of changeable bits that was saved by the kernel when the + devices was initially probed. + + Reviewed-by: Matthieu Herrb <matth...@herbb.eu> + Signed-off-by: Mark Kettenis <kette...@openbsd.org> + +commit b7e42643d2ee6521cf23e6dfe49a8369ba4bf9bb +Author: Matthew Green <m...@netbsd.org> +Date: Sat Jul 26 22:09:30 2014 +0200 + + Implement the kernel_has_driver() method for NetBSD. + + This has the benefit of stopping the "vesa" driver from loading on + hardware that has been claimed by a kernel driver and thus shouldn't + be using "vesa". + + Reviewed-by: Matthieu Herrb <matth...@herrb.eu> + Signed-off-by: Thomas Klausner <w...@netbsd.org> + +commit 1654a0462723b3b75d7a4a20bedfc653cc3e1f1a +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Wed Jul 2 16:41:10 2014 -0700 + + Solaris: Fix fd leak in pci_device_solx_devfs_map_range() + + Caching fd's for reuse is most effective when you actually stick the + newly opened fd in the cache, instead of letting it leak at the end + of the function. + + Regression introduced by yours truly in commit 9f2d95e61896f41adb. + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + Reviewed-by: Randy Fishel <randy.fis...@oracle.com> + +commit ee4e253a3f1a62e2f3f89f5339590fd4e6cde7c4 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Fri May 9 19:25:10 2014 -0700 + + Enable use of __attribute__((deprecated)) with Solaris Studio 12.4 compiler + + Support for this attribute is added in the 12.4 beta release. + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + +commit b9c068896914b4132a24839c9ef7f9fcd6282d88 +Author: Marcin Ko?cielnicki <koria...@0x04.net> +Date: Wed Feb 5 09:01:25 2014 +0100 + + Fix IO access functions on linux+sysfs. + + The offsets on the resourceX files are relative to BAR base - don't add + the base address ourselves. + + Reviewed-by: Adam Jackson <a...@redhat.com> + +commit b29e9be9aff5c5a9ec5e2bcfc48044081b82742b +Author: Samuel Pitoiset <samuel.pitoi...@gmail.com> +Date: Wed Jan 29 18:44:40 2014 +0100 + + Fix a compilation error on GNU Hurd platforms. + + This fixes a typo (unAMp instead of unMAp) introduced in the Windows/Cygwin + support patch. + + Reviewed-by: Jon TURNEY <jon.tur...@dronecode.org.uk> + +commit 6bfccc7ec4f0705595385f6684b6849663f781b4 +Author: Samuel Pitoiset <samuel.pitoi...@gmail.com> +Date: Sat Jan 18 17:19:14 2014 +0100 + + Windows/Cygwin: Add support through the WinIo library + + V2: + - Add support for unmapping + - Add a README.cygwin + + Reviewed-by: Martin Peres <martin.pe...@free.fr> + Reviewed-by: Jon TURNEY <jon.tur...@dronecode.org.uk> + +commit 06f562584a885eff7366dca82caf746e62b5a21f +Author: Thomas Klausner <w...@netbsd.org> +Date: Wed Aug 14 19:45:46 2013 +0200 + + Improve NetBSD i386 detection. + + Sometimes, other values are reported for the CPU part, like + "i486--netbsdelf"). + + From: Mark Davies <ma...@netbsd.org> + Signed-off-by: Thomas Klausner <w...@netbsd.org> + Reviewed-By: Matt Dew <mar...@osource.org> + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + +commit 4427be3de93f359ab106a649a43e41319625e1e7 +Author: Thomas Klausner <w...@netbsd.org> +Date: Sun Jul 21 11:44:14 2013 +0200 + + Fix zlib handling on NetBSD. + + Signed-off-by: Thomas Klausner <w...@netbsd.org> + Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com> + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + commit aa7925c4a798b9ed2cd43bd3c99c2df2a1824311 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Sat Jul 20 15:53:42 2013 -0700 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/INSTALL new/libpciaccess-0.13.3/INSTALL --- old/libpciaccess-0.13.2/INSTALL 2013-07-21 00:55:45.000000000 +0200 +++ new/libpciaccess-0.13.3/INSTALL 2015-02-04 00:59:51.000000000 +0100 @@ -1,11 +1,13 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== @@ -13,7 +15,11 @@ Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,22 @@ 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,8 +83,15 @@ all sorts of other programs in order to regenerate files that came with the distribution. - 6. Often, you can also type `make uninstall' to remove the installed - files again. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. Compilers and Options ===================== @@ -93,7 +116,8 @@ own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have @@ -120,7 +144,8 @@ By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -131,15 +156,46 @@ In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE @@ -152,6 +208,13 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + Particular systems ================== @@ -159,10 +222,15 @@ CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: - ./configure CC="cc -Ae" + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `<wchar.h>' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended @@ -174,6 +242,16 @@ ./configure CC="cc -nodtk" + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== @@ -189,7 +267,8 @@ where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't @@ -277,7 +356,7 @@ `configure' can determine that directory automatically. `--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: + Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/compile new/libpciaccess-0.13.3/compile --- old/libpciaccess-0.13.2/compile 2013-07-21 00:54:46.000000000 +0200 +++ new/libpciaccess-0.13.3/compile 2015-02-04 00:59:24.000000000 +0100 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/config.h.in new/libpciaccess-0.13.3/config.h.in --- old/libpciaccess-0.13.2/config.h.in 2013-07-21 00:54:45.000000000 +0200 +++ new/libpciaccess-0.13.3/config.h.in 2015-02-04 00:59:23.000000000 +0100 @@ -116,6 +116,11 @@ /* Version number of package */ #undef VERSION +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/configure.ac new/libpciaccess-0.13.3/configure.ac --- old/libpciaccess-0.13.2/configure.ac 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/configure.ac 2015-02-04 00:59:14.000000000 +0100 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libpciaccess],[0.13.2], +AC_INIT([libpciaccess],[0.13.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=libpciaccess],[libpciaccess]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) @@ -76,11 +76,11 @@ ;; *netbsd*) case $host in - *i386*) - PCIACCESS_LIBS="-li386 -lpci" + *i[3-9]86*) + PCIACCESS_LIBS="$PCIACCESS_LIBS -li386 -lpci" ;; *x86_64*|*amd64*) - PCIACCESS_LIBS="-lx86_64 -lpci" + PCIACCESS_LIBS="$PCIACCESS_LIBS -lx86_64 -lpci" ;; esac netbsd=yes @@ -95,6 +95,10 @@ gnu*) gnu=yes ;; + *cygwin*) + cygwin=yes + PCIACCESS_LIBS="$PCIACCESS_LIBS" + ;; esac AM_CONDITIONAL(LINUX, [test "x$linux" = xyes]) @@ -103,6 +107,7 @@ AM_CONDITIONAL(OPENBSD, [test "x$openbsd" = xyes]) AM_CONDITIONAL(SOLARIS, [test "x$solaris" = xyes]) AM_CONDITIONAL(GNU, [test "x$gnu" = xyes]) +AM_CONDITIONAL(CYGWIN, [test "x$cygwin" = xyes]) AC_SYS_LARGEFILE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/include/pciaccess.h new/libpciaccess-0.13.3/include/pciaccess.h --- old/libpciaccess-0.13.2/include/pciaccess.h 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/include/pciaccess.h 2015-02-04 00:59:14.000000000 +0100 @@ -59,7 +59,7 @@ #include <inttypes.h> -#if __GNUC__ >= 3 +#if (__GNUC__ >= 3) || (__SUNPRO_C >= 0x5130) #define __deprecated __attribute__((deprecated)) #else #define __deprecated diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/missing new/libpciaccess-0.13.3/missing --- old/libpciaccess-0.13.2/missing 2013-07-21 00:54:46.000000000 +0200 +++ new/libpciaccess-0.13.3/missing 2015-02-04 00:59:24.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/Makefile.am new/libpciaccess-0.13.3/src/Makefile.am --- old/libpciaccess-0.13.2/src/Makefile.am 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/Makefile.am 2015-02-04 00:59:14.000000000 +0100 @@ -56,6 +56,11 @@ VGA_ARBITER = common_vgaarb_stub.c endif +if CYGWIN +OS_SUPPORT = x86_pci.c +VGA_ARBITER = common_vgaarb_stub.c +endif + libpciaccess_la_SOURCES = common_bridge.c \ common_iterator.c \ common_init.c \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/common_init.c new/libpciaccess-0.13.3/src/common_init.c --- old/libpciaccess-0.13.2/src/common_init.c 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/common_init.c 2015-02-04 00:59:14.000000000 +0100 @@ -62,7 +62,7 @@ err = pci_system_openbsd_create(); #elif defined(__sun) err = pci_system_solx_devfs_create(); -#elif defined(__GNU__) +#elif defined(__GNU__) || defined(__CYGWIN__) err = pci_system_x86_create(); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/common_interface.c new/libpciaccess-0.13.3/src/common_interface.c --- old/libpciaccess-0.13.2/src/common_interface.c 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/common_interface.c 2015-02-04 00:59:14.000000000 +0100 @@ -36,7 +36,7 @@ #include "pciaccess.h" #include "pciaccess_private.h" -#if defined(__linux__) || defined(__GLIBC__) +#if defined(__linux__) || defined(__GLIBC__) || defined(__CYGWIN__) #include <byteswap.h> #if __BYTE_ORDER == __BIG_ENDIAN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/freebsd_pci.c new/libpciaccess-0.13.3/src/freebsd_pci.c --- old/libpciaccess-0.13.2/src/freebsd_pci.c 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/freebsd_pci.c 2015-02-04 00:59:14.000000000 +0100 @@ -579,6 +579,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; #elif defined(PCI_MAGIC_IO_RANGE) ret->memory = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, @@ -588,6 +589,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; #else return NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/linux_sysfs.c new/libpciaccess-0.13.3/src/linux_sysfs.c --- old/libpciaccess-0.13.2/src/linux_sysfs.c 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/linux_sysfs.c 2015-02-04 00:59:14.000000000 +0100 @@ -759,6 +759,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 0; return ret; } @@ -796,6 +797,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; } @@ -813,10 +815,14 @@ { uint32_t ret; - if (handle->fd > -1) - pread(handle->fd, &ret, 4, port + handle->base); - else + if (handle->fd > -1) { + if (handle->is_legacy) + pread(handle->fd, &ret, 4, port + handle->base); + else + pread(handle->fd, &ret, 4, port); + } else { ret = inl(port + handle->base); + } return ret; } @@ -826,10 +832,14 @@ { uint16_t ret; - if (handle->fd > -1) - pread(handle->fd, &ret, 2, port + handle->base); - else + if (handle->fd > -1) { + if (handle->is_legacy) + pread(handle->fd, &ret, 2, port + handle->base); + else + pread(handle->fd, &ret, 2, port); + } else { ret = inw(port + handle->base); + } return ret; } @@ -839,10 +849,14 @@ { uint8_t ret; - if (handle->fd > -1) - pread(handle->fd, &ret, 1, port + handle->base); - else + if (handle->fd > -1) { + if (handle->is_legacy) + pread(handle->fd, &ret, 1, port + handle->base); + else + pread(handle->fd, &ret, 1, port); + } else { ret = inb(port + handle->base); + } return ret; } @@ -851,30 +865,42 @@ pci_device_linux_sysfs_write32(struct pci_io_handle *handle, uint32_t port, uint32_t data) { - if (handle->fd > -1) - pwrite(handle->fd, &data, 4, port + handle->base); - else + if (handle->fd > -1) { + if (handle->is_legacy) + pwrite(handle->fd, &data, 4, port + handle->base); + else + pwrite(handle->fd, &data, 4, port); + } else { outl(data, port + handle->base); + } } static void pci_device_linux_sysfs_write16(struct pci_io_handle *handle, uint32_t port, uint16_t data) { - if (handle->fd > -1) - pwrite(handle->fd, &data, 2, port + handle->base); - else + if (handle->fd > -1) { + if (handle->is_legacy) + pwrite(handle->fd, &data, 2, port + handle->base); + else + pwrite(handle->fd, &data, 2, port); + } else { outw(data, port + handle->base); + } } static void pci_device_linux_sysfs_write8(struct pci_io_handle *handle, uint32_t port, uint8_t data) { - if (handle->fd > -1) - pwrite(handle->fd, &data, 1, port + handle->base); - else + if (handle->fd > -1) { + if (handle->is_legacy) + pwrite(handle->fd, &data, 1, port + handle->base); + else + pwrite(handle->fd, &data, 1, port); + } else { outb(data, port + handle->base); + } } static int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/netbsd_pci.c new/libpciaccess-0.13.3/src/netbsd_pci.c --- old/libpciaccess-0.13.2/src/netbsd_pci.c 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/netbsd_pci.c 2015-02-04 00:59:14.000000000 +0100 @@ -733,6 +733,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; #elif defined(__amd64__) struct x86_64_iopl_args ia; @@ -743,6 +744,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; #else return NULL; @@ -841,6 +843,29 @@ return pci_device_netbsd_unmap_range(dev, &map); } +static int +pci_device_netbsd_has_kernel_driver(struct pci_device *dev) +{ +#ifdef PCI_IOC_DRVNAME + /* + * NetBSD PCI_IOC_DRVNAME appears at the same time as pci_drvname(3) + */ + char drvname[16]; + + if (dev->bus >= nbuses) + return 0; + + /* + * vga(4) should be considered "not bound". + */ + if (pci_drvname(buses[dev->bus].fd, dev->dev, dev->func, + drvname, sizeof drvname) == 0 && + strncmp(drvname, "vga", 3) != 0) + return 1; +#endif + return 0; +} + static const struct pci_system_methods netbsd_pci_methods = { .destroy = pci_system_netbsd_destroy, .destroy_device = NULL, @@ -865,6 +890,7 @@ .write8 = pci_device_netbsd_write8, .map_legacy = pci_device_netbsd_map_legacy, .unmap_legacy = pci_device_netbsd_unmap_legacy, + .has_kernel_driver = pci_device_netbsd_has_kernel_driver, }; int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/openbsd_pci.c new/libpciaccess-0.13.3/src/openbsd_pci.c --- old/libpciaccess-0.13.2/src/openbsd_pci.c 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/openbsd_pci.c 2015-02-04 00:59:14.000000000 +0100 @@ -81,6 +81,29 @@ return ioctl(pcifd[domain], PCIOCWRITE, &io); } +static int +pci_readmask(int domain, int bus, int dev, int func, uint32_t reg, + uint32_t *val) +{ + struct pci_io io; + int err; + + bzero(&io, sizeof(io)); + io.pi_sel.pc_bus = bus; + io.pi_sel.pc_dev = dev; + io.pi_sel.pc_func = func; + io.pi_reg = reg; + io.pi_width = 4; + + err = ioctl(pcifd[domain], PCIOCREADMASK, &io); + if (err) + return (err); + + *val = io.pi_data; + + return 0; +} + /** * Read a VGA ROM * @@ -328,11 +351,9 @@ return err; /* Probe the size of the region. */ - err = pci_write(domain, bus, dev, func, bar, ~0); + err = pci_readmask(domain, bus, dev, func, bar, &size); if (err) return err; - pci_read(domain, bus, dev, func, bar, &size); - pci_write(domain, bus, dev, func, bar, reg); if (PCI_MAPREG_TYPE(reg) == PCI_MAPREG_TYPE_IO) { region->is_IO = 1; @@ -360,11 +381,9 @@ return err; reg64 |= (uint64_t)reg << 32; - err = pci_write(domain, bus, dev, func, bar, ~0); + err = pci_readmask(domain, bus, dev, func, bar, &size); if (err) return err; - pci_read(domain, bus, dev, func, bar, &size); - pci_write(domain, bus, dev, func, bar, reg64 >> 32); size64 |= (uint64_t)size << 32; region->base_addr = PCI_MAPREG_MEM64_ADDR(reg64); @@ -412,6 +431,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; #elif defined(__amd64__) struct amd64_iopl_args ia; @@ -422,6 +442,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; #elif defined(PCI_MAGIC_IO_RANGE) ret->memory = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, @@ -431,6 +452,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; #else return NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/pciaccess_private.h new/libpciaccess-0.13.3/src/pciaccess_private.h --- old/libpciaccess-0.13.2/src/pciaccess_private.h 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/pciaccess_private.h 2015-02-04 00:59:14.000000000 +0100 @@ -109,6 +109,7 @@ pciaddr_t size; void *memory; int fd; + int is_legacy; }; struct pci_device_private { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/solx_devfs.c new/libpciaccess-0.13.3/src/solx_devfs.c --- old/libpciaccess-0.13.2/src/solx_devfs.c 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/solx_devfs.c 2015-02-04 00:59:14.000000000 +0100 @@ -724,6 +724,9 @@ strerror(errno)); return err; } +#ifndef __sparc + xsvc_fd = map_fd; +#endif } map->memory = mmap(NULL, map->size, prot, MAP_SHARED, map_fd, map->base); @@ -911,6 +914,7 @@ if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) == 0) { ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libpciaccess-0.13.2/src/x86_pci.c new/libpciaccess-0.13.3/src/x86_pci.c --- old/libpciaccess-0.13.2/src/x86_pci.c 2013-07-21 00:54:34.000000000 +0200 +++ new/libpciaccess-0.13.3/src/x86_pci.c 2015-02-04 00:59:14.000000000 +0100 @@ -72,6 +72,133 @@ return errno; } +#elif defined(__CYGWIN__) + +#include <windows.h> + +/* WinIo declarations */ +typedef BYTE bool; +typedef struct tagPhysStruct { + DWORD64 dwPhysMemSizeInBytes; + DWORD64 pvPhysAddress; + DWORD64 PhysicalMemoryHandle; + DWORD64 pvPhysMemLin; + DWORD64 pvPhysSection; +} tagPhysStruct; + +typedef bool (_stdcall* INITIALIZEWINIO)(void); +typedef void (_stdcall* SHUTDOWNWINIO)(void); +typedef bool (_stdcall* GETPORTVAL)(WORD,PDWORD,BYTE); +typedef bool (_stdcall* SETPORTVAL)(WORD,DWORD,BYTE); +typedef PBYTE (_stdcall* MAPPHYSTOLIN)(tagPhysStruct*); +typedef bool (_stdcall* UNMAPPHYSMEM)(tagPhysStruct*); + +SHUTDOWNWINIO ShutdownWinIo; +GETPORTVAL GetPortVal; +SETPORTVAL SetPortVal; +INITIALIZEWINIO InitializeWinIo; +MAPPHYSTOLIN MapPhysToLin; +UNMAPPHYSMEM UnmapPhysicalMemory; + +static int +x86_enable_io(void) +{ + HMODULE lib = NULL; + + if ((GetVersion() & 0x80000000) == 0) { + /* running on NT, try WinIo version 3 (32 or 64 bits) */ +#ifdef WIN64 + lib = LoadLibrary("WinIo64.dll"); +#else + lib = LoadLibrary("WinIo32.dll"); +#endif + } + + if (!lib) { + fprintf(stderr, "Failed to load WinIo library.\n"); + return 1; + } + +#define GETPROC(n, d) \ + n = (d) GetProcAddress(lib, #n); \ + if (!n) { \ + fprintf(stderr, "Failed to load " #n " function.\n"); \ + return 1; \ + } + + GETPROC(InitializeWinIo, INITIALIZEWINIO); + GETPROC(ShutdownWinIo, SHUTDOWNWINIO); + GETPROC(GetPortVal, GETPORTVAL); + GETPROC(SetPortVal, SETPORTVAL); + GETPROC(MapPhysToLin, MAPPHYSTOLIN); + GETPROC(UnmapPhysicalMemory, UNMAPPHYSMEM); + +#undef GETPROC + + if (!InitializeWinIo()) { + fprintf(stderr, "Failed to initialize WinIo.\n" + "NOTE: WinIo.dll and WinIo.sys must be in the same directory as the executable!\n"); + return 0; + } + + return 0; +} + +static int +x86_disable_io(void) +{ + ShutdownWinIo(); + return 1; +} + +static inline uint8_t +inb(uint16_t port) +{ + DWORD pv; + + if (GetPortVal(port, &pv, 1)) + return (uint8_t)pv; + return 0; +} + +static inline uint16_t +inw(uint16_t port) +{ + DWORD pv; + + if (GetPortVal(port, &pv, 2)) + return (uint16_t)pv; + return 0; +} + +static inline uint32_t +inl(uint16_t port) +{ + DWORD pv; + + if (GetPortVal(port, &pv, 4)) + return (uint32_t)pv; + return 0; +} + +static inline void +outb(uint8_t value, uint16_t port) +{ + SetPortVal(port, value, 1); +} + +static inline void +outw(uint16_t value, uint16_t port) +{ + SetPortVal(port, value, 2); +} + +static inline void +outl(uint32_t value, uint16_t port) +{ + SetPortVal(port, value, 4); +} + #else #error How to enable IO ports on this system? @@ -471,6 +598,41 @@ return 0; } +#if defined(__CYGWIN__) + +static int +pci_device_x86_map_range(struct pci_device *dev, + struct pci_device_mapping *map) +{ + tagPhysStruct phys; + + phys.pvPhysAddress = (DWORD64)(DWORD32)map->base; + phys.dwPhysMemSizeInBytes = map->size; + + map->memory = (PDWORD)MapPhysToLin(&phys); + if (map->memory == NULL) + return EFAULT; + + return 0; +} + +static int +pci_device_x86_unmap_range(struct pci_device *dev, + struct pci_device_mapping *map) +{ + tagPhysStruct phys; + + phys.pvPhysAddress = (DWORD64)(DWORD32)map->base; + phys.dwPhysMemSizeInBytes = map->size; + + if (!UnmapPhysicalMemory(&phys)) + return EFAULT; + + return 0; +} + +#else + static int pci_device_x86_map_range(struct pci_device *dev, struct pci_device_mapping *map) @@ -493,6 +655,15 @@ } static int +pci_device_x86_unmap_range(struct pci_device *dev, + struct pci_device_mapping *map) +{ + return pci_device_generic_unmap_range(dev, map); +} + +#endif + +static int pci_device_x86_read(struct pci_device *dev, void *data, pciaddr_t offset, pciaddr_t size, pciaddr_t *bytes_read) { @@ -558,6 +729,7 @@ ret->base = base; ret->size = size; + ret->is_legacy = 1; return ret; } @@ -635,7 +807,7 @@ map.flags = 0; map.memory = addr; - return pci_device_generic_unmap_range(dev, &map); + return pci_device_x86_unmap_range(dev, &map); } static const struct pci_system_methods x86_pci_methods = { @@ -643,7 +815,7 @@ .read_rom = pci_device_x86_read_rom, .probe = pci_device_x86_probe, .map_range = pci_device_x86_map_range, - .unmap_range = pci_device_generic_unmap_range, + .unmap_range = pci_device_x86_unmap_range, .read = pci_device_x86_read, .write = pci_device_x86_write, .fill_capabilities = pci_fill_capabilities_generic, -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org