[uClibc-cvs] CVS update of uClibc (ldso/ldso/ldso.c libc/sysdeps/linux/alpha/brk.S libc/sysdeps/linux/arm/brk.c libc/sysdeps/linux/common/sbrk.c libc/sysdeps/linux/cris/__init_brk.c libc/sysdeps/linux/cris/brk.c libc/sysdeps/linux/cris/sbrk.c libc/sysdeps/linux/frv/__init_brk.c libc/sysdeps/linux/frv/brk.c libc/sysdeps/linux/frv/sbrk.c libc/sysdeps/linux/h8300/brk.c libc/sysdeps/linux/i386/brk.c libc/sysdeps/linux/m68k/brk.c libc/sysdeps/linux/mips/brk.c libc/sysdeps/linux/nios/brk.c libc/sysdeps/linux/nios2/brk.c libc/sysdeps/linux/powerpc/brk.S libc/sysdeps/linux/sh/__init_brk.c libc/sysdeps/linux/sh/brk.c libc/sysdeps/linux/sh/sbrk.c libc/sysdeps/linux/sh64/__init_brk.c libc/sysdeps/linux/sh64/brk.c libc/sysdeps/linux/sh64/sbrk.c libc/sysdeps/linux/sparc/brk.c)

Erik Andersen andersen at codepoet.org
Fri Jul 30 20:06:02 UTC 2004


    Date: Friday, July 30, 2004 @ 14:06:02
  Author: andersen
    Path: /var/cvs/uClibc

Modified: ldso/ldso/ldso.c (1.101 -> 1.102) libc/sysdeps/linux/alpha/brk.S
          (1.3 -> 1.4) libc/sysdeps/linux/arm/brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/common/sbrk.c (1.2 -> 1.3)
          libc/sysdeps/linux/cris/__init_brk.c (1.2 -> 1.3)
          libc/sysdeps/linux/cris/brk.c (1.2 -> 1.3)
          libc/sysdeps/linux/cris/sbrk.c (1.2 -> 1.3)
          libc/sysdeps/linux/frv/__init_brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/frv/brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/frv/sbrk.c (1.1 -> 1.2)
          libc/sysdeps/linux/h8300/brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/i386/brk.c (1.5 -> 1.6)
          libc/sysdeps/linux/m68k/brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/mips/brk.c (1.2 -> 1.3)
          libc/sysdeps/linux/nios/brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/nios2/brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/powerpc/brk.S (1.3 -> 1.4)
          libc/sysdeps/linux/sh/__init_brk.c (1.2 -> 1.3)
          libc/sysdeps/linux/sh/brk.c (1.2 -> 1.3)
          libc/sysdeps/linux/sh/sbrk.c (1.2 -> 1.3)
          libc/sysdeps/linux/sh64/__init_brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/sh64/brk.c (1.1 -> 1.2)
          libc/sysdeps/linux/sh64/sbrk.c (1.1 -> 1.2)
          libc/sysdeps/linux/sparc/brk.c (1.1 -> 1.2)

s/___brk_addr/__curbrk/g
Some utilities, such as valgrind, have a legitimate reason to know the address
of the current brk.  Since we know such utils will peek under our skirt, we
might as well give them what they expect and not use a gratuitously different
symbol name.
 -Erik


Index: uClibc/ldso/ldso/ldso.c
diff -u uClibc/ldso/ldso/ldso.c:1.101 uClibc/ldso/ldso/ldso.c:1.102
--- uClibc/ldso/ldso/ldso.c:1.101	Thu Jul 29 21:32:40 2004
+++ uClibc/ldso/ldso/ldso.c	Fri Jul 30 14:05:55 2004
@@ -612,7 +612,7 @@
 	   up each symbol individually. */
 
 
-	_dl_brkp = (unsigned long *) (intptr_t) _dl_find_hash("___brk_addr", NULL, 0);
+	_dl_brkp = (unsigned long *) (intptr_t) _dl_find_hash("__curbrk", NULL, 0);
 
 	if (_dl_brkp) {
 		*_dl_brkp = brk_addr;
Index: uClibc/libc/sysdeps/linux/alpha/brk.S
diff -u uClibc/libc/sysdeps/linux/alpha/brk.S:1.3 uClibc/libc/sysdeps/linux/alpha/brk.S:1.4
--- uClibc/libc/sysdeps/linux/alpha/brk.S:1.3	Thu Feb  5 07:53:22 2004
+++ uClibc/libc/sysdeps/linux/alpha/brk.S	Fri Jul 30 14:05:55 2004
@@ -29,12 +29,12 @@
 #ifdef __PIC__
 .section .bss
 	.align 3
-	.globl ___brk_addr
-___brk_addr: .skip 8
-	.type ___brk_addr, at object
-	.size ___brk_addr,8
+	.globl __curbrk
+__curbrk: .skip 8
+	.type __curbrk, at object
+	.size __curbrk,8
 #else
-.comm ___brk_addr, 8
+.comm __curbrk, 8
 #endif
 
 	.text
@@ -71,9 +71,9 @@
 	xor	$16, $0, $1
 	bne	$1, $err0
 
-	/* Update ___brk_addr and return cleanly.  */
+	/* Update __curbrk and return cleanly.  */
 	mov	$31, $0
-$ok:	stq	$16, ___brk_addr
+$ok:	stq	$16, __curbrk
 	addq	$30, 8, $30
 	ret
 
Index: uClibc/libc/sysdeps/linux/arm/brk.c
diff -u uClibc/libc/sysdeps/linux/arm/brk.c:1.1 uClibc/libc/sysdeps/linux/arm/brk.c:1.2
--- uClibc/libc/sysdeps/linux/arm/brk.c:1.1	Sun Jan 20 19:39:27 2002
+++ uClibc/libc/sysdeps/linux/arm/brk.c	Fri Jul 30 14:05:56 2004
@@ -22,7 +22,7 @@
 #include <sys/syscall.h>
 
 /* This must be initialized data because commons can't have aliases.  */
-void *___brk_addr = 0;
+void *__curbrk = 0;
 
 int brk (void *addr)
 {
@@ -31,11 +31,11 @@
     asm ("mov a1, %1\n"	/* save the argment in r0 */
 	    "swi %2\n"	/* do the system call */
 	    "mov %0, a1;"	/* keep the return value */
-	    : "=r"(newbrk) 
+	    : "=r"(newbrk)
 	    : "r"(addr), "i" (__NR_brk)
 	    : "a1");
 
-    ___brk_addr = newbrk;
+    __curbrk = newbrk;
 
     if (newbrk < addr)
     {
Index: uClibc/libc/sysdeps/linux/common/sbrk.c
diff -u uClibc/libc/sysdeps/linux/common/sbrk.c:1.2 uClibc/libc/sysdeps/linux/common/sbrk.c:1.3
--- uClibc/libc/sysdeps/linux/common/sbrk.c:1.2	Sun Jan 20 19:42:30 2002
+++ uClibc/libc/sysdeps/linux/common/sbrk.c	Fri Jul 30 14:05:56 2004
@@ -20,7 +20,7 @@
 #include <errno.h>
 
 /* Defined in brk.c.  */
-extern void *___brk_addr;
+extern void *__curbrk;
 extern int brk (void *addr);
 
 
@@ -31,14 +31,14 @@
 {
     void *oldbrk;
 
-    if (___brk_addr == NULL)
+    if (__curbrk == NULL)
 	if (brk (0) < 0)		/* Initialize the break.  */
 	    return (void *) -1;
 
     if (increment == 0)
-	return ___brk_addr;
+	return __curbrk;
 
-    oldbrk = ___brk_addr;
+    oldbrk = __curbrk;
     if (brk (oldbrk + increment) < 0)
 	return (void *) -1;
 
Index: uClibc/libc/sysdeps/linux/cris/__init_brk.c
diff -u uClibc/libc/sysdeps/linux/cris/__init_brk.c:1.2 uClibc/libc/sysdeps/linux/cris/__init_brk.c:1.3
--- uClibc/libc/sysdeps/linux/cris/__init_brk.c:1.2	Mon Sep 23 06:21:14 2002
+++ uClibc/libc/sysdeps/linux/cris/__init_brk.c	Fri Jul 30 14:05:56 2004
@@ -5,25 +5,24 @@
 #include <errno.h>
 #include "sysdep.h"
 
-void * ___brk_addr = 0;
+void * __curbrk = 0;
 
 int
 __init_brk (void)
 {
-    if (___brk_addr == 0) {
-	    /* 
-		 * Notice that we don't need to save/restore the GOT
+    if (__curbrk == 0) {
+	    /* Notice that we don't need to save/restore the GOT
 	     * register since that is not call clobbered by the syscall.
 	     */
 	    asm ("clear.d $r10\n\t"
 		 "movu.w " STR(__NR_brk) ",$r9\n\t"
 		 "break 13\n\t"
 		 "move.d $r10, %0"
-		 : "=r" (___brk_addr)
+		 : "=r" (__curbrk)
 		 :
 		 : "r9", "r10");
-	    
-	    if (___brk_addr == 0) {
+
+	    if (__curbrk == 0) {
 		    __set_errno(ENOMEM);
 		    return -1;
 	    }
Index: uClibc/libc/sysdeps/linux/cris/brk.c
diff -u uClibc/libc/sysdeps/linux/cris/brk.c:1.2 uClibc/libc/sysdeps/linux/cris/brk.c:1.3
--- uClibc/libc/sysdeps/linux/cris/brk.c:1.2	Mon Sep 23 06:21:14 2002
+++ uClibc/libc/sysdeps/linux/cris/brk.c	Fri Jul 30 14:05:56 2004
@@ -3,14 +3,14 @@
 #include <errno.h>
 #include "sysdep.h"
 
-extern void * ___brk_addr;
+extern void * __curbrk;
 
 extern int __init_brk (void);
 
 int brk(void * end_data_seg)
 {
 	if (__init_brk () == 0) {
-		/* 
+		/*
 		 * Notice that we don't need to save/restore the GOT
 		 * register since that is not call clobbered by the syscall.
 		 */
@@ -18,14 +18,14 @@
 		     "movu.w " STR(__NR_brk) ",$r9\n\t"
 		     "break 13\n\t"
 		     "move.d $r10, %0"
-		     : "=r" (___brk_addr)
+		     : "=r" (__curbrk)
 		     : "g" (end_data_seg)
 		     : "r9", "r10");
-		
-		if (___brk_addr == end_data_seg)
+
+		if (__curbrk == end_data_seg)
 			return 0;
 		__set_errno(ENOMEM);
 	}
 	return -1;
-	
+
 }
Index: uClibc/libc/sysdeps/linux/cris/sbrk.c
diff -u uClibc/libc/sysdeps/linux/cris/sbrk.c:1.2 uClibc/libc/sysdeps/linux/cris/sbrk.c:1.3
--- uClibc/libc/sysdeps/linux/cris/sbrk.c:1.2	Mon Sep 23 06:21:14 2002
+++ uClibc/libc/sysdeps/linux/cris/sbrk.c	Fri Jul 30 14:05:56 2004
@@ -5,7 +5,7 @@
 #include <errno.h>
 #include "sysdep.h"
 
-extern void * ___brk_addr;
+extern void * __curbrk;
 
 extern int __init_brk (void);
 
@@ -13,9 +13,9 @@
 sbrk(intptr_t increment)
 {
 	if (__init_brk () == 0) {
-		void * tmp = ___brk_addr + increment;
+		void * tmp = __curbrk + increment;
 
-		/* 
+		/*
 		 * Notice that we don't need to save/restore the GOT
 		 * register since that is not call clobbered by the syscall.
 		 */
@@ -23,11 +23,11 @@
 		     "movu.w " STR(__NR_brk) ",$r9\n\t"
 		     "break 13\n\t"
 		     "move.d $r10, %0"
-		     : "=r" (___brk_addr)
+		     : "=r" (__curbrk)
 		     : "g" (tmp)
 		     : "r9", "r10");
 
-		if (___brk_addr == tmp)
+		if (__curbrk == tmp)
 			return tmp - increment;
 		__set_errno(ENOMEM);
 		return ((void *) -1);
Index: uClibc/libc/sysdeps/linux/frv/__init_brk.c
diff -u uClibc/libc/sysdeps/linux/frv/__init_brk.c:1.1 uClibc/libc/sysdeps/linux/frv/__init_brk.c:1.2
--- uClibc/libc/sysdeps/linux/frv/__init_brk.c:1.1	Wed Feb 18 01:04:49 2004
+++ uClibc/libc/sysdeps/linux/frv/__init_brk.c	Fri Jul 30 14:05:57 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-void * ___brk_addr = 0;
+void * __curbrk = 0;
 
 #define __NR__brk __NR_brk
 _syscall1(void *, _brk, void *, ptr);
@@ -12,10 +12,10 @@
 int
 __init_brk (void)
 {
-    if (___brk_addr == 0)
+    if (__curbrk == 0)
     {
-		___brk_addr = _brk(0);
-		if (___brk_addr == 0)
+		__curbrk = _brk(0);
+		if (__curbrk == 0)
 		{
 		  __set_errno(ENOMEM);
 		  return -1;
Index: uClibc/libc/sysdeps/linux/frv/brk.c
diff -u uClibc/libc/sysdeps/linux/frv/brk.c:1.1 uClibc/libc/sysdeps/linux/frv/brk.c:1.2
--- uClibc/libc/sysdeps/linux/frv/brk.c:1.1	Wed Feb 18 01:04:49 2004
+++ uClibc/libc/sysdeps/linux/frv/brk.c	Fri Jul 30 14:05:57 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-extern void * ___brk_addr;
+extern void * __curbrk;
 
 extern int __init_brk (void);
 extern void *_brk(void *ptr);
@@ -13,8 +13,8 @@
 {
     if (__init_brk () == 0)
     {
-		___brk_addr = _brk(end_data_seg);
-		if (___brk_addr == end_data_seg)
+		__curbrk = _brk(end_data_seg);
+		if (__curbrk == end_data_seg)
 			return 0;
 		__set_errno(ENOMEM);
     }
Index: uClibc/libc/sysdeps/linux/frv/sbrk.c
diff -u uClibc/libc/sysdeps/linux/frv/sbrk.c:1.1 uClibc/libc/sysdeps/linux/frv/sbrk.c:1.2
--- uClibc/libc/sysdeps/linux/frv/sbrk.c:1.1	Wed Feb 18 01:04:49 2004
+++ uClibc/libc/sysdeps/linux/frv/sbrk.c	Fri Jul 30 14:05:57 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-extern void * ___brk_addr;
+extern void * __curbrk;
 
 extern int __init_brk (void);
 extern void *_brk(void *ptr);
@@ -14,9 +14,9 @@
 {
     if (__init_brk () == 0)
     {
-		char * tmp = (char*)___brk_addr+increment;
-		___brk_addr = _brk(tmp);
-		if (___brk_addr == tmp)
+		char * tmp = (char*)__curbrk+increment;
+		__curbrk = _brk(tmp);
+		if (__curbrk == tmp)
 			return tmp-increment;
 		__set_errno(ENOMEM);
 		return ((void *) -1);
Index: uClibc/libc/sysdeps/linux/h8300/brk.c
diff -u uClibc/libc/sysdeps/linux/h8300/brk.c:1.1 uClibc/libc/sysdeps/linux/h8300/brk.c:1.2
--- uClibc/libc/sysdeps/linux/h8300/brk.c:1.1	Thu Jul 15 01:33:59 2004
+++ uClibc/libc/sysdeps/linux/h8300/brk.c	Fri Jul 30 14:05:57 2004
@@ -6,7 +6,7 @@
 
 
 /* This must be initialized data because commons can't have aliases.  */
-void *___brk_addr = 0;
+void *__curbrk = 0;
 
 
 int brk (void *addr)
@@ -21,7 +21,7 @@
 	 : "0" (__NR_brk), "g" (addr)
 	 : "er0","er1");
 
-    ___brk_addr = newbrk;
+    __curbrk = newbrk;
 
     if (newbrk < addr)
     {
Index: uClibc/libc/sysdeps/linux/i386/brk.c
diff -u uClibc/libc/sysdeps/linux/i386/brk.c:1.5 uClibc/libc/sysdeps/linux/i386/brk.c:1.6
--- uClibc/libc/sysdeps/linux/i386/brk.c:1.5	Sun Jan 20 19:39:29 2002
+++ uClibc/libc/sysdeps/linux/i386/brk.c	Fri Jul 30 14:05:58 2004
@@ -23,7 +23,7 @@
 
 
 /* This must be initialized data because commons can't have aliases.  */
-void *___brk_addr = 0;
+void *__curbrk = 0;
 
 
 int brk (void *addr)
@@ -37,7 +37,7 @@
 	    : "=a" (newbrk), "=r" (scratch)
 	    : "0" (__NR_brk), "g" (__ptrvalue (addr)));
 
-    ___brk_addr = newbrk;
+    __curbrk = newbrk;
 
     if (newbrk < addr)
     {
Index: uClibc/libc/sysdeps/linux/m68k/brk.c
diff -u uClibc/libc/sysdeps/linux/m68k/brk.c:1.1 uClibc/libc/sysdeps/linux/m68k/brk.c:1.2
--- uClibc/libc/sysdeps/linux/m68k/brk.c:1.1	Wed Feb  5 05:50:23 2003
+++ uClibc/libc/sysdeps/linux/m68k/brk.c	Fri Jul 30 14:05:58 2004
@@ -5,7 +5,7 @@
 #include <errno.h>
 
 /* This must be initialized data because commons can't have aliases.  */
-void * ___brk_addr = 0;
+void * __curbrk = 0;
 
 int brk (void *addr)
 {
@@ -18,7 +18,7 @@
 		:"=g" (newbrk)
 		:"i" (__NR_brk),"g" (addr) : "%d0", "%d1");
 
-    ___brk_addr = newbrk;
+    __curbrk = newbrk;
 
     if (newbrk < addr)
     {
Index: uClibc/libc/sysdeps/linux/mips/brk.c
diff -u uClibc/libc/sysdeps/linux/mips/brk.c:1.2 uClibc/libc/sysdeps/linux/mips/brk.c:1.3
--- uClibc/libc/sysdeps/linux/mips/brk.c:1.2	Mon Feb  4 07:02:14 2002
+++ uClibc/libc/sysdeps/linux/mips/brk.c	Fri Jul 30 14:05:59 2004
@@ -21,7 +21,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-void *___brk_addr = 0;
+void *__curbrk = 0;
 
 int brk (void *addr)
 {
@@ -37,7 +37,7 @@
 	 : "$4", "$7");
     newbrk = (void *) res;
   }
-  ___brk_addr = newbrk;
+  __curbrk = newbrk;
 
   if (newbrk < addr)
     {
Index: uClibc/libc/sysdeps/linux/nios/brk.c
diff -u uClibc/libc/sysdeps/linux/nios/brk.c:1.1 uClibc/libc/sysdeps/linux/nios/brk.c:1.2
--- uClibc/libc/sysdeps/linux/nios/brk.c:1.1	Fri Jul 16 05:09:31 2004
+++ uClibc/libc/sysdeps/linux/nios/brk.c	Fri Jul 30 14:05:59 2004
@@ -23,7 +23,7 @@
 
 
 /* This must be initialized data because commons can't have aliases.  */
-void *___brk_addr = 0;
+void *__curbrk = 0;
 
 
 int brk (void *addr)
@@ -34,7 +34,7 @@
 
     asm volatile ("trap 63\n\t" : "=r"(newbrk) : "0"(o0), "r"(g1));
 
-    ___brk_addr = newbrk;
+    __curbrk = newbrk;
 
     if (newbrk < addr) {
       __set_errno (ENOMEM);
Index: uClibc/libc/sysdeps/linux/nios2/brk.c
diff -u uClibc/libc/sysdeps/linux/nios2/brk.c:1.1 uClibc/libc/sysdeps/linux/nios2/brk.c:1.2
--- uClibc/libc/sysdeps/linux/nios2/brk.c:1.1	Fri Jul 16 05:09:32 2004
+++ uClibc/libc/sysdeps/linux/nios2/brk.c	Fri Jul 30 14:06:00 2004
@@ -23,7 +23,7 @@
 
 
 /* This must be initialized data because commons can't have aliases.  */
-void *___brk_addr = 0;
+void *__curbrk = 0;
 
 
 int brk (void *addr)
@@ -35,7 +35,7 @@
 
     asm volatile ("trap\n\t" : "=r"(newbrk) : "0"(r2), "r"(r3), "r"(r4));
 
-    ___brk_addr = newbrk;
+    __curbrk = newbrk;
 
     if (newbrk < addr) {
       __set_errno (ENOMEM);
Index: uClibc/libc/sysdeps/linux/powerpc/brk.S
diff -u uClibc/libc/sysdeps/linux/powerpc/brk.S:1.3 uClibc/libc/sysdeps/linux/powerpc/brk.S:1.4
--- uClibc/libc/sysdeps/linux/powerpc/brk.S:1.3	Mon Jul 15 04:15:07 2002
+++ uClibc/libc/sysdeps/linux/powerpc/brk.S	Fri Jul 30 14:06:00 2004
@@ -23,7 +23,7 @@
 #include <sys/syscall.h>
 
 #ifdef __NR_brk
-	.comm	___brk_addr,4,4
+	.comm	__curbrk,4,4
 	.section ".text"
 .globl      __brk;
 .type      __brk, @function;
@@ -39,12 +39,12 @@
 	mflr    r4
 	bl      _GLOBAL_OFFSET_TABLE_ at local-4
 	mflr    r5
-	lwz     r5,___brk_addr at got(r5)
+	lwz     r5,__curbrk at got(r5)
 	mtlr    r4
 	stw     r3,0(r5)
 #else
-	lis     r4,___brk_addr at ha
-	stw     r3,___brk_addr at l(r4)
+	lis     r4,__curbrk at ha
+	stw     r3,__curbrk at l(r4)
 #endif
 	cmplw   r6,r3
 	addi    r1,r1,16
Index: uClibc/libc/sysdeps/linux/sh/__init_brk.c
diff -u uClibc/libc/sysdeps/linux/sh/__init_brk.c:1.2 uClibc/libc/sysdeps/linux/sh/__init_brk.c:1.3
--- uClibc/libc/sysdeps/linux/sh/__init_brk.c:1.2	Tue Oct  1 10:49:19 2002
+++ uClibc/libc/sysdeps/linux/sh/__init_brk.c	Fri Jul 30 14:06:00 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-void * ___brk_addr = 0;
+void * __curbrk = 0;
 
 #define __NR__brk __NR_brk
 _syscall1(void *, _brk, void *, ptr);
@@ -12,10 +12,10 @@
 int
 __init_brk (void)
 {
-    if (___brk_addr == 0)
+    if (__curbrk == 0)
     {
-		___brk_addr = _brk(0);
-		if (___brk_addr == 0)
+		__curbrk = _brk(0);
+		if (__curbrk == 0)
 		{
 		  __set_errno(ENOMEM);
 		  return -1;
Index: uClibc/libc/sysdeps/linux/sh/brk.c
diff -u uClibc/libc/sysdeps/linux/sh/brk.c:1.2 uClibc/libc/sysdeps/linux/sh/brk.c:1.3
--- uClibc/libc/sysdeps/linux/sh/brk.c:1.2	Tue Oct  1 10:49:19 2002
+++ uClibc/libc/sysdeps/linux/sh/brk.c	Fri Jul 30 14:06:01 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-extern void * ___brk_addr;
+extern void * __curbrk;
 
 extern int __init_brk (void);
 extern void *_brk(void *ptr);
@@ -13,8 +13,8 @@
 {
     if (__init_brk () == 0)
     {
-		___brk_addr = _brk(end_data_seg);
-		if (___brk_addr == end_data_seg)
+		__curbrk = _brk(end_data_seg);
+		if (__curbrk == end_data_seg)
 			return 0;
 		__set_errno(ENOMEM);
     }
Index: uClibc/libc/sysdeps/linux/sh/sbrk.c
diff -u uClibc/libc/sysdeps/linux/sh/sbrk.c:1.2 uClibc/libc/sysdeps/linux/sh/sbrk.c:1.3
--- uClibc/libc/sysdeps/linux/sh/sbrk.c:1.2	Tue Oct  1 10:49:19 2002
+++ uClibc/libc/sysdeps/linux/sh/sbrk.c	Fri Jul 30 14:06:01 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-extern void * ___brk_addr;
+extern void * __curbrk;
 
 extern int __init_brk (void);
 extern void *_brk(void *ptr);
@@ -14,9 +14,9 @@
 {
     if (__init_brk () == 0)
     {
-		char * tmp = (char*)___brk_addr+increment;
-		___brk_addr = _brk(tmp);
-		if (___brk_addr == tmp)
+		char * tmp = (char*)__curbrk+increment;
+		__curbrk = _brk(tmp);
+		if (__curbrk == tmp)
 			return tmp-increment;
 		__set_errno(ENOMEM);
 		return ((void *) -1);
Index: uClibc/libc/sysdeps/linux/sh64/__init_brk.c
diff -u uClibc/libc/sysdeps/linux/sh64/__init_brk.c:1.1 uClibc/libc/sysdeps/linux/sh64/__init_brk.c:1.2
--- uClibc/libc/sysdeps/linux/sh64/__init_brk.c:1.1	Wed Aug 13 14:08:27 2003
+++ uClibc/libc/sysdeps/linux/sh64/__init_brk.c	Fri Jul 30 14:06:01 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-void * ___brk_addr = 0;
+void * __curbrk = 0;
 
 #define __NR__brk __NR_brk
 _syscall1(void *, _brk, void *, ptr);
@@ -12,10 +12,10 @@
 int
 __init_brk (void)
 {
-    if (___brk_addr == 0)
+    if (__curbrk == 0)
     {
-		___brk_addr = _brk(0);
-		if (___brk_addr == 0)
+		__curbrk = _brk(0);
+		if (__curbrk == 0)
 		{
 		  __set_errno(ENOMEM);
 		  return -1;
Index: uClibc/libc/sysdeps/linux/sh64/brk.c
diff -u uClibc/libc/sysdeps/linux/sh64/brk.c:1.1 uClibc/libc/sysdeps/linux/sh64/brk.c:1.2
--- uClibc/libc/sysdeps/linux/sh64/brk.c:1.1	Wed Aug 13 14:08:28 2003
+++ uClibc/libc/sysdeps/linux/sh64/brk.c	Fri Jul 30 14:06:01 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-extern void * ___brk_addr;
+extern void * __curbrk;
 
 extern int __init_brk (void);
 extern void *_brk(void *ptr);
@@ -13,8 +13,8 @@
 {
     if (__init_brk () == 0)
     {
-		___brk_addr = _brk(end_data_seg);
-		if (___brk_addr == end_data_seg)
+		__curbrk = _brk(end_data_seg);
+		if (__curbrk == end_data_seg)
 			return 0;
 		__set_errno(ENOMEM);
     }
Index: uClibc/libc/sysdeps/linux/sh64/sbrk.c
diff -u uClibc/libc/sysdeps/linux/sh64/sbrk.c:1.1 uClibc/libc/sysdeps/linux/sh64/sbrk.c:1.2
--- uClibc/libc/sysdeps/linux/sh64/sbrk.c:1.1	Wed Aug 13 14:08:28 2003
+++ uClibc/libc/sysdeps/linux/sh64/sbrk.c	Fri Jul 30 14:06:01 2004
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
-extern void * ___brk_addr;
+extern void * __curbrk;
 
 extern int __init_brk (void);
 extern void *_brk(void *ptr);
@@ -14,9 +14,9 @@
 {
     if (__init_brk () == 0)
     {
-		char * tmp = (char*)___brk_addr+increment;
-		___brk_addr = _brk(tmp);
-		if (___brk_addr == tmp)
+		char * tmp = (char*)__curbrk+increment;
+		__curbrk = _brk(tmp);
+		if (__curbrk == tmp)
 			return tmp-increment;
 		__set_errno(ENOMEM);
 		return ((void *) -1);
Index: uClibc/libc/sysdeps/linux/sparc/brk.c
diff -u uClibc/libc/sysdeps/linux/sparc/brk.c:1.1 uClibc/libc/sysdeps/linux/sparc/brk.c:1.2
--- uClibc/libc/sysdeps/linux/sparc/brk.c:1.1	Mon Feb  4 03:07:50 2002
+++ uClibc/libc/sysdeps/linux/sparc/brk.c	Fri Jul 30 14:06:01 2004
@@ -23,7 +23,7 @@
 
 
 /* This must be initialized data because commons can't have aliases.  */
-void *___brk_addr = 0;
+void *__curbrk = 0;
 
 
 int brk (void *addr)
@@ -37,7 +37,7 @@
 	newbrk = o0;
     }
 
-    ___brk_addr = newbrk;
+    __curbrk = newbrk;
 
     if (newbrk < addr)
     {



More information about the uClibc-cvs mailing list