diff options
author | Julien Cristau <jcristau@debian.org> | 2008-02-19 14:45:40 +0100 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2008-02-27 23:27:23 +0100 |
commit | adc46f65d7a097ea0e8427a2496586a420c99d55 (patch) | |
tree | 2380ed9a30e10aaa0a31ffe630d199f34b8030cb | |
parent | 25de45d250811474e86cb9a09caf258aef699196 (diff) |
Don't export private symbols.
-rw-r--r-- | src/common_capability.c | 2 | ||||
-rw-r--r-- | src/common_device_name.c | 3 | ||||
-rw-r--r-- | src/common_init.c | 2 | ||||
-rw-r--r-- | src/common_map.c | 2 | ||||
-rw-r--r-- | src/freebsd_pci.c | 2 | ||||
-rw-r--r-- | src/linux_devmem.c | 3 | ||||
-rw-r--r-- | src/linux_sysfs.c | 2 | ||||
-rw-r--r-- | src/pciaccess_private.h | 7 |
8 files changed, 16 insertions, 7 deletions
diff --git a/src/common_capability.c b/src/common_capability.c index 48f6ed4..31d59eb 100644 --- a/src/common_capability.c +++ b/src/common_capability.c @@ -59,7 +59,7 @@ * 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 = diff --git a/src/common_device_name.c b/src/common_device_name.c index 12f88f5..66c2104 100644 --- a/src/common_device_name.c +++ b/src/common_device_name.c @@ -46,6 +46,7 @@ #endif #include "pciaccess.h" +#include "pciaccess_private.h" #define DO_MATCH(a,b) (((a) == PCI_MATCH_ANY) || ((a) == (b))) @@ -92,7 +93,7 @@ struct pci_device_leaf { /** * 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. diff --git a/src/common_init.c b/src/common_init.c index 94048ea..1092faf 100644 --- a/src/common_init.c +++ b/src/common_init.c @@ -35,7 +35,7 @@ #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. diff --git a/src/common_map.c b/src/common_map.c index a64577b..ac1c668 100644 --- a/src/common_map.c +++ b/src/common_map.c @@ -46,7 +46,7 @@ * * \sa pci_device_unmap_range */ -int +_pci_hidden int pci_device_generic_unmap_range(struct pci_device *dev, struct pci_device_mapping *map) { diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index 0c7cf61..67ca9e3 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -439,7 +439,7 @@ static const struct pci_system_methods freebsd_pci_methods = { /** * Attempt to access the FreeBSD PCI interface. */ -int +_pci_hidden int pci_system_freebsd_create( void ) { struct pci_conf_io pciconfio; diff --git a/src/linux_devmem.c b/src/linux_devmem.c index 8650efd..a68ea11 100644 --- a/src/linux_devmem.c +++ b/src/linux_devmem.c @@ -61,7 +61,8 @@ * 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; diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 3671f28..84cdb84 100644 --- a/src/linux_sysfs.c +++ b/src/linux_sysfs.c @@ -96,7 +96,7 @@ static int populate_entries(struct pci_system * pci_sys); /** * Attempt to access PCI subsystem using Linux's sysfs interface. */ -int +_pci_hidden int pci_system_linux_sysfs_create( void ) { int err = 0; diff --git a/src/pciaccess_private.h b/src/pciaccess_private.h index 9eb6062..c8a483e 100644 --- a/src/pciaccess_private.h +++ b/src/pciaccess_private.h @@ -29,6 +29,13 @@ * \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; |