Add support for h8300hn and h8300sn

This commit is contained in:
Nick Clifton
2003-04-24 12:36:08 +00:00
parent 5d9a7c875a
commit 71853f09cc
10 changed files with 38 additions and 888 deletions

View File

@ -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;
}