From: Paul Eggert Date: Thu, 14 Jul 2011 16:07:02 +0000 (-0700) Subject: * alloc.c (__malloc_size_t): Remove. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~152 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5e927815391bbb3a6e25b9bd65a7c59f1a5216ef;p=emacs.git * alloc.c (__malloc_size_t): Remove. All uses replaced by size_t. See Andreas Schwab's note . --- diff --git a/src/ChangeLog b/src/ChangeLog index d9060ae6365..f1670d1db06 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 + . + * 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 diff --git a/src/alloc.c b/src/alloc.c index eb356fd0e83..5848e797b4b 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -68,10 +68,6 @@ extern POINTER_TYPE *sbrk (); #ifdef DOUG_LEA_MALLOC #include -/* 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. */