1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

Canonicalize the path used by sh.

With a bunch of LibC work to support the feature. LibC now initializes
AK::StringImpl by default. It's now fine to use AK in LibC/Userland! :^)
This commit is contained in:
Andreas Kling 2018-10-28 09:36:21 +01:00
parent 88ad59bfb1
commit e904f193c1
15 changed files with 170 additions and 24 deletions

View file

@ -1,5 +1,7 @@
#include "stdlib.h"
#include "mman.h"
#include <Kernel/Syscall.h>
#include <AK/Assertions.h>
extern "C" {
@ -20,5 +22,28 @@ void free(void* ptr)
munmap(ptr, 4096);
}
void* calloc(size_t nmemb, size_t)
{
ASSERT_NOT_REACHED();
return nullptr;
}
void* realloc(void *ptr, size_t)
{
ASSERT_NOT_REACHED();
return nullptr;
}
void exit(int status)
{
Syscall::invoke(Syscall::PosixExit, (dword)status);
}
void abort()
{
// FIXME: Implement proper abort().
exit(253);
}
}