mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
LibC: Change a couple of ASSERT_NOT_REACHED() to TODO()
Just for semantic correctness and better visibility of those unimplemented stub functions.
This commit is contained in:
parent
d64d2ff07b
commit
b42f0b9650
Notes:
sideshowbarker
2024-07-18 23:08:54 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/b42f0b9650f Pull-request: https://github.com/SerenityOS/serenity/pull/4987
@ -67,7 +67,7 @@ void* dlopen(const char* filename, int flags)
|
||||
// FIXME: Return the handle for "the main executable"
|
||||
// The Serenity Kernel will keep a mapping of the main elf binary resident in memory,
|
||||
// But a future dynamic loader might have a different idea/way of letting us access this information
|
||||
ASSERT_NOT_REACHED();
|
||||
TODO();
|
||||
}
|
||||
|
||||
auto basename = LexicalPath(filename).basename();
|
||||
|
@ -24,6 +24,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Format.h>
|
||||
#include <assert.h>
|
||||
#include <mntent.h>
|
||||
|
||||
@ -31,7 +32,8 @@ extern "C" {
|
||||
|
||||
struct mntent* getmntent(FILE*)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
dbgln("FIXME: Implement getmntent()");
|
||||
TODO();
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -24,12 +24,12 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Format.h>
|
||||
#include <Kernel/API/Syscall.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -184,8 +184,8 @@ void siglongjmp(jmp_buf env, int val)
|
||||
|
||||
int sigsuspend(const sigset_t*)
|
||||
{
|
||||
dbgprintf("FIXME: Implement sigsuspend()\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
dbgln("FIXME: Implement sigsuspend()");
|
||||
TODO();
|
||||
}
|
||||
|
||||
static const char* signal_names[] = {
|
||||
|
@ -25,7 +25,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/LogStream.h>
|
||||
#include <AK/Format.h>
|
||||
#include <AK/PrintfImplementation.h>
|
||||
#include <AK/ScopedValueRollback.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
@ -1071,7 +1071,8 @@ int dbgputstr(const char* characters, ssize_t length)
|
||||
|
||||
char* tmpnam(char*)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
dbgln("FIXME: Implement tmpnam()");
|
||||
TODO();
|
||||
}
|
||||
|
||||
FILE* popen(const char* command, const char* type)
|
||||
|
@ -801,7 +801,8 @@ ldiv_t ldiv(long numerator, long denominator)
|
||||
|
||||
size_t mbstowcs(wchar_t*, const char*, size_t)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
dbgln("FIXME: Implement mbstowcs()");
|
||||
TODO();
|
||||
}
|
||||
|
||||
int mbtowc(wchar_t* wch, const char* data, [[maybe_unused]] size_t data_size)
|
||||
@ -821,7 +822,8 @@ int mbtowc(wchar_t* wch, const char* data, [[maybe_unused]] size_t data_size)
|
||||
|
||||
int wctomb(char*, wchar_t)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
dbgln("FIXME: Implement wctomb()");
|
||||
TODO();
|
||||
}
|
||||
|
||||
size_t wcstombs(char* dest, const wchar_t* src, size_t max)
|
||||
|
@ -366,7 +366,8 @@ int nanosleep(const struct timespec* requested_sleep, struct timespec* remaining
|
||||
|
||||
int clock_getres(clockid_t, struct timespec*)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
dbgln("FIXME: Implement clock_getres()");
|
||||
TODO();
|
||||
}
|
||||
|
||||
double difftime(time_t t1, time_t t0)
|
||||
|
@ -24,7 +24,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/LogStream.h>
|
||||
#include <AK/Format.h>
|
||||
#include <assert.h>
|
||||
#include <sys/resource.h>
|
||||
#include <ulimit.h>
|
||||
@ -33,13 +33,14 @@ extern "C" {
|
||||
|
||||
long ulimit([[maybe_unused]] int cmd, [[maybe_unused]] long newlimit)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
dbgln("FIXME: Implement getrusage()");
|
||||
TODO();
|
||||
return -1;
|
||||
}
|
||||
|
||||
int getrusage([[maybe_unused]] int who, [[maybe_unused]] struct rusage* usage)
|
||||
{
|
||||
dbgln("LibC: getrusage is not implemented");
|
||||
dbgln("FIXME: Implement getrusage()");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -771,7 +771,7 @@ ssize_t pread(int fd, void* buf, size_t count, off_t offset)
|
||||
char* getpass(const char* prompt)
|
||||
{
|
||||
dbgln("FIXME: getpass('{}')", prompt);
|
||||
ASSERT_NOT_REACHED();
|
||||
TODO();
|
||||
}
|
||||
|
||||
long sysconf(int name)
|
||||
|
Loading…
Reference in New Issue
Block a user