parent
dd6bd0f880
commit
2b21f41495
|
@ -17,7 +17,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#define FILE int
|
#define FILE void
|
||||||
|
|
||||||
#define EOF (-1)
|
#define EOF (-1)
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,8 @@
|
||||||
#include <base/log.h>
|
#include <base/log.h>
|
||||||
#include <base/sleep.h>
|
#include <base/sleep.h>
|
||||||
|
|
||||||
extern "C" void *abort(void)
|
extern "C" void abort(void)
|
||||||
{
|
{
|
||||||
Genode::warning("abort called");
|
Genode::warning("abort called");
|
||||||
Genode::sleep_forever();
|
Genode::sleep_forever();
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ static Allocator &alloc()
|
||||||
void mini_c_init(Allocator &alloc) { _alloc_ptr = &alloc; }
|
void mini_c_init(Allocator &alloc) { _alloc_ptr = &alloc; }
|
||||||
|
|
||||||
|
|
||||||
extern "C" void *malloc(unsigned size)
|
extern "C" void *malloc(size_t size)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We store the size of the allocation at the very
|
* We store the size of the allocation at the very
|
||||||
|
@ -50,7 +50,7 @@ extern "C" void *malloc(unsigned size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern "C" void *calloc(unsigned nmemb, unsigned size)
|
extern "C" void *calloc(size_t nmemb, size_t size)
|
||||||
{
|
{
|
||||||
void *addr = malloc(nmemb*size);
|
void *addr = malloc(nmemb*size);
|
||||||
memset(addr, 0, nmemb*size);
|
memset(addr, 0, nmemb*size);
|
||||||
|
|
Loading…
Reference in New Issue