From 411a4d00a58c4ebdd287a5095bacdda5e0460bfe Mon Sep 17 00:00:00 2001 From: boykopovar Date: Thu, 10 Sep 2026 08:22:39 +0300 Subject: [PATCH] feat(libs): add change export name macros --- core/libs/prx/libc/include/General.hpp | 1 + .../libs/prx/libc/include/general/ExportMacros.hpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 core/libs/prx/libc/include/general/ExportMacros.hpp diff --git a/core/libs/prx/libc/include/General.hpp b/core/libs/prx/libc/include/General.hpp index 728901a9e..8e85d76d7 100644 --- a/core/libs/prx/libc/include/General.hpp +++ b/core/libs/prx/libc/include/General.hpp @@ -3,6 +3,7 @@ #include "general/LogMacros.hpp" #include "general/VabiMacros.hpp" +#include "general/ExportMacros.hpp" extern "C" void NotImplemented_nid_no_patch(const char* funcName); diff --git a/core/libs/prx/libc/include/general/ExportMacros.hpp b/core/libs/prx/libc/include/general/ExportMacros.hpp new file mode 100644 index 000000000..911255953 --- /dev/null +++ b/core/libs/prx/libc/include/general/ExportMacros.hpp @@ -0,0 +1,14 @@ +#ifndef CORE_LIBS_PRX_LIBC_INCLUDE_GENERAL_EXPORTMACROS_HPP +#define CORE_LIBS_PRX_LIBC_INCLUDE_GENERAL_EXPORTMACROS_HPP + +#if defined(__GNUC__) || defined(__clang__) + #define APS_EXPORT(exportName, funcName) \ + __asm__(".globl " exportName "\n" exportName " = " #funcName "_nid_no_patch_cut") +#elif defined(_MSC_VER) + #define APS_EXPORT(exportName, funcName) \ + __pragma(comment(linker, "/export:" exportName "=" #funcName "_nid_no_patch_cut")) +#else + #define APS_EXPORT(exportName, funcName) +#endif + +#endif