* alloc.c (__malloc_size_t): Remove.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Jul 2011 16:07:02 +0000 (09:07 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Jul 2011 16:07:02 +0000 (09:07 -0700)
All uses replaced by size_t.  See Andreas Schwab's note
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.

src/ChangeLog
src/alloc.c

index d9060ae..f1670d1 100644 (file)
@@ -2,6 +2,10 @@
 
        Integer signedness and overflow and related fixes.  (Bug#9079)
 
+       * alloc.c (__malloc_size_t): Remove.
+       All uses replaced by size_t.  See Andreas Schwab's note
+       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
+
        * image.c: Improve checking for integer overflow.
        (check_image_size): Assume that f is nonnull, since
        it is always nonnull in practice.  This is one less thing to
index eb356fd..5848e79 100644 (file)
@@ -68,10 +68,6 @@ extern POINTER_TYPE *sbrk ();
 #ifdef DOUG_LEA_MALLOC
 
 #include <malloc.h>
-/* malloc.h #defines this as size_t, at least in glibc2.  */
-#ifndef __malloc_size_t
-#define __malloc_size_t size_t
-#endif
 
 /* Specify maximum number of areas to mmap.  It would be nice to use a
    value that explicitly means "no limit".  */
@@ -82,9 +78,8 @@ extern POINTER_TYPE *sbrk ();
 
 /* The following come from gmalloc.c.  */
 
-#define        __malloc_size_t         size_t
-extern __malloc_size_t _bytes_used;
-extern __malloc_size_t __malloc_extra_blocks;
+extern size_t _bytes_used;
+extern size_t __malloc_extra_blocks;
 
 #endif /* not DOUG_LEA_MALLOC */
 
@@ -1111,11 +1106,11 @@ static void (*old_free_hook) (void*, const void*);
 #  define BYTES_USED _bytes_used
 #endif
 
-static __malloc_size_t bytes_used_when_reconsidered;
+static size_t bytes_used_when_reconsidered;
 
 /* Value of _bytes_used, when spare_memory was freed.  */
 
-static __malloc_size_t bytes_used_when_full;
+static size_t bytes_used_when_full;
 
 /* This function is used as the hook for free to call.  */