summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-01 16:49:19 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-01 16:49:19 +0000
commita64f4d5b57c05822aa8c9267f7e25cf42d1856d4 (patch)
treed0ecd65c8a058daaaf696332bcd062c9ddc62d06 /libc/sysdeps/linux/sh
parentb58a631942341b6ccb62ab400e862f404e22dbbf (diff)
Patch from Stefan Allius <allius@atecom.com>:
----------------------------------- In extra/Configs/Config.sh I added the INCLUDE_PTHREADS statement and change the default values for BUILD_UCLIBC_LDSO and HAVE_SHARED. ----------------------------------- In extra/scripts/initfini.pl My last patch removes two labels, which migth be used by the .size statements. (Sorry, but I'm a perl beginner) I fixed it. ----------------------------------- In libc/sysdeps/linux/common/initfini.c I fixed two warnings "nested extern declaration of `i_am_not_a_leaf.. ----------------------------------- In libc/sysdeps/linux/sh/__init_brl.c brk.c sbrk.c I fixed some compiler warnings which comes from a wrong inclusion order. -----------------------------------
Diffstat (limited to 'libc/sysdeps/linux/sh')
-rw-r--r--libc/sysdeps/linux/sh/__init_brk.c4
-rw-r--r--libc/sysdeps/linux/sh/brk.c4
-rw-r--r--libc/sysdeps/linux/sh/sbrk.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/sh/__init_brk.c b/libc/sysdeps/linux/sh/__init_brk.c
index 93aa37d8e..7f9cd3c31 100644
--- a/libc/sysdeps/linux/sh/__init_brk.c
+++ b/libc/sysdeps/linux/sh/__init_brk.c
@@ -1,8 +1,8 @@
/* From libc-5.3.12 */
+#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
-#include <errno.h>
void * ___brk_addr = 0;
@@ -10,7 +10,7 @@ void * ___brk_addr = 0;
_syscall1(void *, _brk, void *, ptr);
int
-__init_brk ()
+__init_brk (void)
{
if (___brk_addr == 0)
{
diff --git a/libc/sysdeps/linux/sh/brk.c b/libc/sysdeps/linux/sh/brk.c
index c7943c1fd..4f97fb084 100644
--- a/libc/sysdeps/linux/sh/brk.c
+++ b/libc/sysdeps/linux/sh/brk.c
@@ -1,12 +1,12 @@
/* From libc-5.3.12 */
+#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
-#include <errno.h>
extern void * ___brk_addr;
-extern int __init_brk ();
+extern int __init_brk (void);
extern void *_brk(void *ptr);
int brk(void * end_data_seg)
diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c
index 3dd5a46f0..c39d60063 100644
--- a/libc/sysdeps/linux/sh/sbrk.c
+++ b/libc/sysdeps/linux/sh/sbrk.c
@@ -1,8 +1,8 @@
/* From libc-5.3.12 */
+#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
-#include <errno.h>
extern void * ___brk_addr;
@@ -14,7 +14,7 @@ sbrk(intptr_t increment)
{
if (__init_brk () == 0)
{
- void * tmp = ___brk_addr+increment;
+ char * tmp = (char*)___brk_addr+increment;
___brk_addr = _brk(tmp);
if (___brk_addr == tmp)
return tmp-increment;