CVS commit: xsrc/external/mit/libpciaccess/dist

2022-11-11 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sat Nov 12 01:45:26 UTC 2022

Modified Files:
xsrc/external/mit/libpciaccess/dist/m4: libtool.m4 ltoptions.m4
ltsugar.m4 ltversion.m4 lt~obsolete.m4
xsrc/external/mit/libpciaccess/dist/src: common_interface.c
netbsd_pci.c

Log Message:
merge libpciaccess 0.17.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/libpciaccess/dist/m4/libtool.m4
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/libpciaccess/dist/m4/ltoptions.m4 \
xsrc/external/mit/libpciaccess/dist/m4/ltsugar.m4 \
xsrc/external/mit/libpciaccess/dist/m4/ltversion.m4 \
xsrc/external/mit/libpciaccess/dist/m4/lt~obsolete.m4
cvs rdiff -u -r1.6 -r1.7 \
xsrc/external/mit/libpciaccess/dist/src/common_interface.c
cvs rdiff -u -r1.21 -r1.22 \
xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libpciaccess/dist/m4/libtool.m4
diff -u xsrc/external/mit/libpciaccess/dist/m4/libtool.m4:1.6 xsrc/external/mit/libpciaccess/dist/m4/libtool.m4:1.7
--- xsrc/external/mit/libpciaccess/dist/m4/libtool.m4:1.6	Sun Mar 11 10:37:32 2018
+++ xsrc/external/mit/libpciaccess/dist/m4/libtool.m4	Sat Nov 12 01:45:25 2022
@@ -1,6 +1,7 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+#   Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -31,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
 # along with this program.  If not, see .
 ])
 
-# serial 58 LT_INIT
+# serial 59 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -181,6 +182,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_DECL_FILECMD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
@@ -219,8 +221,8 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
 libext=a
 
 with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -778,7 +780,7 @@ _LT_EOF
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
+  $SED '$q' "$ltmain" >> "$cfgfile" \
  || (rm -f "$cfgfile"; exit 1)
 
mv -f "$cfgfile" "$ofile" ||
@@ -1042,8 +1044,8 @@ int forced_loaded() { return 2;}
 _LT_EOF
   echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >_MESSAGE_LOG_FD
   $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>_MESSAGE_LOG_FD
-  echo "$AR cru libconftest.a conftest.o" >_MESSAGE_LOG_FD
-  $AR cru libconftest.a conftest.o 2>_MESSAGE_LOG_FD
+  echo "$AR $AR_FLAGS libconftest.a conftest.o" >_MESSAGE_LOG_FD
+  $AR $AR_FLAGS libconftest.a conftest.o 2>_MESSAGE_LOG_FD
   echo "$RANLIB libconftest.a" >_MESSAGE_LOG_FD
   $RANLIB libconftest.a 2>_MESSAGE_LOG_FD
   cat > conftest.c << _LT_EOF
@@ -1067,17 +1069,12 @@ _LT_EOF
   _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
 darwin1.*)
   _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-darwin*) # darwin 5.x on
-  # if running on 10.5 or later, the deployment target defaults
-  # to the OS version, if on x86, and 10.4, the deployment
-  # target defaults to 10.4. Don't you love it?
-  case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]][[,.]]*)
-	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+darwin*)
+  case $MACOSX_DEPLOYMENT_TARGET,$host in
+10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
+  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+*)
+  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
   esac
 ;;
   esac
@@ -1126,12 +1123,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
 output_verbose_link_cmd=func_echo_all
 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib 

CVS commit: xsrc/external/mit/libpciaccess/dist

2022-11-11 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sat Nov 12 01:45:26 UTC 2022

Modified Files:
xsrc/external/mit/libpciaccess/dist/m4: libtool.m4 ltoptions.m4
ltsugar.m4 ltversion.m4 lt~obsolete.m4
xsrc/external/mit/libpciaccess/dist/src: common_interface.c
netbsd_pci.c

Log Message:
merge libpciaccess 0.17.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/libpciaccess/dist/m4/libtool.m4
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/libpciaccess/dist/m4/ltoptions.m4 \
xsrc/external/mit/libpciaccess/dist/m4/ltsugar.m4 \
xsrc/external/mit/libpciaccess/dist/m4/ltversion.m4 \
xsrc/external/mit/libpciaccess/dist/m4/lt~obsolete.m4
cvs rdiff -u -r1.6 -r1.7 \
xsrc/external/mit/libpciaccess/dist/src/common_interface.c
cvs rdiff -u -r1.21 -r1.22 \
xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/libpciaccess/dist/src

2022-01-14 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Jan 14 19:42:56 UTC 2022

Modified Files:
xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c

Log Message:
add flag to disable blindly enabling memory and IO access on everything we
find


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/libpciaccess/dist/src

2022-01-14 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Jan 14 19:42:56 UTC 2022

Modified Files:
xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c

Log Message:
add flag to disable blindly enabling memory and IO access on everything we
find


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.20 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.21
--- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.20	Fri Oct  9 10:48:18 2020
+++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c	Fri Jan 14 19:42:56 2022
@@ -333,6 +333,7 @@ pci_device_netbsd_probe(struct pci_devic
 	err = pci_read(domain, bus, dev, func, PCI_COMMAND_STATUS_REG, );
 	if (err)
 		return err;
+#ifndef AVOID_DEVICE_ENABLE
 	if ((reg & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE)) !=
 	(PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE)) {
 		reg |= PCI_COMMAND_IO_ENABLE |
@@ -343,7 +344,7 @@ pci_device_netbsd_probe(struct pci_devic
 		if (err)
 			return err;
 	}
-
+#endif
 	err = pci_read(domain, bus, dev, func, PCI_BHLC_REG, );
 	if (err)
 		return err;



CVS commit: xsrc/external/mit/libpciaccess/dist

2019-07-14 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Mon Jul 15 05:54:19 UTC 2019

Modified Files:
xsrc/external/mit/libpciaccess/dist/src: common_bridge.c
Removed Files:
xsrc/external/mit/libpciaccess/dist: README

Log Message:
merge libpciaccess 0.15.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/libpciaccess/dist/README
cvs rdiff -u -r1.7 -r1.8 \
xsrc/external/mit/libpciaccess/dist/src/common_bridge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/libpciaccess/dist

2019-07-14 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Mon Jul 15 05:54:19 UTC 2019

Modified Files:
xsrc/external/mit/libpciaccess/dist/src: common_bridge.c
Removed Files:
xsrc/external/mit/libpciaccess/dist: README

Log Message:
merge libpciaccess 0.15.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/libpciaccess/dist/README
cvs rdiff -u -r1.7 -r1.8 \
xsrc/external/mit/libpciaccess/dist/src/common_bridge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libpciaccess/dist/src/common_bridge.c
diff -u xsrc/external/mit/libpciaccess/dist/src/common_bridge.c:1.7 xsrc/external/mit/libpciaccess/dist/src/common_bridge.c:1.8
--- xsrc/external/mit/libpciaccess/dist/src/common_bridge.c:1.7	Mon Mar 17 02:42:09 2014
+++ xsrc/external/mit/libpciaccess/dist/src/common_bridge.c	Mon Jul 15 05:54:19 2019
@@ -216,7 +216,7 @@ pci_device_get_bridge_info( struct pci_d
 	read_bridge_info(priv);
 }
 
-return (priv->header_type == 1) ? priv->bridge.pci : NULL;
+return ((priv->header_type & 0x7f) == 1) ? priv->bridge.pci : NULL;
 }
 
 



re: CVS commit: xsrc/external/mit/libpciaccess/dist

2017-08-29 Thread matthew green
co...@sdf.org writes:
> On Tue, Aug 29, 2017 at 05:52:34AM +, matthew green wrote:
> > @@ -175,6 +179,9 @@ insert( uint16_t vendor )
> > struct pci_id_node * child =
> > calloc( 1, sizeof( struct pci_id_node ) );
> >  
> > +   if ( tree == NULL )
> > +   return NULL;
> > +
> > child->bits = 4;
> >  
> > n->children[ idx ] = child;
> > @@ -183,6 +190,9 @@ insert( uint16_t vendor )
> > struct pci_id_leaf * leaf =
> > calloc( 1, sizeof( struct pci_id_leaf ) );
> >  
> > +   if ( tree == NULL )
> > +   return NULL;
> > +
> > leaf->vendor = vendor;
> 
> should check child & leaf instead, I think

seems not entirely unreasonable.  can you look at it, i was
just porting this change forward..  thanks!


.mrg.


Re: CVS commit: xsrc/external/mit/libpciaccess/dist

2017-08-29 Thread coypu
On Tue, Aug 29, 2017 at 05:52:34AM +, matthew green wrote:
> @@ -175,6 +179,9 @@ insert( uint16_t vendor )
>   struct pci_id_node * child =
>   calloc( 1, sizeof( struct pci_id_node ) );
>  
> + if ( tree == NULL )
> + return NULL;
> +
>   child->bits = 4;
>  
>   n->children[ idx ] = child;
> @@ -183,6 +190,9 @@ insert( uint16_t vendor )
>   struct pci_id_leaf * leaf =
>   calloc( 1, sizeof( struct pci_id_leaf ) );
>  
> + if ( tree == NULL )
> + return NULL;
> +
>   leaf->vendor = vendor;
>  


should check child & leaf instead, I think


Re: CVS commit: xsrc/external/mit/libpciaccess/dist/src

2012-11-04 Thread Alan Barrett

On Fri, 02 Nov 2012, David Young wrote:

Modified Files:
xsrc/external/mit/libpciaccess/dist/src: common_interface.c

Log Message:
Remove useless extra const in const sometype const * var = value;.
Foundusing clang -Wduplicate-decl-specifier.


Maybe 'const sometype * const var' was intended, i.e., a single
assignment semantic?  I've probably mistyped that myself several times.


The variable is assigned only once, so that would work,
but it's in a small block where I don't think it would add any clarity.

--apb (Alan Barrett)


Re: CVS commit: xsrc/external/mit/libpciaccess/dist/src

2012-11-04 Thread David Laight
On Sun, Nov 04, 2012 at 08:44:01AM +0200, Alan Barrett wrote:
 On Fri, 02 Nov 2012, David Young wrote:
 Modified Files:
 xsrc/external/mit/libpciaccess/dist/src: common_interface.c
 
 Log Message:
 Remove useless extra const in const sometype const * var = value;.
 Foundusing clang -Wduplicate-decl-specifier.
 
 Maybe 'const sometype * const var' was intended, i.e., a single
 assignment semantic?  I've probably mistyped that myself several times.
 
 The variable is assigned only once, so that would work,
 but it's in a small block where I don't think it would add any clarity.

Personally I almost never mark variables 'const', the only I initialise
in their declarations (at the top of a function) are probably almost
always never chaned (well maybe execpt default error values).

Marking function parameters 'const' is also pointless, some compilers
verify that the definition in the headers file matches - which is
partitularly pointless since the called object code isn't required
to avoid modifying the argument memory/register (which might sometimes
be a useful optimistation).

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: xsrc/external/mit/libpciaccess/dist/src

2012-11-04 Thread Matt Thomas

On Nov 4, 2012, at 2:26 AM, David Laight wrote:

 Personally I almost never mark variables 'const', the only I initialise
 in their declarations (at the top of a function) are probably almost
 always never chaned (well maybe execpt default error values).

Personally, I always mark variable as const if I don't expect its value to 
change since that documents that expectation.  This is especially true for 
pointers:

const struct foo_softc * const sc = ifp-if_softc;

Once nice side effect is that it catches errors like:

if (sc = NULL) {
}

Re: CVS commit: xsrc/external/mit/libpciaccess/dist/src

2012-11-02 Thread David Young
On Fri, Nov 02, 2012 at 07:38:38AM +, Alan Barrett wrote:
 Module Name:  xsrc
 Committed By: apb
 Date: Fri Nov  2 07:38:38 UTC 2012
 
 Modified Files:
   xsrc/external/mit/libpciaccess/dist/src: common_interface.c
 
 Log Message:
 Remove useless extra const in const sometype const * var = value;.
 Foundusing clang -Wduplicate-decl-specifier.

Maybe 'const sometype * const var' was intended, i.e., a single
assignment semantic?  I've probably mistyped that myself several times.

Dave

-- 
David Young
dyo...@pobox.comUrbana, IL(217) 721-9981


CVS commit: xsrc/external/mit/libpciaccess/dist/src

2010-01-11 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jan 12 03:05:32 UTC 2010

Modified Files:
xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c

Log Message:
in pci_device_netbsd_probe() probe the expansion ROM and size.
if it's there, set priv-rom_base and device-rom_size.

originally from mhitch, and it's basically the same code as present in
both freebsd_pci.c and openbsd_pci.c.

add a comment about needing to avoid the default bios mapping if this
card is not the console.

mmap() with MAP_SHARED, since the kernel forces this anyway, and it is
again the same in both freebsd_pci.c and openbsd_pci.c.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



PCI domains [Was: CVS commit: xsrc/external/mit/libpciaccess/dist/src]

2009-07-09 Thread Simon Burge
Christoph Egger wrote:

 Michael Lorenz wrote:

  +/*
  + * NetBSD's userland has a /dev/pci* entry for each bus but userland has 
  no way
  + * to tell if a bus is a subordinate of another one or if it's on a 
  different
  + * host bridge.
 
 I have a patch which introduces support for PCI domains. It allows the
 userland to distinguish between them by checking if the pci bus belongs
 to the same PCI domain.

What exactly is a PCI domain?  A quick google seems to suggest that
this is a Linux concept as opposed to a PCI concept.  In a previous
life we used NetBSD on a number of different machines of various
architectures that had multiple PCI host bridges, although admittedly we
didn't need to know the topology of the PCI bus layout.

Cheers,
Simon.