about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2019-03-09 11:59:02 -0500
committerZack Weinberg <zackw@panix.com>2020-01-08 12:56:31 -0500
commit454939fdd0da872d25870daf4146889f0c3a9d45 (patch)
tree9a776dcc1426adee05473f9ee36b7abc3c0731bf
parent40782c2685760fc7fe9d82738e3091bfa5216c1c (diff)
downloadglibc-454939fdd0da872d25870daf4146889f0c3a9d45.tar.gz
glibc-454939fdd0da872d25870daf4146889f0c3a9d45.tar.xz
glibc-454939fdd0da872d25870daf4146889f0c3a9d45.zip
Add caddr_t, daddr_t, and loff_t to the set of obsolete typedefs.
caddr_t is a BSD-derived alias for ‘char *’, obsoleted by the
introduction of ‘void *’ in C89 (!)  daddr_t is a “disk address,”
but it’s always defined as ‘int’, making it too small for modern
disks and tapes.  loff_t is another name for off64_t, from early
drafts of LFS.  All three are already only exposed by sys/types.h
under __USE_MISC.

This patch adds them to the set of types that shall not be used in
installed headers (enforced by check-obsolete-constructs.py) and
expunges all remaining uses, internally as well as in installed
headers.  Since __DADDR_T_TYPE is always defined as __S32_TYPE, and
daddr_t is obsolete so there’s no need to worry about future
variation, the patch also removes __DADDR_T_TYPE from the set of
macros that bits/typesizes.h is required to define.  Instead
bits/types.h always defines __daddr_t as __S32_TYPE, and the
definition is moved to a more logical location within the file, next
to __caddr_t.

It’s always safe to change (__)loff_t to the matching (__)off64_t;
in a few internal files, I removed an unnecessary __ prefix.

daddr_t is only used for struct ustat, which is obsoleted by struct
statvfs and we already don’t declare it in public headers, and for an
ioctl parameter block in sys/mtio.h (which may or may not be obsolete,
I can’t tell).  In sys/mtio.h I replaced both uses with ‘int’ to match
the use of bare ‘long int’ for most of the other fields of that
structure.  In misc/ustat.c, the definition of struct ustat is not
actually necessary so I removed it entirely.  In
sysdeps/unix/sysv/linux/ustat.c a definition is necessary but only
because INLINE_SYSCALL_CALL doesn’t work (on at least x86) when an
argument is a pointer to an incomplete type, so I substituted a dummy
definition.

Most of the internal uses of caddr_t are in the sunrpc and nis
directories, and since most of that code is obsolete, I mechanically
replaced them with char * rather than consider whether void * might
make more sense.  Because “const caddr_t foo” is semantically
different from “const char *foo” (in the first case ‘foo’ itself is
const but the memory pointed to isn’t, in the second case the memory
pointed to is const but ‘foo’ isn’t) this change exposed some
const-correctness errors in sunrpc, which I fixed minimally.  Outside
of sunrpc and nis, I put a little more thought into whether uses of
caddr_t should be void * instead.

	* scripts/check-obsolete-constructs.py: Add caddr_t, daddr_t,
        and loff_t to the set of obsolete types forbidden in public
        headers.

	* posix/bits/types.h: Unconditionally define __daddr_t as
        __S32_TYPE.  Move definition of __daddr_t next to definition
        of __caddr_t.
	* bits/typesizes.h
	* sysdeps/mach/hurd/bits/typesizes.h
	* sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
	* sysdeps/unix/sysv/linux/generic/bits/typesizes.h
	* sysdeps/unix/sysv/linux/mips/bits/typesizes.h
	* sysdeps/unix/sysv/linux/s390/bits/typesizes.h
	* sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
	* sysdeps/unix/sysv/linux/x86/bits/typesizes.h:
        Don’t define __DADDR_T_TYPE.

        * sysdeps/gnu/sys/mtio.h (struct mtget): Change all uses of
	__daddr_t to int.
	* misc/ustat.c: Remove definition of struct ustat; only
        forward-declare it.
	* sysdeps/unix/sysv/linux/ustat.c: Replace fields of
        struct ustat with a size-preserving dummy field.

	* hurd/Makefile (migheaderpipe): Rewrite loff_t as __off64_t.
        * hurd/fd-read.c (_hurd_fd_read): Use off64_t instead of loff_t.
        * hurd/fd-write.c (hurd_fd_write): Use off64_t instead of loff_t.
        * hurd/hurd/fd.h (_hurd_fd_read, _hurd_fd_write): Declare
        using __off64_t instead of __loff_t.
        * support/xunistd.h (xcopy_file_range): Declare using off64_t
        instead of loff_t.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
	* sysdeps/unix/sysv/linux/lseek.c
	* sysdeps/unix/sysv/linux/lseek64.c
	* sysdeps/unix/sysv/linux/splice.c
        Throughout, use off64_t instead of loff_t.

	* sysdeps/unix/sysv/linux/sys/quota.h
        (dqoff): Use __off64_t instead of __loff_t.
        (quotactl): Declare using char * instead of caddr_t.
	* sysdeps/unix/sysv/linux/test-errno-linux.c
        (do_test): Cast to char * instead of caddr_t when calling quotactl.

	* elf/dl-map-segments.h (_dl_map_segments): Cast to void *
        instead of caddr_t when calling __mprotect and __mmap.
        * elf/dl-minimal.c (malloc): Declare page as char *, not caddr_t.
        * elf/dl-reloc.c (_dl_relocate_object): Declare textrels.start
        as char *, not caddr_t.  Cast to char *, not caddr_t, in
        pointer arithmetic.

	* intl/loadmsgcat.c: Remove two unnecessary casts to caddr_t
        when calling munmap. Change a third cast to target void *
        instead and add a comment explaining why this one is necessary.

	* locale/loadlocale.c (_nl_load_locale): Use NULL instead of
        `(caddr_t)0`, and remove an unnecessary cast to caddr_t when
        calling munmap.
        (_nl_unload_locale): Change casts when calling free and munmap
        to target char *, and add a comment explaining why they are
        necessary.

	* sysdeps/gnu/net/if.h
        (struct ifreq): Declare ifru_data as char *, not __caddr_t.
        (struct ifconf): Declare ifcu_buf as char *, not __caddr_t.

	* nis/nis_add.c
	* nis/nis_call.c
	* nis/nis_callback.c
	* nis/nis_checkpoint.c
	* nis/nis_findserv.c
	* nis/nis_intern.h
	* nis/nis_lookup.c
	* nis/nis_mkdir.c
	* nis/nis_modify.c
	* nis/nis_ping.c
	* nis/nis_remove.c
	* nis/nis_rmdir.c
	* nis/nis_server.c
	* nis/nis_table.c
	* nis/nis_util.c
	* nis/nss_nisplus/nisplus-grp.c
	* nis/nss_nisplus/nisplus-pwd.c
	* nis/rpcsvc/nis_callback.h
	* nis/rpcsvc/yp.h
	* nis/ypclnt.c
	* sunrpc/auth_des.c
	* sunrpc/auth_unix.c
	* sunrpc/authdes_prot.c
	* sunrpc/authuxprot.c
	* sunrpc/clnt_raw.c
	* sunrpc/clnt_tcp.c
	* sunrpc/clnt_udp.c
	* sunrpc/clnt_unix.c
	* sunrpc/key_call.c
	* sunrpc/pm_getmaps.c
	* sunrpc/pm_getport.c
	* sunrpc/pmap_clnt.c
	* sunrpc/pmap_prot2.c
	* sunrpc/pmap_rmt.c
	* sunrpc/proto.h
	* sunrpc/rpc/auth.h
	* sunrpc/rpc/clnt.h
	* sunrpc/rpc/pmap_clnt.h
	* sunrpc/rpc/pmap_rmt.h
	* sunrpc/rpc/rpc_msg.h
	* sunrpc/rpc/svc.h
	* sunrpc/rpc/xdr.h
	* sunrpc/rpc_clntout.c
	* sunrpc/rpc_cmsg.c
	* sunrpc/rpc_hout.c
	* sunrpc/rpc_prot.c
	* sunrpc/rpc_sample.c
	* sunrpc/rpc_svcout.c
	* sunrpc/svc.c
	* sunrpc/svc_authux.c
	* sunrpc/svc_raw.c
	* sunrpc/svc_tcp.c
	* sunrpc/svc_udp.c
	* sunrpc/svc_unix.c
	* sunrpc/xdr.c
	* sunrpc/xdr_array.c
	* sunrpc/xdr_mem.c
	* sunrpc/xdr_rec.c
	* sunrpc/xdr_ref.c
	* sunrpc/xdr_sizeof.c
	* sunrpc/xdr_stdio.c:
        Mechanically replace all uses of caddr_t with char *.

        * sunrpc/xdr_mem.c (xdrmem_create): Cast away const when
        setting xdrs->x_private and xdrs->x_base.
        * sunrpc/xdr_stdio.c (xdrstdio_getbytes): Correct argument
        types in definition to match prototype.
-rw-r--r--bits/typesizes.h1
-rw-r--r--elf/dl-map-segments.h15
-rw-r--r--elf/dl-minimal.c2
-rw-r--r--elf/dl-reloc.c4
-rw-r--r--hurd/Makefile2
-rw-r--r--hurd/fd-read.c2
-rw-r--r--hurd/fd-write.c2
-rw-r--r--hurd/hurd/fd.h6
-rw-r--r--intl/loadmsgcat.c7
-rw-r--r--locale/loadlocale.c11
-rw-r--r--misc/ustat.c8
-rw-r--r--nis/nis_add.c4
-rw-r--r--nis/nis_call.c10
-rw-r--r--nis/nis_callback.c12
-rw-r--r--nis/nis_checkpoint.c4
-rw-r--r--nis/nis_findserv.c8
-rw-r--r--nis/nis_intern.h12
-rw-r--r--nis/nis_lookup.c4
-rw-r--r--nis/nis_mkdir.c8
-rw-r--r--nis/nis_modify.c4
-rw-r--r--nis/nis_ping.c4
-rw-r--r--nis/nis_remove.c4
-rw-r--r--nis/nis_rmdir.c4
-rw-r--r--nis/nis_server.c8
-rw-r--r--nis/nis_table.c28
-rw-r--r--nis/nis_util.c4
-rw-r--r--nis/nss_nisplus/nisplus-grp.c8
-rw-r--r--nis/nss_nisplus/nisplus-pwd.c8
-rw-r--r--nis/rpcsvc/nis_callback.h2
-rw-r--r--nis/rpcsvc/yp.h6
-rw-r--r--nis/ypclnt.c42
-rw-r--r--posix/bits/types.h4
-rwxr-xr-xscripts/check-obsolete-constructs.py7
-rw-r--r--sunrpc/auth_des.c2
-rw-r--r--sunrpc/auth_unix.c4
-rw-r--r--sunrpc/authdes_prot.c10
-rw-r--r--sunrpc/authuxprot.c2
-rw-r--r--sunrpc/clnt_raw.c12
-rw-r--r--sunrpc/clnt_tcp.c28
-rw-r--r--sunrpc/clnt_udp.c22
-rw-r--r--sunrpc/clnt_unix.c26
-rw-r--r--sunrpc/key_call.c2
-rw-r--r--sunrpc/pm_getmaps.c2
-rw-r--r--sunrpc/pm_getport.c4
-rw-r--r--sunrpc/pmap_clnt.c4
-rw-r--r--sunrpc/pmap_prot2.c2
-rw-r--r--sunrpc/pmap_rmt.c16
-rw-r--r--sunrpc/proto.h2
-rw-r--r--sunrpc/rpc/auth.h4
-rw-r--r--sunrpc/rpc/clnt.h16
-rw-r--r--sunrpc/rpc/pmap_clnt.h12
-rw-r--r--sunrpc/rpc/pmap_rmt.h4
-rw-r--r--sunrpc/rpc/rpc_msg.h2
-rw-r--r--sunrpc/rpc/svc.h14
-rw-r--r--sunrpc/rpc/xdr.h22
-rw-r--r--sunrpc/rpc_clntout.c8
-rw-r--r--sunrpc/rpc_cmsg.c12
-rw-r--r--sunrpc/rpc_hout.c2
-rw-r--r--sunrpc/rpc_prot.c4
-rw-r--r--sunrpc/rpc_sample.c4
-rw-r--r--sunrpc/rpc_svcout.c6
-rw-r--r--sunrpc/svc.c2
-rw-r--r--sunrpc/svc_authux.c2
-rw-r--r--sunrpc/svc_raw.c8
-rw-r--r--sunrpc/svc_tcp.c24
-rw-r--r--sunrpc/svc_udp.c14
-rw-r--r--sunrpc/svc_unix.c28
-rw-r--r--sunrpc/xdr.c4
-rw-r--r--sunrpc/xdr_array.c4
-rw-r--r--sunrpc/xdr_mem.c12
-rw-r--r--sunrpc/xdr_rec.c46
-rw-r--r--sunrpc/xdr_ref.c6
-rw-r--r--sunrpc/xdr_sizeof.c8
-rw-r--r--sunrpc/xdr_stdio.c14
-rw-r--r--support/xunistd.h4
-rw-r--r--sysdeps/gnu/net/if.h4
-rw-r--r--sysdeps/gnu/sys/mtio.h4
-rw-r--r--sysdeps/mach/hurd/bits/typesizes.h1
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/typesizes.h1
-rw-r--r--sysdeps/unix/sysv/linux/generic/bits/typesizes.h1
-rw-r--r--sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h2
-rw-r--r--sysdeps/unix/sysv/linux/lseek.c4
-rw-r--r--sysdeps/unix/sysv/linux/lseek64.c2
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/typesizes.h1
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/typesizes.h1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/typesizes.h1
-rw-r--r--sysdeps/unix/sysv/linux/splice.c2
-rw-r--r--sysdeps/unix/sysv/linux/sys/quota.h4
-rw-r--r--sysdeps/unix/sysv/linux/test-errno-linux.c2
-rw-r--r--sysdeps/unix/sysv/linux/ustat.c9
-rw-r--r--sysdeps/unix/sysv/linux/x86/bits/typesizes.h1
91 files changed, 357 insertions, 362 deletions
diff --git a/bits/typesizes.h b/bits/typesizes.h
index f5c8161fc9..c2ecd1764d 100644
--- a/bits/typesizes.h
+++ b/bits/typesizes.h
@@ -50,7 +50,6 @@
 #define __TIME_T_TYPE		__SLONGWORD_TYPE
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
 #define __KEY_T_TYPE		__S32_TYPE
 #define __CLOCKID_T_TYPE	__S32_TYPE
 #define __TIMER_T_TYPE		void *
diff --git a/elf/dl-map-segments.h b/elf/dl-map-segments.h
index ac9f09ab4c..e874e3cbe4 100644
--- a/elf/dl-map-segments.h
+++ b/elf/dl-map-segments.h
@@ -71,7 +71,7 @@ _dl_map_segments (struct link_map *l, int fd,
              handle the portion of the segment past the end of the file
              mapping.  */
           if (__glibc_unlikely
-              (__mprotect ((caddr_t) (l->l_addr + c->mapend),
+              (__mprotect ((void *) (l->l_addr + c->mapend),
                            loadcmds[nloadcmds - 1].mapstart - c->mapend,
                            PROT_NONE) < 0))
             return DL_MAP_SEGMENTS_ERROR_MPROTECT;
@@ -123,22 +123,21 @@ _dl_map_segments (struct link_map *l, int fd,
               if (__glibc_unlikely ((c->prot & PROT_WRITE) == 0))
                 {
                   /* Dag nab it.  */
-                  if (__mprotect ((caddr_t) (zero
-                                             & ~(GLRO(dl_pagesize) - 1)),
-                                  GLRO(dl_pagesize), c->prot|PROT_WRITE) < 0)
-                    return DL_MAP_SEGMENTS_ERROR_MPROTECT;
+		  if (__mprotect ((void *) (zero & ~(GLRO(dl_pagesize) - 1)),
+				  GLRO(dl_pagesize), c->prot|PROT_WRITE) < 0)
+		    return DL_MAP_SEGMENTS_ERROR_MPROTECT;
                 }
               memset ((void *) zero, '\0', zeropage - zero);
               if (__glibc_unlikely ((c->prot & PROT_WRITE) == 0))
-                __mprotect ((caddr_t) (zero & ~(GLRO(dl_pagesize) - 1)),
+                __mprotect ((void *) (zero & ~(GLRO(dl_pagesize) - 1)),
                             GLRO(dl_pagesize), c->prot);
             }
 
           if (zeroend > zeropage)
             {
               /* Map the remaining zero pages in from the zero fill FD.  */
-              caddr_t mapat;
-              mapat = __mmap ((caddr_t) zeropage, zeroend - zeropage,
+              char *mapat;
+              mapat = __mmap ((void *) zeropage, zeroend - zeropage,
                               c->prot, MAP_ANON|MAP_PRIVATE|MAP_FIXED,
                               -1, 0);
               if (__glibc_unlikely (mapat == MAP_FAILED))
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c
index 42192f8a7b..29d77e75aa 100644
--- a/elf/dl-minimal.c
+++ b/elf/dl-minimal.c
@@ -65,7 +65,7 @@ malloc (size_t n)
     {
       /* Insufficient space left; allocate another page plus one extra
 	 page to reduce number of mmap calls.  */
-      caddr_t page;
+      char *page;
       size_t nup = (n + GLRO(dl_pagesize) - 1) & ~(GLRO(dl_pagesize) - 1);
       if (__glibc_unlikely (nup == 0 && n != 0))
 	return NULL;
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index ffcc84d396..f1f7845ba7 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -148,7 +148,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
 {
   struct textrels
   {
-    caddr_t start;
+    char *start;
     size_t len;
     int prot;
     struct textrels *next;
@@ -198,7 +198,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
 	    newp->len = ALIGN_UP (ph->p_vaddr + ph->p_memsz, GLRO(dl_pagesize))
 			- ALIGN_DOWN (ph->p_vaddr, GLRO(dl_pagesize));
 	    newp->start = PTR_ALIGN_DOWN (ph->p_vaddr, GLRO(dl_pagesize))
-			  + (caddr_t) l->l_addr;
+			  + (char *) l->l_addr;
 
 	    newp->prot = 0;
 	    if (ph->p_flags & PF_R)
diff --git a/hurd/Makefile b/hurd/Makefile
index 1ace90d10b..12d7a32592 100644
--- a/hurd/Makefile
+++ b/hurd/Makefile
@@ -90,7 +90,7 @@ CFLAGS-hurdstartup.o = $(no-stack-protector)
 CFLAGS-RPC_exec_startup_get_info.o = $(no-stack-protector)
 
 # Make generated headers compatible with all support standards
-migheaderpipe := | sed -e 's/\<ino64_t\>/__ino64_t/' -e 's/\<loff_t\>/__loff_t/'
+migheaderpipe := | sed -e 's/\<ino64_t\>/__ino64_t/' -e 's/\<loff_t\>/__off64_t/'
 include ../mach/Machrules
 include ../Rules
 
diff --git a/hurd/fd-read.c b/hurd/fd-read.c
index 11c435f491..92141a145a 100644
--- a/hurd/fd-read.c
+++ b/hurd/fd-read.c
@@ -22,7 +22,7 @@
 #include <string.h>
 
 error_t
-_hurd_fd_read (struct hurd_fd *fd, void *buf, size_t *nbytes, loff_t offset)
+_hurd_fd_read (struct hurd_fd *fd, void *buf, size_t *nbytes, off64_t offset)
 {
   error_t err;
   char *data;
diff --git a/hurd/fd-write.c b/hurd/fd-write.c
index f63bae5908..f8c6bba7ad 100644
--- a/hurd/fd-write.c
+++ b/hurd/fd-write.c
@@ -23,7 +23,7 @@
 
 error_t
 _hurd_fd_write (struct hurd_fd *fd,
-		const void *buf, size_t *nbytes, loff_t offset)
+		const void *buf, size_t *nbytes, off64_t offset)
 {
   error_t err;
   mach_msg_type_number_t wrote;
diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
index e18c3cef42..9a5b22bd21 100644
--- a/hurd/hurd/fd.h
+++ b/hurd/hurd/fd.h
@@ -255,9 +255,11 @@ extern error_t _hurd_fd_close (struct hurd_fd *fd);
    If successful, stores the amount actually read or written in *NBYTES.  */
 
 extern error_t _hurd_fd_read (struct hurd_fd *fd,
-			      void *buf, size_t *nbytes, __loff_t offset);
+			      void *buf, size_t *nbytes,
+                              __off64_t offset);
 extern error_t _hurd_fd_write (struct hurd_fd *fd,
-			       const void *buf, size_t *nbytes, __loff_t offset);
+			       const void *buf, size_t *nbytes,
+                               __off64_t offset);
 
 
 /* Call *RPC on PORT and/or CTTY; if a call on CTTY returns EBACKGROUND,
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index 91c1ef156a..dd96c9caaa 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -871,7 +871,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file,
       /* The magic number is wrong: not a message catalog file.  */
 #ifdef HAVE_MMAP
       if (use_mmap)
-	munmap ((caddr_t) data, size);
+	munmap (data, size);
       else
 #endif
 	free (data);
@@ -1237,7 +1237,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file,
       free (domain->malloced);
 #ifdef HAVE_MMAP
       if (use_mmap)
-	munmap ((caddr_t) data, size);
+	munmap (data, size);
       else
 #endif
 	free (data);
@@ -1307,9 +1307,10 @@ _nl_unload_domain (struct loaded_domain *domain)
 
   free (domain->malloced);
 
+  /* Casts below are necessary because domain->data is const.  */
 # ifdef _POSIX_MAPPED_FILES
   if (domain->use_mmap)
-    munmap ((caddr_t) domain->data, domain->mmap_size);
+    munmap ((void *) domain->data, domain->mmap_size);
   else
 # endif	/* _POSIX_MAPPED_FILES */
     free ((void *) domain->data);
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 2fcb348d1d..c7c2706f65 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -221,8 +221,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
   /* Some systems do not have this flag; it is superfluous.  */
 #  define MAP_FILE 0
 # endif
-  filedata = __mmap ((caddr_t) 0, st.st_size,
-		     PROT_READ, MAP_FILE|MAP_COPY, fd, 0);
+  filedata = __mmap (NULL, st.st_size, PROT_READ, MAP_FILE|MAP_COPY, fd, 0);
   if (__glibc_unlikely (filedata == MAP_FAILED))
     {
       filedata = NULL;
@@ -270,7 +269,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
     {
 #ifdef _POSIX_MAPPED_FILES
       if (alloc == ld_mapped)
-	__munmap ((caddr_t) filedata, st.st_size);
+	__munmap (filedata, st.st_size);
 #endif
       return;
     }
@@ -288,14 +287,16 @@ _nl_unload_locale (struct __locale_data *locale)
   if (locale->private.cleanup)
     (*locale->private.cleanup) (locale);
 
+  /* The casts below are necessary because locale->name and
+     locale->filedata are const.  */
   switch (__builtin_expect (locale->alloc, ld_mapped))
     {
     case ld_malloced:
-      free ((void *) locale->filedata);
+      free ((char *) locale->filedata);
       break;
     case ld_mapped:
 #ifdef _POSIX_MAPPED_FILES
-      __munmap ((caddr_t) locale->filedata, locale->filesize);
+      __munmap ((char *) locale->filedata, locale->filesize);
       break;
 #endif
     case ld_archive:		/* Nothing to do.  */
diff --git a/misc/ustat.c b/misc/ustat.c
index a1b057f640..52b22c7e83 100644
--- a/misc/ustat.c
+++ b/misc/ustat.c
@@ -24,13 +24,7 @@
 # include <unistd.h>
 # include <errno.h>
 
-struct ustat
- {
-   __daddr_t f_tfree;         /* Number of free blocks.  */
-   __ino_t f_tinode;          /* Number of free inodes.  */
-   char f_fname[6];
-   char f_fpack[6];
-};
+struct ustat;
 
 int
 __old_ustat (dev_t dev, struct ustat *ust)
diff --git a/nis/nis_add.c b/nis/nis_add.c
index a034dab84b..ca3436e4c1 100644
--- a/nis/nis_add.c
+++ b/nis/nis_add.c
@@ -63,8 +63,8 @@ nis_add (const_nis_name name, const nis_object *obj2)
 
   status = __do_niscall (req.ns_object.ns_object_val[0].zo_domain,
 			 NIS_ADD, (xdrproc_t) _xdr_ns_request,
-			 (caddr_t) &req, (xdrproc_t) _xdr_nis_result,
-			 (caddr_t) res, MASTER_ONLY, NULL);
+			 (char *) &req, (xdrproc_t) _xdr_nis_result,
+			 (char *) res, MASTER_ONLY, NULL);
   if (status != NIS_SUCCESS)
     NIS_RES_STATUS (res) = status;
 
diff --git a/nis/nis_call.c b/nis/nis_call.c
index 92c70e97aa..6ed4a9cb69 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -217,7 +217,7 @@ __nisbind_connect (dir_binding *dbp)
   if (dbp->clnt == NULL)
     return NIS_RPCERROR;
 
-  clnt_control (dbp->clnt, CLSET_TIMEOUT, (caddr_t) &RPCTIMEOUT);
+  clnt_control (dbp->clnt, CLSET_TIMEOUT, (char *) &RPCTIMEOUT);
   /* If the program exists, close the socket */
   if (fcntl (dbp->socket, F_SETFD, 1) == -1)
     perror ("fcntl: F_SETFD");
@@ -296,8 +296,8 @@ libnsl_hidden_nolink_def (__nisbind_create, GLIBC_2_1)
 /* __nisbind_connect (dbp) must be run before calling this function !
    So we could use the same binding twice */
 nis_error
-__do_niscall3 (dir_binding *dbp, u_long prog, xdrproc_t xargs, caddr_t req,
-	       xdrproc_t xres, caddr_t resp, unsigned int flags, nis_cb *cb)
+__do_niscall3 (dir_binding *dbp, u_long prog, xdrproc_t xargs, char *req,
+	       xdrproc_t xres, char *resp, unsigned int flags, nis_cb *cb)
 {
   enum clnt_stat result;
   nis_error retcode;
@@ -381,7 +381,7 @@ libnsl_hidden_nolink_def (__do_niscall3, GLIBC_PRIVATE)
 
 nis_error
 __do_niscall2 (const nis_server *server, u_int server_len, u_long prog,
-	       xdrproc_t xargs, caddr_t req, xdrproc_t xres, caddr_t resp,
+	       xdrproc_t xargs, char *req, xdrproc_t xres, char *resp,
 	       unsigned int flags, nis_cb *cb)
 {
   dir_binding dbp;
@@ -825,7 +825,7 @@ libnsl_hidden_nolink_def (__prepare_niscall, GLIBC_PRIVATE)
 
 nis_error
 __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs,
-	      caddr_t req, xdrproc_t xres, caddr_t resp, unsigned int flags,
+	      char *req, xdrproc_t xres, char *resp, unsigned int flags,
 	      nis_cb *cb)
 {
   dir_binding bptr;
diff --git a/nis/nis_callback.c b/nis/nis_callback.c
index b9611b98cd..027c683c5e 100644
--- a/nis/nis_callback.c
+++ b/nis/nis_callback.c
@@ -121,7 +121,7 @@ cb_prog_1 (struct svc_req *rqstp, SVCXPRT *transp)
 	xdr_argument = (xdrproc_t) xdr_cback_data;
 	xdr_result = (xdrproc_t) xdr_bool;
 	memset (&argument, 0, sizeof (argument));
-	if (!svc_getargs (transp, xdr_argument, (caddr_t) & argument))
+	if (!svc_getargs (transp, xdr_argument, (char *) & argument))
 	  {
 	    svcerr_decode (transp);
 	    return;
@@ -153,7 +153,7 @@ cb_prog_1 (struct svc_req *rqstp, SVCXPRT *transp)
       xdr_argument = (xdrproc_t) xdr_void;
       xdr_result = (xdrproc_t) xdr_void;
       memset (&argument, 0, sizeof (argument));
-      if (!svc_getargs (transp, xdr_argument, (caddr_t) & argument))
+      if (!svc_getargs (transp, xdr_argument, (char *) & argument))
 	{
 	  svcerr_decode (transp);
 	  return;
@@ -167,7 +167,7 @@ cb_prog_1 (struct svc_req *rqstp, SVCXPRT *transp)
       xdr_argument = (xdrproc_t) _xdr_nis_error;
       xdr_result = (xdrproc_t) xdr_void;
       memset (&argument, 0, sizeof (argument));
-      if (!svc_getargs (transp, xdr_argument, (caddr_t) & argument))
+      if (!svc_getargs (transp, xdr_argument, (char *) & argument))
 	{
 	  svcerr_decode (transp);
 	  return;
@@ -183,7 +183,7 @@ cb_prog_1 (struct svc_req *rqstp, SVCXPRT *transp)
     }
   if (result != NULL && !svc_sendreply (transp, xdr_result, result))
     svcerr_systemerr (transp);
-  if (!svc_freeargs (transp, xdr_argument, (caddr_t) & argument))
+  if (!svc_freeargs (transp, xdr_argument, (char *) & argument))
     {
       fputs (_ ("unable to free arguments"), stderr);
       exit (1);
@@ -224,8 +224,8 @@ internal_nis_do_callback (struct dir_binding *bptr, netobj *cookie,
 	  /* See if callback 'thread' in the server is still alive. */
 	  cb_is_running = FALSE;
 	  if (clnt_call (bptr->clnt, NIS_CALLBACK, (xdrproc_t) xdr_netobj,
-			 (caddr_t) cookie, (xdrproc_t) xdr_bool,
-			 (caddr_t) &cb_is_running, TIMEOUT) != RPC_SUCCESS)
+			 (char *) cookie, (xdrproc_t) xdr_bool,
+			 (char *) &cb_is_running, TIMEOUT) != RPC_SUCCESS)
 	    cb_is_running = FALSE;
 
 	  if (cb_is_running == FALSE)
diff --git a/nis/nis_checkpoint.c b/nis/nis_checkpoint.c
index 0b61e460dc..b591a0c9ed 100644
--- a/nis/nis_checkpoint.c
+++ b/nis/nis_checkpoint.c
@@ -60,8 +60,8 @@ nis_checkpoint (const_nis_name dirname)
 	  memset (&cpres, '\0', sizeof (cp_result));
 	  if (__do_niscall2 (&NIS_RES_OBJECT(res2)->DI_data.do_servers.do_servers_val[i],
 			     1, NIS_CHECKPOINT, (xdrproc_t) _xdr_nis_name,
-			     (caddr_t) &dirname, (xdrproc_t) _xdr_cp_result,
-			     (caddr_t) &cpres, 0, NULL) != NIS_SUCCESS)
+			     (char *) &dirname, (xdrproc_t) _xdr_cp_result,
+			     (char *) &cpres, 0, NULL) != NIS_SUCCESS)
 	    NIS_RES_STATUS (res) = NIS_RPCERROR;
 	  else
 	    {
diff --git a/nis/nis_findserv.c b/nis/nis_findserv.c
index e0adc30e3b..bad7092247 100644
--- a/nis/nis_findserv.c
+++ b/nis/nis_findserv.c
@@ -163,15 +163,15 @@ __nis_findfastest_with_timeout (dir_binding *bind,
 	      sizeof (struct sockaddr_in));
       /* Transmit to NULLPROC, return immediately. */
       clnt_call (clnt, NULLPROC,
-		 (xdrproc_t) xdr_void, (caddr_t) 0,
-		 (xdrproc_t) xdr_void, (caddr_t) 0, TIMEOUT00);
+		 (xdrproc_t) xdr_void, (char *) 0,
+		 (xdrproc_t) xdr_void, (char *) 0, TIMEOUT00);
     }
 
   while (found == -1) {
     /* Receive reply from NULLPROC asynchronously. Note null inproc. */
     int rc = clnt_call (clnt, NULLPROC,
-			(xdrproc_t) NULL, (caddr_t) 0,
-			(xdrproc_t) xdr_void, (caddr_t) 0,
+			(xdrproc_t) NULL, (char *) 0,
+			(xdrproc_t) xdr_void, (char *) 0,
 			*timeout);
     if (RPC_SUCCESS == rc) {
       uint32_t val;
diff --git a/nis/nis_intern.h b/nis/nis_intern.h
index 349d99e13c..164b82570a 100644
--- a/nis/nis_intern.h
+++ b/nis/nis_intern.h
@@ -54,16 +54,16 @@ typedef struct nis_cb nis_cb;
 extern unsigned long int inetstr2int (const char *str);
 extern long int __nis_findfastest (dir_binding *bind);
 extern nis_error __do_niscall2 (const nis_server *serv, u_int serv_len,
-				u_long prog, xdrproc_t xargs, caddr_t req,
-				xdrproc_t xres, caddr_t resp,
+				u_long prog, xdrproc_t xargs, char *req,
+				xdrproc_t xres, char *resp,
 				unsigned int flags, nis_cb *cb);
 extern nis_error __do_niscall (const_nis_name name, u_long prog,
-			       xdrproc_t xargs, caddr_t req,
-			       xdrproc_t xres, caddr_t resp,
+			       xdrproc_t xargs, char *req,
+			       xdrproc_t xres, char *resp,
 			       unsigned int flags, nis_cb *cb);
 extern nis_error __do_niscall3 (dir_binding *dbp, u_long prog,
-				xdrproc_t xargs, caddr_t req,
-				xdrproc_t xres, caddr_t resp,
+				xdrproc_t xargs, char *req,
+				xdrproc_t xres, char *resp,
 				unsigned int flags, nis_cb *cb);
 libnsl_hidden_proto (__do_niscall3)
 
diff --git a/nis/nis_lookup.c b/nis/nis_lookup.c
index f489a23a4b..a1f2114b9a 100644
--- a/nis/nis_lookup.c
+++ b/nis/nis_lookup.c
@@ -78,8 +78,8 @@ nis_lookup (const_nis_name name, const unsigned int flags)
 	again:
 	  result = clnt_call (bptr.clnt, NIS_LOOKUP,
 			      (xdrproc_t) _xdr_ns_request,
-			      (caddr_t) &req, (xdrproc_t) _xdr_nis_result,
-			      (caddr_t) res, RPCTIMEOUT);
+			      (char *) &req, (xdrproc_t) _xdr_nis_result,
+			      (char *) res, RPCTIMEOUT);
 
 	  if (result != RPC_SUCCESS)
 	    status = NIS_RPCERROR;
diff --git a/nis/nis_mkdir.c b/nis/nis_mkdir.c
index 8aa3279420..e3319b66aa 100644
--- a/nis/nis_mkdir.c
+++ b/nis/nis_mkdir.c
@@ -29,13 +29,13 @@ nis_mkdir (const_nis_name dir, const nis_server *server)
 
   if (server == NULL)
     res2 = __do_niscall (dir, NIS_MKDIR, (xdrproc_t) _xdr_nis_name,
-			 (caddr_t) &dir, (xdrproc_t) _xdr_nis_error,
-			 (caddr_t) &res, 0, NULL);
+			 (char *) &dir, (xdrproc_t) _xdr_nis_error,
+			 (char *) &res, 0, NULL);
   else
     res2 = __do_niscall2 (server, 1, NIS_MKDIR,
 			  (xdrproc_t) _xdr_nis_name,
-			  (caddr_t) &dir, (xdrproc_t) _xdr_nis_error,
-			  (caddr_t) &res, 0, NULL);
+			  (char *) &dir, (xdrproc_t) _xdr_nis_error,
+			  (char *) &res, 0, NULL);
   if (res2 != NIS_SUCCESS)
     return res2;
 
diff --git a/nis/nis_modify.c b/nis/nis_modify.c
index 0fa26e1f42..5c0105ebd9 100644
--- a/nis/nis_modify.c
+++ b/nis/nis_modify.c
@@ -62,8 +62,8 @@ nis_modify (const_nis_name name, const nis_object *obj2)
   req.ns_object.ns_object_len = 1;
 
   status = __do_niscall (name, NIS_MODIFY, (xdrproc_t) _xdr_ns_request,
-			 (caddr_t) & req, (xdrproc_t) _xdr_nis_result,
-			 (caddr_t) res, MASTER_ONLY,
+			 (char *) & req, (xdrproc_t) _xdr_nis_result,
+			 (char *) res, MASTER_ONLY,
 			 NULL);
   if (status != NIS_SUCCESS)
     NIS_RES_STATUS (res) = status;
diff --git a/nis/nis_ping.c b/nis/nis_ping.c
index 2e7e1f4a3d..3109910a7a 100644
--- a/nis/nis_ping.c
+++ b/nis/nis_ping.c
@@ -64,8 +64,8 @@ nis_ping (const_nis_name dirname, unsigned int utime,
   for (i = 1; i < obj->DI_data.do_servers.do_servers_len; ++i)
     __do_niscall2 (&obj->DI_data.do_servers.do_servers_val[i], 1,
 		   NIS_PING, (xdrproc_t) _xdr_ping_args,
-		   (caddr_t) &args, (xdrproc_t) xdr_void,
-		   (caddr_t) NULL, 0, NULL);
+		   (char *) &args, (xdrproc_t) xdr_void,
+		   (char *) NULL, 0, NULL);
   nis_freeresult (res);
 }
 libnsl_hidden_nolink_def (nis_ping, GLIBC_2_1)
diff --git a/nis/nis_remove.c b/nis/nis_remove.c
index 42922421d6..5208046c41 100644
--- a/nis/nis_remove.c
+++ b/nis/nis_remove.c
@@ -47,8 +47,8 @@ nis_remove (const_nis_name name, const nis_object *obj)
     }
 
   if ((status = __do_niscall (name, NIS_REMOVE, (xdrproc_t) _xdr_ns_request,
-			      (caddr_t) &req, (xdrproc_t) _xdr_nis_result,
-			      (caddr_t) res, MASTER_ONLY,
+			      (char *) &req, (xdrproc_t) _xdr_nis_result,
+			      (char *) res, MASTER_ONLY,
 			      NULL)) != NIS_SUCCESS)
     NIS_RES_STATUS (res) = status;
 
diff --git a/nis/nis_rmdir.c b/nis/nis_rmdir.c
index 77d9a02d17..0dd44fe91d 100644
--- a/nis/nis_rmdir.c
+++ b/nis/nis_rmdir.c
@@ -32,8 +32,8 @@ nis_rmdir (const_nis_name dir, const nis_server *server)
 
   res2 = __do_niscall2 (server, 1, NIS_RMDIR,
 			(xdrproc_t) _xdr_nis_name,
-			(caddr_t) &dir, (xdrproc_t) _xdr_nis_error,
-			(caddr_t) &res, 0, NULL);
+			(char *) &dir, (xdrproc_t) _xdr_nis_error,
+			(char *) &res, 0, NULL);
   if (res2 != NIS_SUCCESS)
     return res2;
 
diff --git a/nis/nis_server.c b/nis/nis_server.c
index f41c1f5db2..f1ad68288c 100644
--- a/nis/nis_server.c
+++ b/nis/nis_server.c
@@ -40,8 +40,8 @@ nis_servstate (const nis_server *serv, const nis_tag *tags,
     return NIS_BADOBJECT;
 
   if (__do_niscall2 (serv, 1, NIS_SERVSTATE, (xdrproc_t) _xdr_nis_taglist,
-		     (caddr_t) &taglist, (xdrproc_t) _xdr_nis_taglist,
-		     (caddr_t) &tagres, 0, NULL) != NIS_SUCCESS)
+		     (char *) &taglist, (xdrproc_t) _xdr_nis_taglist,
+		     (char *) &tagres, 0, NULL) != NIS_SUCCESS)
     return NIS_RPCERROR;
 
   *result = tagres.tags.tags_val;
@@ -67,8 +67,8 @@ nis_stats (const nis_server *serv, const nis_tag *tags,
     return NIS_BADOBJECT;
 
   if (__do_niscall2 (serv, 1, NIS_STATUS, (xdrproc_t) _xdr_nis_taglist,
-		     (caddr_t) &taglist, (xdrproc_t) _xdr_nis_taglist,
-		     (caddr_t) &tagres, 0, NULL) != NIS_SUCCESS)
+		     (char *) &taglist, (xdrproc_t) _xdr_nis_taglist,
+		     (char *) &tagres, 0, NULL) != NIS_SUCCESS)
     return NIS_RPCERROR;
 
   *result = tagres.tags.tags_val;
diff --git a/nis/nis_table.c b/nis/nis_table.c
index 1d615a9a73..1b4076fa98 100644
--- a/nis/nis_table.c
+++ b/nis/nis_table.c
@@ -146,8 +146,8 @@ get_tablepath (char *name, dir_binding *bptr)
   req.ns_object.ns_object_val = NULL;
 
   result = clnt_call (bptr->clnt, NIS_LOOKUP, (xdrproc_t) _xdr_ns_request,
-		      (caddr_t) &req, (xdrproc_t) _xdr_nis_result,
-		      (caddr_t) &res, RPCTIMEOUT);
+		      (char *) &req, (xdrproc_t) _xdr_nis_result,
+		      (char *) &res, RPCTIMEOUT);
 
   const char *cptr;
   if (result == RPC_SUCCESS && NIS_RES_STATUS (&res) == NIS_SUCCESS
@@ -308,9 +308,9 @@ nis_list (const_nis_name name, unsigned int flags,
 
     again:
       clnt_status = clnt_call (bptr.clnt, NIS_IBLIST,
-			       (xdrproc_t) _xdr_ib_request, (caddr_t) ibreq,
+			       (xdrproc_t) _xdr_ib_request, (char *) ibreq,
 			       (xdrproc_t) _xdr_nis_result,
-			       (caddr_t) res, RPCTIMEOUT);
+			       (char *) res, RPCTIMEOUT);
 
       if (__glibc_unlikely (clnt_status != RPC_SUCCESS))
 	NIS_RES_STATUS (res) = NIS_RPCERROR;
@@ -604,9 +604,9 @@ nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags)
 
   nis_error status = __do_niscall (ibreq->ibr_name, NIS_IBADD,
 				   (xdrproc_t) _xdr_ib_request,
-				   (caddr_t) ibreq,
+				   (char *) ibreq,
 				   (xdrproc_t) _xdr_nis_result,
-				   (caddr_t) res, 0, NULL);
+				   (char *) res, 0, NULL);
   if (__glibc_unlikely (status != NIS_SUCCESS))
     NIS_RES_STATUS (res) = status;
 
@@ -663,8 +663,8 @@ nis_modify_entry (const_nis_name name, const nis_object *obj2,
 
   status = __do_niscall (ibreq->ibr_name, NIS_IBMODIFY,
 			 (xdrproc_t) _xdr_ib_request,
-			 (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result,
-			 (caddr_t) res, 0, NULL);
+			 (char *) ibreq, (xdrproc_t) _xdr_nis_result,
+			 (char *) res, 0, NULL);
   if (__glibc_unlikely (status != NIS_SUCCESS))
     NIS_RES_STATUS (res) = status;
 
@@ -713,8 +713,8 @@ nis_remove_entry (const_nis_name name, const nis_object *obj,
 
   if ((status = __do_niscall (ibreq->ibr_name, NIS_IBREMOVE,
 			      (xdrproc_t) _xdr_ib_request,
-			      (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result,
-			      (caddr_t) res, 0, NULL)) != NIS_SUCCESS)
+			      (char *) ibreq, (xdrproc_t) _xdr_nis_result,
+			      (char *) res, 0, NULL)) != NIS_SUCCESS)
     NIS_RES_STATUS (res) = status;
 
   nis_free_request (ibreq);
@@ -749,8 +749,8 @@ nis_first_entry (const_nis_name name)
 
   status = __do_niscall (ibreq->ibr_name, NIS_IBFIRST,
 			 (xdrproc_t) _xdr_ib_request,
-			 (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result,
-			 (caddr_t) res, 0, NULL);
+			 (char *) ibreq, (xdrproc_t) _xdr_nis_result,
+			 (char *) res, 0, NULL);
 
   if (__glibc_unlikely (status != NIS_SUCCESS))
     NIS_RES_STATUS (res) = status;
@@ -793,8 +793,8 @@ nis_next_entry (const_nis_name name, const netobj *cookie)
 
   status = __do_niscall (ibreq->ibr_name, NIS_IBNEXT,
 			 (xdrproc_t) _xdr_ib_request,
-			 (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result,
-			 (caddr_t) res, 0, NULL);
+			 (char *) ibreq, (xdrproc_t) _xdr_nis_result,
+			 (char *) res, 0, NULL);
 
   if (__glibc_unlikely (status != NIS_SUCCESS))
     NIS_RES_STATUS (res) = status;
diff --git a/nis/nis_util.c b/nis/nis_util.c
index 370cbe695e..d356a80cea 100644
--- a/nis/nis_util.c
+++ b/nis/nis_util.c
@@ -39,8 +39,8 @@ __nis_finddirectory (directory_obj *dir, const_nis_name name)
   status = __do_niscall2 (dir->do_servers.do_servers_val,
 			  dir->do_servers.do_servers_len,
 			  NIS_FINDDIRECTORY, (xdrproc_t) _xdr_fd_args,
-			  (caddr_t) &fd_args, (xdrproc_t) _xdr_fd_result,
-			  (caddr_t) fd_res, NO_AUTHINFO|USE_DGRAM, NULL);
+			  (char *) &fd_args, (xdrproc_t) _xdr_fd_result,
+			  (char *) fd_res, NO_AUTHINFO|USE_DGRAM, NULL);
   if (status != NIS_SUCCESS)
     fd_res->status = status;
 
diff --git a/nis/nss_nisplus/nisplus-grp.c b/nis/nss_nisplus/nisplus-grp.c
index 8223c37bb9..57037222cd 100644
--- a/nis/nss_nisplus/nisplus-grp.c
+++ b/nis/nss_nisplus/nisplus-grp.c
@@ -188,9 +188,9 @@ internal_nisplus_getgrent_r (struct group *gr, char *buffer, size_t buflen,
 
 	  status = __do_niscall3 (&bptr, NIS_IBFIRST,
 				  (xdrproc_t) _xdr_ib_request,
-				  (caddr_t) ibreq,
+				  (char *) ibreq,
 				  (xdrproc_t) _xdr_nis_result,
-				  (caddr_t) &result,
+				  (char *) &result,
 				  0, NULL);
 	}
       else
@@ -200,9 +200,9 @@ internal_nisplus_getgrent_r (struct group *gr, char *buffer, size_t buflen,
 
 	  status = __do_niscall3 (&bptr, NIS_IBNEXT,
 				  (xdrproc_t) _xdr_ib_request,
-				  (caddr_t) ibreq,
+				  (char *) ibreq,
 				  (xdrproc_t) _xdr_nis_result,
-				  (caddr_t) &result,
+				  (char *) &result,
 				  0, NULL);
 
 	  ibreq->ibr_cookie.n_bytes = NULL;
diff --git a/nis/nss_nisplus/nisplus-pwd.c b/nis/nss_nisplus/nisplus-pwd.c
index b1834609a8..4252f9509a 100644
--- a/nis/nss_nisplus/nisplus-pwd.c
+++ b/nis/nss_nisplus/nisplus-pwd.c
@@ -188,9 +188,9 @@ internal_nisplus_getpwent_r (struct passwd *pw, char *buffer, size_t buflen,
 
 	  status = __do_niscall3 (&bptr, NIS_IBFIRST,
 				  (xdrproc_t) _xdr_ib_request,
-				  (caddr_t) ibreq,
+				  (char *) ibreq,
 				  (xdrproc_t) _xdr_nis_result,
-				  (caddr_t) &result,
+				  (char *) &result,
 				  0, NULL);
 	}
       else
@@ -200,9 +200,9 @@ internal_nisplus_getpwent_r (struct passwd *pw, char *buffer, size_t buflen,
 
 	  status = __do_niscall3 (&bptr, NIS_IBNEXT,
 				  (xdrproc_t) _xdr_ib_request,
-				  (caddr_t) ibreq,
+				  (char *) ibreq,
 				  (xdrproc_t) _xdr_nis_result,
-				  (caddr_t) &result,
+				  (char *) &result,
 				  0, NULL);
 
 	  ibreq->ibr_cookie.n_bytes = NULL;
diff --git a/nis/rpcsvc/nis_callback.h b/nis/rpcsvc/nis_callback.h
index 6f05728e2a..ecbd367621 100644
--- a/nis/rpcsvc/nis_callback.h
+++ b/nis/rpcsvc/nis_callback.h
@@ -60,7 +60,7 @@ extern  void * cbproc_finish_1_svc (void *, struct svc_req *) __THROW;
 #define CBPROC_ERROR 3
 extern  void * cbproc_error_1 (nis_error *, CLIENT *) __THROW;
 extern  void * cbproc_error_1_svc (nis_error *, struct svc_req *) __THROW;
-extern int cb_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t) __THROW;
+extern int cb_prog_1_freeresult (SVCXPRT *, xdrproc_t, char *) __THROW;
 
 /* the xdr functions */
 
diff --git a/nis/rpcsvc/yp.h b/nis/rpcsvc/yp.h
index 968b74c42e..407e1fde9c 100644
--- a/nis/rpcsvc/yp.h
+++ b/nis/rpcsvc/yp.h
@@ -278,7 +278,7 @@ extern  ypresp_order *ypproc_order_2_svc (ypreq_nokey *, struct svc_req *);
 #define YPPROC_MAPLIST 11
 extern  ypresp_maplist *ypproc_maplist_2 (domainname *, CLIENT *);
 extern  ypresp_maplist *ypproc_maplist_2_svc (domainname *, struct svc_req *);
-extern int ypprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
+extern int ypprog_2_freeresult (SVCXPRT *, xdrproc_t, char *);
 
 
 #define YPPUSH_XFRRESPPROG (0x40000000)
@@ -290,7 +290,7 @@ extern  void *yppushproc_null_1_svc (void *, struct svc_req *);
 #define YPPUSHPROC_XFRRESP 1
 extern  void *yppushproc_xfrresp_1 (yppushresp_xfr *, CLIENT *);
 extern  void *yppushproc_xfrresp_1_svc (yppushresp_xfr *, struct svc_req *);
-extern int yppush_xfrrespprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
+extern int yppush_xfrrespprog_1_freeresult (SVCXPRT *, xdrproc_t, char *);
 
 
 #define YPBINDPROG 100007
@@ -305,7 +305,7 @@ extern  ypbind_resp *ypbindproc_domain_2_svc (domainname *, struct svc_req *);
 #define YPBINDPROC_SETDOM 2
 extern  void *ypbindproc_setdom_2 (ypbind_setdom *, CLIENT *);
 extern  void *ypbindproc_setdom_2_svc (ypbind_setdom *, struct svc_req *);
-extern int ypbindprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
+extern int ypbindprog_2_freeresult (SVCXPRT *, xdrproc_t, char *);
 
 
 extern  bool_t xdr_ypstat (XDR *, ypstat*);
diff --git a/nis/ypclnt.c b/nis/ypclnt.c
index ada08bf982..e82003421b 100644
--- a/nis/ypclnt.c
+++ b/nis/ypclnt.c
@@ -126,9 +126,9 @@ yp_bind_ypbindprog (const char *domain, dom_binding *ysd)
     }
 
   if (clnt_call (client, YPBINDPROC_DOMAIN,
-		 (xdrproc_t) xdr_domainname, (caddr_t) &domain,
+		 (xdrproc_t) xdr_domainname, (char *) &domain,
 		 (xdrproc_t) xdr_ypbind_resp,
-		 (caddr_t) &ypbr, RPCTIMEOUT) != RPC_SUCCESS)
+		 (char *) &ypbr, RPCTIMEOUT) != RPC_SUCCESS)
     {
       clnt_destroy (client);
       return YPERR_YPBIND;
@@ -271,7 +271,7 @@ libnsl_hidden_nolink_def(yp_unbind, GLIBC_2_0)
 
 static int
 __ypclnt_call (const char *domain, u_long prog, xdrproc_t xargs,
-	       caddr_t req, xdrproc_t xres, caddr_t resp, dom_binding **ydb,
+	       char *req, xdrproc_t xres, char *resp, dom_binding **ydb,
 	       int print_error)
 {
   enum clnt_stat result;
@@ -294,7 +294,7 @@ __ypclnt_call (const char *domain, u_long prog, xdrproc_t xargs,
 
 static int
 do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
-	   caddr_t req, xdrproc_t xres, caddr_t resp)
+	   char *req, xdrproc_t xres, char *resp)
 {
   dom_binding *ydb;
   int status;
@@ -365,7 +365,7 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
 /* Like do_ypcall, but translate the status value if necessary.  */
 static int
 do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
-	      caddr_t req, xdrproc_t xres, caddr_t resp)
+	      char *req, xdrproc_t xres, char *resp)
 {
   int status = do_ypcall (domain, prog, xargs, req, xres, resp);
   if (status == YPERR_SUCCESS)
@@ -451,8 +451,8 @@ yp_match (const char *indomain, const char *inmap, const char *inkey,
   memset (&resp, '\0', sizeof (resp));
 
   result = do_ypcall_tr (indomain, YPPROC_MATCH, (xdrproc_t) xdr_ypreq_key,
-			 (caddr_t) &req, (xdrproc_t) xdr_ypresp_val,
-			 (caddr_t) &resp);
+			 (char *) &req, (xdrproc_t) xdr_ypresp_val,
+			 (char *) &resp);
 
   if (result != YPERR_SUCCESS)
     return result;
@@ -493,8 +493,8 @@ yp_first (const char *indomain, const char *inmap, char **outkey,
   memset (&resp, '\0', sizeof (resp));
 
   result = do_ypcall (indomain, YPPROC_FIRST, (xdrproc_t) xdr_ypreq_nokey,
-		      (caddr_t) &req, (xdrproc_t) xdr_ypresp_key_val,
-		      (caddr_t) &resp);
+		      (char *) &req, (xdrproc_t) xdr_ypresp_key_val,
+		      (char *) &resp);
 
   if (result != RPC_SUCCESS)
     return YPERR_RPC;
@@ -552,8 +552,8 @@ yp_next (const char *indomain, const char *inmap, const char *inkey,
   memset (&resp, '\0', sizeof (resp));
 
   result = do_ypcall_tr (indomain, YPPROC_NEXT, (xdrproc_t) xdr_ypreq_key,
-			 (caddr_t) &req, (xdrproc_t) xdr_ypresp_key_val,
-			 (caddr_t) &resp);
+			 (char *) &req, (xdrproc_t) xdr_ypresp_key_val,
+			 (char *) &resp);
 
   if (result != YPERR_SUCCESS)
     return result;
@@ -602,8 +602,8 @@ yp_master (const char *indomain, const char *inmap, char **outname)
   memset (&resp, '\0', sizeof (ypresp_master));
 
   result = do_ypcall_tr (indomain, YPPROC_MASTER, (xdrproc_t) xdr_ypreq_nokey,
-			 (caddr_t) &req, (xdrproc_t) xdr_ypresp_master,
-			 (caddr_t) &resp);
+			 (char *) &req, (xdrproc_t) xdr_ypresp_master,
+			 (char *) &resp);
 
   if (result != YPERR_SUCCESS)
     return result;
@@ -632,8 +632,8 @@ yp_order (const char *indomain, const char *inmap, unsigned int *outorder)
   memset (&resp, '\0', sizeof (resp));
 
   result = do_ypcall_tr (indomain, YPPROC_ORDER, (xdrproc_t) xdr_ypreq_nokey,
-			 (caddr_t) &req, (xdrproc_t) xdr_ypresp_order,
-			 (caddr_t) &resp);
+			 (char *) &req, (xdrproc_t) xdr_ypresp_order,
+			 (char *) &resp);
 
   if (result != YPERR_SUCCESS)
     return result;
@@ -760,8 +760,8 @@ yp_all (const char *indomain, const char *inmap,
       data.data = (void *) incallback->data;
 
       result = clnt_call (clnt, YPPROC_ALL, (xdrproc_t) xdr_ypreq_nokey,
-			  (caddr_t) &req, (xdrproc_t) __xdr_ypresp_all,
-			  (caddr_t) &data, RPCTIMEOUT);
+			  (char *) &req, (xdrproc_t) __xdr_ypresp_all,
+			  (char *) &data, RPCTIMEOUT);
 
       if (__glibc_unlikely (result != RPC_SUCCESS))
 	{
@@ -801,8 +801,8 @@ yp_maplist (const char *indomain, struct ypmaplist **outmaplist)
   memset (&resp, '\0', sizeof (resp));
 
   result = do_ypcall_tr (indomain, YPPROC_MAPLIST, (xdrproc_t) xdr_domainname,
-			 (caddr_t) &indomain, (xdrproc_t) xdr_ypresp_maplist,
-			 (caddr_t) &resp);
+			 (char *) &indomain, (xdrproc_t) xdr_ypresp_maplist,
+			 (char *) &resp);
 
   if (__glibc_likely (result == YPERR_SUCCESS))
     {
@@ -1007,8 +1007,8 @@ yp_update (char *domain, char *map, unsigned ypop,
     clnt->cl_auth = authunix_create_default ();
 
 again:
-  r = clnt_call (clnt, ypop, xdr_argument, (caddr_t) &args,
-		 (xdrproc_t) xdr_u_int, (caddr_t) &res, RPCTIMEOUT);
+  r = clnt_call (clnt, ypop, xdr_argument, (char *) &args,
+		 (xdrproc_t) xdr_u_int, (char *) &res, RPCTIMEOUT);
 
   if (r == RPC_AUTHERROR)
     {
diff --git a/posix/bits/types.h b/posix/bits/types.h
index 78c47ffa06..426cee12fb 100644
--- a/posix/bits/types.h
+++ b/posix/bits/types.h
@@ -161,7 +161,6 @@ __STD_TYPE __TIME_T_TYPE __time_t;	/* Seconds since the Epoch.  */
 __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds.  */
 __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds.  */
 
-__STD_TYPE __DADDR_T_TYPE __daddr_t;	/* The type of a disk address.  */
 __STD_TYPE __KEY_T_TYPE __key_t;	/* Type of an IPC key.  */
 
 /* Clock ID used in clock and timer functions.  */
@@ -200,7 +199,8 @@ __STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t;
 /* These few don't really vary by system, they always correspond
    to one of the other defined types.  */
 typedef __off64_t __loff_t;	/* Type of file sizes and offsets (LFS).  */
-typedef char *__caddr_t;
+typedef char *__caddr_t;                /* Type of a memory address (BSD).  */
+__STD_TYPE __S32_TYPE __daddr_t;	/* Type of a disk address (BSD).  */
 
 /* Duplicates info from stdint.h but this is used in unistd.h.  */
 __STD_TYPE __SWORD_TYPE __intptr_t;
diff --git a/scripts/check-obsolete-constructs.py b/scripts/check-obsolete-constructs.py
index cdeacd8f54..ea457265be 100755
--- a/scripts/check-obsolete-constructs.py
+++ b/scripts/check-obsolete-constructs.py
@@ -18,7 +18,10 @@
 
 """Verifies that installed headers do not use any obsolete constructs:
  * legacy BSD typedefs superseded by <stdint.h>:
-   ushort uint ulong u_char u_short u_int u_long u_intNN_t quad_t u_quad_t
+      ushort uint ulong
+      u_char u_short u_int u_long
+      u_intNN_t quad_t u_quad_t
+      caddr_t daddr_t loff_t register_t
    (sys/types.h is allowed to _define_ these types, but not to use them
     to define anything else).
 """
@@ -254,6 +257,8 @@ class NoCheck(ConstructChecker):
 OBSOLETE_TYPE_RE_ = re.compile(r"""\A
   (__)?
   (   quad_t
+    | [cd]addr_t
+    | loff_t
     | register_t
     | u(?: short | int | long
          | _(?: char | short | int(?:[0-9]+_t)? | long | quad_t )))
diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c
index d26820a701..1f926090da 100644
--- a/sunrpc/auth_des.c
+++ b/sunrpc/auth_des.c
@@ -190,7 +190,7 @@ authdes_pk_create (const char *servername, netobj *pkey, u_int window,
   auth->ah_cred.oa_flavor = AUTH_DES;
   auth->ah_verf.oa_flavor = AUTH_DES;
   auth->ah_ops = (struct auth_ops *) &authdes_ops;
-  auth->ah_private = (caddr_t) ad;
+  auth->ah_private = (char *) ad;
 
   if (!authdes_refresh (auth))
     goto failed;
diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c
index ff0d2eb933..2275d54c5a 100644
--- a/sunrpc/auth_unix.c
+++ b/sunrpc/auth_unix.c
@@ -116,7 +116,7 @@ no_memory:
       return NULL;
     }
   auth->ah_ops = (struct auth_ops *) &auth_unix_ops;
-  auth->ah_private = (caddr_t) au;
+  auth->ah_private = (char *) au;
   auth->ah_verf = au->au_shcred = _null_auth;
   au->au_shfaults = 0;
 
@@ -330,7 +330,7 @@ authunix_destroy (AUTH *auth)
   if (auth->ah_verf.oa_base != NULL)
     mem_free (auth->ah_verf.oa_base, auth->ah_verf.oa_length);
 
-  mem_free ((caddr_t) auth, sizeof (*auth));
+  mem_free ((char *) auth, sizeof (*auth));
 }
 
 /*
diff --git a/sunrpc/authdes_prot.c b/sunrpc/authdes_prot.c
index 93b7cfc04b..bc23622ae8 100644
--- a/sunrpc/authdes_prot.c
+++ b/sunrpc/authdes_prot.c
@@ -51,13 +51,13 @@ xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred)
     {
     case ADN_FULLNAME:
       ATTEMPT (xdr_string (xdrs, &cred->adc_fullname.name, MAXNETNAMELEN));
-      ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.key,
+      ATTEMPT (xdr_opaque (xdrs, (char *) & cred->adc_fullname.key,
 			   sizeof (des_block)));
-      ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.window,
+      ATTEMPT (xdr_opaque (xdrs, (char *) & cred->adc_fullname.window,
 			   sizeof (cred->adc_fullname.window)));
       return (TRUE);
     case ADN_NICKNAME:
-      ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_nickname,
+      ATTEMPT (xdr_opaque (xdrs, (char *) & cred->adc_nickname,
 			   sizeof (cred->adc_nickname)));
       return TRUE;
     default:
@@ -73,9 +73,9 @@ xdr_authdes_verf (register XDR *xdrs, register struct authdes_verf *verf)
   /*
    * Unrolled xdr
    */
-  ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_xtimestamp,
+  ATTEMPT (xdr_opaque (xdrs, (char *) & verf->adv_xtimestamp,
 		       sizeof (des_block)));
-  ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_int_u,
+  ATTEMPT (xdr_opaque (xdrs, (char *) & verf->adv_int_u,
 		       sizeof (verf->adv_int_u)));
   return TRUE;
 }
diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c
index 14fe9f56c8..41fd999979 100644
--- a/sunrpc/authuxprot.c
+++ b/sunrpc/authuxprot.c
@@ -54,7 +54,7 @@ xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
       && (sizeof (gid_t) == sizeof (short int)
 	  ? xdr_u_short (xdrs, (u_short *) & (p->aup_gid))
 	  : xdr_u_int (xdrs, (u_int *) & (p->aup_gid)))
-      && xdr_array (xdrs, (caddr_t *) & (p->aup_gids),
+      && xdr_array (xdrs, (char **) & (p->aup_gids),
 		    & (p->aup_len), NGRPS, sizeof (gid_t),
 		    (sizeof (gid_t) == sizeof (short int)
 		     ? (xdrproc_t) xdr_u_short
diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c
index 5b9bd48247..a723dc2b07 100644
--- a/sunrpc/clnt_raw.c
+++ b/sunrpc/clnt_raw.c
@@ -61,11 +61,11 @@ struct clntraw_private_s
   };
 #define clntraw_private RPC_THREAD_VARIABLE(clntraw_private_s)
 
-static enum clnt_stat clntraw_call (CLIENT *, u_long, xdrproc_t, caddr_t,
-				    xdrproc_t, caddr_t, struct timeval);
+static enum clnt_stat clntraw_call (CLIENT *, u_long, xdrproc_t, char *,
+				    xdrproc_t, char *, struct timeval);
 static void clntraw_abort (void);
 static void clntraw_geterr (CLIENT *, struct rpc_err *);
-static bool_t clntraw_freeres (CLIENT *, xdrproc_t, caddr_t);
+static bool_t clntraw_freeres (CLIENT *, xdrproc_t, char *);
 static bool_t clntraw_control (CLIENT *, int, char *);
 static void clntraw_destroy (CLIENT *);
 
@@ -129,8 +129,8 @@ clntraw_create (u_long prog, u_long vers)
 libc_hidden_nolink_sunrpc (clntraw_create, GLIBC_2_0)
 
 static enum clnt_stat
-clntraw_call (CLIENT *h, u_long proc, xdrproc_t xargs, caddr_t argsp,
-	      xdrproc_t xresults, caddr_t resultsp, struct timeval timeout)
+clntraw_call (CLIENT *h, u_long proc, xdrproc_t xargs, char *argsp,
+	      xdrproc_t xresults, char *resultsp, struct timeval timeout)
 {
   struct clntraw_private_s *clp = clntraw_private;
   XDR *xdrs = &clp->xdr_stream;
@@ -214,7 +214,7 @@ clntraw_geterr (CLIENT *cl, struct rpc_err *err)
 
 
 static bool_t
-clntraw_freeres (CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr)
+clntraw_freeres (CLIENT *cl, xdrproc_t xdr_res, char *res_ptr)
 {
   struct clntraw_private_s *clp = clntraw_private;
   XDR *xdrs = &clp->xdr_stream;
diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c
index 249e9c3584..4b3533eba7 100644
--- a/sunrpc/clnt_tcp.c
+++ b/sunrpc/clnt_tcp.c
@@ -76,11 +76,11 @@ struct ct_data
 static int readtcp (char *, char *, int);
 static int writetcp (char *, char *, int);
 
-static enum clnt_stat clnttcp_call (CLIENT *, u_long, xdrproc_t, caddr_t,
-				    xdrproc_t, caddr_t, struct timeval);
+static enum clnt_stat clnttcp_call (CLIENT *, u_long, xdrproc_t, char *,
+				    xdrproc_t, char *, struct timeval);
 static void clnttcp_abort (void);
 static void clnttcp_geterr (CLIENT *, struct rpc_err *);
-static bool_t clnttcp_freeres (CLIENT *, xdrproc_t, caddr_t);
+static bool_t clnttcp_freeres (CLIENT *, xdrproc_t, char *);
 static bool_t clnttcp_control (CLIENT *, int, char *);
 static void clnttcp_destroy (CLIENT *);
 
@@ -135,8 +135,8 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers,
       u_short port;
       if ((port = pmap_getport (raddr, prog, vers, IPPROTO_TCP)) == 0)
 	{
-	  mem_free ((caddr_t) ct, sizeof (struct ct_data));
-	  mem_free ((caddr_t) h, sizeof (CLIENT));
+	  mem_free ((char *) ct, sizeof (struct ct_data));
+	  mem_free ((char *) h, sizeof (CLIENT));
 	  return ((CLIENT *) NULL);
 	}
       raddr->sin_port = htons (port);
@@ -204,9 +204,9 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers,
    * and authnone for authentication.
    */
   xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz,
-		 (caddr_t) ct, readtcp, writetcp);
+		 (char *) ct, readtcp, writetcp);
   h->cl_ops = (struct clnt_ops *) &tcp_ops;
-  h->cl_private = (caddr_t) ct;
+  h->cl_private = (char *) ct;
   h->cl_auth = authnone_create ();
   return h;
 
@@ -214,8 +214,8 @@ fooy:
   /*
    * Something goofed, free stuff and barf
    */
-  mem_free ((caddr_t) ct, sizeof (struct ct_data));
-  mem_free ((caddr_t) h, sizeof (CLIENT));
+  mem_free ((char *) ct, sizeof (struct ct_data));
+  mem_free ((char *) h, sizeof (CLIENT));
   return ((CLIENT *) NULL);
 }
 #ifdef EXPORT_RPC_SYMBOLS
@@ -225,8 +225,8 @@ libc_hidden_nolink_sunrpc (clnttcp_create, GLIBC_2_0)
 #endif
 
 static enum clnt_stat
-clnttcp_call (CLIENT *h, u_long proc, xdrproc_t xdr_args, caddr_t args_ptr,
-	      xdrproc_t xdr_results, caddr_t results_ptr,
+clnttcp_call (CLIENT *h, u_long proc, xdrproc_t xdr_args, char *args_ptr,
+	      xdrproc_t xdr_results, char *results_ptr,
 	      struct timeval timeout)
 {
   struct ct_data *ct = (struct ct_data *) h->cl_private;
@@ -337,7 +337,7 @@ clnttcp_geterr (CLIENT *h, struct rpc_err *errp)
 }
 
 static bool_t
-clnttcp_freeres (CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr)
+clnttcp_freeres (CLIENT *cl, xdrproc_t xdr_res, char *res_ptr)
 {
   struct ct_data *ct = (struct ct_data *) cl->cl_private;
   XDR *xdrs = &(ct->ct_xdrs);
@@ -454,8 +454,8 @@ clnttcp_destroy (CLIENT *h)
       (void) __close (ct->ct_sock);
     }
   XDR_DESTROY (&(ct->ct_xdrs));
-  mem_free ((caddr_t) ct, sizeof (struct ct_data));
-  mem_free ((caddr_t) h, sizeof (CLIENT));
+  mem_free ((char *) ct, sizeof (struct ct_data));
+  mem_free ((char *) h, sizeof (CLIENT));
 }
 
 /*
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index ee79b09b40..462f0cc299 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -64,11 +64,11 @@ extern u_long _create_xid (void);
 /*
  * UDP bases client side rpc operations
  */
-static enum clnt_stat clntudp_call (CLIENT *, u_long, xdrproc_t, caddr_t,
-				    xdrproc_t, caddr_t, struct timeval);
+static enum clnt_stat clntudp_call (CLIENT *, u_long, xdrproc_t, char *,
+				    xdrproc_t, char *, struct timeval);
 static void clntudp_abort (void);
 static void clntudp_geterr (CLIENT *, struct rpc_err *);
-static bool_t clntudp_freeres (CLIENT *, xdrproc_t, caddr_t);
+static bool_t clntudp_freeres (CLIENT *, xdrproc_t, char *);
 static bool_t clntudp_control (CLIENT *, int, char *);
 static void clntudp_destroy (CLIENT *);
 
@@ -155,7 +155,7 @@ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program,
       raddr->sin_port = htons (port);
     }
   cl->cl_ops = (struct clnt_ops *) &udp_ops;
-  cl->cl_private = (caddr_t) cu;
+  cl->cl_private = (char *) cu;
   cu->cu_raddr = *raddr;
   cu->cu_rlen = sizeof (cu->cu_raddr);
   cu->cu_wait = wait;
@@ -203,9 +203,9 @@ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program,
   return cl;
 fooy:
   if (cu)
-    mem_free ((caddr_t) cu, sizeof (*cu) + sendsz + recvsz);
+    mem_free ((char *) cu, sizeof (*cu) + sendsz + recvsz);
   if (cl)
-    mem_free ((caddr_t) cl, sizeof (CLIENT));
+    mem_free ((char *) cl, sizeof (CLIENT));
   return (CLIENT *) NULL;
 }
 #ifdef EXPORT_RPC_SYMBOLS
@@ -269,11 +269,11 @@ clntudp_call (/* client handle */
 	      /* xdr routine for args */
 	      xdrproc_t xargs,
 	      /* pointer to args */
-	      caddr_t argsp,
+	      char *argsp,
 	      /* xdr routine for results */
 	      xdrproc_t xresults,
 	      /* pointer to results */
-	      caddr_t resultsp,
+	      char *resultsp,
 	      /* seconds to wait before giving up */
 	      struct timeval utimeout)
 {
@@ -535,7 +535,7 @@ clntudp_geterr (CLIENT *cl, struct rpc_err *errp)
 
 
 static bool_t
-clntudp_freeres (CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr)
+clntudp_freeres (CLIENT *cl, xdrproc_t xdr_res, char *res_ptr)
 {
   struct cu_data *cu = (struct cu_data *) cl->cl_private;
   XDR *xdrs = &(cu->cu_outxdrs);
@@ -652,6 +652,6 @@ clntudp_destroy (CLIENT *cl)
       (void) __close (cu->cu_sock);
     }
   XDR_DESTROY (&(cu->cu_outxdrs));
-  mem_free ((caddr_t) cu, (sizeof (*cu) + cu->cu_sendsz + cu->cu_recvsz));
-  mem_free ((caddr_t) cl, sizeof (CLIENT));
+  mem_free ((char *) cu, (sizeof (*cu) + cu->cu_sendsz + cu->cu_recvsz));
+  mem_free ((char *) cl, sizeof (CLIENT));
 }
diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c
index 33a02cc8af..51ed935359 100644
--- a/sunrpc/clnt_unix.c
+++ b/sunrpc/clnt_unix.c
@@ -77,11 +77,11 @@ struct ct_data
 static int readunix (char *, char *, int);
 static int writeunix (char *, char *, int);
 
-static enum clnt_stat clntunix_call (CLIENT *, u_long, xdrproc_t, caddr_t,
-				    xdrproc_t, caddr_t, struct timeval);
+static enum clnt_stat clntunix_call (CLIENT *, u_long, xdrproc_t, char *,
+				    xdrproc_t, char *, struct timeval);
 static void clntunix_abort (void);
 static void clntunix_geterr (CLIENT *, struct rpc_err *);
-static bool_t clntunix_freeres (CLIENT *, xdrproc_t, caddr_t);
+static bool_t clntunix_freeres (CLIENT *, xdrproc_t, char *);
 static bool_t clntunix_control (CLIENT *, int, char *);
 static void clntunix_destroy (CLIENT *);
 
@@ -187,9 +187,9 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers,
    * and authnone for authentication.
    */
   xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz,
-		 (caddr_t) ct, readunix, writeunix);
+		 (char *) ct, readunix, writeunix);
   h->cl_ops = (struct clnt_ops *) &unix_ops;
-  h->cl_private = (caddr_t) ct;
+  h->cl_private = (char *) ct;
   h->cl_auth = authnone_create ();
   return h;
 
@@ -197,15 +197,15 @@ fooy:
   /*
    * Something goofed, free stuff and barf
    */
-  mem_free ((caddr_t) ct, sizeof (struct ct_data));
-  mem_free ((caddr_t) h, sizeof (CLIENT));
+  mem_free ((char *) ct, sizeof (struct ct_data));
+  mem_free ((char *) h, sizeof (CLIENT));
   return (CLIENT *) NULL;
 }
 libc_hidden_nolink_sunrpc (clntunix_create, GLIBC_2_1)
 
 static enum clnt_stat
-clntunix_call (CLIENT *h, u_long proc, xdrproc_t xdr_args, caddr_t args_ptr,
-	       xdrproc_t xdr_results, caddr_t results_ptr,
+clntunix_call (CLIENT *h, u_long proc, xdrproc_t xdr_args, char *args_ptr,
+	       xdrproc_t xdr_results, char *results_ptr,
 	       struct timeval timeout)
 {
   struct ct_data *ct = (struct ct_data *) h->cl_private;
@@ -313,7 +313,7 @@ clntunix_geterr (CLIENT *h, struct rpc_err *errp)
 }
 
 static bool_t
-clntunix_freeres (CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr)
+clntunix_freeres (CLIENT *cl, xdrproc_t xdr_res, char *res_ptr)
 {
   struct ct_data *ct = (struct ct_data *) cl->cl_private;
   XDR *xdrs = &(ct->ct_xdrs);
@@ -428,8 +428,8 @@ clntunix_destroy (CLIENT *h)
       (void) __close (ct->ct_sock);
     }
   XDR_DESTROY (&(ct->ct_xdrs));
-  mem_free ((caddr_t) ct, sizeof (struct ct_data));
-  mem_free ((caddr_t) h, sizeof (CLIENT));
+  mem_free ((char *) ct, sizeof (struct ct_data));
+  mem_free ((char *) h, sizeof (CLIENT));
 }
 
 static int
@@ -450,7 +450,7 @@ __msgread (int sock, void *data, size_t cnt)
   msg.msg_name = NULL;
   msg.msg_namelen = 0;
 #ifdef SCM_CREDENTIALS
-  msg.msg_control = (caddr_t) &cm;
+  msg.msg_control = (char *) &cm;
   msg.msg_controllen = CMSG_SPACE(sizeof (struct ucred));
 #endif
   msg.msg_flags = 0;
diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
index 9b8f9819c9..270a1e9c86 100644
--- a/sunrpc/key_call.c
+++ b/sunrpc/key_call.c
@@ -228,7 +228,7 @@ key_gendes (des_block *key)
     return -1;
 
   stat = clnt_call (client, KEY_GEN, (xdrproc_t) xdr_void, NULL,
-		    (xdrproc_t) xdr_des_block, (caddr_t) key,
+		    (xdrproc_t) xdr_des_block, (char *) key,
 		    tottimeout);
   clnt_destroy (client);
   __close (socket);
diff --git a/sunrpc/pm_getmaps.c b/sunrpc/pm_getmaps.c
index 094492b2b4..b1e8eab7c4 100644
--- a/sunrpc/pm_getmaps.c
+++ b/sunrpc/pm_getmaps.c
@@ -72,7 +72,7 @@ pmap_getmaps (struct sockaddr_in *address)
   if (client != (CLIENT *) NULL)
     {
       if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)xdr_void, NULL,
-		     (xdrproc_t)xdr_pmaplist, (caddr_t)&head,
+		     (xdrproc_t)xdr_pmaplist, (char *)&head,
 		     minutetimeout) != RPC_SUCCESS)
 	{
 	  clnt_perror (client, _("pmap_getmaps.c: rpc problem"));
diff --git a/sunrpc/pm_getport.c b/sunrpc/pm_getport.c
index 3e6dd34e58..394c437039 100644
--- a/sunrpc/pm_getport.c
+++ b/sunrpc/pm_getport.c
@@ -115,8 +115,8 @@ __libc_rpc_getport (struct sockaddr_in *address, u_long program,
       parms.pm_prot = protocol;
       parms.pm_port = 0;	/* not needed or used */
       if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap,
-		     (caddr_t)&parms, (xdrproc_t)xdr_u_short,
-		     (caddr_t)&port, tottimeout) != RPC_SUCCESS)
+		     (char *)&parms, (xdrproc_t)xdr_u_short,
+		     (char *)&port, tottimeout) != RPC_SUCCESS)
 	{
 	  ce->cf_stat = RPC_PMAPFAILURE;
 	  clnt_geterr (client, &ce->cf_error);
diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c
index 69b4907b3a..3b1ebe1868 100644
--- a/sunrpc/pmap_clnt.c
+++ b/sunrpc/pmap_clnt.c
@@ -122,7 +122,7 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
   parms.pm_prot = protocol;
   parms.pm_port = port;
   if (CLNT_CALL (client, PMAPPROC_SET, (xdrproc_t)xdr_pmap,
-		 (caddr_t)&parms, (xdrproc_t)xdr_bool, (caddr_t)&rslt,
+		 (char *)&parms, (xdrproc_t)xdr_bool, (char *)&rslt,
 		 tottimeout) != RPC_SUCCESS)
     {
       clnt_perror (client, _("Cannot register service"));
@@ -157,7 +157,7 @@ pmap_unset (u_long program, u_long version)
   parms.pm_vers = version;
   parms.pm_port = parms.pm_prot = 0;
   CLNT_CALL (client, PMAPPROC_UNSET, (xdrproc_t)xdr_pmap,
-	     (caddr_t)&parms, (xdrproc_t)xdr_bool, (caddr_t)&rslt,
+	     (char *)&parms, (xdrproc_t)xdr_bool, (char *)&rslt,
 	     tottimeout);
   CLNT_DESTROY (client);
   /* (void)close(socket); CLNT_DESTROY already closed it */
diff --git a/sunrpc/pmap_prot2.c b/sunrpc/pmap_prot2.c
index c414db0298..6825db7fe3 100644
--- a/sunrpc/pmap_prot2.c
+++ b/sunrpc/pmap_prot2.c
@@ -102,7 +102,7 @@ xdr_pmaplist (XDR *xdrs, struct pmaplist **rp)
        */
       if (freeing)
 	next = (*rp)->pml_next;
-      if (!xdr_reference (xdrs, (caddr_t *) rp,
+      if (!xdr_reference (xdrs, (char **) rp,
 			  (u_int) sizeof (struct pmaplist),
 			  (xdrproc_t) xdr_pmap))
 	  return FALSE;
diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
index 6b142e5441..0fc406c125 100644
--- a/sunrpc/pmap_rmt.c
+++ b/sunrpc/pmap_rmt.c
@@ -66,7 +66,7 @@ static const struct timeval timeout = {3, 0};
  */
 enum clnt_stat
 pmap_rmtcall (struct sockaddr_in *addr, u_long prog, u_long vers, u_long proc,
-	      xdrproc_t xdrargs, caddr_t argsp, xdrproc_t xdrres, caddr_t resp,
+	      xdrproc_t xdrargs, char *argsp, xdrproc_t xdrres, char *resp,
 	      struct timeval tout, u_long *port_ptr)
 {
   int socket = -1;
@@ -89,8 +89,8 @@ pmap_rmtcall (struct sockaddr_in *addr, u_long prog, u_long vers, u_long proc,
       r.xdr_results = xdrres;
       stat = CLNT_CALL (client, PMAPPROC_CALLIT,
 			(xdrproc_t)xdr_rmtcall_args,
-			(caddr_t)&a, (xdrproc_t)xdr_rmtcallres,
-			(caddr_t)&r, tout);
+			(char *)&a, (xdrproc_t)xdr_rmtcallres,
+			(char *)&r, tout);
       CLNT_DESTROY (client);
     }
   else
@@ -143,9 +143,9 @@ libc_hidden_nolink_sunrpc (xdr_rmtcall_args, GLIBC_2_0)
 bool_t
 xdr_rmtcallres (XDR *xdrs, struct rmtcallres *crp)
 {
-  caddr_t port_ptr;
+  char *port_ptr;
 
-  port_ptr = (caddr_t) crp->port_ptr;
+  port_ptr = (char *) crp->port_ptr;
   if (xdr_reference (xdrs, &port_ptr, sizeof (u_long),
 		     (xdrproc_t) xdr_u_long)
       && xdr_u_long (xdrs, &crp->resultslen))
@@ -205,11 +205,11 @@ clnt_broadcast (/* program number */
 		/* xdr routine for args */
 		xdrproc_t xargs,
 		/* pointer to args */
-		caddr_t argsp,
+		char *argsp,
 		/* xdr routine for results */
 		xdrproc_t xresults,
 		/* pointer to results */
-		caddr_t resultsp,
+		char *resultsp,
 		/* call with each result obtained */
 		resultproc_t eachresult)
 {
@@ -312,7 +312,7 @@ clnt_broadcast (/* program number */
 	}
     recv_again:
       msg.acpted_rply.ar_verf = _null_auth;
-      msg.acpted_rply.ar_results.where = (caddr_t) & r;
+      msg.acpted_rply.ar_results.where = (char *) & r;
       msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_rmtcallres;
       milliseconds = t.tv_sec * 1000 + t.tv_usec / 1000;
       switch (__poll(&fd, 1, milliseconds))
diff --git a/sunrpc/proto.h b/sunrpc/proto.h
index ea28565b1e..eef7b91614 100644
--- a/sunrpc/proto.h
+++ b/sunrpc/proto.h
@@ -17,7 +17,7 @@ void pprocdef(proc_list *proc, version_list *vp,
 	      const char *addargtype, int server_p, int mode);
 void pdeclaration(const char *name, declaration *dec, int tab,
 		  const char *separator);
-void print_xdr_func_def (char* name, int pointerp, int i);
+void print_xdr_func_def (char *name, int pointerp, int i);
 
 /****** rpc_main.c ******/
 	/* nil */
diff --git a/sunrpc/rpc/auth.h b/sunrpc/rpc/auth.h
index e01b077214..c506e53749 100644
--- a/sunrpc/rpc/auth.h
+++ b/sunrpc/rpc/auth.h
@@ -81,7 +81,7 @@ extern bool_t xdr_des_block (XDR *__xdrs, des_block *__blkp) __THROW;
  */
 struct opaque_auth {
 	enum_t	oa_flavor;		/* flavor of auth */
-	caddr_t	oa_base;		/* address of more auth stuff */
+	char *	oa_base;		/* address of more auth stuff */
 	u_int	oa_length;		/* not to exceed MAX_AUTH_BYTES */
 };
 
@@ -101,7 +101,7 @@ struct AUTH {
     int  (*ah_refresh) (AUTH *);		/* refresh credentials */
     void (*ah_destroy) (AUTH *); 	    	/* destroy this structure */
   } *ah_ops;
-  caddr_t ah_private;
+  char *ah_private;
 };
 
 
diff --git a/sunrpc/rpc/clnt.h b/sunrpc/rpc/clnt.h
index f4d4a941c7..88ea9a2ae7 100644
--- a/sunrpc/rpc/clnt.h
+++ b/sunrpc/rpc/clnt.h
@@ -130,19 +130,19 @@ typedef struct CLIENT CLIENT;
 struct CLIENT {
   AUTH	*cl_auth;		 /* authenticator */
   struct clnt_ops {
-    enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t,
-			       caddr_t, struct timeval);
+    enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, char *, xdrproc_t,
+			       char *, struct timeval);
 				/* call remote procedure */
     void (*cl_abort) (void);	/* abort a call */
     void (*cl_geterr) (CLIENT *, struct rpc_err *);
 				/* get specific error code */
-    bool_t (*cl_freeres) (CLIENT *, xdrproc_t, caddr_t);
+    bool_t (*cl_freeres) (CLIENT *, xdrproc_t, char *);
 				/* frees results */
     void (*cl_destroy) (CLIENT *); /* destroy this structure */
     bool_t (*cl_control) (CLIENT *, int, char *);
 				/* the ioctl() of rpc */
   } *cl_ops;
-  caddr_t cl_private;		/* private stuff */
+  char *cl_private;		/* private stuff */
 };
 
 
@@ -159,9 +159,9 @@ struct CLIENT {
  * 	CLIENT *rh;
  *	u_long proc;
  *	xdrproc_t xargs;
- *	caddr_t argsp;
+ *	char *argsp;
  *	xdrproc_t xres;
- *	caddr_t resp;
+ *	char *resp;
  *	struct timeval timeout;
  */
 #define	CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs)	\
@@ -191,7 +191,7 @@ struct CLIENT {
  * CLNT_FREERES(rh, xres, resp);
  * 	CLIENT *rh;
  *	xdrproc_t xres;
- *	caddr_t resp;
+ *	char *resp;
  */
 #define	CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
 #define	clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
@@ -401,7 +401,7 @@ extern char *clnt_sperrno (enum clnt_stat __num) __THROW;	/* string */
 /*
  * get the port number on the host for the rpc program,version and proto
  */
-extern int getrpcport (const char * __host, u_long __prognum,
+extern int getrpcport (const char *__host, u_long __prognum,
 		       u_long __versnum, u_int __proto) __THROW;
 
 /*
diff --git a/sunrpc/rpc/pmap_clnt.h b/sunrpc/rpc/pmap_clnt.h
index 1cc94b8fee..1e7a4fb31f 100644
--- a/sunrpc/rpc/pmap_clnt.h
+++ b/sunrpc/rpc/pmap_clnt.h
@@ -42,7 +42,7 @@
 
 __BEGIN_DECLS
 
-typedef bool_t (*resultproc_t) (caddr_t __resp, struct sockaddr_in *__raddr);
+typedef bool_t (*resultproc_t) (char *__resp, struct sockaddr_in *__raddr);
 
 /*
  * Usage:
@@ -60,7 +60,7 @@ typedef bool_t (*resultproc_t) (caddr_t __resp, struct sockaddr_in *__raddr);
  *		the procedure eachresult is called.  Its form is:
  *	done = eachresult(resp, raddr)
  *		bool_t done;
- *		caddr_t resp;
+ *		char *resp;
  *		struct sockaddr_in raddr;
  *		where resp points to the results of the call and raddr is the
  *		address if the responder to the broadcast.
@@ -76,14 +76,14 @@ extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr,
 				    const u_long __vers,
 				    const u_long __proc,
 				    xdrproc_t __xdrargs,
-				    caddr_t __argsp, xdrproc_t __xdrres,
-				    caddr_t __resp, struct timeval __tout,
+				    char *__argsp, xdrproc_t __xdrres,
+				    char *__resp, struct timeval __tout,
 				    u_long *__port_ptr) __THROW;
 extern enum clnt_stat clnt_broadcast (const u_long __prog,
 				      const u_long __vers,
 				      const u_long __proc, xdrproc_t __xargs,
-				      caddr_t __argsp, xdrproc_t __xresults,
-				      caddr_t __resultsp,
+				      char *__argsp, xdrproc_t __xresults,
+				      char *__resultsp,
 				      resultproc_t __eachresult) __THROW;
 extern u_short pmap_getport (struct sockaddr_in *__address,
 			     const u_long __program,
diff --git a/sunrpc/rpc/pmap_rmt.h b/sunrpc/rpc/pmap_rmt.h
index f8680141ae..7627b8edfe 100644
--- a/sunrpc/rpc/pmap_rmt.h
+++ b/sunrpc/rpc/pmap_rmt.h
@@ -44,7 +44,7 @@ __BEGIN_DECLS
 
 struct rmtcallargs {
 	u_long prog, vers, proc, arglen;
-	caddr_t args_ptr;
+	char *args_ptr;
 	xdrproc_t xdr_args;
 };
 
@@ -54,7 +54,7 @@ extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp)
 struct rmtcallres {
 	u_long *port_ptr;
 	u_long resultslen;
-	caddr_t results_ptr;
+	char *results_ptr;
 	xdrproc_t xdr_results;
 };
 
diff --git a/sunrpc/rpc/rpc_msg.h b/sunrpc/rpc/rpc_msg.h
index 273b187d14..a2cc516cd6 100644
--- a/sunrpc/rpc/rpc_msg.h
+++ b/sunrpc/rpc/rpc_msg.h
@@ -93,7 +93,7 @@ struct accepted_reply {
 			u_long	high;
 		} AR_versions;
 		struct {
-			caddr_t	where;
+			char *	where;
 			xdrproc_t proc;
 		} AR_results;
 		/* and many other null cases */
diff --git a/sunrpc/rpc/svc.h b/sunrpc/rpc/svc.h
index 71d5a02a46..ea2ba71906 100644
--- a/sunrpc/rpc/svc.h
+++ b/sunrpc/rpc/svc.h
@@ -97,11 +97,11 @@ struct SVCXPRT {
     enum xprt_stat (*xp_stat) (SVCXPRT *__xprt);
 				/* get transport status */
     bool_t	(*xp_getargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args,
-			       caddr_t __args_ptr); /* get arguments */
+			       char *__args_ptr); /* get arguments */
     bool_t	(*xp_reply) (SVCXPRT *__xprt, struct rpc_msg *__msg);
 				/* send reply */
     bool_t	(*xp_freeargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args,
-				caddr_t __args_ptr);
+				char *__args_ptr);
 				/* free mem allocated for args */
     void	(*xp_destroy) (SVCXPRT *__xprt);
 				/* destroy this struct */
@@ -109,8 +109,8 @@ struct SVCXPRT {
   int		xp_addrlen;	 /* length of remote address */
   struct sockaddr_in xp_raddr;	 /* remote address */
   struct opaque_auth xp_verf;	 /* raw response verifier */
-  caddr_t		xp_p1;		 /* private */
-  caddr_t		xp_p2;		 /* private */
+  char *		xp_p1;		 /* private */
+  char *		xp_p2;		 /* private */
   char		xp_pad [256];	/* padding, internal use */
 };
 
@@ -125,7 +125,7 @@ struct SVCXPRT {
  * SVCXPRT		*xprt;
  * struct rpc_msg	*msg;
  * xdrproc_t		 xargs;
- * caddr_t		 argsp;
+ * char *		 argsp;
  */
 #define SVC_RECV(xprt, msg)				\
 	(*(xprt)->xp_ops->xp_recv)((xprt), (msg))
@@ -166,7 +166,7 @@ struct svc_req {
   rpcvers_t rq_vers;            /* service protocol version */
   rpcproc_t rq_proc;            /* the desired procedure */
   struct opaque_auth rq_cred;   /* raw creds from the wire */
-  caddr_t rq_clntcred;          /* read only cooked cred */
+  char *rq_clntcred;          /* read only cooked cred */
   SVCXPRT *rq_xprt;             /* associated transport */
 };
 
@@ -242,7 +242,7 @@ extern void xprt_unregister (SVCXPRT *__xprt) __THROW;
  */
 
 extern bool_t	svc_sendreply (SVCXPRT *__xprt, xdrproc_t __xdr_results,
-			       caddr_t __xdr_location) __THROW;
+			       char *__xdr_location) __THROW;
 
 extern void	svcerr_decode (SVCXPRT *__xprt) __THROW;
 
diff --git a/sunrpc/rpc/xdr.h b/sunrpc/rpc/xdr.h
index d80d8f735d..3007e38d09 100644
--- a/sunrpc/rpc/xdr.h
+++ b/sunrpc/rpc/xdr.h
@@ -116,7 +116,7 @@ struct XDR
 	/* get a long from underlying stream */
 	bool_t (*x_putlong) (XDR *__xdrs, const long *__lp);
 	/* put a long to " */
-	bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len);
+	bool_t (*x_getbytes) (XDR *__xdrs, char *__addr, u_int __len);
 	/* get some bytes from " */
 	bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, u_int __len);
 	/* put some bytes to " */
@@ -134,9 +134,9 @@ struct XDR
 	/* put a int to " */
       }
      *x_ops;
-    caddr_t x_public;		/* users' data */
-    caddr_t x_private;		/* pointer to private data */
-    caddr_t x_base;		/* private used for position info */
+    char *x_public;		/* users' data */
+    char *x_private;		/* pointer to private data */
+    char *x_base;		/* private used for position info */
     u_int x_handy;		/* extra private word */
   };
 
@@ -147,7 +147,7 @@ struct XDR
  * The opaque pointer generally points to a structure of the data type
  * to be decoded.  If this pointer is 0, then the type routines should
  * allocate dynamic storage of the appropriate size and return it.
- * bool_t       (*xdrproc_t)(XDR *, caddr_t *);
+ * bool_t       (*xdrproc_t)(XDR *, char **);
  */
 typedef bool_t (*xdrproc_t) (XDR *, void *,...);
 
@@ -158,7 +158,7 @@ typedef bool_t (*xdrproc_t) (XDR *, void *,...);
  * XDR          *xdrs;
  * int32_t      *int32p;
  * long         *longp;
- * caddr_t       addr;
+ * char         *addr;
  * u_int         len;
  * u_int         pos;
  */
@@ -305,12 +305,12 @@ extern bool_t xdr_quad_t (XDR *__xdrs, quad_t *__ip) __THROW;
 extern bool_t xdr_u_quad_t (XDR *__xdrs, u_quad_t *__up) __THROW;
 extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW;
 extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW;
-extern bool_t xdr_array (XDR * _xdrs, caddr_t *__addrp, u_int *__sizep,
+extern bool_t xdr_array (XDR * _xdrs, char **__addrp, u_int *__sizep,
 			 u_int __maxsize, u_int __elsize, xdrproc_t __elproc)
      __THROW;
 extern bool_t xdr_bytes (XDR *__xdrs, char **__cpp, u_int *__sizep,
 			 u_int __maxsize) __THROW;
-extern bool_t xdr_opaque (XDR *__xdrs, caddr_t __cp, u_int __cnt) __THROW;
+extern bool_t xdr_opaque (XDR *__xdrs, char *__cp, u_int __cnt) __THROW;
 extern bool_t xdr_string (XDR *__xdrs, char **__cpp, u_int __maxsize) __THROW;
 extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp,
 			 const struct xdr_discrim *__choices,
@@ -321,7 +321,7 @@ extern bool_t xdr_vector (XDR *__xdrs, char *__basep, u_int __nelem,
 			  u_int __elemsize, xdrproc_t __xdr_elem) __THROW;
 extern bool_t xdr_float (XDR *__xdrs, float *__fp) __THROW;
 extern bool_t xdr_double (XDR *__xdrs, double *__dp) __THROW;
-extern bool_t xdr_reference (XDR *__xdrs, caddr_t *__xpp, u_int __size,
+extern bool_t xdr_reference (XDR *__xdrs, char **__xpp, u_int __size,
 			     xdrproc_t __proc) __THROW;
 extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp,
 			   u_int __obj_size, xdrproc_t __xdr_obj) __THROW;
@@ -347,7 +347,7 @@ extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW;
  */
 
 /* XDR using memory buffers */
-extern void xdrmem_create (XDR *__xdrs, const caddr_t __addr,
+extern void xdrmem_create (XDR *__xdrs, const char *__addr,
 			   u_int __size, enum xdr_op __xop) __THROW;
 
 /* XDR using stdio library */
@@ -356,7 +356,7 @@ extern void xdrstdio_create (XDR *__xdrs, FILE *__file, enum xdr_op __xop)
 
 /* XDR pseudo records for tcp */
 extern void xdrrec_create (XDR *__xdrs, u_int __sendsize,
-			   u_int __recvsize, caddr_t __tcp_handle,
+			   u_int __recvsize, char *__tcp_handle,
 			   int (*__readit) (char *, char *, int),
 			   int (*__writeit) (char *, char *, int)) __THROW;
 
diff --git a/sunrpc/rpc_clntout.c b/sunrpc/rpc_clntout.c
index ce4d2a4c95..eaacdb637c 100644
--- a/sunrpc/rpc_clntout.c
+++ b/sunrpc/rpc_clntout.c
@@ -262,7 +262,7 @@ printbody (proc_list * proc)
 	       "(clnt_call (clnt, %s, (xdrproc_t) xdr_void, ", proc->proc_name);
 
       fprintf (fout,
-	       "(caddr_t) NULL,\n\t\t(xdrproc_t) xdr_%s, (caddr_t) %s%s,",
+	       "(char *) NULL,\n\t\t(xdrproc_t) xdr_%s, (char *) %s%s,",
 	       stringfix(proc->res_type), (mtflag)?"":ampr(proc->res_type),
 	       RESULT);
       if (mtflag)
@@ -287,7 +287,7 @@ printbody (proc_list * proc)
 	       "(clnt_call (clnt, %s, (xdrproc_t) xdr_%s", proc->proc_name,
 	       proc->args.argname);
       fprintf (fout,
-	       ", (caddr_t) &arg,\n\t\t(xdrproc_t) xdr_%s, (caddr_t) %s%s,",
+	       ", (char *) &arg,\n\t\t(xdrproc_t) xdr_%s, (char *) %s%s,",
 	       stringfix(proc->res_type), (mtflag)?"":ampr(proc->res_type),
 	       RESULT);
       if (mtflag)
@@ -299,7 +299,7 @@ printbody (proc_list * proc)
     {				/* single argument, new or old style */
       if (!mtflag)
 	fprintf (fout,
-		 "\tif (clnt_call (clnt, %s,\n\t\t(xdrproc_t) xdr_%s, (caddr_t) %s%s,\n\t\t(xdrproc_t) xdr_%s, (caddr_t) %s%s,\n\t\tTIMEOUT) != RPC_SUCCESS) {\n",
+		 "\tif (clnt_call (clnt, %s,\n\t\t(xdrproc_t) xdr_%s, (char *) %s%s,\n\t\t(xdrproc_t) xdr_%s, (char *) %s%s,\n\t\tTIMEOUT) != RPC_SUCCESS) {\n",
 		 proc->proc_name,
 		 stringfix (proc->args.decls->decl.type),
 		 (newstyle ? "&" : ""),
@@ -308,7 +308,7 @@ printbody (proc_list * proc)
 		 RESULT);
       else
 	fprintf(fout,
-		"\treturn (clnt_call(clnt, %s,\n\t\t(xdrproc_t) xdr_%s, (caddr_t) %s%s,\n\t\t(xdrproc_t) xdr_%s, (caddr_t) %s%s,\n\t\tTIMEOUT));\n",
+		"\treturn (clnt_call(clnt, %s,\n\t\t(xdrproc_t) xdr_%s, (char *) %s%s,\n\t\t(xdrproc_t) xdr_%s, (char *) %s%s,\n\t\tTIMEOUT));\n",
 		proc->proc_name,
 		stringfix (proc->args.decls->decl.type),
 		(newstyle ? "&" : ""),
diff --git a/sunrpc/rpc_cmsg.c b/sunrpc/rpc_cmsg.c
index ec8cc6ccca..4164a849f5 100644
--- a/sunrpc/rpc_cmsg.c
+++ b/sunrpc/rpc_cmsg.c
@@ -76,7 +76,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
 	  (void) IXDR_PUT_INT32 (buf, oa->oa_length);
 	  if (oa->oa_length)
 	    {
-	      memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length);
+	      memcpy ((char *) buf, oa->oa_base, oa->oa_length);
 	      buf = (int32_t *) ((char *) buf + RNDUP (oa->oa_length));
 	    }
 	  oa = &cmsg->rm_call.cb_verf;
@@ -84,7 +84,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
 	  (void) IXDR_PUT_INT32 (buf, oa->oa_length);
 	  if (oa->oa_length)
 	    {
-	      memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length);
+	      memcpy ((char *) buf, oa->oa_base, oa->oa_length);
 	      /* no real need....
 		 buf = (long *) ((char *) buf + RNDUP(oa->oa_length));
 	       */
@@ -120,7 +120,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
 		return FALSE;
 	      if (oa->oa_base == NULL)
 		{
-		  oa->oa_base = (caddr_t)
+		  oa->oa_base = (char *)
 		    mem_alloc (oa->oa_length);
 		}
 	      buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length));
@@ -132,7 +132,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
 		}
 	      else
 		{
-		  memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length);
+		  memcpy (oa->oa_base, (char *) buf, oa->oa_length);
 		  /* no real need....
 		     buf = (long *) ((char *) buf
 		     + RNDUP(oa->oa_length));
@@ -160,7 +160,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
 		return FALSE;
 	      if (oa->oa_base == NULL)
 		{
-		  oa->oa_base = (caddr_t)
+		  oa->oa_base = (char *)
 		    mem_alloc (oa->oa_length);
 		}
 	      buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length));
@@ -172,7 +172,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
 		}
 	      else
 		{
-		  memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length);
+		  memcpy (oa->oa_base, (char *) buf, oa->oa_length);
 		  /* no real need...
 		     buf = (long *) ((char *) buf
 		     + RNDUP(oa->oa_length));
diff --git a/sunrpc/rpc_hout.c b/sunrpc/rpc_hout.c
index 10f793d233..027d687219 100644
--- a/sunrpc/rpc_hout.c
+++ b/sunrpc/rpc_hout.c
@@ -277,7 +277,7 @@ pfreeprocdef (const char *name, const char *vers, int mode)
   f_print (fout, "extern int ");
   pvname (name, vers);
   if (mode == 1)
-    f_print (fout,"_freeresult (SVCXPRT *, xdrproc_t, caddr_t);\n");
+    f_print (fout,"_freeresult (SVCXPRT *, xdrproc_t, char *);\n");
   else
     f_print (fout,"_freeresult ();\n");
 }
diff --git a/sunrpc/rpc_prot.c b/sunrpc/rpc_prot.c
index 46582f2a35..bd98264de1 100644
--- a/sunrpc/rpc_prot.c
+++ b/sunrpc/rpc_prot.c
@@ -65,7 +65,7 @@ libc_hidden_nolink_sunrpc (xdr_opaque_auth, GLIBC_2_0)
 bool_t
 xdr_des_block (XDR *xdrs, des_block *blkp)
 {
-  return xdr_opaque (xdrs, (caddr_t) blkp, sizeof (des_block));
+  return xdr_opaque (xdrs, (char *) blkp, sizeof (des_block));
 }
 libc_hidden_nolink_sunrpc (xdr_des_block, GLIBC_2_0)
 
@@ -136,7 +136,7 @@ xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg)
       xdr_enum (xdrs, (enum_t *) & (rmsg->rm_direction)) &&
       (rmsg->rm_direction == REPLY))
     return xdr_union (xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat),
-		      (caddr_t) & (rmsg->rm_reply.ru), reply_dscrm,
+		      (char *) & (rmsg->rm_reply.ru), reply_dscrm,
 		      NULL_xdrproc_t);
   return FALSE;
 }
diff --git a/sunrpc/rpc_sample.c b/sunrpc/rpc_sample.c
index e90b58c080..1a267f1cfa 100644
--- a/sunrpc/rpc_sample.c
+++ b/sunrpc/rpc_sample.c
@@ -264,13 +264,13 @@ write_sample_server (definition * def)
 	  f_print(fout, "\nint\n");
 	  pvname(def->def_name, vp->vers_num);
 	  if (Cflag)
-	    f_print(fout,"_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result)\n");
+	    f_print(fout,"_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, char *result)\n");
 	  else
 	    {
 	      f_print(fout,"_freeresult (transp, xdr_result, result)\n");
 	      f_print(fout,"\tSVCXPRT *transp;\n");
 	      f_print(fout,"\txdrproc_t xdr_result;\n");
-	      f_print(fout,"\tcaddr_t result;\n");
+	      f_print(fout,"\tchar *result;\n");
 	    }
 	  f_print(fout, "{\n");
 	  f_print(fout, "\txdr_free (xdr_result, result);\n");
diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c
index 4f12a8146c..3eca750d46 100644
--- a/sunrpc/rpc_svcout.c
+++ b/sunrpc/rpc_svcout.c
@@ -624,7 +624,7 @@ write_program (const definition * def, const char *storage)
 	{
 	  f_print(fout,"\tif (!");
 	  pvname(def->def_name, vp->vers_num);
-	  f_print(fout,"_freeresult (%s, _xdr_%s, (caddr_t) &%s))\n",
+	  f_print(fout,"_freeresult (%s, _xdr_%s, (char *) &%s))\n",
 		  TRANSP, RESULT, RESULT);
 	  (void) sprintf(_errbuf, "unable to free results");
 	  print_err_message("\t\t");
@@ -644,7 +644,7 @@ printerr (const char *err, const char *transp)
 static void
 printif (const char *proc, const char *transp, const char *arg)
 {
-  f_print (fout, "\tif (!svc_%s (%s, (xdrproc_t) _xdr_%s, (caddr_t) &%s)) {\n",
+  f_print (fout, "\tif (!svc_%s (%s, (xdrproc_t) _xdr_%s, (char *) &%s)) {\n",
 	   proc, transp, arg, arg);
 }
 
@@ -773,7 +773,7 @@ write_msg_out (void)
     }
   else
     {
-      f_print (fout, "void _msgout (char* msg)\n");
+      f_print (fout, "void _msgout (char *msg)\n");
     }
   f_print (fout, "{\n");
   f_print (fout, "#ifdef RPC_SVC_FG\n");
diff --git a/sunrpc/svc.c b/sunrpc/svc.c
index 917e9a311c..1aa11094bf 100644
--- a/sunrpc/svc.c
+++ b/sunrpc/svc.c
@@ -250,7 +250,7 @@ libc_hidden_nolink_sunrpc (svc_unregister, GLIBC_2_0)
 /* Send a reply to an rpc request */
 bool_t
 svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
-	       caddr_t xdr_location)
+	       char *xdr_location)
 {
   struct rpc_msg rply;
 
diff --git a/sunrpc/svc_authux.c b/sunrpc/svc_authux.c
index 0c6b0242cd..1a703782f4 100644
--- a/sunrpc/svc_authux.c
+++ b/sunrpc/svc_authux.c
@@ -78,7 +78,7 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
 	  stat = AUTH_BADCRED;
 	  goto done;
 	}
-      memcpy (aup->aup_machname, (caddr_t) buf, (u_int) str_len);
+      memcpy (aup->aup_machname, (char *) buf, (u_int) str_len);
       aup->aup_machname[str_len] = 0;
       str_len = RNDUP (str_len);
       buf = (int32_t *) ((char *) buf + str_len);
diff --git a/sunrpc/svc_raw.c b/sunrpc/svc_raw.c
index f0176311d5..f7a3f913bf 100644
--- a/sunrpc/svc_raw.c
+++ b/sunrpc/svc_raw.c
@@ -52,9 +52,9 @@ struct svcraw_private_s
 
 static bool_t svcraw_recv (SVCXPRT *, struct rpc_msg *);
 static enum xprt_stat svcraw_stat (SVCXPRT *);
-static bool_t svcraw_getargs (SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svcraw_getargs (SVCXPRT *, xdrproc_t, char *);
 static bool_t svcraw_reply (SVCXPRT *, struct rpc_msg *);
-static bool_t svcraw_freeargs (SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svcraw_freeargs (SVCXPRT *, xdrproc_t, char *);
 static void svcraw_destroy (SVCXPRT *);
 
 static const struct xp_ops server_ops =
@@ -127,7 +127,7 @@ svcraw_reply (SVCXPRT *xprt, struct rpc_msg *msg)
 }
 
 static bool_t
-svcraw_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
+svcraw_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, char *args_ptr)
 {
   struct svcraw_private_s *srp = svcraw_private;
 
@@ -137,7 +137,7 @@ svcraw_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
 }
 
 static bool_t
-svcraw_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
+svcraw_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, char *args_ptr)
 {
   struct svcraw_private_s *srp = svcraw_private;
   XDR *xdrs;
diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
index efbdd22548..1ae2a1a681 100644
--- a/sunrpc/svc_tcp.c
+++ b/sunrpc/svc_tcp.c
@@ -71,9 +71,9 @@
  */
 static bool_t svctcp_recv (SVCXPRT *, struct rpc_msg *);
 static enum xprt_stat svctcp_stat (SVCXPRT *);
-static bool_t svctcp_getargs (SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svctcp_getargs (SVCXPRT *, xdrproc_t, char *);
 static bool_t svctcp_reply (SVCXPRT *, struct rpc_msg *);
-static bool_t svctcp_freeargs (SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svctcp_freeargs (SVCXPRT *, xdrproc_t, char *);
 static void svctcp_destroy (SVCXPRT *);
 
 static const struct xp_ops svctcp_op =
@@ -105,9 +105,9 @@ static const struct xp_ops svctcp_rendezvous_op =
 {
   rendezvous_request,
   rendezvous_stat,
-  (bool_t (*) (SVCXPRT *, xdrproc_t, caddr_t)) svctcp_rendezvous_abort,
+  (bool_t (*) (SVCXPRT *, xdrproc_t, char *)) svctcp_rendezvous_abort,
   (bool_t (*) (SVCXPRT *, struct rpc_msg *)) svctcp_rendezvous_abort,
-  (bool_t (*) (SVCXPRT *, xdrproc_t, caddr_t)) svctcp_rendezvous_abort,
+  (bool_t (*) (SVCXPRT *, xdrproc_t, char *)) svctcp_rendezvous_abort,
   svctcp_destroy
 };
 
@@ -194,7 +194,7 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize)
   r->sendsize = sendsize;
   r->recvsize = recvsize;
   xprt->xp_p2 = NULL;
-  xprt->xp_p1 = (caddr_t) r;
+  xprt->xp_p1 = (char *) r;
   xprt->xp_verf = _null_auth;
   xprt->xp_ops = &svctcp_rendezvous_op;
   xprt->xp_port = ntohs (addr.sin_port);
@@ -237,9 +237,9 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize)
     }
   cd->strm_stat = XPRT_IDLE;
   xdrrec_create (&(cd->xdrs), sendsize, recvsize,
-		 (caddr_t) xprt, readtcp, writetcp);
+		 (char *) xprt, readtcp, writetcp);
   xprt->xp_p2 = NULL;
-  xprt->xp_p1 = (caddr_t) cd;
+  xprt->xp_p1 = (char *) cd;
   xprt->xp_verf.oa_base = cd->verf_body;
   xprt->xp_addrlen = 0;
   xprt->xp_ops = &svctcp_op;	/* truly deals with calls */
@@ -299,8 +299,8 @@ svctcp_destroy (SVCXPRT *xprt)
       /* an actual connection socket */
       XDR_DESTROY (&(cd->xdrs));
     }
-  mem_free ((caddr_t) cd, sizeof (struct tcp_conn));
-  mem_free ((caddr_t) xprt, sizeof (SVCXPRT));
+  mem_free ((char *) cd, sizeof (struct tcp_conn));
+  mem_free ((char *) xprt, sizeof (SVCXPRT));
 }
 
 
@@ -351,7 +351,7 @@ readtcp (char *xprtptr, char *buf, int len)
  * Any error is fatal and the connection is closed.
  */
 static int
-writetcp (char *xprtptr, char * buf, int len)
+writetcp (char *xprtptr, char *buf, int len)
 {
   SVCXPRT *xprt = (SVCXPRT *)xprtptr;
   int i, cnt;
@@ -398,14 +398,14 @@ svctcp_recv (SVCXPRT *xprt, struct rpc_msg *msg)
 }
 
 static bool_t
-svctcp_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
+svctcp_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, char *args_ptr)
 {
   return ((*xdr_args) (&(((struct tcp_conn *)
 			  (xprt->xp_p1))->xdrs), args_ptr));
 }
 
 static bool_t
-svctcp_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
+svctcp_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, char *args_ptr)
 {
   XDR *xdrs = &(((struct tcp_conn *) (xprt->xp_p1))->xdrs);
 
diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c
index ae67c9b36a..1f34ccf4a4 100644
--- a/sunrpc/svc_udp.c
+++ b/sunrpc/svc_udp.c
@@ -74,8 +74,8 @@
 static bool_t svcudp_recv (SVCXPRT *, struct rpc_msg *);
 static bool_t svcudp_reply (SVCXPRT *, struct rpc_msg *);
 static enum xprt_stat svcudp_stat (SVCXPRT *);
-static bool_t svcudp_getargs (SVCXPRT *, xdrproc_t, caddr_t);
-static bool_t svcudp_freeargs (SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svcudp_getargs (SVCXPRT *, xdrproc_t, char *);
+static bool_t svcudp_freeargs (SVCXPRT *, xdrproc_t, char *);
 static void svcudp_destroy (SVCXPRT *);
 
 static const struct xp_ops svcudp_op =
@@ -168,7 +168,7 @@ svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz)
   rpc_buffer (xprt) = buf;
   xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_DECODE);
   su->su_cache = NULL;
-  xprt->xp_p2 = (caddr_t) su;
+  xprt->xp_p2 = (char *) su;
   xprt->xp_verf.oa_base = su->su_verfbody;
   xprt->xp_ops = &svcudp_op;
   xprt->xp_port = ntohs (addr.sin_port);
@@ -368,14 +368,14 @@ svcudp_reply (SVCXPRT *xprt, struct rpc_msg *msg)
 }
 
 static bool_t
-svcudp_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
+svcudp_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, char *args_ptr)
 {
 
   return (*xdr_args) (&(su_data (xprt)->su_xdrs), args_ptr);
 }
 
 static bool_t
-svcudp_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
+svcudp_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, char *args_ptr)
 {
   XDR *xdrs = &(su_data (xprt)->su_xdrs);
 
@@ -392,8 +392,8 @@ svcudp_destroy (SVCXPRT *xprt)
   (void) __close (xprt->xp_sock);
   XDR_DESTROY (&(su->su_xdrs));
   mem_free (rpc_buffer (xprt), su->su_iosz);
-  mem_free ((caddr_t) su, sizeof (struct svcudp_data));
-  mem_free ((caddr_t) xprt, sizeof (SVCXPRT));
+  mem_free ((char *) su, sizeof (struct svcudp_data));
+  mem_free ((char *) xprt, sizeof (SVCXPRT));
 }
 
 
diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index e01afeabe6..2d5864cc10 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -71,9 +71,9 @@
  */
 static bool_t svcunix_recv (SVCXPRT *, struct rpc_msg *);
 static enum xprt_stat svcunix_stat (SVCXPRT *);
-static bool_t svcunix_getargs (SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svcunix_getargs (SVCXPRT *, xdrproc_t, char *);
 static bool_t svcunix_reply (SVCXPRT *, struct rpc_msg *);
-static bool_t svcunix_freeargs (SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svcunix_freeargs (SVCXPRT *, xdrproc_t, char *);
 static void svcunix_destroy (SVCXPRT *);
 
 static const struct xp_ops svcunix_op =
@@ -105,9 +105,9 @@ static const struct xp_ops svcunix_rendezvous_op =
 {
   rendezvous_request,
   rendezvous_stat,
-  (bool_t (*) (SVCXPRT *, xdrproc_t, caddr_t)) svcunix_rendezvous_abort,
+  (bool_t (*) (SVCXPRT *, xdrproc_t, char *)) svcunix_rendezvous_abort,
   (bool_t (*) (SVCXPRT *, struct rpc_msg *)) svcunix_rendezvous_abort,
-  (bool_t (*) (SVCXPRT *, xdrproc_t, caddr_t)) svcunix_rendezvous_abort,
+  (bool_t (*) (SVCXPRT *, xdrproc_t, char *)) svcunix_rendezvous_abort,
   svcunix_destroy
 };
 
@@ -194,7 +194,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
   r->sendsize = sendsize;
   r->recvsize = recvsize;
   xprt->xp_p2 = NULL;
-  xprt->xp_p1 = (caddr_t) r;
+  xprt->xp_p1 = (char *) r;
   xprt->xp_verf = _null_auth;
   xprt->xp_ops = &svcunix_rendezvous_op;
   xprt->xp_port = -1;
@@ -233,9 +233,9 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize)
     }
   cd->strm_stat = XPRT_IDLE;
   xdrrec_create (&(cd->xdrs), sendsize, recvsize,
-		 (caddr_t) xprt, readunix, writeunix);
+		 (char *) xprt, readunix, writeunix);
   xprt->xp_p2 = NULL;
-  xprt->xp_p1 = (caddr_t) cd;
+  xprt->xp_p1 = (char *) cd;
   xprt->xp_verf.oa_base = cd->verf_body;
   xprt->xp_addrlen = 0;
   xprt->xp_ops = &svcunix_op;	/* truly deals with calls */
@@ -298,8 +298,8 @@ svcunix_destroy (SVCXPRT *xprt)
       /* an actual connection socket */
       XDR_DESTROY (&(cd->xdrs));
     }
-  mem_free ((caddr_t) cd, sizeof (struct unix_conn));
-  mem_free ((caddr_t) xprt, sizeof (SVCXPRT));
+  mem_free ((char *) cd, sizeof (struct unix_conn));
+  mem_free ((char *) xprt, sizeof (SVCXPRT));
 }
 
 #ifdef SCM_CREDENTIALS
@@ -331,7 +331,7 @@ __msgread (int sock, void *data, size_t cnt)
   msg.msg_name = NULL;
   msg.msg_namelen = 0;
 #ifdef SCM_CREDENTIALS
-  msg.msg_control = (caddr_t) &cm;
+  msg.msg_control = (char *) &cm;
   msg.msg_controllen = sizeof (struct cmessage);
 #endif
   msg.msg_flags = 0;
@@ -453,7 +453,7 @@ readunix (char *xprtptr, char *buf, int len)
  * Any error is fatal and the connection is closed.
  */
 static int
-writeunix (char *xprtptr, char * buf, int len)
+writeunix (char *xprtptr, char *buf, int len)
 {
   SVCXPRT *xprt = (SVCXPRT *) xprtptr;
   int i, cnt;
@@ -496,7 +496,7 @@ svcunix_recv (SVCXPRT *xprt, struct rpc_msg *msg)
       /* set up verifiers */
 #ifdef SCM_CREDENTIALS
       msg->rm_call.cb_verf.oa_flavor = AUTH_UNIX;
-      msg->rm_call.cb_verf.oa_base = (caddr_t) &cm;
+      msg->rm_call.cb_verf.oa_base = (char *) &cm;
       msg->rm_call.cb_verf.oa_length = sizeof (cm);
 #endif
       return TRUE;
@@ -506,14 +506,14 @@ svcunix_recv (SVCXPRT *xprt, struct rpc_msg *msg)
 }
 
 static bool_t
-svcunix_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
+svcunix_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, char *args_ptr)
 {
   return (*xdr_args) (&(((struct unix_conn *) (xprt->xp_p1))->xdrs),
 		      args_ptr);
 }
 
 static bool_t
-svcunix_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
+svcunix_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, char *args_ptr)
 {
   XDR *xdrs = &(((struct unix_conn *) (xprt->xp_p1))->xdrs);
 
diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c
index b5fb7455e2..98967dfd35 100644
--- a/sunrpc/xdr.c
+++ b/sunrpc/xdr.c
@@ -539,7 +539,7 @@ libc_hidden_nolink_sunrpc (xdr_enum, GLIBC_2_0)
  * cp points to the opaque object and cnt gives the byte length.
  */
 bool_t
-xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
+xdr_opaque (XDR *xdrs, char *cp, u_int cnt)
 {
   u_int rndup;
   static char crud[BYTES_PER_XDR_UNIT];
@@ -566,7 +566,7 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
 	}
       if (rndup == 0)
 	return TRUE;
-      return XDR_GETBYTES (xdrs, (caddr_t)crud, rndup);
+      return XDR_GETBYTES (xdrs, (char *)crud, rndup);
 
     case XDR_ENCODE:
       if (!XDR_PUTBYTES (xdrs, cp, cnt))
diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c
index 18383d437e..a4f0853843 100644
--- a/sunrpc/xdr_array.c
+++ b/sunrpc/xdr_array.c
@@ -56,7 +56,7 @@
 bool_t
 xdr_array (XDR *xdrs,
 	   /* array pointer */
-	   caddr_t *addrp,
+	   char **addrp,
 	   /* number of elements */
 	   u_int *sizep,
 	   /* max numberof elements */
@@ -67,7 +67,7 @@ xdr_array (XDR *xdrs,
 	   xdrproc_t elproc)
 {
   u_int i;
-  caddr_t target = *addrp;
+  char *target = *addrp;
   u_int c;		/* the actual element count */
   bool_t stat = TRUE;
 
diff --git a/sunrpc/xdr_mem.c b/sunrpc/xdr_mem.c
index 46a1f6f190..f4af0acb39 100644
--- a/sunrpc/xdr_mem.c
+++ b/sunrpc/xdr_mem.c
@@ -42,7 +42,7 @@
 
 static bool_t xdrmem_getlong (XDR *, long *);
 static bool_t xdrmem_putlong (XDR *, const long *);
-static bool_t xdrmem_getbytes (XDR *, caddr_t, u_int);
+static bool_t xdrmem_getbytes (XDR *, char *, u_int);
 static bool_t xdrmem_putbytes (XDR *, const char *, u_int);
 static u_int xdrmem_getpos (const XDR *);
 static bool_t xdrmem_setpos (XDR *, u_int);
@@ -70,13 +70,13 @@ static const struct xdr_ops xdrmem_ops =
  * memory buffer.
  */
 void
-xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
+xdrmem_create (XDR *xdrs, const char *addr, u_int size, enum xdr_op op)
 {
   xdrs->x_op = op;
   /* We have to add the const since the `struct xdr_ops' in `struct XDR'
      is not `const'.  */
   xdrs->x_ops = (struct xdr_ops *) &xdrmem_ops;
-  xdrs->x_private = xdrs->x_base = addr;
+  xdrs->x_private = xdrs->x_base = (char *)addr;
   xdrs->x_handy = size;
 }
 #ifdef EXPORT_RPC_SYMBOLS
@@ -134,7 +134,7 @@ xdrmem_putlong (XDR *xdrs, const long *lp)
  * a good idea.  None of the things pointed to are const.
  */
 static bool_t
-xdrmem_getbytes (XDR *xdrs, caddr_t addr, u_int len)
+xdrmem_getbytes (XDR *xdrs, char *addr, u_int len)
 {
   if (xdrs->x_handy < len)
     return FALSE;
@@ -175,8 +175,8 @@ xdrmem_getpos (const XDR *xdrs)
 static bool_t
 xdrmem_setpos (XDR *xdrs, u_int pos)
 {
-  caddr_t newaddr = xdrs->x_base + pos;
-  caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
+  char *newaddr = xdrs->x_base + pos;
+  char *lastaddr = xdrs->x_private + xdrs->x_handy;
   size_t handy = lastaddr - newaddr;
 
   if (newaddr > lastaddr
diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c
index c9a1eaad63..5d777803ed 100644
--- a/sunrpc/xdr_rec.c
+++ b/sunrpc/xdr_rec.c
@@ -54,7 +54,7 @@
 
 static bool_t xdrrec_getlong (XDR *, long *);
 static bool_t xdrrec_putlong (XDR *, const long *);
-static bool_t xdrrec_getbytes (XDR *, caddr_t, u_int);
+static bool_t xdrrec_getbytes (XDR *, char *, u_int);
 static bool_t xdrrec_putbytes (XDR *, const char *, u_int);
 static u_int xdrrec_getpos (const XDR *);
 static bool_t xdrrec_setpos (XDR *, u_int);
@@ -93,15 +93,15 @@ static const struct xdr_ops xdrrec_ops = {
 
 typedef struct rec_strm
   {
-    caddr_t tcp_handle;
-    caddr_t the_buffer;
+    char *tcp_handle;
+    char *the_buffer;
     /*
      * out-going bits
      */
     int (*writeit) (char *, char *, int);
-    caddr_t out_base;		/* output buffer (points to frag header) */
-    caddr_t out_finger;		/* next output position */
-    caddr_t out_boundry;	/* data cannot up to this address */
+    char *out_base;		/* output buffer (points to frag header) */
+    char *out_finger;		/* next output position */
+    char *out_boundry;	/* data cannot up to this address */
     uint32_t *frag_header;	/* beginning of curren fragment */
     bool_t frag_sent;		/* true if buffer sent in middle of record */
     /*
@@ -109,9 +109,9 @@ typedef struct rec_strm
      */
     int (*readit) (char *, char *, int);
     u_long in_size;		/* fixed size of the input buffer */
-    caddr_t in_base;
-    caddr_t in_finger;		/* location of next byte to be had */
-    caddr_t in_boundry;		/* can read up to this location */
+    char *in_base;
+    char *in_finger;		/* location of next byte to be had */
+    char *in_boundry;		/* can read up to this location */
     long fbtbc;			/* fragment bytes to be consumed */
     bool_t last_frag;
     u_int sendsize;
@@ -123,7 +123,7 @@ static u_int fix_buf_size (u_int);
 static bool_t skip_input_bytes (RECSTREAM *, long);
 static bool_t flush_out (RECSTREAM *, bool_t);
 static bool_t set_input_fragment (RECSTREAM *);
-static bool_t get_input_bytes (RECSTREAM *, caddr_t, int);
+static bool_t get_input_bytes (RECSTREAM *, char *, int);
 
 /*
  * Create an xdr handle for xdrrec
@@ -136,12 +136,12 @@ static bool_t get_input_bytes (RECSTREAM *, caddr_t, int);
  */
 void
 xdrrec_create (XDR *xdrs, u_int sendsize,
-	       u_int recvsize, caddr_t tcp_handle,
+	       u_int recvsize, char *tcp_handle,
 	       int (*readit) (char *, char *, int),
 	       int (*writeit) (char *, char *, int))
 {
   RECSTREAM *rstrm = (RECSTREAM *) mem_alloc (sizeof (RECSTREAM));
-  caddr_t tmp;
+  char *tmp;
   char *buf;
 
   sendsize = fix_buf_size (sendsize);
@@ -176,7 +176,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize,
   /* We have to add the cast since the `struct xdr_ops' in `struct XDR'
      is not `const'.  */
   xdrs->x_ops = (struct xdr_ops *) &xdrrec_ops;
-  xdrs->x_private = (caddr_t) rstrm;
+  xdrs->x_private = (char *) rstrm;
   rstrm->tcp_handle = tcp_handle;
   rstrm->readit = readit;
   rstrm->writeit = writeit;
@@ -216,7 +216,7 @@ xdrrec_getlong (XDR *xdrs, long *lp)
     }
   else
     {
-      if (!xdrrec_getbytes (xdrs, (caddr_t) & mylong,
+      if (!xdrrec_getbytes (xdrs, (char *) & mylong,
 			    BYTES_PER_XDR_UNIT))
 	return FALSE;
       *lp = (int32_t) ntohl (mylong);
@@ -248,7 +248,7 @@ xdrrec_putlong (XDR *xdrs, const long *lp)
 }
 
 static bool_t	   /* must manage buffers, fragments, and records */
-xdrrec_getbytes (XDR *xdrs, caddr_t addr, u_int len)
+xdrrec_getbytes (XDR *xdrs, char *addr, u_int len)
 {
   RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
   u_int current;
@@ -330,7 +330,7 @@ xdrrec_setpos (XDR *xdrs, u_int pos)
   RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
   u_int currpos = xdrrec_getpos (xdrs);
   int delta = currpos - pos;
-  caddr_t newpos;
+  char *newpos;
 
   if ((int) currpos != -1)
     switch (xdrs->x_op)
@@ -338,7 +338,7 @@ xdrrec_setpos (XDR *xdrs, u_int pos)
 
       case XDR_ENCODE:
 	newpos = rstrm->out_finger - delta;
-	if (newpos > (caddr_t) rstrm->frag_header &&
+	if (newpos > (char *) rstrm->frag_header &&
 	    newpos < rstrm->out_boundry)
 	  {
 	    rstrm->out_finger = newpos;
@@ -404,7 +404,7 @@ xdrrec_destroy (XDR *xdrs)
 
   mem_free (rstrm->the_buffer,
 	    rstrm->sendsize + rstrm->recvsize + BYTES_PER_XDR_UNIT);
-  mem_free ((caddr_t) rstrm, sizeof (RECSTREAM));
+  mem_free ((char *) rstrm, sizeof (RECSTREAM));
 }
 
 static bool_t
@@ -424,7 +424,7 @@ xdrrec_getint32 (XDR *xdrs, int32_t *ip)
     }
   else
     {
-      if (!xdrrec_getbytes (xdrs, (caddr_t) &mylong,
+      if (!xdrrec_getbytes (xdrs, (char *) &mylong,
 			    BYTES_PER_XDR_UNIT))
 	return FALSE;
       *ip = ntohl (mylong);
@@ -549,14 +549,14 @@ flush_out (RECSTREAM *rstrm, bool_t eor)
       != (int) len)
     return FALSE;
   rstrm->frag_header = (uint32_t *) rstrm->out_base;
-  rstrm->out_finger = (caddr_t) rstrm->out_base + BYTES_PER_XDR_UNIT;
+  rstrm->out_finger = (char *) rstrm->out_base + BYTES_PER_XDR_UNIT;
   return TRUE;
 }
 
 static bool_t	/* knows nothing about records!  Only about input buffers */
 fill_input_buf (RECSTREAM *rstrm)
 {
-  caddr_t where;
+  char *where;
   size_t i;
   int len;
 
@@ -573,7 +573,7 @@ fill_input_buf (RECSTREAM *rstrm)
 }
 
 static bool_t	/* knows nothing about records!  Only about input buffers */
-get_input_bytes (RECSTREAM *rstrm, caddr_t addr, int len)
+get_input_bytes (RECSTREAM *rstrm, char *addr, int len)
 {
   int current;
 
@@ -600,7 +600,7 @@ set_input_fragment (RECSTREAM *rstrm)
 {
   uint32_t header;
 
-  if (! get_input_bytes (rstrm, (caddr_t)&header, BYTES_PER_XDR_UNIT))
+  if (! get_input_bytes (rstrm, (char *)&header, BYTES_PER_XDR_UNIT))
     return FALSE;
   header = ntohl (header);
   rstrm->last_frag = ((header & LAST_FRAG) == 0) ? FALSE : TRUE;
diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c
index eab3b74227..abb9ac24f5 100644
--- a/sunrpc/xdr_ref.c
+++ b/sunrpc/xdr_ref.c
@@ -57,13 +57,13 @@
 bool_t
 xdr_reference (XDR *xdrs,
 	       /* the pointer to work on */
-	       caddr_t *pp,
+	       char **pp,
 	       /* size of the object pointed to */
 	       u_int size,
 	       /* xdr routine to handle the object */
 	       xdrproc_t proc)
 {
-  caddr_t loc = *pp;
+  char *loc = *pp;
   bool_t stat;
 
   if (loc == NULL)
@@ -73,7 +73,7 @@ xdr_reference (XDR *xdrs,
 	return TRUE;
 
       case XDR_DECODE:
-	*pp = loc = (caddr_t) calloc (1, size);
+	*pp = loc = (char *) calloc (1, size);
 	if (loc == NULL)
 	  {
 	    (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
diff --git a/sunrpc/xdr_sizeof.c b/sunrpc/xdr_sizeof.c
index 1592406d64..150d043078 100644
--- a/sunrpc/xdr_sizeof.c
+++ b/sunrpc/xdr_sizeof.c
@@ -87,7 +87,7 @@ x_inline (XDR *xdrs, u_int len)
     {
       /* Free the earlier space and allocate new area */
       free (xdrs->x_private);
-      if ((xdrs->x_private = (caddr_t) malloc (len)) == NULL)
+      if ((xdrs->x_private = (char *) malloc (len)) == NULL)
 	{
 	  xdrs->x_base = 0;
 	  return NULL;
@@ -133,7 +133,7 @@ xdr_sizeof (xdrproc_t func, void *data)
   bool_t stat;
   /* to stop ANSI-C compiler from complaining */
   typedef bool_t (*dummyfunc1) (XDR *, long *);
-  typedef bool_t (*dummyfunc2) (XDR *, caddr_t, u_int);
+  typedef bool_t (*dummyfunc2) (XDR *, char *, u_int);
   typedef bool_t (*dummyfunc3) (XDR *, int32_t *);
 
   ops.x_putlong = x_putlong;
@@ -152,8 +152,8 @@ xdr_sizeof (xdrproc_t func, void *data)
   x.x_op = XDR_ENCODE;
   x.x_ops = &ops;
   x.x_handy = 0;
-  x.x_private = (caddr_t) NULL;
-  x.x_base = (caddr_t) 0;
+  x.x_private = (char *) NULL;
+  x.x_base = (char *) 0;
 
   stat = func (&x, data);
   free (x.x_private);
diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c
index 0c2cbb78de..459585bf0d 100644
--- a/sunrpc/xdr_stdio.c
+++ b/sunrpc/xdr_stdio.c
@@ -49,7 +49,7 @@
 
 static bool_t xdrstdio_getlong (XDR *, long *);
 static bool_t xdrstdio_putlong (XDR *, const long *);
-static bool_t xdrstdio_getbytes (XDR *, caddr_t, u_int);
+static bool_t xdrstdio_getbytes (XDR *, char *, u_int);
 static bool_t xdrstdio_putbytes (XDR *, const char *, u_int);
 static u_int xdrstdio_getpos (const XDR *);
 static bool_t xdrstdio_setpos (XDR *, u_int);
@@ -87,7 +87,7 @@ xdrstdio_create (XDR *xdrs, FILE *file, enum xdr_op op)
   /* We have to add the const since the `struct xdr_ops' in `struct XDR'
      is not `const'.  */
   xdrs->x_ops = (struct xdr_ops *) &xdrstdio_ops;
-  xdrs->x_private = (caddr_t) file;
+  xdrs->x_private = (char *) file;
   xdrs->x_handy = 0;
   xdrs->x_base = 0;
 }
@@ -108,7 +108,7 @@ xdrstdio_getlong (XDR *xdrs, long *lp)
 {
   uint32_t mycopy;
 
-  if (fread ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
+  if (fread ((char *) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
     return FALSE;
   *lp = (long) ntohl (mycopy);
   return TRUE;
@@ -119,13 +119,13 @@ xdrstdio_putlong (XDR *xdrs, const long *lp)
 {
   int32_t mycopy = htonl ((uint32_t) *lp);
 
-  if (fwrite ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
+  if (fwrite ((char *) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
     return FALSE;
   return TRUE;
 }
 
 static bool_t
-xdrstdio_getbytes (XDR *xdrs, const caddr_t addr, u_int len)
+xdrstdio_getbytes (XDR *xdrs, char *addr, u_int len)
 {
   if ((len != 0) && (fread (addr, (int) len, 1,
 			    (FILE *) xdrs->x_private) != 1))
@@ -174,7 +174,7 @@ xdrstdio_getint32 (XDR *xdrs, int32_t *ip)
 {
   int32_t mycopy;
 
-  if (fread ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
+  if (fread ((char *) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
     return FALSE;
   *ip = ntohl (mycopy);
   return TRUE;
@@ -186,7 +186,7 @@ xdrstdio_putint32 (XDR *xdrs, const int32_t *ip)
   int32_t mycopy = htonl (*ip);
 
   ip = &mycopy;
-  if (fwrite ((caddr_t) ip, 4, 1, (FILE *) xdrs->x_private) != 1)
+  if (fwrite ((char *) ip, 4, 1, (FILE *) xdrs->x_private) != 1)
     return FALSE;
   return TRUE;
 }
diff --git a/support/xunistd.h b/support/xunistd.h
index 96f498f2e5..82f1ccc7b8 100644
--- a/support/xunistd.h
+++ b/support/xunistd.h
@@ -64,8 +64,8 @@ void *xmmap (void *addr, size_t length, int prot, int flags, int fd);
 void xmprotect (void *addr, size_t length, int prot);
 void xmunmap (void *addr, size_t length);
 
-ssize_t xcopy_file_range(int fd_in, loff_t *off_in, int fd_out,
-			 loff_t *off_out, size_t len, unsigned int flags);
+ssize_t xcopy_file_range(int fd_in, off64_t *off_in, int fd_out,
+			 off64_t *off_out, size_t len, unsigned int flags);
 
 __END_DECLS
 
diff --git a/sysdeps/gnu/net/if.h b/sysdeps/gnu/net/if.h
index e587a5ce59..8ab14d0d14 100644
--- a/sysdeps/gnu/net/if.h
+++ b/sysdeps/gnu/net/if.h
@@ -145,7 +145,7 @@ struct ifreq
 	struct ifmap ifru_map;
 	char ifru_slave[IFNAMSIZ];	/* Just fits the size */
 	char ifru_newname[IFNAMSIZ];
-	__caddr_t ifru_data;
+	char *ifru_data;
       } ifr_ifru;
   };
 # define ifr_name	ifr_ifrn.ifrn_name	/* interface name 	*/
@@ -178,7 +178,7 @@ struct ifconf
     int	ifc_len;			/* Size of buffer.  */
     union
       {
-	__caddr_t ifcu_buf;
+	char *ifcu_buf;
 	struct ifreq *ifcu_req;
       } ifc_ifcu;
   };
diff --git a/sysdeps/gnu/sys/mtio.h b/sysdeps/gnu/sys/mtio.h
index 56cfcf13d0..17a9b210d9 100644
--- a/sysdeps/gnu/sys/mtio.h
+++ b/sysdeps/gnu/sys/mtio.h
@@ -90,8 +90,8 @@ struct mtget
     long int mt_gstat;		/* Generic (device independent) status.  */
     long int mt_erreg;		/* Error register.  */
     /* The next two fields are not always used.  */
-    __daddr_t mt_fileno;	/* Number of current file on tape.  */
-    __daddr_t mt_blkno;		/* Current block number.  */
+    int mt_fileno;		/* Number of current file on tape.  */
+    int mt_blkno;		/* Current block number.  */
   };
 #define _IOT_mtget /* Hurd ioctl type field.  */ \
   _IOT (_IOTS (long), 7, 0, 0, 0, 0)
diff --git a/sysdeps/mach/hurd/bits/typesizes.h b/sysdeps/mach/hurd/bits/typesizes.h
index f950bbf5d8..d3b0dcd9c8 100644
--- a/sysdeps/mach/hurd/bits/typesizes.h
+++ b/sysdeps/mach/hurd/bits/typesizes.h
@@ -50,7 +50,6 @@
 #define __TIME_T_TYPE		__SLONGWORD_TYPE
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
 #define __KEY_T_TYPE		__S32_TYPE
 #define __CLOCKID_T_TYPE	__S32_TYPE
 #define __TIMER_T_TYPE		__S32_TYPE
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
index 44e5381822..13e0428c40 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
@@ -49,7 +49,6 @@
 #define __TIME_T_TYPE		__SLONGWORD_TYPE
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__S64_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
 #define __KEY_T_TYPE		__S32_TYPE
 #define __CLOCKID_T_TYPE	__S32_TYPE
 #define __TIMER_T_TYPE		void *
diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
index 47b91568dd..c7e72f3ca5 100644
--- a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
@@ -51,7 +51,6 @@
 #define __TIME_T_TYPE		__SLONGWORD_TYPE
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
 #define __KEY_T_TYPE		__S32_TYPE
 #define __CLOCKID_T_TYPE	__S32_TYPE
 #define __TIMER_T_TYPE		void *
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
index c5e028625a..08e96d0d00 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
@@ -24,7 +24,7 @@
    in with standard 64-bit syscalls but return them through APIs that
    only expose the low 32 bits of some fields.  */
 
-static inline off_t lseek_overflow (loff_t res)
+static inline off_t lseek_overflow (off64_t res)
 {
   off_t retval = (off_t) res;
   if (retval == res)
diff --git a/sysdeps/unix/sysv/linux/lseek.c b/sysdeps/unix/sysv/linux/lseek.c
index 3b3e0c4a8b..0576835291 100644
--- a/sysdeps/unix/sysv/linux/lseek.c
+++ b/sysdeps/unix/sysv/linux/lseek.c
@@ -28,7 +28,7 @@
    in with standard 64-bit syscalls but return them through APIs that
    only expose the low 32 bits of some fields.  */
 
-static inline off_t lseek_overflow (loff_t res)
+static inline off_t lseek_overflow (off64_t res)
 {
   off_t retval = (off_t) res;
   if (retval == res)
@@ -42,7 +42,7 @@ off_t
 __lseek (int fd, off_t offset, int whence)
 {
 # ifdef __NR__llseek
-  loff_t res;
+  off64_t res;
   int rc = INLINE_SYSCALL_CALL (_llseek, fd,
 				(long) (((uint64_t) (offset)) >> 32),
 				(long) offset, &res, whence);
diff --git a/sysdeps/unix/sysv/linux/lseek64.c b/sysdeps/unix/sysv/linux/lseek64.c
index d1aee524e2..8a53dea9f9 100644
--- a/sysdeps/unix/sysv/linux/lseek64.c
+++ b/sysdeps/unix/sysv/linux/lseek64.c
@@ -27,7 +27,7 @@ off64_t
 __lseek64 (int fd, off64_t offset, int whence)
 {
 #ifdef __NR__llseek
-  loff_t res;
+  off64_t res;
   int rc = INLINE_SYSCALL_CALL (_llseek, fd,
 				(long) (((uint64_t) (offset)) >> 32),
 				(long) offset, &res, whence);
diff --git a/sysdeps/unix/sysv/linux/mips/bits/typesizes.h b/sysdeps/unix/sysv/linux/mips/bits/typesizes.h
index 1132670b1c..7c1bedd9af 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/typesizes.h
@@ -50,7 +50,6 @@
 #define __TIME_T_TYPE		__SLONGWORD_TYPE
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
 #define __KEY_T_TYPE		__S32_TYPE
 #define __CLOCKID_T_TYPE	__S32_TYPE
 #define __TIMER_T_TYPE		void *
diff --git a/sysdeps/unix/sysv/linux/s390/bits/typesizes.h b/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
index 91c601d0fe..e812109140 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
@@ -50,7 +50,6 @@
 #define __TIME_T_TYPE		__SLONGWORD_TYPE
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
 #define __KEY_T_TYPE		__S32_TYPE
 #define __CLOCKID_T_TYPE	__S32_TYPE
 #define __TIMER_T_TYPE		void *
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h b/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
index d19742d932..830a45f01c 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
@@ -50,7 +50,6 @@
 #define __TIME_T_TYPE		__SLONGWORD_TYPE
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__S32_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
 #define __KEY_T_TYPE		__S32_TYPE
 #define __CLOCKID_T_TYPE	__S32_TYPE
 #define __TIMER_T_TYPE		void *
diff --git a/sysdeps/unix/sysv/linux/splice.c b/sysdeps/unix/sysv/linux/splice.c
index fe21cf1988..36e5d0ad35 100644
--- a/sysdeps/unix/sysv/linux/splice.c
+++ b/sysdeps/unix/sysv/linux/splice.c
@@ -20,7 +20,7 @@
 #include <sysdep-cancel.h>
 
 ssize_t
-splice (int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len,
+splice (int fd_in, off64_t *off_in, int fd_out, off64_t *off_out, size_t len,
 	unsigned int flags)
 {
   return SYSCALL_CANCEL (splice, fd_in, off_in, fd_out, off_out, len, flags);
diff --git a/sysdeps/unix/sysv/linux/sys/quota.h b/sysdeps/unix/sysv/linux/sys/quota.h
index 2178d839d2..23f00684b6 100644
--- a/sysdeps/unix/sysv/linux/sys/quota.h
+++ b/sysdeps/unix/sysv/linux/sys/quota.h
@@ -114,7 +114,7 @@ struct dqblk
 #define	dq_btime	dq_dqb.dqb_btime
 #define	dq_itime	dq_dqb.dqb_itime
 
-#define dqoff(UID)      ((__loff_t)((UID) * sizeof (struct dqblk)))
+#define dqoff(UID)      ((__off64_t)((UID) * sizeof (struct dqblk)))
 
 /* Old name for struct if_dqinfo.  */
 struct dqinfo
@@ -128,7 +128,7 @@ struct dqinfo
 __BEGIN_DECLS
 
 extern int quotactl (int __cmd, const char *__special, int __id,
-		     __caddr_t __addr) __THROW;
+		     char *__addr) __THROW;
 
 __END_DECLS
 
diff --git a/sysdeps/unix/sysv/linux/test-errno-linux.c b/sysdeps/unix/sysv/linux/test-errno-linux.c
index b748f8f2a0..0bd1fbeffe 100644
--- a/sysdeps/unix/sysv/linux/test-errno-linux.c
+++ b/sysdeps/unix/sysv/linux/test-errno-linux.c
@@ -163,7 +163,7 @@ do_test (void)
      of containers.  Linux 5.4 added additional argument validation
      and can return EINVAL.  */
   fails |= test_wrp2 (LIST (ENODEV, ENOSYS, EPERM, EINVAL),
-		      quotactl, Q_GETINFO, NULL, -1, (caddr_t) &dqblk);
+		      quotactl, Q_GETINFO, NULL, -1, (char *) &dqblk);
   fails |= test_wrp (EINVAL, sched_getparam, -1, &sch_param);
   fails |= test_wrp (EINVAL, sched_getscheduler, -1);
   fails |= test_wrp (EINVAL, sched_get_priority_max, -1);
diff --git a/sysdeps/unix/sysv/linux/ustat.c b/sysdeps/unix/sysv/linux/ustat.c
index 51f20a2a73..8d8b99aea4 100644
--- a/sysdeps/unix/sysv/linux/ustat.c
+++ b/sysdeps/unix/sysv/linux/ustat.c
@@ -36,12 +36,13 @@
   })
 # endif
 
+/* INLINE_SYSCALL_CALL requires all pointer arguments to point to
+   complete types, but we do not need to access any of the fields of
+   this structure.  It was formerly 20, 24, or 32 bytes, depending on
+   architecture and _FILE_OFFSET_BITS.  */
 struct ustat
 {
-  __daddr_t f_tfree;         /* Number of free blocks.  */
-  __ino_t f_tinode;          /* Number of free inodes.  */
-  char f_fname[6];
-  char f_fpack[6];
+  char dummy[32];
 };
 
 int
diff --git a/sysdeps/unix/sysv/linux/x86/bits/typesizes.h b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
index 67ebbb2e17..55f9a4c430 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
@@ -66,7 +66,6 @@
 #define __TIME_T_TYPE		__SYSCALL_SLONG_TYPE
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__SYSCALL_SLONG_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
 #define __KEY_T_TYPE		__S32_TYPE
 #define __CLOCKID_T_TYPE	__S32_TYPE
 #define __TIMER_T_TYPE		void *