LibC: Add stubs for some functions in {dlfcn,ftw,utime,wchar}.h

This commit is contained in:
Bananymous 2024-08-09 17:01:41 +03:00
parent e768cd53fb
commit 2797fe116f
5 changed files with 56 additions and 0 deletions

View File

@ -3,7 +3,9 @@ set(LIBC_SOURCES
assert.cpp
ctype.cpp
dirent.cpp
dlfcn.cpp
fcntl.cpp
ftw.cpp
grp.cpp
inttypes.cpp
locale.cpp
@ -31,6 +33,8 @@ set(LIBC_SOURCES
termios.cpp
time.cpp
unistd.cpp
utime.cpp
wchar.cpp
icxxabi.cpp
arch/${BANAN_ARCH}/setjmp.S

View File

@ -0,0 +1,23 @@
#include <BAN/Assert.h>
#include <dlfcn.h>
int dlclose(void*)
{
ASSERT_NOT_REACHED();
}
char* dlerror(void)
{
ASSERT_NOT_REACHED();
}
void* dlopen(const char*, int)
{
ASSERT_NOT_REACHED();
}
void* dlsym(void* __restrict, const char* __restrict)
{
ASSERT_NOT_REACHED();
}

View File

@ -0,0 +1,13 @@
#include <BAN/Assert.h>
#include <ftw.h>
int ftw(const char*, int (*)(const char*, const struct stat*, int), int)
{
ASSERT_NOT_REACHED();
}
int nftw(const char*, int (*)(const char*, const struct stat*, int, struct FTW*), int, int)
{
ASSERT_NOT_REACHED();
}

View File

@ -0,0 +1,8 @@
#include <BAN/Assert.h>
#include <utime.h>
int utime(const char*, const struct utimbuf*)
{
ASSERT_NOT_REACHED();
}

View File

@ -0,0 +1,8 @@
#include <BAN/Assert.h>
#include <wchar.h>
size_t mbrtowc(wchar_t* __restrict, const char* __restrict, size_t, mbstate_t* __restrict)
{
ASSERT_NOT_REACHED();
}