Use wut 1.1.1

This commit is contained in:
Maschell 2022-07-24 18:58:11 +02:00
parent 90d4ccfe2a
commit 47fc482931
6 changed files with 45 additions and 7 deletions

View File

@ -1,5 +1,5 @@
FROM wiiuenv/devkitppc:20220507
FROM wiiuenv/devkitppc:20220806
COPY --from=wiiuenv/wiiumodulesystem:20220507 /artifacts $DEVKITPRO
COPY --from=wiiuenv/wiiumodulesystem:20220724 /artifacts $DEVKITPRO
WORKDIR project

36
wumsloader/src/crt.c Normal file
View File

@ -0,0 +1,36 @@
void __init_wut_malloc();
void __init_wut_newlib();
void __init_wut_stdcpp();
void __init_wut_devoptab();
void __attribute__((weak)) __init_wut_socket();
void __fini_wut_malloc();
void __fini_wut_newlib();
void __fini_wut_stdcpp();
void __fini_wut_devoptab();
void __attribute__((weak)) __fini_wut_socket();
void __attribute__((weak))
init_wut() {
__init_wut_malloc();
__init_wut_newlib();
__init_wut_stdcpp();
__init_wut_devoptab();
if (&__init_wut_socket) __init_wut_socket();
}
void __attribute__((weak))
fini_wut() {
__fini_wut_devoptab();
__fini_wut_stdcpp();
__fini_wut_newlib();
__fini_wut_malloc();
}

View File

@ -41,7 +41,7 @@ extern "C" int _start(int argc, char **argv) {
}
void doStart(int argc, char **argv) {
__init_wut();
init_wut();
initLogging();
if (!gInitCalled) {
@ -130,7 +130,7 @@ void doStart(int argc, char **argv) {
CallHook(gLoadedModules, WUMS_HOOK_APPLICATION_STARTS);
deinitLogging();
__fini_wut();
fini_wut();
}
void CallInitHooksForModule(const std::shared_ptr<ModuleData> &curModule) {

View File

@ -1,7 +1,7 @@
#pragma once
extern "C" void __init();
extern "C" void __init_wut();
extern "C" void __fini_wut();
extern "C" void init_wut();
extern "C" void fini_wut();
void doStart(int argc, char **argv);

View File

@ -33,6 +33,7 @@ IMPORT(OSWaitCond);
IMPORT(OSSignalCond);
IMPORT(MEMAllocFromDefaultHeapEx);
IMPORT(MEMFreeToDefaultHeap);
IMPORT(OSSwapAtomic);
IMPORT(FSTimeToCalendarTime);
IMPORT(FSInit);
@ -46,6 +47,7 @@ IMPORT(FSGetFreeSpaceSize);
IMPORT(FSGetStat);
IMPORT(FSRemove);
IMPORT(FSOpenFile);
IMPORT(FSOpenFileEx);
IMPORT(FSCloseFile);
IMPORT(FSOpenDir);
IMPORT(FSMakeDir);

View File

@ -7,7 +7,7 @@ std::unique_ptr<T> make_unique_nothrow(Args &&...args) noexcept(noexcept(T(std::
}
template<typename T>
inline typename std::_MakeUniq<T>::__array make_unique_nothrow(size_t num) noexcept {
inline typename std::unique_ptr<T> make_unique_nothrow(size_t num) noexcept {
return std::unique_ptr<T>(new (std::nothrow) std::remove_extent_t<T>[num]());
}