Browse Source

No more *xdr* jump relocations

Peter S. Mazinger 18 years ago
parent
commit
746d0019f2

+ 1 - 0
libc/inet/rpc/auth_none.c

@@ -36,6 +36,7 @@
  */
 
 #define xdrmem_create __xdrmem_create
+#define xdr_opaque_auth __xdr_opaque_auth
 
 #define __FORCE_GLIBC
 #include <features.h>

+ 2 - 0
libc/inet/rpc/auth_unix.c

@@ -42,6 +42,8 @@
 #define getegid __getegid
 #define geteuid __geteuid
 #define xdrmem_create __xdrmem_create
+#define xdr_authunix_parms __xdr_authunix_parms
+#define xdr_opaque_auth __xdr_opaque_auth
 
 #define __FORCE_GLIBC
 #include <features.h>

+ 8 - 2
libc/inet/rpc/authunix_prot.c

@@ -34,6 +34,11 @@
  * XDR for UNIX style authentication parameters for RPC
  */
 
+#define xdr_string __xdr_string
+#define xdr_u_int __xdr_u_int
+#define xdr_array __xdr_array
+#define xdr_u_long __xdr_u_long
+
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <rpc/auth.h>
@@ -43,8 +48,8 @@
  * XDR for unix authentication parameters.
  * Unfortunately, none of these can be declared const.
  */
-bool_t
-xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
+bool_t attribute_hidden
+__xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
 {
   if (xdr_u_long (xdrs, &(p->aup_time))
       && xdr_string (xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
@@ -63,3 +68,4 @@ xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
     }
   return FALSE;
 }
+strong_alias(__xdr_authunix_parms,xdr_authunix_parms)

+ 3 - 0
libc/inet/rpc/clnt_raw.c

@@ -44,6 +44,9 @@ static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";
 
 #define authnone_create __authnone_create
 #define xdrmem_create __xdrmem_create
+#define xdr_callhdr __xdr_callhdr
+#define xdr_replymsg __xdr_replymsg
+#define xdr_opaque_auth __xdr_opaque_auth
 #define svc_getreq __svc_getreq
 
 #define __FORCE_GLIBC

+ 5 - 0
libc/inet/rpc/clnt_tcp.c

@@ -52,6 +52,11 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
 
 #define authnone_create __authnone_create
 #define xdrrec_create __xdrrec_create
+#define xdrrec_endofrecord __xdrrec_endofrecord
+#define xdrrec_skiprecord __xdrrec_skiprecord
+#define xdr_callhdr __xdr_callhdr
+#define xdr_replymsg __xdr_replymsg
+#define xdr_opaque_auth __xdr_opaque_auth
 #define xdrmem_create __xdrmem_create
 #define pmap_getport __pmap_getport
 

+ 3 - 1
libc/inet/rpc/clnt_udp.c

@@ -42,6 +42,9 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
 
 #define authnone_create __authnone_create
 #define xdrmem_create __xdrmem_create
+#define xdr_callhdr __xdr_callhdr
+#define xdr_replymsg __xdr_replymsg
+#define xdr_opaque_auth __xdr_opaque_auth
 
 #define pmap_getport __pmap_getport
 
@@ -69,7 +72,6 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
 #include <sys/uio.h>
 #endif
 
-extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);
 extern u_long _create_xid (void) attribute_hidden;
 
 /*

+ 5 - 0
libc/inet/rpc/clnt_unix.c

@@ -48,6 +48,11 @@
 
 #define authnone_create __authnone_create
 #define xdrrec_create __xdrrec_create
+#define xdrrec_endofrecord __xdrrec_endofrecord
+#define xdrrec_skiprecord __xdrrec_skiprecord
+#define xdr_callhdr __xdr_callhdr
+#define xdr_replymsg __xdr_replymsg
+#define xdr_opaque_auth __xdr_opaque_auth
 #define xdrmem_create __xdrmem_create
 #define getegid __getegid
 #define geteuid __geteuid

+ 1 - 0
libc/inet/rpc/pmap_clnt.c

@@ -36,6 +36,7 @@
 
 #define clnt_perror __clnt_perror
 #define clntudp_bufcreate __clntudp_bufcreate
+#define xdr_bool __xdr_bool
 
 #define __FORCE_GLIBC
 #include <features.h>

+ 2 - 0
libc/inet/rpc/pmap_prot.c

@@ -38,6 +38,8 @@ static char sccsid[] = "@(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
+#define xdr_u_long __xdr_u_long
+
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <rpc/pmap_prot.h>

+ 3 - 0
libc/inet/rpc/pmap_prot2.c

@@ -38,6 +38,9 @@ static char sccsid[] = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
+#define xdr_bool __xdr_bool
+#define xdr_reference __xdr_reference
+
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <rpc/pmap_prot.h>

+ 37 - 32
libc/inet/rpc/pmap_rmt.c

@@ -41,6 +41,10 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
 
 #define authunix_create_default __authunix_create_default
 #define xdrmem_create __xdrmem_create
+#define xdr_callmsg __xdr_callmsg
+#define xdr_replymsg __xdr_replymsg
+#define xdr_reference __xdr_reference
+#define xdr_u_long __xdr_u_long
 #define inet_makeaddr __inet_makeaddr
 #define clntudp_create __clntudp_create
 
@@ -68,6 +72,37 @@ extern u_long _create_xid (void) attribute_hidden;
 
 static const struct timeval timeout = {3, 0};
 
+/*
+ * XDR remote call arguments
+ * written for XDR_ENCODE direction only
+ */
+bool_t attribute_hidden
+__xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
+{
+  u_int lenposition, argposition, position;
+
+  if (xdr_u_long (xdrs, &(cap->prog)) &&
+      xdr_u_long (xdrs, &(cap->vers)) &&
+      xdr_u_long (xdrs, &(cap->proc)))
+    {
+      lenposition = XDR_GETPOS (xdrs);
+      if (!xdr_u_long (xdrs, &(cap->arglen)))
+	return FALSE;
+      argposition = XDR_GETPOS (xdrs);
+      if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr))
+	return FALSE;
+      position = XDR_GETPOS (xdrs);
+      cap->arglen = (u_long) position - (u_long) argposition;
+      XDR_SETPOS (xdrs, lenposition);
+      if (!xdr_u_long (xdrs, &(cap->arglen)))
+	return FALSE;
+      XDR_SETPOS (xdrs, position);
+      return TRUE;
+    }
+  return FALSE;
+}
+strong_alias(__xdr_rmtcall_args,xdr_rmtcall_args)
+
 /*
  * pmapper remote-call-service interface.
  * This routine is used to call the pmapper remote call service
@@ -102,7 +137,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
       r.port_ptr = port_ptr;
       r.results_ptr = resp;
       r.xdr_results = xdrres;
-      stat = CLNT_CALL (client, PMAPPROC_CALLIT, (xdrproc_t)xdr_rmtcall_args,
+      stat = CLNT_CALL (client, PMAPPROC_CALLIT, (xdrproc_t)__xdr_rmtcall_args,
 			(caddr_t)&a, (xdrproc_t)xdr_rmtcallres,
 			(caddr_t)&r, tout);
       CLNT_DESTROY (client);
@@ -117,36 +152,6 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
 }
 
 
-/*
- * XDR remote call arguments
- * written for XDR_ENCODE direction only
- */
-bool_t
-xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
-{
-  u_int lenposition, argposition, position;
-
-  if (xdr_u_long (xdrs, &(cap->prog)) &&
-      xdr_u_long (xdrs, &(cap->vers)) &&
-      xdr_u_long (xdrs, &(cap->proc)))
-    {
-      lenposition = XDR_GETPOS (xdrs);
-      if (!xdr_u_long (xdrs, &(cap->arglen)))
-	return FALSE;
-      argposition = XDR_GETPOS (xdrs);
-      if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr))
-	return FALSE;
-      position = XDR_GETPOS (xdrs);
-      cap->arglen = (u_long) position - (u_long) argposition;
-      XDR_SETPOS (xdrs, lenposition);
-      if (!xdr_u_long (xdrs, &(cap->arglen)))
-	return FALSE;
-      XDR_SETPOS (xdrs, position);
-      return TRUE;
-    }
-  return FALSE;
-}
-
 /*
  * XDR remote call results
  * written for XDR_DECODE direction only
@@ -307,7 +312,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
   r.xdr_results = xresults;
   r.results_ptr = resultsp;
   xdrmem_create (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE);
-  if ((!xdr_callmsg (xdrs, &msg)) || (!xdr_rmtcall_args (xdrs, &a)))
+  if ((!xdr_callmsg (xdrs, &msg)) || (!__xdr_rmtcall_args (xdrs, &a)))
     {
       stat = RPC_CANTENCODEARGS;
       goto done_broad;

+ 9 - 2
libc/inet/rpc/rpc_callmsg.c

@@ -38,6 +38,12 @@ static char sccsid[] = "@(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";
  *
  */
 
+#define xdr_enum __xdr_enum
+#define xdr_opaque __xdr_opaque
+#define xdr_u_int __xdr_u_int
+#define xdr_u_long __xdr_u_long
+#define xdr_opaque_auth __xdr_opaque_auth
+
 #define __FORCE_GLIBC
 #include <features.h>
 
@@ -48,8 +54,8 @@ static char sccsid[] = "@(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";
 /*
  * XDR a call message
  */
-bool_t
-xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
+bool_t attribute_hidden
+__xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
 {
   int32_t *buf;
   struct opaque_auth *oa;
@@ -204,3 +210,4 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
     return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf));
   return FALSE;
 }
+strong_alias(__xdr_callmsg,xdr_callmsg)

+ 13 - 11
libc/inet/rpc/rpc_prot.c

@@ -46,6 +46,9 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
 
 #define xdr_bytes __xdr_bytes
 #define xdr_union __xdr_union
+#define xdr_enum __xdr_enum
+#define xdr_opaque __xdr_opaque
+#define xdr_u_long __xdr_u_long
 
 #define __FORCE_GLIBC
 #include <features.h>
@@ -60,8 +63,8 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
  * XDR an opaque authentication struct
  * (see auth.h)
  */
-bool_t
-xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
+bool_t attribute_hidden
+__xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
 {
 
   if (xdr_enum (xdrs, &(ap->oa_flavor)))
@@ -69,6 +72,7 @@ xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
 		      &ap->oa_length, MAX_AUTH_BYTES);
   return FALSE;
 }
+strong_alias(__xdr_opaque_auth,xdr_opaque_auth)
 
 /*
  * XDR a DES block
@@ -88,7 +92,7 @@ bool_t
 xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
 {
   /* personalized union, rather than calling xdr_union */
-  if (!xdr_opaque_auth (xdrs, &(ar->ar_verf)))
+  if (!__xdr_opaque_auth (xdrs, &(ar->ar_verf)))
     return FALSE;
   if (!xdr_enum (xdrs, (enum_t *) & (ar->ar_stat)))
     return FALSE;
@@ -137,10 +141,8 @@ static const struct xdr_discrim reply_dscrm[3] =
 /*
  * XDR a reply message
  */
-bool_t
-xdr_replymsg (xdrs, rmsg)
-     XDR *xdrs;
-     struct rpc_msg *rmsg;
+bool_t attribute_hidden
+__xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg)
 {
   if (xdr_u_long (xdrs, &(rmsg->rm_xid)) &&
       xdr_enum (xdrs, (enum_t *) & (rmsg->rm_direction)) &&
@@ -150,6 +152,7 @@ xdr_replymsg (xdrs, rmsg)
 		      NULL_xdrproc_t);
   return FALSE;
 }
+strong_alias(__xdr_replymsg,xdr_replymsg)
 
 
 /*
@@ -157,10 +160,8 @@ xdr_replymsg (xdrs, rmsg)
  * The fields include: rm_xid, rm_direction, rpcvers, prog, and vers.
  * The rm_xid is not really static, but the user can easily munge on the fly.
  */
-bool_t
-xdr_callhdr (xdrs, cmsg)
-     XDR *xdrs;
-     struct rpc_msg *cmsg;
+bool_t attribute_hidden
+__xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg)
 {
 
   cmsg->rm_direction = CALL;
@@ -174,6 +175,7 @@ xdr_callhdr (xdrs, cmsg)
     return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers));
   return FALSE;
 }
+strong_alias(__xdr_callhdr,xdr_callhdr)
 
 /* ************************** Client utility routine ************* */
 

+ 1 - 0
libc/inet/rpc/svc_auth_unix.c

@@ -39,6 +39,7 @@
  */
 
 #define xdrmem_create __xdrmem_create
+#define xdr_authunix_parms __xdr_authunix_parms
 
 #define __FORCE_GLIBC
 #define _GNU_SOURCE

+ 2 - 0
libc/inet/rpc/svc_raw.c

@@ -41,6 +41,8 @@ static char sccsid[] = "@(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #define xdrmem_create __xdrmem_create
+#define xdr_callmsg __xdr_callmsg
+#define xdr_replymsg __xdr_replymsg
 
 #define __FORCE_GLIBC
 #include <features.h>

+ 5 - 0
libc/inet/rpc/svc_tcp.c

@@ -42,6 +42,11 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #define xdrrec_create __xdrrec_create
+#define xdrrec_endofrecord __xdrrec_endofrecord
+#define xdrrec_skiprecord __xdrrec_skiprecord
+#define xdrrec_eof __xdrrec_eof
+#define xdr_callmsg __xdr_callmsg
+#define xdr_replymsg __xdr_replymsg
 #define xprt_register __xprt_register
 
 #define __FORCE_GLIBC

+ 2 - 0
libc/inet/rpc/svc_udp.c

@@ -41,6 +41,8 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
 
 #define xprt_register __xprt_register
 #define xdrmem_create __xdrmem_create
+#define xdr_callmsg __xdr_callmsg
+#define xdr_replymsg __xdr_replymsg
 
 #define __FORCE_GLIBC
 #define _GNU_SOURCE

+ 5 - 0
libc/inet/rpc/svc_unix.c

@@ -38,6 +38,11 @@
  */
 
 #define xdrrec_create __xdrrec_create
+#define xdrrec_endofrecord __xdrrec_endofrecord
+#define xdrrec_skiprecord __xdrrec_skiprecord
+#define xdrrec_eof __xdrrec_eof
+#define xdr_callmsg __xdr_callmsg
+#define xdr_replymsg __xdr_replymsg
 #define xprt_register __xprt_register
 #define getegid __getegid
 #define geteuid __geteuid

+ 104 - 99
libc/inet/rpc/xdr.c

@@ -91,19 +91,41 @@ xdr_void (void)
 }
 
 /*
- * XDR integers
+ * XDR long integers
+ * The definition of xdr_long() is kept for backward
+ * compatibility. Instead xdr_int() should be used.
  */
-bool_t
-xdr_int (XDR *xdrs, int *ip)
+bool_t attribute_hidden
+__xdr_long (XDR *xdrs, long *lp)
 {
 
-#if INT_MAX < LONG_MAX
+  if (xdrs->x_op == XDR_ENCODE
+      && (sizeof (int32_t) == sizeof (long)
+	  || (int32_t) *lp == *lp))
+    return XDR_PUTLONG (xdrs, lp);
+
+  if (xdrs->x_op == XDR_DECODE)
+    return XDR_GETLONG (xdrs, lp);
+
+  if (xdrs->x_op == XDR_FREE)
+    return TRUE;
+
+  return FALSE;
+}
+strong_alias(__xdr_long,xdr_long)
+
+/*
+ * XDR short integers
+ */
+bool_t attribute_hidden
+__xdr_short (XDR *xdrs, short *sp)
+{
   long l;
 
   switch (xdrs->x_op)
     {
     case XDR_ENCODE:
-      l = (long) *ip;
+      l = (long) *sp;
       return XDR_PUTLONG (xdrs, &l);
 
     case XDR_DECODE:
@@ -111,33 +133,30 @@ xdr_int (XDR *xdrs, int *ip)
 	{
 	  return FALSE;
 	}
-      *ip = (int) l;
+      *sp = (short) l;
+      return TRUE;
+
     case XDR_FREE:
       return TRUE;
     }
   return FALSE;
-#elif INT_MAX == LONG_MAX
-  return xdr_long (xdrs, (long *) ip);
-#elif INT_MAX == SHRT_MAX
-  return xdr_short (xdrs, (short *) ip);
-#else
-#error unexpected integer sizes in_xdr_int()
-#endif
 }
+strong_alias(__xdr_short,xdr_short)
 
 /*
- * XDR unsigned integers
+ * XDR integers
  */
-bool_t
-xdr_u_int (XDR *xdrs, u_int *up)
+bool_t attribute_hidden
+__xdr_int (XDR *xdrs, int *ip)
 {
-#if UINT_MAX < ULONG_MAX
-  u_long l;
+
+#if INT_MAX < LONG_MAX
+  long l;
 
   switch (xdrs->x_op)
     {
     case XDR_ENCODE:
-      l = (u_long) * up;
+      l = (long) *ip;
       return XDR_PUTLONG (xdrs, &l);
 
     case XDR_DECODE:
@@ -145,50 +164,28 @@ xdr_u_int (XDR *xdrs, u_int *up)
 	{
 	  return FALSE;
 	}
-      *up = (u_int) l;
+      *ip = (int) l;
     case XDR_FREE:
       return TRUE;
     }
   return FALSE;
-#elif UINT_MAX == ULONG_MAX
-  return xdr_u_long (xdrs, (u_long *) up);
-#elif UINT_MAX == USHRT_MAX
-  return xdr_short (xdrs, (short *) up);
+#elif INT_MAX == LONG_MAX
+  return __xdr_long (xdrs, (long *) ip);
+#elif INT_MAX == SHRT_MAX
+  return __xdr_short (xdrs, (short *) ip);
 #else
-#error unexpected integer sizes in_xdr_u_int()
+#error unexpected integer sizes in xdr_int()
 #endif
 }
-
-/*
- * XDR long integers
- * The definition of xdr_long() is kept for backward
- * compatibility. Instead xdr_int() should be used.
- */
-bool_t
-xdr_long (XDR *xdrs, long *lp)
-{
-
-  if (xdrs->x_op == XDR_ENCODE
-      && (sizeof (int32_t) == sizeof (long)
-	  || (int32_t) *lp == *lp))
-    return XDR_PUTLONG (xdrs, lp);
-
-  if (xdrs->x_op == XDR_DECODE)
-    return XDR_GETLONG (xdrs, lp);
-
-  if (xdrs->x_op == XDR_FREE)
-    return TRUE;
-
-  return FALSE;
-}
+strong_alias(__xdr_int,xdr_int)
 
 /*
  * XDR unsigned long integers
  * The definition of xdr_u_long() is kept for backward
  * compatibility. Instead xdr_u_int() should be used.
  */
-bool_t
-xdr_u_long (XDR *xdrs, u_long *ulp)
+bool_t attribute_hidden
+__xdr_u_long (XDR *xdrs, u_long *ulp)
 {
   switch (xdrs->x_op)
     {
@@ -215,6 +212,42 @@ xdr_u_long (XDR *xdrs, u_long *ulp)
     }
   return FALSE;
 }
+strong_alias(__xdr_u_long,xdr_u_long)
+
+/*
+ * XDR unsigned integers
+ */
+bool_t attribute_hidden
+__xdr_u_int (XDR *xdrs, u_int *up)
+{
+#if UINT_MAX < ULONG_MAX
+  u_long l;
+
+  switch (xdrs->x_op)
+    {
+    case XDR_ENCODE:
+      l = (u_long) * up;
+      return XDR_PUTLONG (xdrs, &l);
+
+    case XDR_DECODE:
+      if (!XDR_GETLONG (xdrs, &l))
+	{
+	  return FALSE;
+	}
+      *up = (u_int) l;
+    case XDR_FREE:
+      return TRUE;
+    }
+  return FALSE;
+#elif UINT_MAX == ULONG_MAX
+  return __xdr_u_long (xdrs, (u_long *) up);
+#elif UINT_MAX == USHRT_MAX
+  return __xdr_short (xdrs, (short *) up);
+#else
+#error unexpected integer sizes in xdr_u_int()
+#endif
+}
+strong_alias(__xdr_u_int,xdr_u_int)
 
 /*
  * XDR hyper integers
@@ -295,34 +328,6 @@ xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
   return __xdr_u_hyper (xdrs, ullp);
 }
 
-/*
- * XDR short integers
- */
-bool_t
-xdr_short (XDR *xdrs, short *sp)
-{
-  long l;
-
-  switch (xdrs->x_op)
-    {
-    case XDR_ENCODE:
-      l = (long) *sp;
-      return XDR_PUTLONG (xdrs, &l);
-
-    case XDR_DECODE:
-      if (!XDR_GETLONG (xdrs, &l))
-	{
-	  return FALSE;
-	}
-      *sp = (short) l;
-      return TRUE;
-
-    case XDR_FREE:
-      return TRUE;
-    }
-  return FALSE;
-}
-
 /*
  * XDR unsigned short integers
  */
@@ -361,7 +366,7 @@ xdr_char (XDR *xdrs, char *cp)
   int i;
 
   i = (*cp);
-  if (!xdr_int (xdrs, &i))
+  if (!__xdr_int (xdrs, &i))
     {
       return FALSE;
     }
@@ -378,7 +383,7 @@ xdr_u_char (XDR *xdrs, u_char *cp)
   u_int u;
 
   u = (*cp);
-  if (!xdr_u_int (xdrs, &u))
+  if (!__xdr_u_int (xdrs, &u))
     {
       return FALSE;
     }
@@ -389,8 +394,8 @@ xdr_u_char (XDR *xdrs, u_char *cp)
 /*
  * XDR booleans
  */
-bool_t
-xdr_bool (XDR *xdrs, bool_t *bp)
+bool_t attribute_hidden
+__xdr_bool (XDR *xdrs, bool_t *bp)
 {
   long lb;
 
@@ -413,12 +418,13 @@ xdr_bool (XDR *xdrs, bool_t *bp)
     }
   return FALSE;
 }
+strong_alias(__xdr_bool,xdr_bool)
 
 /*
  * XDR enumerations
  */
-bool_t
-xdr_enum (XDR *xdrs, enum_t *ep)
+bool_t attribute_hidden
+__xdr_enum (XDR *xdrs, enum_t *ep)
 {
   enum sizecheck
     {
@@ -451,26 +457,27 @@ xdr_enum (XDR *xdrs, enum_t *ep)
 	}
       return FALSE;
 #else
-      return xdr_long (xdrs, (long *) ep);
+      return __xdr_long (xdrs, (long *) ep);
 #endif
     }
   else if (sizeof (enum sizecheck) == sizeof (short))
     {
-      return xdr_short (xdrs, (short *) ep);
+      return __xdr_short (xdrs, (short *) ep);
     }
   else
     {
       return FALSE;
     }
 }
+strong_alias(__xdr_enum,xdr_enum)
 
 /*
  * XDR opaque data
  * Allows the specification of a fixed size sequence of opaque bytes.
  * cp points to the opaque object and cnt gives the byte length.
  */
-bool_t
-xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
+bool_t attribute_hidden
+__xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
 {
   u_int rndup;
   static char crud[BYTES_PER_XDR_UNIT];
@@ -513,6 +520,7 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
     }
   return FALSE;
 }
+strong_alias(__xdr_opaque,xdr_opaque)
 
 /*
  * XDR counted bytes
@@ -528,7 +536,7 @@ __xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
   /*
    * first deal with the length since xdr bytes are counted
    */
-  if (!xdr_u_int (xdrs, sizep))
+  if (!__xdr_u_int (xdrs, sizep))
     {
       return FALSE;
     }
@@ -565,7 +573,7 @@ __xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
       /* fall into ... */
 
     case XDR_ENCODE:
-      return xdr_opaque (xdrs, sp, nodesize);
+      return __xdr_opaque (xdrs, sp, nodesize);
 
     case XDR_FREE:
       if (sp != NULL)
@@ -610,7 +618,7 @@ __xdr_union (XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choi
   /*
    * we deal with the discriminator;  it's an enum
    */
-  if (!xdr_enum (xdrs, dscmp))
+  if (!__xdr_enum (xdrs, dscmp))
     {
       return FALSE;
     }
@@ -648,11 +656,8 @@ strong_alias(__xdr_union,xdr_union)
  * storage is allocated.  The last parameter is the max allowed length
  * of the string as specified by a protocol.
  */
-bool_t
-xdr_string (xdrs, cpp, maxsize)
-     XDR *xdrs;
-     char **cpp;
-     u_int maxsize;
+bool_t attribute_hidden
+__xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
 {
   char *sp = *cpp;	/* sp is the actual string pointer */
   u_int size;
@@ -677,7 +682,7 @@ xdr_string (xdrs, cpp, maxsize)
     case XDR_DECODE:
       break;
     }
-  if (!xdr_u_int (xdrs, &size))
+  if (!__xdr_u_int (xdrs, &size))
     {
       return FALSE;
     }
@@ -714,7 +719,7 @@ xdr_string (xdrs, cpp, maxsize)
       /* fall into ... */
 
     case XDR_ENCODE:
-      return xdr_opaque (xdrs, sp, size);
+      return __xdr_opaque (xdrs, sp, size);
 
     case XDR_FREE:
       mem_free (sp, nodesize);
@@ -733,7 +738,7 @@ xdr_wrapstring (xdrs, cpp)
      XDR *xdrs;
      char **cpp;
 {
-  if (xdr_string (xdrs, cpp, LASTUNSIGNED))
+  if (__xdr_string (xdrs, cpp, LASTUNSIGNED))
     {
       return TRUE;
     }

+ 5 - 8
libc/inet/rpc/xdr_array.c

@@ -40,6 +40,8 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
  * arrays.  See xdr.h for more info on the interface to xdr.
  */
 
+#define xdr_u_int __xdr_u_int
+
 #define __FORCE_GLIBC
 #define _GNU_SOURCE
 #include <features.h>
@@ -64,14 +66,8 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
  * elsize is the size (in bytes) of each element, and elproc is the
  * xdr procedure to call to handle each element of the array.
  */
-bool_t
-xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
-     XDR *xdrs;
-     caddr_t *addrp;		/* array pointer */
-     u_int *sizep;		/* number of elements */
-     u_int maxsize;		/* max numberof elements */
-     u_int elsize;		/* size in bytes of each element */
-     xdrproc_t elproc;		/* xdr routine to handle each element */
+bool_t attribute_hidden
+__xdr_array (XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize, xdrproc_t elproc)
 {
   u_int i;
   caddr_t target = *addrp;
@@ -145,6 +141,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
     }
   return stat;
 }
+strong_alias(__xdr_array,xdr_array)
 
 /*
  * xdr_vector():

+ 9 - 7
libc/inet/rpc/xdr_rec.c

@@ -476,8 +476,8 @@ xdrrec_putint32 (XDR *xdrs, const int32_t *ip)
  * Before reading (deserializing from the stream, one should always call
  * this procedure to guarantee proper record alignment.
  */
-bool_t
-xdrrec_skiprecord (XDR *xdrs)
+bool_t attribute_hidden
+__xdrrec_skiprecord (XDR *xdrs)
 {
   RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
 
@@ -492,14 +492,15 @@ xdrrec_skiprecord (XDR *xdrs)
   rstrm->last_frag = FALSE;
   return TRUE;
 }
+strong_alias(__xdrrec_skiprecord,xdrrec_skiprecord)
 
 /*
  * Lookahead function.
  * Returns TRUE iff there is no more input in the buffer
  * after consuming the rest of the current record.
  */
-bool_t
-xdrrec_eof (XDR *xdrs)
+bool_t attribute_hidden
+__xdrrec_eof (XDR *xdrs)
 {
   RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
 
@@ -515,6 +516,7 @@ xdrrec_eof (XDR *xdrs)
     return TRUE;
   return FALSE;
 }
+strong_alias(__xdrrec_eof,xdrrec_eof)
 
 /*
  * The client must tell the package when an end-of-record has occurred.
@@ -522,8 +524,8 @@ xdrrec_eof (XDR *xdrs)
  * (output) tcp stream.  (This lets the package support batched or
  * pipelined procedure calls.)  TRUE => immediate flush to tcp connection.
  */
-bool_t
-xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
+bool_t attribute_hidden
+__xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
 {
   RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
   u_long len;		/* fragment length */
@@ -541,7 +543,7 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
   rstrm->out_finger += BYTES_PER_XDR_UNIT;
   return TRUE;
 }
-
+strong_alias(__xdrrec_endofrecord,xdrrec_endofrecord)
 
 /*
  * Internal useful routines

+ 6 - 8
libc/inet/rpc/xdr_reference.c

@@ -40,6 +40,8 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
  * "pointers".  See xdr.h for more info on the interface to xdr.
  */
 
+#define xdr_bool __xdr_bool
+
 #define __FORCE_GLIBC
 #define _GNU_SOURCE
 #include <features.h>
@@ -66,12 +68,8 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
  * size is the size of the referneced structure.
  * proc is the routine to handle the referenced structure.
  */
-bool_t
-xdr_reference (xdrs, pp, size, proc)
-     XDR *xdrs;
-     caddr_t *pp;		/* the pointer to work on */
-     u_int size;		/* size of the object pointed to */
-     xdrproc_t proc;		/* xdr routine to handle the object */
+bool_t attribute_hidden
+__xdr_reference (XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc)
 {
   caddr_t loc = *pp;
   bool_t stat;
@@ -110,7 +108,7 @@ xdr_reference (xdrs, pp, size, proc)
     }
   return stat;
 }
-
+strong_alias(__xdr_reference,xdr_reference)
 
 /*
  * xdr_pointer():
@@ -151,5 +149,5 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
       *objpp = NULL;
       return TRUE;
     }
-  return xdr_reference (xdrs, objpp, obj_size, xdr_obj);
+  return __xdr_reference (xdrs, objpp, obj_size, xdr_obj);
 }