glibc/sysdeps/unix/sysv/linux
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
..
aarch64 [AArch64] Update dl-procinfo for new HWCAP flags in Linux 4.12 2017-07-19 13:50:23 +01:00
alpha Do not use __ptr_t. 2017-08-08 17:14:49 +00:00
arm Consolidate Linux fcntl implementation 2017-06-30 15:17:26 -03:00
bits Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
generic Consolidate Linux fcntl implementation 2017-06-30 15:17:26 -03:00
hppa Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
i386 i386: Add <startup.h> [BZ #21913] 2017-08-08 08:43:15 -07:00
ia64 Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
include Add shim header for bits/syscall.h. 2017-06-01 10:56:10 -04:00
m68k Consolidate Linux fcntl implementation 2017-06-30 15:17:26 -03:00
microblaze microblaze: Resolve non-relocatable branch in pt-vfork.S (BZ#21779) 2017-07-28 09:21:14 -03:00
mips Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
net
netash
netatalk
netax25
neteconet
netinet
netipx
netiucv
netpacket
netrom
netrose
nfs
nios2 Miscellaneous sys/ucontext.h namespace fixes (bug 21457). 2017-06-28 10:33:23 +00:00
powerpc powerpc: Fix float128 IFUNC relocations [BZ #21707] 2017-07-17 17:49:26 -03:00
s390 Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
scsi
sh Consolidate Linux fcntl implementation 2017-06-30 15:17:26 -03:00
sparc Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
sys Fix struct sigaltstack namespace (bug 21517). 2017-06-05 10:17:46 +00:00
tile Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
wordsize-64 Consolidate Linux openat implementation 2017-06-20 18:20:06 -03:00
x86 Rename struct ucontext tag (bug 21457). 2017-06-26 22:03:58 +00:00
x86_64 Rename struct ucontext tag (bug 21457). 2017-06-26 22:03:58 +00:00
Implies
Makefile Call exit directly in clone (BZ #21512) 2017-06-26 17:52:20 -03:00
Versions
_G_config.h Remove __need macros from stdio.h and wchar.h. 2017-06-08 13:58:17 -04:00
_exit.c
a.out.h
accept.c
accept4.c
access.c tunables: Use direct syscall for access (BZ#21744) 2017-07-24 11:21:07 -03:00
adjtime.c
aio_misc.h
aio_sigqueue.c
arch-fork.h
bind.c
check_native.c
check_pf.c
clock.c
clock_getcpuclockid.c
clock_getres.c
clock_gettime.c
clock_nanosleep.c
clock_settime.c
close.c
cmsg_nxthdr.c
configure
configure.ac
connect.c
creat.c
creat64.c
createthread.c
default-sched.h
device-nrs.h
dl-brk.c
dl-execstack.c
dl-fxstatat64.c
dl-getcwd.c
dl-librecon.h ld.so: Consolidate 2 strtouls into _dl_strtoul [BZ #21528] 2017-06-08 12:52:42 -07:00
dl-openat64.c
dl-opendir.c
dl-origin.c
dl-osinfo.h
dl-sbrk.c
dl-sysdep.c
dl-sysdep.h
dl-vdso.c
dl-vdso.h
dl-writev.h
epoll_pwait.c
epoll_wait.c
errqueue.h Consistently use uintN_t not u_intN_t everywhere. 2017-08-07 19:55:34 +00:00
eventfd_read.c
eventfd_write.c
exit-thread.h
faccessat.c
fallocate.c
fallocate64.c
fatal-prepare.h
fchmodat.c
fcntl.c Consolidate Linux fcntl implementation 2017-06-30 15:17:26 -03:00
fd_to_filename.h
fdatasync.c
fexecve.c
fips-private.h
fpathconf.c
fstatfs64.c
fstatvfs.c
fstatvfs64.c
fsync.c
ftime.c
ftruncate.c
ftruncate64.c
futex-internal.h
futimens.c
futimes.c
futimesat.c
fxstat.c
fxstat64.c
fxstatat.c
fxstatat64.c
gai_sigqueue.c
getclktck.c
getcwd.c
getdents.c
getdents64.c
getdirentries.c
getdirentries64.c
getdtsz.c
getentropy.c
gethostid.c
getipv4sourcefilter.c
getloadavg.c
getlogin.c
getlogin_r.c
getpagesize.c
getpeername.c
getpriority.c
getpt.c
getrandom.c
getrlimit.c
getrlimit64.c
getsockname.c
getsockopt.c
getsourcefilter.c
getsysstats.c sysconf: Use conservative default for _SC_NPROCESSORS_ONLN [BZ #21542] 2017-07-04 16:12:46 +02:00
gettimeofday.c
grantpt.c
if_index.c
ifaddrs.c
ifreq.c
internal_statvfs.c
internal_statvfs64.c
ipc_ops.h
ipc_priv.h
kernel-features.h posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
kernel-posix-cpu-timers.h
kernel-posix-timers.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
ldd-rewrite.sed
lddlibc4.c
ldsodefs.h
libc_fatal.c
linux_fsinfo.h
listen.c
local-setxid.h
lowlevellock-futex.h
lseek.c
lseek64.c
lutimes.c
lxstat.c
lxstat64.c
malloc-sysdep.h
mmap.c Do not use __ptr_t. 2017-08-08 17:14:49 +00:00
mmap64.c Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
mmap_internal.h
mq_close.c
mq_getattr.c
mq_notify.c
mq_open.c
mq_receive.c
mq_send.c
mq_timedreceive.c
mq_timedsend.c
mq_unlink.c
msgctl.c
msgget.c
msgrcv.c
msgsnd.c
msync.c
nanosleep.c Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
netlink_assert_response.c
netlinkaccess.h
nice.c
not-cancel.h
not-errno.h tunables: Use direct syscall for access (BZ#21744) 2017-07-24 11:21:07 -03:00
nptl-signals.h
nscd_setup_thread.c
ntp_gettime.c
ntp_gettimex.c
open.c
open64.c
open_by_handle_at.c
openat.c Consolidate Linux openat implementation 2017-06-20 18:20:06 -03:00
openat64.c Consolidate Linux openat implementation 2017-06-20 18:20:06 -03:00
opendir.c
opensock.c
pathconf.c
pathconf.h
paths.h
pause.c
personality.c
poll.c
posix_fadvise.c
posix_fadvise64.c
posix_fallocate.c
posix_fallocate64.c
posix_madvise.c
ppoll.c
pread.c
pread64.c
preadv.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
preadv2.c posix: Set p{read,write}v2 to return ENOTSUP (BZ#21780) 2017-08-08 09:59:46 -03:00
preadv64.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
preadv64v2.c posix: Set p{read,write}v2 to return ENOTSUP (BZ#21780) 2017-08-08 09:59:46 -03:00
prlimit.c
prof-freq.c
profil.c
pselect.c
pt-raise.c
pthread-pids.h
pthread_getaffinity.c
pthread_getcpuclockid.c
pthread_getname.c
pthread_kill.c
pthread_setaffinity.c
pthread_setname.c
pthread_sigmask.c
pthread_sigqueue.c
ptrace.c
ptsname.c Remove check for NULL buffer passed to `ptsname_r' 2017-06-07 17:37:59 +02:00
pwrite.c
pwrite64.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev2.c posix: Set p{read,write}v2 to return ENOTSUP (BZ#21780) 2017-08-08 09:59:46 -03:00
pwritev64.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev64v2.c posix: Set p{read,write}v2 to return ENOTSUP (BZ#21780) 2017-08-08 09:59:46 -03:00
raise.c
read.c
readahead.c
readdir64.c
readdir64_r.c
readonly-area.c
readv.c
reboot.c
recv.c
recvfrom.c
recvmmsg.c
recvmsg.c
remove.c
rename.c
renameat.c
sa_len.c
safe-fatal.h
sched_getaffinity.c
sched_getcpu.c
sched_setaffinity.c
segfault.c
select.c
semctl.c
semget.c
semop.c
semtimedop.c
send.c
sendmmsg.c
sendmsg.c
sendto.c
setegid.c
seteuid.c
setgid.c
setgroups.c
sethostid.c
setipv4sourcefilter.c
setregid.c
setresgid.c
setresuid.c
setreuid.c
setrlimit.c
setrlimit64.c
setsockopt.c
setsourcefilter.c
setuid.c
shlib-versions
shm-directory.c
shmat.c
shmctl.c
shmdt.c
shmget.c
shutdown.c
sigaction.c
siglist.h
signal.c
signalfd.c
sigpending.c
sigprocmask.c
sigqueue.c
sigreturn.c
sigset-cvt-mask.h
sigsetops.h
sigstack.c
sigsuspend.c
sigtimedwait.c
sigwait.c
sigwaitinfo.c
sizes.h
socket.c
socketcall.h
socketpair.c
spawni.c
speed.c
splice.c
statfs64.c
statvfs.c
statvfs64.c
sync_file_range.c
syscalls.list
sysconf.c
sysctl.c
sysctl.mk
sysdep-vdso.h
sysdep.h
syslog.c
system.c
tcdrain.c
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsendbrk.c
tcsetattr.c Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
tcsetpgrp.c
tee.c
termio.h
test-errno-linux.c
time.c
timer_create.c
timer_delete.c
timer_getoverr.c
timer_gettime.c
timer_routines.c
timer_settime.c
times.c
timespec_get.c
truncate.c
truncate64.c
tst-affinity-pid.c
tst-affinity.c
tst-align-clone.c
tst-clone.c
tst-clone2.c Use test-driver in sysdeps/unix/sysv/linux/tst-clone2.c 2017-06-07 14:05:42 +02:00
tst-clone3.c Call exit directly in clone (BZ #21512) 2017-06-26 17:52:20 -03:00
tst-fallocate-common.c
tst-fallocate.c
tst-fallocate64.c
tst-fanotify.c
tst-getpid1.c
tst-personality.c
tst-quota.c
tst-setgetname.c
tst-signal-numbers.sh Factor out shared definitions from bits/signum.h. 2017-06-20 20:32:50 -04:00
tst-skeleton-affinity.c
tst-skeleton-thread-affinity.c
tst-sync_file_range.c
tst-thread-affinity-pthread.c
tst-thread-affinity-pthread2.c
tst-thread-affinity-sched.c
ttyname.c
ttyname.h
ttyname_r.c
ualarm.c
umount.S
umount2.S
unlockpt.c
updwtmp.c
ustat.c
utimensat.c
utimes.c
utmp_file.c
vfork.c
vmsplice.c
wait.c
wait3.c
waitid.c
waitpid.c
write.c
writev.c
xmknod.c
xmknodat.c
xstat.c
xstat64.c
xstatconv.c
xstatconv.h