* SPDX-License-Identifier: GPL-2.0-or-later
*/
+#ifndef _INTERNAL_H
+#define _INTERNAL_H
+
#include "config.h"
#ifdef PCI_SHARED_LIB
#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))) VERSIONED_ABI
#ifdef _WIN32
+#define STATIC_ALIAS(_decl, _for) VERSIONED_ABI _decl { return _for; }
/* 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" \
".def\t" PCI_STRINGIFY(__MINGW_USYMBOL(_ext)) ";\t.scl\t2;\t.type\t32;\t.endef\n\t" \
".set\t" PCI_STRINGIFY(__MINGW_USYMBOL(_ext)) "," PCI_STRINGIFY(__MINGW_USYMBOL(_int)))
#else
+#define STATIC_ALIAS(_decl, _for)
#define SYMBOL_VERSION(_int, _ext) asm(".symver " #_int "," #_ext)
#endif
#endif
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_ecam,
- pm_win32_cfgmgr32, pm_win32_kldbg, pm_win32_sysdbg;
+ pm_win32_cfgmgr32, pm_win32_kldbg, pm_win32_sysdbg, pm_aos_expansion;
+
+#endif