glibc/malloc
Joseph Myers f17a42333f Do not use __ptr_t.
sys/cdefs.h has a macro __ptr_t, which a few places in glibc use
instead of void *.  void * is a well-understood standard type for that
purpose and in a post-C89 context there is no need for a macro for it;
this patch changes those places to use void * directly instead.

Unlike __long_double_t, __ptr_t is widely used outside glibc (or at
least has many hits on codesearch.debian.net).  I don't know how many
of those uses would break if sys/cdefs.h ceased to define the macro,
but there's enough risk that this patch leaves the definition and just
removes the uses within glibc; removal of the definition can be
considered separately if desired.

Tested for x86_64, and with build-many-glibcs.py.

	* malloc/mcheck.c (old_free_hook): Use void * instead of __ptr_t.
	(old_malloc_hook): Likewise.
	(old_memalign_hook): Likewise.
	(old_realloc_hook): Likewise.
	(struct hdr): Likewise.
	(flood): Likewise.
	(freehook): Likewise.
	(mallochook): Likewise.
	(memalignhook): Likewise.
	(reallochook): Likewise.
	(mprobe): Likewise.
	* malloc/mtrace.c (mallwatch): Likewise.
	(tr_old_free_hook): Likewise.
	(tr_old_malloc_hook): Likewise.
	(tr_old_realloc_hook): Likewise.
	(tr_old_memalign_hook): Likewise.
	(tr_where): Likewise.
	(lock_and_info): Likewise.
	(tr_freehook): Likewise.
	(tr_mallochook): Likewise.
	(tr_reallochook): Likewise.
	(tr_memalignhook): Likewise.
	* misc/err.h [!__GNUC_VA_LIST] (__gnuc_va_list): Likewise.
	* misc/mmap.c (__mmap): Likewise.
	* misc/mmap64.c (__mmap64): Likewise.
	* misc/mprotect.c (__mprotect): Likewise.
	* misc/msync.c (msync): Likewise.
	* misc/munmap.c (__munmap): Likewise.
	* posix/posix_madvise.c (posix_madvise): Likewise.
	* socket/send.c (__send): Likewise.
	* socket/sendto.c (__sendto): Likewise.
	* socket/setsockopt.c (__setsockopt): Likewise.
	* string/memcmp.c (__ptr_t): Remove macro.
	(MEMCMP): Use void * instead of ptr_t.
	* string/memrchr.c (__ptr_t): Remove macro.
	(__memrchr): Use void * instead of ptr_t.
	* sysdeps/mach/hurd/dl-sysdep.c (__mmap): Likewise.
	* sysdeps/mach/hurd/mmap.c (__mmap): Likewise.
	* sysdeps/mach/hurd/mmap64.c (__mmap64): Likewise.
	* sysdeps/mach/mprotect.c (__mprotect): Likewise.
	* sysdeps/mach/msync.c (msync): Likewise.
	* sysdeps/mach/munmap.c (__munmap): Likewise.
	* sysdeps/mips/bits/setjmp.h (struct __jmp_buf_internal_tag):
	Likewise.
	* sysdeps/posix/getcwd.c (__getcwd): Likewise.
	* sysdeps/powerpc/powerpc32/memset.S (memset): Likewise.
	* sysdeps/powerpc/powerpc32/power4/memcpy.S (memcpy): Likewise.
	* sysdeps/powerpc/powerpc32/power4/memset.S (memset): Likewise.
	* sysdeps/powerpc/powerpc32/power6/memcpy.S (memcpy): Likewise.
	* sysdeps/powerpc/powerpc32/power6/memset.S (memset): Likewise.
	* sysdeps/powerpc/powerpc32/power7/memcpy.S (memcpy): Likewise.
	* sysdeps/powerpc/powerpc32/power7/mempcpy.S (__mempcpy):
	Likewise.
	* sysdeps/powerpc/powerpc32/power7/memset.S (memset): Likewise.
	* sysdeps/powerpc/powerpc64/memcpy.S (memcpy): Likewise.
	* sysdeps/powerpc/powerpc64/memset.S (memset): Likewise.
	* sysdeps/powerpc/powerpc64/power4/memcpy.S (memcpy): Likewise.
	* sysdeps/powerpc/powerpc64/power4/memset.S (memset): Likewise.
	* sysdeps/powerpc/powerpc64/power6/memcpy.S (memcpy): Likewise.
	* sysdeps/powerpc/powerpc64/power6/memset.S (memset): Likewise.
	* sysdeps/powerpc/powerpc64/power7/memcpy.S (memcpy): Likewise.
	* sysdeps/powerpc/powerpc64/power7/mempcpy.S (__mempcpy):
	Likewise.
	* sysdeps/powerpc/powerpc64/power7/memset.S (memset): Likewise.
	* sysdeps/powerpc/powerpc64/power8/memset.S (memset): Likewise.
	* sysdeps/tile/memcmp.c (__ptr_t): Remove macro.
	(MEMCMP): Use void * instead of ptr_t.
	* sysdeps/unix/sysv/linux/alpha/oldglob.c (old_glob_t): Likewise.
	* sysdeps/unix/sysv/linux/mmap.c (__mmap): Likewise.
2017-08-08 17:14:49 +00:00
..
Depend
Makefile Fix missing redirects in testsuite targets 2017-08-07 18:13:36 +02:00
Versions Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_alloc_array.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_allocate.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_copy_bytes.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_copy_string.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloc_buffer_create_failure.c Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
arena.c Add per-thread cache to malloc 2017-07-06 13:37:30 -04:00
dynarray-skeleton.c dynarray: Implement begin/end functions in the spirit of C++ 2017-06-13 21:55:10 +02:00
dynarray.h dynarray: Use libc_hidden_proto only for !_ISOMAC 2017-06-19 12:58:08 +02:00
dynarray_at_failure.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
dynarray_emplace_enlarge.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
dynarray_finalize.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
dynarray_resize.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
dynarray_resize_clear.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
hooks.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
malloc-hooks.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
malloc-internal.h i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120] 2017-06-30 09:11:24 -07:00
malloc.c Avoid backtrace from __stack_chk_fail [BZ #12189] 2017-07-11 07:44:14 -07:00
malloc.h Add reallocarray function 2017-05-30 18:27:57 -03:00
mallocbug.c Reformat malloc to gnu style. 2014-01-02 09:40:10 +01:00
mcheck-init.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mcheck.c Do not use __ptr_t. 2017-08-08 17:14:49 +00:00
mcheck.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memusage.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memusage.sh Update copyright dates not handled by scripts/update-copyrights. 2017-01-01 00:26:24 +00:00
memusagestat.c Update copyright dates not handled by scripts/update-copyrights. 2017-01-01 00:26:24 +00:00
morecore.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mtrace.c Do not use __ptr_t. 2017-08-08 17:14:49 +00:00
mtrace.pl Update copyright dates not handled by scripts/update-copyrights. 2017-01-01 00:26:24 +00:00
obstack.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
obstack.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
reallocarray.c Add reallocarray function 2017-05-30 18:27:57 -03:00
scratch_buffer_grow.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
scratch_buffer_grow_preserve.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
scratch_buffer_set_array_size.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
set-freeres.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
thread-freeres.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-alloc_buffer.c Prevent an implicit int promotion in malloc/tst-alloc_buffer.c 2017-06-26 09:56:26 -03:00
tst-calloc.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-dynarray-at-fail.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
tst-dynarray-fail.c Add internal facility for dynamic array handling 2017-06-02 11:59:28 +02:00
tst-dynarray-shared.h dynarray: Implement begin/end functions in the spirit of C++ 2017-06-13 21:55:10 +02:00
tst-dynarray.c dynarray: Implement begin/end functions in the spirit of C++ 2017-06-13 21:55:10 +02:00
tst-interpose-aux-nothread.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-interpose-aux-thread.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-interpose-aux.c Fix failing test malloc/tst-interpose-nothread with GCC 7. 2017-03-21 16:41:56 +01:00
tst-interpose-aux.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-interpose-nothread.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-interpose-skeleton.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-interpose-static-nothread.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-interpose-static-thread.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-interpose-thread.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-malloc-backtrace.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-malloc-fork-deadlock.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-malloc-thread-exit.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-malloc-thread-fail.c Increase some test timeouts. 2017-01-05 17:39:38 +00:00
tst-malloc-usable-static-tunables.c Initialize tunable list with the GLIBC_TUNABLES environment variable 2016-12-31 23:49:24 +05:30
tst-malloc-usable-static.c Add framework for tunables 2016-12-31 23:49:24 +05:30
tst-malloc-usable-tunables.c Initialize tunable list with the GLIBC_TUNABLES environment variable 2016-12-31 23:49:24 +05:30
tst-malloc-usable.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-malloc.c Split DIAG_* macros to new header libc-diag.h. 2017-02-25 09:59:46 -05:00
tst-mallocfork.c * malloc/tst-mallocfork.c (do_test): Make sure sa_flags is 2005-12-06 00:50:15 +00:00
tst-mallocfork2.c Increase some test timeouts. 2017-01-05 17:39:38 +00:00
tst-mallocstate.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-mallopt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-mcheck.c Split DIAG_* macros to new header libc-diag.h. 2017-02-25 09:59:46 -05:00
tst-memalign.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-mtrace.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-mtrace.sh Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-obstack.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-posix_memalign.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-pvalloc.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-realloc.c Split DIAG_* macros to new header libc-diag.h. 2017-02-25 09:59:46 -05:00
tst-reallocarray.c Add reallocarray function 2017-05-30 18:27:57 -03:00
tst-scratch_buffer.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-trim1.c * malloc/tst-trim1.c: New file. 2007-12-16 22:57:57 +00:00
tst-valloc.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00