mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +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:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user