Add WUPS_USE_WUT_SOCKETS hook

This commit is contained in:
Maschell 2021-04-17 13:40:42 +02:00
parent 4ea2588d14
commit 57bebfc265
4 changed files with 17 additions and 3 deletions

View File

@ -1,4 +1,4 @@
FROM wiiuenv/devkitppc:20210101
FROM wiiuenv/devkitppc:20210414
WORKDIR tmp_build
COPY . .

View File

@ -2,7 +2,7 @@ TOPDIR ?= $(CURDIR)
include $(TOPDIR)/share/wups_rules
export WUT_MAJOR := 0
export WUT_MINOR := 4
export WUT_MINOR := 5
export WUT_PATCH := 0
VERSION := $(WUT_MAJOR).$(WUT_MINOR).$(WUT_PATCH)

View File

@ -40,6 +40,8 @@ typedef enum wups_loader_hook_type_t {
WUPS_LOADER_HOOK_FINI_WUT_STDCPP,
WUPS_LOADER_HOOK_INIT_WUT_DEVOPTAB,
WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB,
WUPS_LOADER_HOOK_INIT_WUT_SOCKETS,
WUPS_LOADER_HOOK_FINI_WUT_SOCKETS,
WUPS_LOADER_HOOK_INIT_PLUGIN, /* Called when exiting the plugin loader */
WUPS_LOADER_HOOK_DEINIT_PLUGIN, /* Called when re-entering the plugin loader */
@ -157,6 +159,18 @@ typedef struct wups_loader_hook_t {
}\
WUPS_HOOK_EX(WUPS_LOADER_HOOK_FINI_WUT_STDCPP,on_fini_wut_stdcpp);
#define WUPS_USE_WUT_SOCKETS() \
__EXTERN_C_MACRO void __attribute__((weak)) __init_wut_socket(); \
void on_init_wut_sockets(){ \
if (&__init_wut_socket) __init_wut_socket(); \
} \
WUPS_HOOK_EX(WUPS_LOADER_HOOK_INIT_WUT_SOCKETS,on_init_wut_sockets); \
__EXTERN_C_MACRO void __attribute__((weak)) __fini_wut_socket(); \
void on_fini_wut_sockets(){ \
if (&__fini_wut_socket) __fini_wut_socket(); \
}\
WUPS_HOOK_EX(WUPS_LOADER_HOOK_FINI_WUT_SOCKETS,on_fini_wut_sockets);
#ifdef __cplusplus
}
#endif

View File

@ -33,7 +33,7 @@
extern "C" {
#endif
#define WUPS_PLUGIN_NAME(x) WUPS_META(name, x); WUPS_META(wups, "0.4"); WUPS_USE_WUT_MALLOC() WUPS_USE_WUT_NEWLIB() WUPS_USE_WUT_STDCPP() WUPS_META(buildtimestamp, __DATE__ " " __TIME__);
#define WUPS_PLUGIN_NAME(x) WUPS_META(name, x); WUPS_META(wups, "0.5"); WUPS_USE_WUT_MALLOC() WUPS_USE_WUT_SOCKETS() WUPS_USE_WUT_NEWLIB() WUPS_USE_WUT_STDCPP() WUPS_META(buildtimestamp, __DATE__ " " __TIME__);
#define WUPS_PLUGIN_AUTHOR(x) WUPS_META(author, x)
#define WUPS_PLUGIN_VERSION(x) WUPS_META(version, x)
#define WUPS_PLUGIN_LICENSE(x) WUPS_META(license, x)