X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Finternal.h;h=00ac401ec5a3e07d3165b391d59b7ec9d01dd0c1;hb=327b6e8a1660e1c937b7987fa31f972af393521b;hp=ed0e94f4b7efcc4c730f98fc6f0e90e55a7e9abe;hpb=e2d9340ba416ef0856fb8198e16ffd255225952c;p=pciutils.git diff --git a/lib/internal.h b/lib/internal.h index ed0e94f..00ac401 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -3,7 +3,9 @@ * * Copyright (c) 1997--2022 Martin Mares * - * Can be freely distributed and used under the terms of the GNU GPL. + * Can be freely distributed and used under the terms of the GNU GPL v2+ + * + * SPDX-License-Identifier: GPL-2.0-or-later */ #include "config.h" @@ -15,12 +17,12 @@ // optimizations is happy to optimize them away, leading to linker failures. #define VERSIONED_ABI __attribute__((used)) PCI_ABI #ifdef __APPLE__ -#define STATIC_ALIAS(_decl, _for) _decl PCI_ABI { return _for; } +#define STATIC_ALIAS(_decl, _for) _decl VERSIONED_ABI { return _for; } #define DEFINE_ALIAS(_decl, _for) #define SYMBOL_VERSION(_int, _ext) #else #define STATIC_ALIAS(_decl, _for) -#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for))) +#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for))) VERSIONED_ABI #ifdef _WIN32 /* GCC does not support asm .symver directive for Windows targets, so define new external global function symbol as alias to internal symbol */ #define SYMBOL_VERSION(_int, _ext) asm(".globl\t" PCI_STRINGIFY(__MINGW_USYMBOL(_ext)) "\n\t" \ @@ -81,6 +83,8 @@ int pci_emulated_read(struct pci_dev *d, int pos, byte *buf, int len); void *pci_malloc(struct pci_access *, int); void pci_mfree(void *); char *pci_strdup(struct pci_access *a, const char *s); +struct pci_access *pci_clone_access(struct pci_access *a); +int pci_init_internal(struct pci_access *a, int skip_method); void pci_init_v30(struct pci_access *a) VERSIONED_ABI; void pci_init_v35(struct pci_access *a) VERSIONED_ABI; @@ -134,5 +138,5 @@ void pci_free_caps(struct pci_dev *); extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc, pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device, pm_dump, pm_linux_sysfs, pm_darwin, pm_sylixos_device, pm_hurd, - pm_mmio_conf1, pm_mmio_conf1_ext, + pm_mmio_conf1, pm_mmio_conf1_ext, pm_ecam, pm_win32_cfgmgr32, pm_win32_kldbg, pm_win32_sysdbg;