summaryrefslogtreecommitdiffstats
path: root/libc/inet/rpc/rpc_prot.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 04:03:33 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 04:03:33 +0000
commitcb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8 (patch)
tree520f8e8d113184cfa7954ebd274564b8c255fa9a /libc/inet/rpc/rpc_prot.c
parente4461be66e2655058aef358b00050bc70ac72861 (diff)
downloaduClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.bz2
uClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.xz
Merge from trunk. Going pretty good so far. Kind of. Okay, not really.
Diffstat (limited to 'libc/inet/rpc/rpc_prot.c')
-rw-r--r--libc/inet/rpc/rpc_prot.c48
1 files changed, 29 insertions, 19 deletions
diff --git a/libc/inet/rpc/rpc_prot.c b/libc/inet/rpc/rpc_prot.c
index afc1dccd1..ebe6c3128 100644
--- a/libc/inet/rpc/rpc_prot.c
+++ b/libc/inet/rpc/rpc_prot.c
@@ -44,12 +44,6 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
* routines are also in this program.
*/
-#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>
@@ -57,14 +51,21 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
#include <rpc/rpc.h>
+libc_hidden_proto(xdr_bytes)
+libc_hidden_proto(xdr_union)
+libc_hidden_proto(xdr_enum)
+libc_hidden_proto(xdr_opaque)
+libc_hidden_proto(xdr_u_long)
+
/* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */
/*
* XDR an opaque authentication struct
* (see auth.h)
*/
-bool_t attribute_hidden
-__xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
+libc_hidden_proto(xdr_opaque_auth)
+bool_t
+xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
{
if (xdr_enum (xdrs, &(ap->oa_flavor)))
@@ -72,7 +73,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)
+libc_hidden_def(xdr_opaque_auth)
/*
* XDR a DES block
@@ -88,11 +89,13 @@ xdr_des_block (XDR *xdrs, des_block *blkp)
/*
* XDR the MSG_ACCEPTED part of a reply message union
*/
+extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
+libc_hidden_proto(xdr_accepted_reply)
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;
@@ -109,10 +112,13 @@ xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
}
return TRUE; /* TRUE => open ended set of problems */
}
+libc_hidden_def(xdr_accepted_reply)
/*
* XDR the MSG_DENIED part of a reply message union
*/
+extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
+libc_hidden_proto(xdr_rejected_reply)
bool_t
xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
{
@@ -131,6 +137,7 @@ xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
}
return FALSE;
}
+libc_hidden_def(xdr_rejected_reply)
static const struct xdr_discrim reply_dscrm[3] =
{
@@ -141,8 +148,9 @@ static const struct xdr_discrim reply_dscrm[3] =
/*
* XDR a reply message
*/
-bool_t attribute_hidden
-__xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg)
+libc_hidden_proto(xdr_replymsg)
+bool_t
+xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg)
{
if (xdr_u_long (xdrs, &(rmsg->rm_xid)) &&
xdr_enum (xdrs, (enum_t *) & (rmsg->rm_direction)) &&
@@ -152,7 +160,7 @@ __xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg)
NULL_xdrproc_t);
return FALSE;
}
-strong_alias(__xdr_replymsg,xdr_replymsg)
+libc_hidden_def(xdr_replymsg)
/*
@@ -160,8 +168,9 @@ strong_alias(__xdr_replymsg,xdr_replymsg)
* 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 attribute_hidden
-__xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg)
+libc_hidden_proto(xdr_callhdr)
+bool_t
+xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg)
{
cmsg->rm_direction = CALL;
@@ -175,7 +184,7 @@ __xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg)
return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers));
return FALSE;
}
-strong_alias(__xdr_callhdr,xdr_callhdr)
+libc_hidden_def(xdr_callhdr)
/* ************************** Client utility routine ************* */
@@ -240,8 +249,9 @@ rejected (enum reject_stat rjct_stat,
/*
* given a reply message, fills in the error
*/
-void attribute_hidden
-__seterr_reply (struct rpc_msg *msg,
+libc_hidden_proto(_seterr_reply)
+void
+_seterr_reply (struct rpc_msg *msg,
struct rpc_err *error)
{
/* optimized for normal, SUCCESSful case */
@@ -285,4 +295,4 @@ __seterr_reply (struct rpc_msg *msg,
break;
}
}
-strong_alias(__seterr_reply,_seterr_reply)
+libc_hidden_def(_seterr_reply)