Retro68/gcc/newlib/libc/machine/xstormy16/mallocr.c

34 lines
436 B
C
Raw Normal View History

2017-04-11 21:13:36 +00:00
#include <malloc.h>
#ifdef DEFINE_MALLOC
2018-12-28 15:30:48 +00:00
void *
2017-04-11 21:13:36 +00:00
_malloc_r (struct _reent *r, size_t sz)
{
return malloc (sz);
}
#endif
#ifdef DEFINE_CALLOC
2018-12-28 15:30:48 +00:00
void *
2017-04-11 21:13:36 +00:00
_calloc_r (struct _reent *r, size_t a, size_t b)
{
return calloc (a, b);
}
#endif
#ifdef DEFINE_FREE
void
2018-12-28 15:30:48 +00:00
_free_r (struct _reent *r, void *x)
2017-04-11 21:13:36 +00:00
{
free (x);
}
#endif
#ifdef DEFINE_REALLOC
2018-12-28 15:30:48 +00:00
void *
_realloc_r (struct _reent *r, void *x, size_t sz)
2017-04-11 21:13:36 +00:00
{
return realloc (x, sz);
}
#endif