glibc/socket
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
..
bits Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sys Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
Makefile Assume that accept4 is always available and works 2017-04-19 07:44:48 +02:00
Versions Fix mq_notify socket, recv namespace (bug 18546). 2015-06-17 20:20:08 +00:00
accept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
accept4.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bind.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
connect.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getpeername.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getsockname.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getsockopt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
isfdtype.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
listen.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
opensock.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
recv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
recvfrom.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
recvmmsg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
recvmsg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sa_len.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
send.c Do not use __ptr_t. 2017-08-08 17:14:49 +00:00
sendmmsg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sendmsg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sendto.c Do not use __ptr_t. 2017-08-08 17:14:49 +00:00
setsockopt.c Do not use __ptr_t. 2017-08-08 17:14:49 +00:00
shutdown.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sockatmark.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
socket.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
socketpair.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-accept4.c Assume that accept4 is always available and works 2017-04-19 07:44:48 +02:00