mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:37:46 +00:00
Get rid of SERENITY macro since the compiler already defines __serenity__
This makes it a bit easier to use AK templates out-of-tree.
This commit is contained in:
parent
6aead8998a
commit
301a269ca0
27 changed files with 39 additions and 60 deletions
|
@ -1,34 +1,11 @@
|
|||
#include "kmalloc.h"
|
||||
|
||||
#ifndef SERENITY
|
||||
#ifndef __serenity__
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
void* kcalloc(size_t nmemb, size_t size)
|
||||
{
|
||||
return calloc(nmemb, size);
|
||||
}
|
||||
|
||||
void* kmalloc(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void kfree(void* ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void* krealloc(void* ptr, size_t size)
|
||||
{
|
||||
return realloc(ptr, size);
|
||||
}
|
||||
|
||||
void* kmalloc_eternal(size_t size)
|
||||
{
|
||||
return kmalloc(size);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue