1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

Remove pre-ISO C support

No more __const.
This commit is contained in:
Ulrich Drepper
2012-01-07 23:57:22 -05:00
parent 33808bf116
commit a784e50247
209 changed files with 2420 additions and 2244 deletions

View File

@@ -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

View File

@@ -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));

View File

@@ -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);

View File

@@ -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);

View File

@@ -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,