Add support for h8300hn and h8300sn
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user