about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-08-08 17:14:49 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-08-08 17:14:49 +0000
commitf17a42333f2eb0bd7ef5194167dd52f9770a6680 (patch)
tree412b74849f8d26ddf201a572a4d1f7f644fe2198 /sysdeps
parent0df595b23a829c9169ec418a19eef9006b4ae801 (diff)
downloadglibc-f17a42333f2eb0bd7ef5194167dd52f9770a6680.tar.gz
glibc-f17a42333f2eb0bd7ef5194167dd52f9770a6680.tar.xz
glibc-f17a42333f2eb0bd7ef5194167dd52f9770a6680.zip
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.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c6
-rw-r--r--sysdeps/mach/hurd/mmap.c20
-rw-r--r--sysdeps/mach/hurd/mmap64.c4
-rw-r--r--sysdeps/mach/mprotect.c2
-rw-r--r--sysdeps/mach/msync.c2
-rw-r--r--sysdeps/mach/munmap.c2
-rw-r--r--sysdeps/mips/bits/setjmp.h8
-rw-r--r--sysdeps/posix/getcwd.c6
-rw-r--r--sysdeps/powerpc/powerpc32/memset.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power4/memcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power4/memset.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power6/memcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power6/memset.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power7/memcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power7/mempcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power7/memset.S2
-rw-r--r--sysdeps/powerpc/powerpc64/memcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc64/memset.S2
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memset.S2
-rw-r--r--sysdeps/powerpc/powerpc64/power6/memcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc64/power6/memset.S2
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc64/power7/mempcpy.S2
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memset.S2
-rw-r--r--sysdeps/powerpc/powerpc64/power8/memset.S2
-rw-r--r--sysdeps/tile/memcmp.c5
-rw-r--r--sysdeps/unix/sysv/linux/alpha/oldglob.c2
-rw-r--r--sysdeps/unix/sysv/linux/mmap.c2
29 files changed, 46 insertions, 49 deletions
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 4f274b4d65..3794aed521 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -453,8 +453,8 @@ __libc_lseek64 (int fd, off64_t offset, int whence)
   return offset;
 }
 
-__ptr_t weak_function
-__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+void *weak_function
+__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
 {
   error_t err;
   vm_prot_t vmprot;
@@ -512,7 +512,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 
   if (err)
     return __hurd_fail (err), MAP_FAILED;
-  return (__ptr_t) mapaddr;
+  return (void *) mapaddr;
 }
 
 int weak_function
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index dbd718a688..72706c3332 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -26,12 +26,12 @@
    is nonzero, it is the desired mapping address.  If the MAP_FIXED bit is
    set in FLAGS, the mapping will be at ADDR exactly (which must be
    page-aligned); otherwise the system chooses a convenient nearby address.
-   The return value is the actual mapping address chosen or (__ptr_t) -1
+   The return value is the actual mapping address chosen or (void *) -1
    for errors (in which case `errno' is set).  A successful `mmap' call
    deallocates any previous mapping for the affected region.  */
 
-__ptr_t
-__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+void *
+__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
 {
   error_t err;
   vm_prot_t vmprot;
@@ -42,7 +42,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 
   /* ADDR and OFFSET must be page-aligned.  */
   if ((mapaddr & (__vm_page_size - 1)) || (offset & (__vm_page_size - 1)))
-    return (__ptr_t) (long int) __hurd_fail (EINVAL);
+    return (void *) (long int) __hurd_fail (EINVAL);
 
   if ((flags & (MAP_TYPE|MAP_INHERIT)) == MAP_ANON
       && prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */
@@ -64,7 +64,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 	    err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1);
 	}
 
-      return err ? (__ptr_t) (long int) __hurd_fail (err) : (__ptr_t) mapaddr;
+      return err ? (void *) (long int) __hurd_fail (err) : (void *) mapaddr;
     }
 
   vmprot = VM_PROT_NONE;
@@ -78,7 +78,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
   switch (flags & MAP_TYPE)
     {
     default:
-      return (__ptr_t) (long int) __hurd_fail (EINVAL);
+      return (void *) (long int) __hurd_fail (EINVAL);
 
     case MAP_ANON:
       memobj = MACH_PORT_NULL;
@@ -92,7 +92,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 	  {
 	    if (err == MIG_BAD_ID || err == EOPNOTSUPP || err == ENOSYS)
 	      err = ENODEV;	/* File descriptor doesn't support mmap.  */
-	    return (__ptr_t) (long int) __hurd_dfail (fd, err);
+	    return (void *) (long int) __hurd_dfail (fd, err);
 	  }
 	switch (prot & (PROT_READ|PROT_WRITE))
 	  {
@@ -129,7 +129,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 	    else
 	      {
 		__mach_port_deallocate (__mach_task_self (), wobj);
-		return (__ptr_t) (long int) __hurd_fail (EACCES);
+		return (void *) (long int) __hurd_fail (EACCES);
 	      }
 	    break;
 	  default:
@@ -180,9 +180,9 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
     __mach_port_deallocate (__mach_task_self (), memobj);
 
   if (err)
-    return (__ptr_t) (long int) __hurd_fail (err);
+    return (void *) (long int) __hurd_fail (err);
 
-  return (__ptr_t) mapaddr;
+  return (void *) mapaddr;
 }
 
 weak_alias (__mmap, mmap)
diff --git a/sysdeps/mach/hurd/mmap64.c b/sysdeps/mach/hurd/mmap64.c
index ced469db18..282b7525c8 100644
--- a/sysdeps/mach/hurd/mmap64.c
+++ b/sysdeps/mach/hurd/mmap64.c
@@ -28,8 +28,8 @@
    for errors (in which case `errno' is set).  A successful `mmap' call
    deallocates any previous mapping for the affected region.  */
 
-__ptr_t
-__mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd,
+void *
+__mmap64 (void *addr, size_t len, int prot, int flags, int fd,
 	  __off64_t offset)
 {
   vm_offset_t small_offset = (vm_offset_t) offset;
diff --git a/sysdeps/mach/mprotect.c b/sysdeps/mach/mprotect.c
index 477017da39..84a72850ac 100644
--- a/sysdeps/mach/mprotect.c
+++ b/sysdeps/mach/mprotect.c
@@ -25,7 +25,7 @@
    (and sets errno).  */
 
 int
-__mprotect (__ptr_t addr, size_t len, int prot)
+__mprotect (void *addr, size_t len, int prot)
 {
   kern_return_t err;
   vm_prot_t vmprot;
diff --git a/sysdeps/mach/msync.c b/sysdeps/mach/msync.c
index f84553269e..b908fed141 100644
--- a/sysdeps/mach/msync.c
+++ b/sysdeps/mach/msync.c
@@ -33,7 +33,7 @@
    unpredictable before this is done.  */
 
 int
-msync (__ptr_t addr, size_t len, int flags)
+msync (void *addr, size_t len, int flags)
 {
   vm_sync_t sync_flags = 0;
   kern_return_t err;
diff --git a/sysdeps/mach/munmap.c b/sysdeps/mach/munmap.c
index b5fdaeaf1b..4a98613baf 100644
--- a/sysdeps/mach/munmap.c
+++ b/sysdeps/mach/munmap.c
@@ -24,7 +24,7 @@
    bytes.  Returns 0 if successful, -1 for errors (and sets errno).  */
 
 int
-__munmap (__ptr_t addr, size_t len)
+__munmap (void *addr, size_t len)
 {
   kern_return_t err;
 
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 91c64505f4..0b9643748c 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -29,19 +29,19 @@ typedef struct __jmp_buf_internal_tag
   {
 #if _MIPS_SIM == _ABIO32
     /* Program counter.  */
-    __ptr_t __pc;
+    void *__pc;
 
     /* Stack pointer.  */
-    __ptr_t __sp;
+    void *__sp;
 
     /* Callee-saved registers s0 through s7.  */
     int __regs[8];
 
     /* The frame pointer.  */
-    __ptr_t __fp;
+    void *__fp;
 
     /* The global pointer.  */
-    __ptr_t __gp;
+    void *__gp;
 #else
     /* Program counter.  */
     __extension__ long long __pc;
diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c
index eb1706aa5c..75bcfd23cf 100644
--- a/sysdeps/posix/getcwd.c
+++ b/sysdeps/posix/getcwd.c
@@ -318,7 +318,7 @@ __getcwd (char *buf, size_t size)
 		}
 	      else
 		{
-		  new = realloc ((__ptr_t) dotlist, dotsize * 2 + 1);
+		  new = realloc ((void *) dotlist, dotsize * 2 + 1);
 		  if (new == NULL)
 		    goto lose;
 		  dotp = &new[dotsize];
@@ -492,7 +492,7 @@ __getcwd (char *buf, size_t size)
 
 #ifndef __ASSUME_ATFCTS
   if (dotlist != dots)
-    free ((__ptr_t) dotlist);
+    free ((void *) dotlist);
 #endif
 
   size_t used = path + allocated - pathp;
@@ -516,7 +516,7 @@ __getcwd (char *buf, size_t size)
   int save_errno = errno;
 #ifndef __ASSUME_ATFCTS
   if (dotlist != dots)
-    free ((__ptr_t) dotlist);
+    free ((void *) dotlist);
 #endif
   if (dirstream != NULL)
     __closedir (dirstream);
diff --git a/sysdeps/powerpc/powerpc32/memset.S b/sysdeps/powerpc/powerpc32/memset.S
index 8913a02698..be20bb63a0 100644
--- a/sysdeps/powerpc/powerpc32/memset.S
+++ b/sysdeps/powerpc/powerpc32/memset.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.
 
    The memset is done in four sizes: byte (8 bits), word (32 bits),
diff --git a/sysdeps/powerpc/powerpc32/power4/memcpy.S b/sysdeps/powerpc/powerpc32/power4/memcpy.S
index 37bc712dd9..886b83c37f 100644
--- a/sysdeps/powerpc/powerpc32/power4/memcpy.S
+++ b/sysdeps/powerpc/powerpc32/power4/memcpy.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]);
    Returns 'dst'.
 
    Memcpy handles short copies (< 32-bytes) using a binary move blocks
diff --git a/sysdeps/powerpc/powerpc32/power4/memset.S b/sysdeps/powerpc/powerpc32/power4/memset.S
index 25319f7233..62cd33fc25 100644
--- a/sysdeps/powerpc/powerpc32/power4/memset.S
+++ b/sysdeps/powerpc/powerpc32/power4/memset.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.
 
    The memset is done in three sizes: byte (8 bits), word (32 bits),
diff --git a/sysdeps/powerpc/powerpc32/power6/memcpy.S b/sysdeps/powerpc/powerpc32/power6/memcpy.S
index 81b62cba21..0bf4d3feb4 100644
--- a/sysdeps/powerpc/powerpc32/power6/memcpy.S
+++ b/sysdeps/powerpc/powerpc32/power6/memcpy.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]);
    Returns 'dst'.
 
    Memcpy handles short copies (< 32-bytes) using a binary move blocks
diff --git a/sysdeps/powerpc/powerpc32/power6/memset.S b/sysdeps/powerpc/powerpc32/power6/memset.S
index f221c32d2f..8d17491ff2 100644
--- a/sysdeps/powerpc/powerpc32/power6/memset.S
+++ b/sysdeps/powerpc/powerpc32/power6/memset.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.
 
    The memset is done in three sizes: byte (8 bits), word (32 bits),
diff --git a/sysdeps/powerpc/powerpc32/power7/memcpy.S b/sysdeps/powerpc/powerpc32/power7/memcpy.S
index 8e33c1d733..7332b72717 100644
--- a/sysdeps/powerpc/powerpc32/power7/memcpy.S
+++ b/sysdeps/powerpc/powerpc32/power7/memcpy.S
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]);
    Returns 'dst'.  */
 
 	.machine  power7
diff --git a/sysdeps/powerpc/powerpc32/power7/mempcpy.S b/sysdeps/powerpc/powerpc32/power7/mempcpy.S
index 1682fbcd2a..10714c9057 100644
--- a/sysdeps/powerpc/powerpc32/power7/mempcpy.S
+++ b/sysdeps/powerpc/powerpc32/power7/mempcpy.S
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] __mempcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] __mempcpy (void *dst [r3], void *src [r4], size_t len [r5]);
 	Returns 'dst' + 'len'.  */
 
 	.machine  power7
diff --git a/sysdeps/powerpc/powerpc32/power7/memset.S b/sysdeps/powerpc/powerpc32/power7/memset.S
index b431f5086d..520b9ce06a 100644
--- a/sysdeps/powerpc/powerpc32/power7/memset.S
+++ b/sysdeps/powerpc/powerpc32/power7/memset.S
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.  */
 
 	.machine  power7
diff --git a/sysdeps/powerpc/powerpc64/memcpy.S b/sysdeps/powerpc/powerpc64/memcpy.S
index b6a11055d8..ba80908c6c 100644
--- a/sysdeps/powerpc/powerpc64/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/memcpy.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]);
    Returns 'dst'.
 
    Memcpy handles short copies (< 32-bytes) using a binary move blocks
diff --git a/sysdeps/powerpc/powerpc64/memset.S b/sysdeps/powerpc/powerpc64/memset.S
index 34db4d7041..ae4ffb1299 100644
--- a/sysdeps/powerpc/powerpc64/memset.S
+++ b/sysdeps/powerpc/powerpc64/memset.S
@@ -24,7 +24,7 @@
 	.section	".text"
 	.align 2
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.
 
    The memset is done in three sizes: byte (8 bits), word (32 bits),
diff --git a/sysdeps/powerpc/powerpc64/power4/memcpy.S b/sysdeps/powerpc/powerpc64/power4/memcpy.S
index 4bec39ce86..26577ba351 100644
--- a/sysdeps/powerpc/powerpc64/power4/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power4/memcpy.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]);
    Returns 'dst'.
 
    Memcpy handles short copies (< 32-bytes) using a binary move blocks
diff --git a/sysdeps/powerpc/powerpc64/power4/memset.S b/sysdeps/powerpc/powerpc64/power4/memset.S
index 0aafce785b..c44f3de629 100644
--- a/sysdeps/powerpc/powerpc64/power4/memset.S
+++ b/sysdeps/powerpc/powerpc64/power4/memset.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.
 
    The memset is done in three sizes: byte (8 bits), word (32 bits),
diff --git a/sysdeps/powerpc/powerpc64/power6/memcpy.S b/sysdeps/powerpc/powerpc64/power6/memcpy.S
index ac177ca4b7..342bac6c39 100644
--- a/sysdeps/powerpc/powerpc64/power6/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power6/memcpy.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]);
    Returns 'dst'.
 
    Memcpy handles short copies (< 32-bytes) using a binary move blocks
diff --git a/sysdeps/powerpc/powerpc64/power6/memset.S b/sysdeps/powerpc/powerpc64/power6/memset.S
index 8bbb8c4cb1..37c3f2fba1 100644
--- a/sysdeps/powerpc/powerpc64/power6/memset.S
+++ b/sysdeps/powerpc/powerpc64/power6/memset.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.
 
    The memset is done in three sizes: byte (8 bits), word (32 bits),
diff --git a/sysdeps/powerpc/powerpc64/power7/memcpy.S b/sysdeps/powerpc/powerpc64/power7/memcpy.S
index 641c7e2118..1ccbc2e153 100644
--- a/sysdeps/powerpc/powerpc64/power7/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/memcpy.S
@@ -20,7 +20,7 @@
 #include <sysdep.h>
 
 
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]);
    Returns 'dst'.  */
 
 #ifndef MEMCPY
diff --git a/sysdeps/powerpc/powerpc64/power7/mempcpy.S b/sysdeps/powerpc/powerpc64/power7/mempcpy.S
index 904fac5d1c..1883907ad3 100644
--- a/sysdeps/powerpc/powerpc64/power7/mempcpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/mempcpy.S
@@ -20,7 +20,7 @@
 #include <sysdep.h>
 
 
-/* __ptr_t [r3] __mempcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
+/* void * [r3] __mempcpy (void *dst [r3], void *src [r4], size_t len [r5]);
     Returns 'dst' + 'len'.  */
 
 #ifndef MEMPCPY
diff --git a/sysdeps/powerpc/powerpc64/power7/memset.S b/sysdeps/powerpc/powerpc64/power7/memset.S
index f2e2fa1b37..c90ae243f4 100644
--- a/sysdeps/powerpc/powerpc64/power7/memset.S
+++ b/sysdeps/powerpc/powerpc64/power7/memset.S
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.  */
 
 #ifndef MEMSET
diff --git a/sysdeps/powerpc/powerpc64/power8/memset.S b/sysdeps/powerpc/powerpc64/power8/memset.S
index 7ad3bb1b00..369b95894a 100644
--- a/sysdeps/powerpc/powerpc64/power8/memset.S
+++ b/sysdeps/powerpc/powerpc64/power8/memset.S
@@ -20,7 +20,7 @@
 
 #define MTVSRD_V1_R4  .long 0x7c240166     /* mtvsrd  v1,r4  */
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.  */
 
 #ifndef MEMSET
diff --git a/sysdeps/tile/memcmp.c b/sysdeps/tile/memcmp.c
index 83c62be059..c3ed88bca7 100644
--- a/sysdeps/tile/memcmp.c
+++ b/sysdeps/tile/memcmp.c
@@ -19,9 +19,6 @@
 # include "config.h"
 #endif
 
-#undef	__ptr_t
-#define __ptr_t	void *
-
 #if defined HAVE_STRING_H || defined _LIBC
 # include <string.h>
 #endif
@@ -294,7 +291,7 @@ memcmp_not_common_alignment (long int srcp1, long int srcp2, size_t len)
 }
 
 int
-MEMCMP (const __ptr_t s1, const __ptr_t s2, size_t len)
+MEMCMP (const void *s1, const void *s2, size_t len)
 {
   op_t a0;
   op_t b0;
diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c
index edd6d47ba9..988c92ba45 100644
--- a/sysdeps/unix/sysv/linux/alpha/oldglob.c
+++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c
@@ -36,7 +36,7 @@ typedef struct
        are used instead of the normal file access functions.  */
     void (*gl_closedir) (void *);
     struct dirent *(*gl_readdir) (void *);
-    __ptr_t (*gl_opendir) (const char *);
+    void *(*gl_opendir) (const char *);
     int (*gl_lstat) (const char *, struct stat *);
     int (*gl_stat) (const char *, struct stat *);
   } old_glob_t;
diff --git a/sysdeps/unix/sysv/linux/mmap.c b/sysdeps/unix/sysv/linux/mmap.c
index 98c2f88eb8..2024bee001 100644
--- a/sysdeps/unix/sysv/linux/mmap.c
+++ b/sysdeps/unix/sysv/linux/mmap.c
@@ -36,7 +36,7 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
   MMAP_CHECK_PAGE_UNIT ();
 
   if (offset & MMAP_OFF_LOW_MASK)
-    return (__ptr_t) INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return (void *) INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
 
 #ifdef __NR_mmap2
   return (void *) MMAP_CALL (mmap2, addr, len, prot, flags, fd,