summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-07-31 08:05:07 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-07-31 08:05:07 +0000
commit850215e29412953914cc18e097de51d3c7854400 (patch)
tree07f35b136d4d782bf27de5d0beda32ea000132b6
parent0de6e86b1c1d99cddd2934ba2ae2f05bc1157ec9 (diff)
Update to libpciaccess 0.12.
We already had most of the code from this version, it just add 2 bug fixes. no ABI/API change.
-rw-r--r--lib/libpciaccess/configure20
-rw-r--r--lib/libpciaccess/configure.ac2
-rw-r--r--lib/libpciaccess/src/Makefile.am6
-rw-r--r--lib/libpciaccess/src/Makefile.in11
-rw-r--r--lib/libpciaccess/src/common_interface.c4
-rw-r--r--lib/libpciaccess/src/common_vgaarb.c10
6 files changed, 28 insertions, 25 deletions
diff --git a/lib/libpciaccess/configure b/lib/libpciaccess/configure
index 2441708a0..389c63ea9 100644
--- a/lib/libpciaccess/configure
+++ b/lib/libpciaccess/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for libpciaccess 0.11.0.
+# Generated by GNU Autoconf 2.62 for libpciaccess 0.12.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=libpciaccess>.
#
@@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='libpciaccess'
PACKAGE_TARNAME='libpciaccess'
-PACKAGE_VERSION='0.11.0'
-PACKAGE_STRING='libpciaccess 0.11.0'
+PACKAGE_VERSION='0.12.0'
+PACKAGE_STRING='libpciaccess 0.12.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=libpciaccess'
# Factoring default headers for most tests.
@@ -1518,7 +1518,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 libpciaccess 0.11.0 to adapt to many kinds of systems.
+\`configure' configures libpciaccess 0.12.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1588,7 +1588,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libpciaccess 0.11.0:";;
+ short | recursive ) echo "Configuration of libpciaccess 0.12.0:";;
esac
cat <<\_ACEOF
@@ -1706,7 +1706,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libpciaccess configure 0.11.0
+libpciaccess configure 0.12.0
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1720,7 +1720,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 libpciaccess $as_me 0.11.0, which was
+It was created by libpciaccess $as_me 0.12.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2369,7 +2369,7 @@ fi
# Define the identity of the package.
PACKAGE='libpciaccess'
- VERSION='0.11.0'
+ VERSION='0.12.0'
cat >>confdefs.h <<_ACEOF
@@ -22960,7 +22960,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libpciaccess $as_me 0.11.0, which was
+This file was extended by libpciaccess $as_me 0.12.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23013,7 +23013,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-libpciaccess config.status 0.11.0
+libpciaccess config.status 0.12.0
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/lib/libpciaccess/configure.ac b/lib/libpciaccess/configure.ac
index e5d962fd6..bba0cffb5 100644
--- a/lib/libpciaccess/configure.ac
+++ b/lib/libpciaccess/configure.ac
@@ -24,7 +24,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ([2.60])
-AC_INIT(libpciaccess, 0.11.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=libpciaccess], libpciaccess)
+AC_INIT(libpciaccess, 0.12.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=libpciaccess], libpciaccess)
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/lib/libpciaccess/src/Makefile.am b/lib/libpciaccess/src/Makefile.am
index 81bb91a3b..187202199 100644
--- a/lib/libpciaccess/src/Makefile.am
+++ b/lib/libpciaccess/src/Makefile.am
@@ -68,7 +68,7 @@ libpciaccess_la_SOURCES = common_bridge.c \
INCLUDES = -I$(top_srcdir)/include
-libpciaccess_la_LIBADD = @PCIACCESS_LIBS@
+libpciaccess_la_LIBADD = $(PCIACCESS_LIBS)
libpciaccess_la_LDFLAGS = -version-number 0:10:8 -no-undefined
@@ -79,8 +79,4 @@ libpciaccessinclude_HEADERS = \
noinst_PROGRAMS = scanpci
scanpci_SOURCES = scanpci.c
-if SOLARIS
-scanpci_LDADD = libpciaccess.la -ldevinfo
-else
scanpci_LDADD = libpciaccess.la
-endif
diff --git a/lib/libpciaccess/src/Makefile.in b/lib/libpciaccess/src/Makefile.in
index 5a144c815..c1909340a 100644
--- a/lib/libpciaccess/src/Makefile.in
+++ b/lib/libpciaccess/src/Makefile.in
@@ -83,7 +83,8 @@ am__installdirs = "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(libpciaccessincludedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
-libpciaccess_la_DEPENDENCIES =
+am__DEPENDENCIES_1 =
+libpciaccess_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am__libpciaccess_la_SOURCES_DIST = common_bridge.c common_iterator.c \
common_init.c common_interface.c common_io.c \
common_capability.c common_device_name.c common_map.c \
@@ -112,8 +113,7 @@ libpciaccess_la_OBJECTS = $(am_libpciaccess_la_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
am_scanpci_OBJECTS = scanpci.$(OBJEXT)
scanpci_OBJECTS = $(am_scanpci_OBJECTS)
-@SOLARIS_FALSE@scanpci_DEPENDENCIES = libpciaccess.la
-@SOLARIS_TRUE@scanpci_DEPENDENCIES = libpciaccess.la
+scanpci_DEPENDENCIES = libpciaccess.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -299,15 +299,14 @@ libpciaccess_la_SOURCES = common_bridge.c \
$(OS_SUPPORT)
INCLUDES = -I$(top_srcdir)/include
-libpciaccess_la_LIBADD = @PCIACCESS_LIBS@
+libpciaccess_la_LIBADD = $(PCIACCESS_LIBS)
libpciaccess_la_LDFLAGS = -version-number 0:10:8 -no-undefined
libpciaccessincludedir = $(includedir)
libpciaccessinclude_HEADERS = \
$(top_srcdir)/include/pciaccess.h
scanpci_SOURCES = scanpci.c
-@SOLARIS_FALSE@scanpci_LDADD = libpciaccess.la
-@SOLARIS_TRUE@scanpci_LDADD = libpciaccess.la -ldevinfo
+scanpci_LDADD = libpciaccess.la
all: all-am
.SUFFIXES:
diff --git a/lib/libpciaccess/src/common_interface.c b/lib/libpciaccess/src/common_interface.c
index d46feab87..4af772ac3 100644
--- a/lib/libpciaccess/src/common_interface.c
+++ b/lib/libpciaccess/src/common_interface.c
@@ -317,8 +317,8 @@ pci_device_map_range(struct pci_device *dev, pciaddr_t base,
*addr = mappings[devp->num_mappings].memory;
devp->num_mappings++;
} else {
- mappings = realloc(devp->mappings,
- (sizeof(devp->mappings[0]) * devp->num_mappings));
+ mappings = realloc(mappings,
+ (sizeof(mappings[0]) * devp->num_mappings));
}
devp->mappings = mappings;
diff --git a/lib/libpciaccess/src/common_vgaarb.c b/lib/libpciaccess/src/common_vgaarb.c
index a96aedfd0..86eceb51d 100644
--- a/lib/libpciaccess/src/common_vgaarb.c
+++ b/lib/libpciaccess/src/common_vgaarb.c
@@ -33,6 +33,7 @@
#include <stdlib.h>
#include <limits.h>
+#include "config.h"
#include "pciaccess.h"
#include "pciaccess_private.h"
@@ -259,10 +260,17 @@ pci_device_vgaarb_decodes(int new_vgaarb_rsrc)
if (dev->vgaarb_rsrc == new_vgaarb_rsrc)
return 0;
- len = snprintf(buf, BUFSIZE, "decodes %s", rsrc_to_str(dev->vgaarb_rsrc));
+ len = snprintf(buf, BUFSIZE, "decodes %s", rsrc_to_str(new_vgaarb_rsrc));
ret = vgaarb_write(pci_sys->vgaarb_fd, buf, len);
if (ret == 0)
dev->vgaarb_rsrc = new_vgaarb_rsrc;
+
+ ret = read(pci_sys->vgaarb_fd, buf, BUFSIZE);
+ if (ret <= 0)
+ return -1;
+
+ parse_string_to_decodes_rsrc(buf, &pci_sys->vga_count, NULL);
+
return ret;
}