1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/* connector for sbrk */ #include <reent.h> #include <unistd.h> extern void *_sbrk_r (struct _reent *, ptrdiff_t); extern void *_sbrk (ptrdiff_t); void * sbrk (incr) ptrdiff_t incr; { #ifdef REENTRANT_SYSCALLS_PROVIDED return _sbrk_r (_REENT, incr); #else return _sbrk (incr); #endif }