about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2012-01-07 23:57:22 -0500
committerUlrich Drepper <drepper@gmail.com>2012-01-07 23:57:22 -0500
commita784e502472fb3a1afa4d01a47c66b52d23e00f6 (patch)
tree5ebaa084119dcffe41671a62e2e799b172c57d24 /malloc
parent33808bf1164be2e7c8535bdd5ac398c75c33ed49 (diff)
downloadglibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar.gz
glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar.xz
glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.zip
Remove pre-ISO C support
No more __const.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/arena.c6
-rw-r--r--malloc/malloc.c18
-rw-r--r--malloc/malloc.h12
-rw-r--r--malloc/mcheck.c6
-rw-r--r--malloc/mtrace.c2
5 files changed, 22 insertions, 22 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index cb8548ba3f..d3cf4b9f1b 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -1,5 +1,5 @@
 /* Malloc implementation for multiple threads without lock contention.
-   Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2009,2010,2011
+   Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2009,2010,2011,2012
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@@ -145,9 +145,9 @@ int __malloc_initialized = -1;
 /* atfork support.  */
 
 static __malloc_ptr_t (*save_malloc_hook) (size_t __size,
-					   __const __malloc_ptr_t);
+					   const __malloc_ptr_t);
 static void           (*save_free_hook) (__malloc_ptr_t __ptr,
-					 __const __malloc_ptr_t);
+					 const __malloc_ptr_t);
 static void*        save_arena;
 
 #ifdef ATFORK_MEM
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 300e879b8c..6bacb124bc 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -1,5 +1,5 @@
 /* Malloc implementation for multiple threads without lock contention.
-   Copyright (C) 1996-2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1996-2009, 2010, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Wolfram Gloger <wg@malloc.de>
    and Doug Lea <dl@cs.oswego.edu>, 2001.
@@ -2911,7 +2911,7 @@ public_mALLOc(size_t bytes)
   mstate ar_ptr;
   void *victim;
 
-  __malloc_ptr_t (*hook) (size_t, __const __malloc_ptr_t)
+  __malloc_ptr_t (*hook) (size_t, const __malloc_ptr_t)
     = force_reg (__malloc_hook);
   if (__builtin_expect (hook != NULL, 0))
     return (*hook)(bytes, RETURN_ADDRESS (0));
@@ -2953,7 +2953,7 @@ public_fREe(void* mem)
   mstate ar_ptr;
   mchunkptr p;                          /* chunk corresponding to mem */
 
-  void (*hook) (__malloc_ptr_t, __const __malloc_ptr_t)
+  void (*hook) (__malloc_ptr_t, const __malloc_ptr_t)
     = force_reg (__free_hook);
   if (__builtin_expect (hook != NULL, 0)) {
     (*hook)(mem, RETURN_ADDRESS (0));
@@ -2992,7 +2992,7 @@ public_rEALLOc(void* oldmem, size_t bytes)
 
   void* newp;             /* chunk to return */
 
-  __malloc_ptr_t (*hook) (__malloc_ptr_t, size_t, __const __malloc_ptr_t) =
+  __malloc_ptr_t (*hook) (__malloc_ptr_t, size_t, const __malloc_ptr_t) =
     force_reg (__realloc_hook);
   if (__builtin_expect (hook != NULL, 0))
     return (*hook)(oldmem, bytes, RETURN_ADDRESS (0));
@@ -3085,7 +3085,7 @@ public_mEMALIGn(size_t alignment, size_t bytes)
   void *p;
 
   __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
-					__const __malloc_ptr_t)) =
+					const __malloc_ptr_t)) =
     force_reg (__memalign_hook);
   if (__builtin_expect (hook != NULL, 0))
     return (*hook)(alignment, bytes, RETURN_ADDRESS (0));
@@ -3140,7 +3140,7 @@ public_vALLOc(size_t bytes)
   size_t pagesz = GLRO(dl_pagesize);
 
   __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
-					__const __malloc_ptr_t)) =
+					const __malloc_ptr_t)) =
     force_reg (__memalign_hook);
   if (__builtin_expect (hook != NULL, 0))
     return (*hook)(pagesz, bytes, RETURN_ADDRESS (0));
@@ -3186,7 +3186,7 @@ public_pVALLOc(size_t bytes)
   size_t rounded_bytes = (bytes + page_mask) & ~(page_mask);
 
   __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
-					__const __malloc_ptr_t)) =
+					const __malloc_ptr_t)) =
     force_reg (__memalign_hook);
   if (__builtin_expect (hook != NULL, 0))
     return (*hook)(pagesz, rounded_bytes, RETURN_ADDRESS (0));
@@ -3239,7 +3239,7 @@ public_cALLOc(size_t n, size_t elem_size)
     }
   }
 
-  __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, __const __malloc_ptr_t)) =
+  __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, const __malloc_ptr_t)) =
     force_reg (__malloc_hook);
   if (__builtin_expect (hook != NULL, 0)) {
     sz = bytes;
@@ -5032,7 +5032,7 @@ __posix_memalign (void **memptr, size_t alignment, size_t size)
   /* Call the hook here, so that caller is posix_memalign's caller
      and not posix_memalign itself.  */
   __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
-					__const __malloc_ptr_t)) =
+					const __malloc_ptr_t)) =
     force_reg (__memalign_hook);
   if (__builtin_expect (hook != NULL, 0))
     mem = (*hook)(alignment, size, RETURN_ADDRESS (0));
diff --git a/malloc/malloc.h b/malloc/malloc.h
index 3a43f7cfdb..eb63afb6cb 100644
--- a/malloc/malloc.h
+++ b/malloc/malloc.h
@@ -1,5 +1,5 @@
 /* Prototypes and definition for malloc implementation.
-   Copyright (C) 1996, 1997, 1999, 2000, 2002-2004, 2005, 2007, 2009, 2011
+   Copyright (C) 1996,1997,1999,2000,2002-2004,2005,2007,2009,2011,2012
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -41,7 +41,7 @@
 #  define __MALLOC_HOOK_VOLATILE
 #  define __MALLOC_DEPRECATED
 # else
-#  define __MALLOC_HOOK_VOLATILE __volatile
+#  define __MALLOC_HOOK_VOLATILE volatile
 #  define __MALLOC_DEPRECATED __attribute_deprecated__
 # endif
 
@@ -171,18 +171,18 @@ extern void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void)
      __MALLOC_DEPRECATED;
 /* Hooks for debugging and user-defined versions. */
 extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr,
-						   __const __malloc_ptr_t)
+						   const __malloc_ptr_t)
      __MALLOC_DEPRECATED;
 extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook) (size_t __size,
-						      __const __malloc_ptr_t)
+						      const __malloc_ptr_t)
      __MALLOC_DEPRECATED;
 extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook) (void *__ptr,
 						       size_t __size,
-						       __const __malloc_ptr_t)
+						       const __malloc_ptr_t)
      __MALLOC_DEPRECATED;
 extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook) (size_t __alignment,
 							size_t __size,
-							__const __malloc_ptr_t)
+							const __malloc_ptr_t)
      __MALLOC_DEPRECATED;
 extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
 
diff --git a/malloc/mcheck.c b/malloc/mcheck.c
index e2eb83f41d..a3dd1c42a4 100644
--- a/malloc/mcheck.c
+++ b/malloc/mcheck.c
@@ -1,5 +1,5 @@
 /* Standard debugging hooks for `malloc'.
-   Copyright (C) 1990-1997,1999,2000-2002,2007,2010
+   Copyright (C) 1990-1997,1999,2000-2002,2007,2010,2012
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written May 1989 by Mike Haertel.
@@ -30,13 +30,13 @@
 #endif
 
 /* Old hook values.  */
-static void (*old_free_hook) (__ptr_t ptr, __const __ptr_t);
+static void (*old_free_hook) (__ptr_t ptr, const __ptr_t);
 static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t);
 static __ptr_t (*old_memalign_hook) (__malloc_size_t alignment,
 				     __malloc_size_t size,
 				     const __ptr_t);
 static __ptr_t (*old_realloc_hook) (__ptr_t ptr, __malloc_size_t size,
-				    __const __ptr_t);
+				    const __ptr_t);
 
 /* Function to call when something awful happens.  */
 static void (*abortfunc) (enum mcheck_status);
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index 0d0cb35ff3..d0fdf2302f 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -64,7 +64,7 @@ static __ptr_t (*tr_old_realloc_hook) (__ptr_t ptr, __malloc_size_t size,
 				       const __ptr_t);
 static __ptr_t (*tr_old_memalign_hook) (__malloc_size_t __alignment,
 					__malloc_size_t __size,
-					__const __ptr_t);
+					const __ptr_t);
 
 /* This function is called when the block being alloc'd, realloc'd, or
    freed has an address matching the variable "mallwatch".  In a debugger,