diff options
author | Nick Clifton <nickc@redhat.com> | 2003-04-24 12:36:08 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-04-24 12:36:08 +0000 |
commit | 71853f09cc829a83391b4a1b1bb62944d41c99ba (patch) | |
tree | 923b9a0bdbf2d0a3b044f840b55e525276db8b13 /libgloss/libnosys | |
parent | 5d9a7c875abcd2b551804774e2331a16d47b4f54 (diff) | |
download | newlib-71853f09cc829a83391b4a1b1bb62944d41c99ba.zip newlib-71853f09cc829a83391b4a1b1bb62944d41c99ba.tar.gz newlib-71853f09cc829a83391b4a1b1bb62944d41c99ba.tar.bz2 |
Add support for h8300hn and h8300sn
Diffstat (limited to 'libgloss/libnosys')
-rw-r--r-- | libgloss/libnosys/sbrk.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/libgloss/libnosys/sbrk.c b/libgloss/libnosys/sbrk.c index 8091d70..8c1c971 100644 --- a/libgloss/libnosys/sbrk.c +++ b/libgloss/libnosys/sbrk.c @@ -1,27 +1,18 @@ -/* - * Version of sbrk for no operating system. - */ +/* Version of sbrk for no operating system. */ -#include "config.h" -#include <_ansi.h> -#include <_syslist.h> -#include <sys/types.h> -#include <errno.h> -#undef errno -extern int errno; - -caddr_t -_DEFUN (_sbrk, (incr), - int incr) +void * +_sbrk (incr) + int incr; { - extern char end; /* set by linker */ - static char *heap_end; - char *prev_heap_end; + extern char end; /* Set by linker. */ + static char * heap_end; + char * prev_heap_end; + + if (heap_end == 0) + heap_end = & end; - if (heap_end == 0) { - heap_end = &end; - } prev_heap_end = heap_end; heap_end += incr; - return (caddr_t) prev_heap_end; + + return (void *) prev_heap_end; } |