newlib-cygwin/newlib/libc/syscalls/syssbrk.c

19 lines
308 B
C
Raw Normal View History

2000-02-18 03:39:52 +08:00
/* connector for sbrk */
#include <reent.h>
#include <unistd.h>
extern void *_sbrk_r (struct _reent *, ptrdiff_t);
extern void *_sbrk (ptrdiff_t);
2000-02-18 03:39:52 +08:00
void *
_DEFUN (sbrk, (incr),
ptrdiff_t incr)
2000-02-18 03:39:52 +08:00
{
#ifdef REENTRANT_SYSCALLS_PROVIDED
return _sbrk_r (_REENT, incr);
#else
return _sbrk (incr);
#endif
}