Fix formatting

This commit is contained in:
Maschell 2024-12-14 11:13:18 +01:00
parent 92239fbe30
commit ac0ef5fcab
4 changed files with 15 additions and 9 deletions

View File

@ -46,8 +46,9 @@ extern "C" {
#define WUPS_SECTION(x) WUPS_EXTERN_C __attribute__((__section__(".wups." x), used))
#define WUPS_META(id, value) \
WUPS_SECTION("meta") const char wups_meta_##id[] = #id "=" value
#define WUPS_META(id, value) \
WUPS_SECTION("meta") \
const char wups_meta_##id[] = #id "=" value
#ifdef __cplusplus
}

View File

@ -148,7 +148,8 @@ typedef struct wups_loader_entry_t {
#define WUPS_MUST_REPLACE_FOR_PROCESS(x, lib, function_name, targetProcess) WUPS_MUST_REPLACE_EX(NULL, NULL, real_##x, lib, my_##x, function_name, targetProcess)
#define WUPS_MUST_REPLACE_EX(pAddress, vAddress, original_func, rpl_type, replace_func, replace_function_name, process) \
WUPS_SECTION("load") const wups_loader_entry_t wups_load_##replace_func = { \
WUPS_SECTION("load") \
const wups_loader_entry_t wups_load_##replace_func = { \
.type = WUPS_LOADER_ENTRY_FUNCTION_MANDATORY, \
._function = { \
.physical_address = (const void *) pAddress, \

View File

@ -22,9 +22,10 @@
extern "C" {
#endif
#define WUPS_HOOK_EX(type_def, original_func) \
WUPS_SECTION("hooks") const wups_loader_hook_t wups_hooks_##original_func = { \
.type = type_def, \
#define WUPS_HOOK_EX(type_def, original_func) \
WUPS_SECTION("hooks") \
const wups_loader_hook_t wups_hooks_##original_func = { \
.type = type_def, \
.target = (const void *) &(original_func)}
typedef enum wups_loader_hook_type_t {

View File

@ -50,11 +50,14 @@ extern "C" {
WUPS___FINI_WRAPPER(); \
WUPS_INIT_CONFIG_FUNCTIONS(); \
WUPS_META(buildtimestamp, __DATE__ " " __TIME__); \
WUPS_SECTION("meta") const char wups_meta_plugin_name[] = __plugin_name; \
WUPS_SECTION("meta") const char wups_meta_info_dump[] = "(plugin: " __plugin_name ";" \
WUPS_SECTION("meta") \
const char wups_meta_plugin_name[] = __plugin_name; \
WUPS_SECTION("meta") \
const char wups_meta_info_dump[] = "(plugin: " __plugin_name ";" \
"wups " WUPS_VERSION_STR ";" \
"buildtime: " __DATE__ " " __TIME__ ")"; \
WUPS_SECTION("meta") const char wups_meta_info_linking_order[] = "Loading \"" __plugin_name "\" failed.\n" \
WUPS_SECTION("meta") \
const char wups_meta_info_linking_order[] = "Loading \"" __plugin_name "\" failed.\n" \
"Function \"wut_get_thread_specific\" returned unexpected value.\n" \
"Please check linking order (expected \"-lwups -lwut\")";