]> git.ipfire.org Git - thirdparty/pciutils.git/commit
Use the visibility attributes only when building a shared library.
authorMartin Mares <mj@ucw.cz>
Tue, 26 Aug 2008 13:17:17 +0000 (15:17 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 26 Aug 2008 13:17:17 +0000 (15:17 +0200)
commit59a0211a49bccb35875a8ec4f1b3ce06f006b7f1
tree179b13d4d435981400af4b46ff69a4e0a517b809
parent17b215b0406790e3af1ef990f29c131e7fc0b7e4
Use the visibility attributes only when building a shared library.

Omair Eshkenazi has reported that libpci fails to build with gcc 3.x.
We require gcc 4.x for building shared libraries, but it should not
be needed when SHARED=no.

This patch changes internal.h to define PCI_ABI as the visibility
attribute only if we build a shared library.

However, this means that we need to know the configuration settings
before we include pci.h, so I had to include config.h explicitly
from internal.h and create a new symbol PCI_CONFIG_H to check whether
config.h has been already included.
lib/configure
lib/internal.h
lib/pci.h