* later to try again for the second capability. This could lead to memory
* leaks or other quirky behavior.
*/
-int
+_pci_hidden int
pci_fill_capabilities_generic( struct pci_device * dev )
{
struct pci_device_private * const dev_priv =
#endif
#include "pciaccess.h"
+#include "pciaccess_private.h"
#define DO_MATCH(a,b) (((a) == PCI_MATCH_ANY) || ((a) == (b)))
/**
* Root of the PCI vendor ID search tree.
*/
-struct pci_id_node * tree = NULL;
+_pci_hidden struct pci_id_node * tree = NULL;
/**
* Name of the file containing the PCI ID information.
#include "pciaccess.h"
#include "pciaccess_private.h"
-struct pci_system * pci_sys;
+_pci_hidden struct pci_system * pci_sys;
/**
* Initialize the PCI subsystem for access.
*
* \sa pci_device_unmap_range
*/
-int
+_pci_hidden int
pci_device_generic_unmap_range(struct pci_device *dev,
struct pci_device_mapping *map)
{
/**
* Attempt to access the FreeBSD PCI interface.
*/
-int
+_pci_hidden int
pci_system_freebsd_create( void )
{
struct pci_conf_io pciconfio;
* Before using the VGA special case code, this function should check that
* VGA access are routed to the device. Right?
*/
-int pci_device_linux_devmem_read_rom(struct pci_device *dev, void *buffer)
+_pci_hidden int
+pci_device_linux_devmem_read_rom(struct pci_device *dev, void *buffer)
{
struct pci_device_private *priv = (struct pci_device_private *) dev;
int fd;
/**
* Attempt to access PCI subsystem using Linux's sysfs interface.
*/
-int
+_pci_hidden int
pci_system_linux_sysfs_create( void )
{
int err = 0;
* \author Ian Romanick <idr@us.ibm.com>
*/
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define _pci_hidden __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define _pci_hidden __hidden
+#else /* not gcc >= 4 and not Sun Studio >= 8 */
+# define _pci_hidden
+#endif /* GNUC >= 4 */
struct pci_device_mapping;