summaryrefslogtreecommitdiff
path: root/lib/libpciaccess/scanpci
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-03-09 21:02:11 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-03-09 21:02:11 +0000
commitfdaa6ab556a8914edcb6dbe9da49821fd6c48b3e (patch)
treec6d814653ce0456e948c23f20800af1df73da128 /lib/libpciaccess/scanpci
parent79db6e4960cdb7facb6143b780c692265fc09c88 (diff)
Update to libpciaccess 0.13. Tested by shadchin@
Diffstat (limited to 'lib/libpciaccess/scanpci')
-rw-r--r--lib/libpciaccess/scanpci/Makefile.in28
-rw-r--r--lib/libpciaccess/scanpci/scanpci.c33
2 files changed, 42 insertions, 19 deletions
diff --git a/lib/libpciaccess/scanpci/Makefile.in b/lib/libpciaccess/scanpci/Makefile.in
index a760eae02..642e6937f 100644
--- a/lib/libpciaccess/scanpci/Makefile.in
+++ b/lib/libpciaccess/scanpci/Makefile.in
@@ -64,7 +64,9 @@ subdir = scanpci
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(install_sh) -d
@@ -105,6 +107,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -112,24 +115,20 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DSYMUTIL = @DSYMUTIL@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
FREEBSD_FALSE = @FREEBSD_FALSE@
@@ -142,6 +141,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -150,21 +150,27 @@ LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LINUX_FALSE = @LINUX_FALSE@
LINUX_TRUE = @LINUX_TRUE@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NETBSD_FALSE = @NETBSD_FALSE@
NETBSD_TRUE = @NETBSD_TRUE@
+NM = @NM@
NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENBSD_FALSE = @OPENBSD_FALSE@
OPENBSD_TRUE = @OPENBSD_TRUE@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -186,13 +192,11 @@ STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
diff --git a/lib/libpciaccess/scanpci/scanpci.c b/lib/libpciaccess/scanpci/scanpci.c
index 36ecf0448..1f5f8bd5c 100644
--- a/lib/libpciaccess/scanpci/scanpci.c
+++ b/lib/libpciaccess/scanpci/scanpci.c
@@ -22,10 +22,29 @@
* DEALINGS IN THE SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
-#include <err.h>
#include <unistd.h>
+#include <inttypes.h>
+
+#ifdef HAVE_ERR_H
+#include <err.h>
+#else
+# include <errno.h>
+# include <string.h>
+# define err(exitcode, format, args...) \
+ errx(exitcode, format ": %s", ## args, strerror(errno))
+# define errx(exitcode, format, args...) \
+ { warnx(format, ## args); exit(exitcode); }
+# define warn(format, args...) \
+ warnx(format ": %s", ## args, strerror(errno))
+# define warnx(format, args...) \
+ fprintf(stderr, format "\n", ## args)
+#endif
#include "pciaccess.h"
@@ -33,19 +52,19 @@
static void
print_pci_bridge( const struct pci_bridge_info * info )
{
- printf( " Bus: primary=%02x, secondary=%02x, subordinate=%02x, "
- "sec-latency=%u\n",
+ printf( " Bus: primary=%02"PRIx8", secondary=%02"PRIx8", subordinate=%02"PRIx8", "
+ "sec-latency=%"PRIu8"\n",
info->primary_bus,
info->secondary_bus,
info->subordinate_bus,
info->secondary_latency_timer );
- printf( " I/O behind bridge: %08x-%08x\n",
+ printf( " I/O behind bridge: %08"PRIx32"-%08"PRIx32"\n",
info->io_base,
info->io_limit );
- printf( " Memory behind bridge: %08x-%08x\n",
+ printf( " Memory behind bridge: %08"PRIx32"-%08"PRIx32"\n",
info->mem_base,
info->mem_limit );
- printf( " Prefetchable memory behind bridge: %08llx-%08llx\n",
+ printf( " Prefetchable memory behind bridge: %08"PRIx64"-%08"PRIx64"\n",
info->prefetch_mem_base,
info->prefetch_mem_limit );
}
@@ -132,7 +151,7 @@ print_pci_device( struct pci_device * dev, int verbose )
pci_device_probe( dev );
for ( i = 0 ; i < 6 ; i++ ) {
if ( dev->regions[i].base_addr != 0 ) {
- printf( " BASE%u 0x%08x SIZE %d %s",
+ printf( " BASE%u 0x%08"PRIxPTR" SIZE %zu %s",
i,
(intptr_t) dev->regions[i].base_addr,
(size_t) dev->regions[i].size,