Blame SOURCES/glibc-rh1505492-malloc_size_t.patch

c6d234
commit 1ba4f03035faabd9090f61ec5514e2abced5ca29
c6d234
Author: Joseph Myers <joseph@codesourcery.com>
c6d234
Date:   Fri Mar 8 16:46:07 2013 +0000
c6d234
c6d234
    Remove __malloc_size_t.
c6d234
c6d234
Adjusted here to keep the definition in the public <malloc.h> header
c6d234
file.
c6d234
c6d234
diff --git a/malloc/mcheck.c b/malloc/mcheck.c
c6d234
index c5addc55afebd502..695de42e914e247c 100644
c6d234
--- a/malloc/mcheck.c
c6d234
+++ b/malloc/mcheck.c
c6d234
@@ -29,11 +29,10 @@
c6d234
 
c6d234
 /* Old hook values.  */
c6d234
 static void (*old_free_hook) (__ptr_t ptr, const __ptr_t);
c6d234
-static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t);
c6d234
-static __ptr_t (*old_memalign_hook) (__malloc_size_t alignment,
c6d234
-				     __malloc_size_t size,
c6d234
+static __ptr_t (*old_malloc_hook) (size_t size, const __ptr_t);
c6d234
+static __ptr_t (*old_memalign_hook) (size_t alignment, size_t size,
c6d234
 				     const __ptr_t);
c6d234
-static __ptr_t (*old_realloc_hook) (__ptr_t ptr, __malloc_size_t size,
c6d234
+static __ptr_t (*old_realloc_hook) (__ptr_t ptr, size_t size,
c6d234
 				    const __ptr_t);
c6d234
 
c6d234
 /* Function to call when something awful happens.  */
c6d234
@@ -48,7 +47,7 @@ static void (*abortfunc) (enum mcheck_status);
c6d234
 
c6d234
 struct hdr
c6d234
   {
c6d234
-    __malloc_size_t size;	/* Exact size requested by user.  */
c6d234
+    size_t size;		/* Exact size requested by user.  */
c6d234
     unsigned long int magic;	/* Magic number to check header integrity.  */
c6d234
     struct hdr *prev;
c6d234
     struct hdr *next;
c6d234
@@ -69,12 +68,12 @@ static int pedantic;
c6d234
 # include <string.h>
c6d234
 # define flood memset
c6d234
 #else
c6d234
-static void flood (__ptr_t, int, __malloc_size_t);
c6d234
+static void flood (__ptr_t, int, size_t);
c6d234
 static void
c6d234
 flood (ptr, val, size)
c6d234
      __ptr_t ptr;
c6d234
      int val;
c6d234
-     __malloc_size_t size;
c6d234
+     size_t size;
c6d234
 {
c6d234
   char *cp = ptr;
c6d234
   while (size--)
c6d234
@@ -202,7 +201,7 @@ freehook (__ptr_t ptr, const __ptr_t caller)
c6d234
 }
c6d234
 
c6d234
 static __ptr_t
c6d234
-mallochook (__malloc_size_t size, const __ptr_t caller)
c6d234
+mallochook (size_t size, const __ptr_t caller)
c6d234
 {
c6d234
   struct hdr *hdr;
c6d234
 
c6d234
@@ -235,11 +234,11 @@ mallochook (__malloc_size_t size, const __ptr_t caller)
c6d234
 }
c6d234
 
c6d234
 static __ptr_t
c6d234
-memalignhook (__malloc_size_t alignment, __malloc_size_t size,
c6d234
+memalignhook (size_t alignment, size_t size,
c6d234
 	      const __ptr_t caller)
c6d234
 {
c6d234
   struct hdr *hdr;
c6d234
-  __malloc_size_t slop;
c6d234
+  size_t slop;
c6d234
   char *block;
c6d234
 
c6d234
   if (pedantic)
c6d234
@@ -274,7 +273,7 @@ memalignhook (__malloc_size_t alignment, __malloc_size_t size,
c6d234
 }
c6d234
 
c6d234
 static __ptr_t
c6d234
-reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller)
c6d234
+reallochook (__ptr_t ptr, size_t size, const __ptr_t caller)
c6d234
 {
c6d234
   if (size == 0)
c6d234
     {
c6d234
@@ -283,7 +282,7 @@ reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller)
c6d234
     }
c6d234
 
c6d234
   struct hdr *hdr;
c6d234
-  __malloc_size_t osize;
c6d234
+  size_t osize;
c6d234
 
c6d234
   if (pedantic)
c6d234
     mcheck_check_all ();
c6d234
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
c6d234
index 3f02c7182285d025..0a26ccc65d81bd2a 100644
c6d234
--- a/malloc/mtrace.c
c6d234
+++ b/malloc/mtrace.c
c6d234
@@ -58,11 +58,10 @@ __ptr_t mallwatch;
c6d234
 
c6d234
 /* Old hook values.  */
c6d234
 static void (*tr_old_free_hook) (__ptr_t ptr, const __ptr_t);
c6d234
-static __ptr_t (*tr_old_malloc_hook) (__malloc_size_t size, const __ptr_t);
c6d234
-static __ptr_t (*tr_old_realloc_hook) (__ptr_t ptr, __malloc_size_t size,
c6d234
+static __ptr_t (*tr_old_malloc_hook) (size_t size, const __ptr_t);
c6d234
+static __ptr_t (*tr_old_realloc_hook) (__ptr_t ptr, size_t size,
c6d234
 				       const __ptr_t);
c6d234
-static __ptr_t (*tr_old_memalign_hook) (__malloc_size_t __alignment,
c6d234
-					__malloc_size_t __size,
c6d234
+static __ptr_t (*tr_old_memalign_hook) (size_t __alignment, size_t __size,
c6d234
 					const __ptr_t);
c6d234
 
c6d234
 /* This function is called when the block being alloc'd, realloc'd, or
c6d234
@@ -160,10 +159,10 @@ tr_freehook (ptr, caller)
c6d234
   __libc_lock_unlock (lock);
c6d234
 }
c6d234
 
c6d234
-static __ptr_t tr_mallochook (__malloc_size_t, const __ptr_t) __THROW;
c6d234
+static __ptr_t tr_mallochook (size_t, const __ptr_t) __THROW;
c6d234
 static __ptr_t
c6d234
 tr_mallochook (size, caller)
c6d234
-     __malloc_size_t size;
c6d234
+     size_t size;
c6d234
      const __ptr_t caller;
c6d234
 {
c6d234
   __ptr_t hdr;
c6d234
@@ -190,12 +189,12 @@ tr_mallochook (size, caller)
c6d234
   return hdr;
c6d234
 }
c6d234
 
c6d234
-static __ptr_t tr_reallochook (__ptr_t, __malloc_size_t, const __ptr_t)
c6d234
+static __ptr_t tr_reallochook (__ptr_t, size_t, const __ptr_t)
c6d234
      __THROW;
c6d234
 static __ptr_t
c6d234
 tr_reallochook (ptr, size, caller)
c6d234
      __ptr_t ptr;
c6d234
-     __malloc_size_t size;
c6d234
+     size_t size;
c6d234
      const __ptr_t caller;
c6d234
 {
c6d234
   __ptr_t hdr;
c6d234
@@ -238,11 +237,11 @@ tr_reallochook (ptr, size, caller)
c6d234
   return hdr;
c6d234
 }
c6d234
 
c6d234
-static __ptr_t tr_memalignhook (__malloc_size_t, __malloc_size_t,
c6d234
+static __ptr_t tr_memalignhook (size_t, size_t,
c6d234
 				const __ptr_t) __THROW;
c6d234
 static __ptr_t
c6d234
 tr_memalignhook (alignment, size, caller)
c6d234
-     __malloc_size_t alignment, size;
c6d234
+     size_t alignment, size;
c6d234
      const __ptr_t caller;
c6d234
 {
c6d234
   __ptr_t hdr;