Don't export private symbols.
authorJulien Cristau <jcristau@debian.org>
Tue, 19 Feb 2008 13:45:40 +0000 (14:45 +0100)
committerJulien Cristau <jcristau@debian.org>
Wed, 27 Feb 2008 22:27:23 +0000 (23:27 +0100)
src/common_capability.c
src/common_device_name.c
src/common_init.c
src/common_map.c
src/freebsd_pci.c
src/linux_devmem.c
src/linux_sysfs.c
src/pciaccess_private.h

index 48f6ed4..31d59eb 100644 (file)
@@ -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 =
index 12f88f5..66c2104 100644 (file)
@@ -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.
index 94048ea..1092faf 100644 (file)
@@ -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.
index a64577b..ac1c668 100644 (file)
@@ -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)
 {
index 0c7cf61..67ca9e3 100644 (file)
@@ -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;
index 8650efd..a68ea11 100644 (file)
@@ -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;
index 3671f28..84cdb84 100644 (file)
@@ -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;
index 9eb6062..c8a483e 100644 (file)
  * \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;