Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-04-24 16:36:08 +0400
committerNick Clifton <nickc@redhat.com>2003-04-24 16:36:08 +0400
commit71853f09cc829a83391b4a1b1bb62944d41c99ba (patch)
tree923b9a0bdbf2d0a3b044f840b55e525276db8b13 /libgloss/libnosys
parent5d9a7c875abcd2b551804774e2331a16d47b4f54 (diff)
Add support for h8300hn and h8300sn
Diffstat (limited to 'libgloss/libnosys')
-rw-r--r--libgloss/libnosys/sbrk.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/libgloss/libnosys/sbrk.c b/libgloss/libnosys/sbrk.c
index 8091d7083..8c1c971aa 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;
}