fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git] / toolchain / gcc / libgloss / libnosys / sbrk.c
blob8c1c971aa5fb0877e459ea9fa87565a47dbaf598
1 /* Version of sbrk for no operating system. */
3 void *
4 _sbrk (incr)
5 int incr;
6 {
7 extern char end; /* Set by linker. */
8 static char * heap_end;
9 char * prev_heap_end;
11 if (heap_end == 0)
12 heap_end = & end;
14 prev_heap_end = heap_end;
15 heap_end += incr;
17 return (void *) prev_heap_end;