diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-02-26 01:45:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-02-26 01:45:59 +0000 |
commit | 77fe0b9cd86ccba7349921082d886cbca613404c (patch) | |
tree | ef0d25d9dadd97d317a1c4e044385ccdde34bcc3 /sunrpc | |
parent | d417e0ffc4d2707b0d684106f17554395e8be220 (diff) | |
download | glibc-77fe0b9cd86ccba7349921082d886cbca613404c.tar.gz glibc-77fe0b9cd86ccba7349921082d886cbca613404c.tar.xz glibc-77fe0b9cd86ccba7349921082d886cbca613404c.zip |
Update.
2002-02-25 Ulrich Drepper <drepper@redhat.com> * assert/assert-perr.c: Use INTUSE to reference functions and variables inside libc itself. Ise INTDEF and INTDEF2 to define appropriate aliases. Add prototypes for the new aliases. * assert/assert.c: Likewise. * include/libc-symbols.h: Likewise. * include/stdio.h: Likewise. * include/netinet/in.h: Likewise. * include/rpc/auth.h: Likewise. * include/rpc/auth_unix.h: Likewise. * include/rpc/key_prot.h: Likewise. * include/rpc/pmap_prot.h: Likewise. * include/rpc/pmap_rmt.h: Likewise. * include/rpc/rpc_msg.h: Likewise. * include/rpc/xdr.h: Likewise. * inet/gethstbyad_r.c: Likewise. * inet/gethstbynm2_r.c: Likewise. * inet/gethstbynm_r.c: Likewise. * inet/gethstent_r.c: Likewise. * inet/in6_addr.c: Likewise. * libio/__fpurge.c: Likewise. * libio/filedoalloc.c: Likewise. * libio/fileops.c: Likewise. * libio/ftello.c: Likewise. * libio/ftello64.c: Likewise. * libio/genops.c: Likewise. * libio/iofclose.c: Likewise. * libio/iofdopen.c: Likewise. * libio/iofflush.c: Likewise. * libio/iofflush_u.c: Likewise. * libio/iofgetpos.c: Likewise. * libio/iofgetpos64.c: Likewise. * libio/iofgets.c: Likewise. * libio/iofgets_u.c: Likewise. * libio/iofopen.c: Likewise. * libio/iofopncook.c: Likewise. * libio/iofputs.c: Likewise. * libio/iofread.c: Likewise. * libio/iofread_u.c: Likewise. * libio/iofsetpos.c: Likewise. * libio/iofsetpos64.c: Likewise. * libio/ioftell.c: Likewise. * libio/iofwrite.c: Likewise. * libio/iogetline.c: Likewise. * libio/iogets.c: Likewise. * libio/iogetwline.c: Likewise. * libio/iolibio.h: Likewise. * libio/iopadn.c: Likewise. * libio/iopopen.c: Likewise. * libio/ioseekoff.c: Likewise. * libio/ioseekpos.c: Likewise. * libio/iosetbuffer.c: Likewise. * libio/iosetvbuf.c: Likewise. * libio/ioungetc.c: Likewise. * libio/ioungetwc.c: Likewise. * libio/iovdprintf.c: Likewise. * libio/iovsprintf.c: Likewise. * libio/iovsscanf.c: Likewise. * libio/libioP.h: Likewise. * libio/memstream.c: Likewise. * libio/obprintf.c: Likewise. * libio/oldfileops.c: Likewise. * libio/oldiofclose.c: Likewise. * libio/oldiofdopen.c: Likewise. * libio/oldiofgetpos.c: Likewise. * libio/oldiofgetpos64.c: Likewise. * libio/oldiofopen.c: Likewise. * libio/oldiofsetpos.c: Likewise. * libio/oldiofsetpos64.c: Likewise. * libio/oldiopopen.c: Likewise. * libio/oldstdfiles.c: Likewise. * libio/putc.c: Likewise. * libio/setbuf.c: Likewise. * libio/setlinebuf.c: Likewise. * libio/stdfiles.c: Likewise. * libio/stdio.c: Likewise. * libio/strops.c: Likewise. * libio/vasprintf.c: Likewise. * libio/vscanf.c: Likewise. * libio/vsnprintf.c: Likewise. * libio/vswprintf.c: Likewise. * libio/wfiledoalloc.c: Likewise. * libio/wfileops.c: Likewise. * libio/wgenops.c: Likewise. * libio/wstrops.c: Likewise. * malloc/mtrace.c: Likewise. * misc/error.c: Likewise. * misc/syslog.c: Likewise. * nss/getXXbyYY_r.c: Likewise. * nss/getXXent_r.c: Likewise. * nss/hosts-lookup.c: Likewise. * stdio-common/getw.c * stdio-common/printf-prs.c: Likewise. * stdio-common/printf_fp.c: Likewise. * stdio-common/printf_size.c: Likewise. * stdio-common/putw.c: Likewise. * stdio-common/scanf.c: Likewise. * stdio-common/sprintf.c: Likewise. * stdio-common/tmpfile64.c: Likewise. * stdio-common/vfprintf.c: Likewise. * stdio-common/vfscanf.c: Likewise. * stdlib/strfmon.c: Likewise. * sunrpc/auth_des.c: Likewise. * sunrpc/auth_none.c: Likewise. * sunrpc/auth_unix.c: Likewise. * sunrpc/authdes_prot.c: Likewise. * sunrpc/authuxprot.c: Likewise. * sunrpc/clnt_perr.c: Likewise. * sunrpc/clnt_raw.c: Likewise. * sunrpc/clnt_tcp.c: Likewise. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/key_call.c: Likewise. * sunrpc/key_prot.c: Likewise. * sunrpc/openchild.c: Likewise. * sunrpc/pm_getmaps.c: Likewise. * sunrpc/pm_getport.c: Likewise. * sunrpc/pmap_clnt.c: Likewise. * sunrpc/pmap_prot.c: Likewise. * sunrpc/pmap_prot2.c: Likewise. * sunrpc/pmap_rmt.c: Likewise. * sunrpc/rpc_cmsg.c: Likewise. * sunrpc/rpc_prot.c: Likewise. * sunrpc/svc_authux.c: Likewise. * sunrpc/svc_raw.c: Likewise. * sunrpc/svc_simple.c: Likewise. * sunrpc/svc_tcp.c: Likewise. * sunrpc/svc_udp.c: Likewise. * sunrpc/svc_unix.c: Likewise. * sunrpc/xdr.c: Likewise. * sunrpc/xdr_array.c: Likewise. * sunrpc/xdr_mem.c: Likewise. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_ref.c: Likewise. * sunrpc/xdr_stdio.c: Likewise. * sysdeps/generic/_strerror.c: Likewise. * sysdeps/generic/printf_fphex.c: Likewise. * sysdeps/generic/tmpfile.c: Likewise. * sysdeps/gnu/errlist.awk: Likewise. * sysdeps/gnu/errlist.c: Likewise. * libio/Makefile (routines): Remove iosprint. * libio/iosprintf.c: Removed
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/auth_des.c | 8 | ||||
-rw-r--r-- | sunrpc/auth_none.c | 8 | ||||
-rw-r--r-- | sunrpc/auth_unix.c | 28 | ||||
-rw-r--r-- | sunrpc/authdes_prot.c | 24 | ||||
-rw-r--r-- | sunrpc/authuxprot.c | 22 | ||||
-rw-r--r-- | sunrpc/clnt_perr.c | 2 | ||||
-rw-r--r-- | sunrpc/clnt_raw.c | 10 | ||||
-rw-r--r-- | sunrpc/clnt_tcp.c | 21 | ||||
-rw-r--r-- | sunrpc/clnt_udp.c | 13 | ||||
-rw-r--r-- | sunrpc/clnt_unix.c | 22 | ||||
-rw-r--r-- | sunrpc/key_call.c | 52 | ||||
-rw-r--r-- | sunrpc/key_prot.c | 53 | ||||
-rw-r--r-- | sunrpc/openchild.c | 4 | ||||
-rw-r--r-- | sunrpc/pm_getmaps.c | 4 | ||||
-rw-r--r-- | sunrpc/pm_getport.c | 4 | ||||
-rw-r--r-- | sunrpc/pmap_clnt.c | 9 | ||||
-rw-r--r-- | sunrpc/pmap_prot.c | 9 | ||||
-rw-r--r-- | sunrpc/pmap_prot2.c | 9 | ||||
-rw-r--r-- | sunrpc/pmap_rmt.c | 37 | ||||
-rw-r--r-- | sunrpc/rpc_cmsg.c | 29 | ||||
-rw-r--r-- | sunrpc/rpc_prot.c | 52 | ||||
-rw-r--r-- | sunrpc/svc_authux.c | 7 | ||||
-rw-r--r-- | sunrpc/svc_raw.c | 7 | ||||
-rw-r--r-- | sunrpc/svc_simple.c | 7 | ||||
-rw-r--r-- | sunrpc/svc_tcp.c | 16 | ||||
-rw-r--r-- | sunrpc/svc_udp.c | 12 | ||||
-rw-r--r-- | sunrpc/svc_unix.c | 14 | ||||
-rw-r--r-- | sunrpc/xdr.c | 50 | ||||
-rw-r--r-- | sunrpc/xdr_array.c | 3 | ||||
-rw-r--r-- | sunrpc/xdr_mem.c | 1 | ||||
-rw-r--r-- | sunrpc/xdr_rec.c | 6 | ||||
-rw-r--r-- | sunrpc/xdr_ref.c | 7 | ||||
-rw-r--r-- | sunrpc/xdr_stdio.c | 8 |
33 files changed, 314 insertions, 244 deletions
diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c index 5100f9e31d..bf1b8a6eeb 100644 --- a/sunrpc/auth_des.c +++ b/sunrpc/auth_des.c @@ -52,8 +52,8 @@ #define debug(msg) /* printf("%s\n", msg) */ -extern bool_t xdr_authdes_cred (XDR *, struct authdes_cred *); -extern bool_t xdr_authdes_verf (XDR *, struct authdes_verf *); +extern bool_t INTUSE(xdr_authdes_cred) (XDR *, struct authdes_cred *); +extern bool_t INTUSE(xdr_authdes_verf) (XDR *, struct authdes_verf *); /* * DES authenticator operations vector @@ -309,7 +309,7 @@ authdes_marshal (AUTH *auth, XDR *xdrs) ATTEMPT (xdr_putint32 (xdrs, &auth->ah_cred.oa_flavor)); ATTEMPT (xdr_putint32 (xdrs, &len)); } - ATTEMPT (xdr_authdes_cred (xdrs, cred)); + ATTEMPT (INTUSE(xdr_authdes_cred) (xdrs, cred)); len = (2 + 1) * BYTES_PER_XDR_UNIT; if ((ixdr = xdr_inline (xdrs, 2 * BYTES_PER_XDR_UNIT)) != NULL) @@ -322,7 +322,7 @@ authdes_marshal (AUTH *auth, XDR *xdrs) ATTEMPT (xdr_putint32 (xdrs, &auth->ah_verf.oa_flavor)); ATTEMPT (xdr_putint32 (xdrs, &len)); } - ATTEMPT (xdr_authdes_verf (xdrs, verf)); + ATTEMPT (INTUSE(xdr_authdes_verf) (xdrs, verf)); return TRUE; } diff --git a/sunrpc/auth_none.c b/sunrpc/auth_none.c index 0983b95322..b235ec3b95 100644 --- a/sunrpc/auth_none.c +++ b/sunrpc/auth_none.c @@ -87,10 +87,10 @@ authnone_create (void) ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; ap->no_client.ah_ops = &ops; xdrs = &xdr_stream; - xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MARSHEL_SIZE, - XDR_ENCODE); - (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred); - (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf); + INTUSE(xdrmem_create) (xdrs, ap->marshalled_client, + (u_int) MAX_MARSHEL_SIZE, XDR_ENCODE); + (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_cred); + (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_verf); ap->mcnt = XDR_GETPOS (xdrs); XDR_DESTROY (xdrs); } diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index bcfa0c931f..aae372c4fb 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -139,8 +139,8 @@ no_memory: /* * Serialize the parameters into origcred */ - xdrmem_create (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); - if (!xdr_authunix_parms (&xdrs, &aup)) + INTUSE(xdrmem_create) (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); + if (!INTUSE(xdr_authunix_parms) (&xdrs, &aup)) abort (); au->au_origcred.oa_length = len = XDR_GETPOS (&xdrs); au->au_origcred.oa_flavor = AUTH_UNIX; @@ -212,8 +212,8 @@ authunix_validate (AUTH *auth, struct opaque_auth *verf) if (verf->oa_flavor == AUTH_SHORT) { au = AUTH_PRIVATE (auth); - xdrmem_create (&xdrs, verf->oa_base, verf->oa_length, - XDR_DECODE); + INTUSE(xdrmem_create) (&xdrs, verf->oa_base, verf->oa_length, + XDR_DECODE); if (au->au_shcred.oa_base != NULL) { @@ -221,14 +221,14 @@ authunix_validate (AUTH *auth, struct opaque_auth *verf) au->au_shcred.oa_length); au->au_shcred.oa_base = NULL; } - if (xdr_opaque_auth (&xdrs, &au->au_shcred)) + if (INTUSE(xdr_opaque_auth) (&xdrs, &au->au_shcred)) { auth->ah_cred = au->au_shcred; } else { xdrs.x_op = XDR_FREE; - (void) xdr_opaque_auth (&xdrs, &au->au_shcred); + (void) INTUSE(xdr_opaque_auth) (&xdrs, &au->au_shcred); au->au_shcred.oa_base = NULL; auth->ah_cred = au->au_origcred; } @@ -256,9 +256,9 @@ authunix_refresh (AUTH *auth) /* first deserialize the creds back into a struct authunix_parms */ aup.aup_machname = NULL; aup.aup_gids = (gid_t *) NULL; - xdrmem_create (&xdrs, au->au_origcred.oa_base, - au->au_origcred.oa_length, XDR_DECODE); - stat = xdr_authunix_parms (&xdrs, &aup); + INTUSE(xdrmem_create) (&xdrs, au->au_origcred.oa_base, + au->au_origcred.oa_length, XDR_DECODE); + stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup); if (!stat) goto done; @@ -267,7 +267,7 @@ authunix_refresh (AUTH *auth) aup.aup_time = now.tv_sec; xdrs.x_op = XDR_ENCODE; XDR_SETPOS (&xdrs, 0); - stat = xdr_authunix_parms (&xdrs, &aup); + stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup); if (!stat) goto done; auth->ah_cred = au->au_origcred; @@ -275,7 +275,7 @@ authunix_refresh (AUTH *auth) done: /* free the struct authunix_parms created by deserializing */ xdrs.x_op = XDR_FREE; - (void) xdr_authunix_parms (&xdrs, &aup); + (void) INTUSE(xdr_authunix_parms) (&xdrs, &aup); XDR_DESTROY (&xdrs); return stat; } @@ -310,9 +310,9 @@ marshal_new_auth (AUTH *auth) XDR *xdrs = &xdr_stream; struct audata *au = AUTH_PRIVATE (auth); - xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); - if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) || - (!xdr_opaque_auth (xdrs, &(auth->ah_verf)))) + INTUSE(xdrmem_create) (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); + if ((!INTUSE(xdr_opaque_auth) (xdrs, &(auth->ah_cred))) || + (!INTUSE(xdr_opaque_auth) (xdrs, &(auth->ah_verf)))) perror (_("auth_none.c - Fatal marshalling problem")); else au->au_mpos = XDR_GETPOS (xdrs); diff --git a/sunrpc/authdes_prot.c b/sunrpc/authdes_prot.c index 6c79fc2c88..a8891088d1 100644 --- a/sunrpc/authdes_prot.c +++ b/sunrpc/authdes_prot.c @@ -46,21 +46,26 @@ xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred) /* * Unrolled xdr */ - ATTEMPT (xdr_enum (xdrs, (enum_t *) & cred->adc_namekind)); + ATTEMPT (INTUSE(xdr_enum) (xdrs, (enum_t *) & cred->adc_namekind)); switch (cred->adc_namekind) { case ADN_FULLNAME: - ATTEMPT (xdr_string (xdrs, &cred->adc_fullname.name, MAXNETNAMELEN)); - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.key, sizeof (des_block))); - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.window, sizeof (cred->adc_fullname.window))); + ATTEMPT (INTUSE(xdr_string) (xdrs, &cred->adc_fullname.name, + MAXNETNAMELEN)); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.key, + sizeof (des_block))); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.window, + sizeof (cred->adc_fullname.window))); return (TRUE); case ADN_NICKNAME: - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_nickname, sizeof (cred->adc_nickname))); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_nickname, + sizeof (cred->adc_nickname))); return TRUE; default: return FALSE; } } +INTDEF(xdr_authdes_cred) bool_t @@ -69,9 +74,10 @@ xdr_authdes_verf (register XDR *xdrs, register struct authdes_verf *verf) /* * Unrolled xdr */ - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_xtimestamp, - sizeof (des_block))); - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_int_u, - sizeof (verf->adv_int_u))); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_xtimestamp, + sizeof (des_block))); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_int_u, + sizeof (verf->adv_int_u))); return TRUE; } +INTDEF(xdr_authdes_verf) diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c index b033c568ac..60d3ddbbf5 100644 --- a/sunrpc/authuxprot.c +++ b/sunrpc/authuxprot.c @@ -46,20 +46,22 @@ bool_t 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) + if (INTUSE(xdr_u_long) (xdrs, &(p->aup_time)) + && INTUSE(xdr_string) (xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && (sizeof (uid_t) == sizeof (short int) - ? xdr_u_short (xdrs, (u_short *) & (p->aup_uid)) - : xdr_u_int (xdrs, (u_int *) & (p->aup_uid))) + ? INTUSE(xdr_u_short) (xdrs, (u_short *) & (p->aup_uid)) + : INTUSE(xdr_u_int) (xdrs, (u_int *) & (p->aup_uid))) && (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), - & (p->aup_len), NGRPS, sizeof (gid_t), - (sizeof (gid_t) == sizeof (short int) - ? (xdrproc_t) xdr_u_short : (xdrproc_t) xdr_u_int))) + ? INTUSE(xdr_u_short) (xdrs, (u_short *) & (p->aup_gid)) + : INTUSE(xdr_u_int) (xdrs, (u_int *) & (p->aup_gid))) + && INTUSE(xdr_array) (xdrs, (caddr_t *) & (p->aup_gids), + & (p->aup_len), NGRPS, sizeof (gid_t), + (sizeof (gid_t) == sizeof (short int) + ? (xdrproc_t) INTUSE(xdr_u_short) + : (xdrproc_t) INTUSE(xdr_u_int)))) { return TRUE; } return FALSE; } +INTDEF(xdr_authunix_parms) diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index 4164539dd2..4e2efafeaa 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -45,7 +45,7 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include <wchar.h> # include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif static char *auth_errmsg (enum auth_stat stat) internal_function; diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c index ee70e9568b..5b1fb4b74a 100644 --- a/sunrpc/clnt_raw.c +++ b/sunrpc/clnt_raw.c @@ -109,8 +109,8 @@ clntraw_create (u_long prog, u_long vers) call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = prog; call_msg.rm_call.cb_vers = vers; - xdrmem_create (xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); - if (!xdr_callhdr (xdrs, &call_msg)) + INTUSE(xdrmem_create) (xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); + if (!INTUSE(xdr_callhdr) (xdrs, &call_msg)) { perror (_ ("clnt_raw.c - Fatal header serialization error.")); } @@ -120,7 +120,7 @@ clntraw_create (u_long prog, u_long vers) /* * Set xdrmem for client/server shared buffer */ - xdrmem_create (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE); + INTUSE(xdrmem_create) (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE); /* * create client handle @@ -178,7 +178,7 @@ call_again: msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_results.where = resultsp; msg.acpted_rply.ar_results.proc = xresults; - if (!xdr_replymsg (xdrs, &msg)) + if (!INTUSE(xdr_replymsg) (xdrs, &msg)) return RPC_CANTDECODERES; _seterr_reply (&msg, &error); status = error.re_status; @@ -205,7 +205,7 @@ call_again: if (msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) xdr_opaque_auth (xdrs, &(msg.acpted_rply.ar_verf)); + (void) INTUSE(xdr_opaque_auth) (xdrs, &(msg.acpted_rply.ar_verf)); } } diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c index 6267dc70f6..8c09a15c66 100644 --- a/sunrpc/clnt_tcp.c +++ b/sunrpc/clnt_tcp.c @@ -200,9 +200,9 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, /* * pre-serialize the static part of the call msg and stash it away */ - xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, + INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE); - if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg)) + if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg)) { if (ct->ct_closeit) { @@ -217,8 +217,8 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, * Create a client handle which uses xdrrec for serialization * and authnone for authentication. */ - xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz, - (caddr_t) ct, readtcp, writetcp); + INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz, + (caddr_t) ct, readtcp, writetcp); h->cl_ops = &tcp_ops; h->cl_private = (caddr_t) ct; h->cl_auth = authnone_create (); @@ -271,10 +271,10 @@ call_again: { if (ct->ct_error.re_status == RPC_SUCCESS) ct->ct_error.re_status = RPC_CANTENCODEARGS; - (void) xdrrec_endofrecord (xdrs, TRUE); + (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); return (ct->ct_error.re_status); } - if (!xdrrec_endofrecord (xdrs, shipnow)) + if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow)) return ct->ct_error.re_status = RPC_CANTSEND; if (!shipnow) return RPC_SUCCESS; @@ -295,11 +295,11 @@ call_again: { reply_msg.acpted_rply.ar_verf = _null_auth; reply_msg.acpted_rply.ar_results.where = NULL; - reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; - if (!xdrrec_skiprecord (xdrs)) + reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void); + if (!INTUSE(xdrrec_skiprecord) (xdrs)) return (ct->ct_error.re_status); /* now decode and validate the response header */ - if (!xdr_replymsg (xdrs, &reply_msg)) + if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg)) { if (ct->ct_error.re_status == RPC_SUCCESS) continue; @@ -329,7 +329,8 @@ call_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf)); + (void) INTUSE(xdr_opaque_auth) (xdrs, + &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 94b672174f..82fd3eee51 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -172,9 +172,8 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = program; call_msg.rm_call.cb_vers = version; - xdrmem_create (&(cu->cu_outxdrs), cu->cu_outbuf, - sendsz, XDR_ENCODE); - if (!xdr_callhdr (&(cu->cu_outxdrs), &call_msg)) + INTUSE(xdrmem_create) (&(cu->cu_outxdrs), cu->cu_outbuf, sendsz, XDR_ENCODE); + if (!INTUSE(xdr_callhdr) (&(cu->cu_outxdrs), &call_msg)) { goto fooy; } @@ -448,8 +447,8 @@ send_again: /* * now decode and validate the response */ - xdrmem_create (&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE); - ok = xdr_replymsg (&reply_xdrs, &reply_msg); + INTUSE(xdrmem_create) (&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE); + ok = INTUSE(xdr_replymsg) (&reply_xdrs, &reply_msg); /* XDR_DESTROY(&reply_xdrs); save a few cycles on noop destroy */ if (ok) { @@ -465,8 +464,8 @@ send_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) xdr_opaque_auth (xdrs, - &(reply_msg.acpted_rply.ar_verf)); + (void) INTUSE(xdr_opaque_auth) (xdrs, + &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index 64a97a1b68..8c2fa40f80 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -181,8 +181,9 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, /* * pre-serialize the static part of the call msg and stash it away */ - xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE); - if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg)) + INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, + XDR_ENCODE); + if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg)) { if (ct->ct_closeit) __close (*sockp); @@ -195,8 +196,8 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, * Create a client handle which uses xdrrec for serialization * and authnone for authentication. */ - xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz, - (caddr_t) ct, readunix, writeunix); + INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz, + (caddr_t) ct, readunix, writeunix); h->cl_ops = &unix_ops; h->cl_private = (caddr_t) ct; h->cl_auth = authnone_create (); @@ -249,10 +250,10 @@ call_again: { if (ct->ct_error.re_status == RPC_SUCCESS) ct->ct_error.re_status = RPC_CANTENCODEARGS; - (void) xdrrec_endofrecord (xdrs, TRUE); + (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); return ct->ct_error.re_status; } - if (!xdrrec_endofrecord (xdrs, shipnow)) + if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow)) return ct->ct_error.re_status = RPC_CANTSEND; if (!shipnow) return RPC_SUCCESS; @@ -271,11 +272,11 @@ call_again: { reply_msg.acpted_rply.ar_verf = _null_auth; reply_msg.acpted_rply.ar_results.where = NULL; - reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; - if (!xdrrec_skiprecord (xdrs)) + reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void); + if (!INTUSE(xdrrec_skiprecord) (xdrs)) return ct->ct_error.re_status; /* now decode and validate the response header */ - if (!xdr_replymsg (xdrs, &reply_msg)) + if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg)) { if (ct->ct_error.re_status == RPC_SUCCESS) continue; @@ -305,7 +306,8 @@ call_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf)); + (void) INTUSE(xdr_opaque_auth) (xdrs, + &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c index 5df8f6fd57..61c13ec335 100644 --- a/sunrpc/key_call.c +++ b/sunrpc/key_call.c @@ -75,8 +75,8 @@ key_setsecret (char *secretkey) { keystatus status; - if (!key_call ((u_long) KEY_SET, (xdrproc_t) xdr_keybuf, secretkey, - (xdrproc_t) xdr_keystatus, (char *) &status)) + if (!key_call ((u_long) KEY_SET, (xdrproc_t) INTUSE(xdr_keybuf), secretkey, + (xdrproc_t) INTUSE(xdr_keystatus), (char *) &status)) return -1; if (status != KEY_SUCCESS) { @@ -98,8 +98,9 @@ key_secretkey_is_set (void) struct key_netstres kres; memset (&kres, 0, sizeof (kres)); - if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) xdr_void, (char *) NULL, - (xdrproc_t) xdr_key_netstres, (char *) &kres) && + if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) INTUSE(xdr_void), + (char *) NULL, (xdrproc_t) INTUSE(xdr_key_netstres), + (char *) &kres) && (kres.status == KEY_SUCCESS) && (kres.key_netstres_u.knet.st_priv_key[0] != 0)) { @@ -118,8 +119,9 @@ key_encryptsession (char *remotename, des_block *deskey) arg.remotename = remotename; arg.deskey = *deskey; - if (!key_call ((u_long) KEY_ENCRYPT, (xdrproc_t) xdr_cryptkeyarg, - (char *) &arg, (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_ENCRYPT, (xdrproc_t) INTUSE(xdr_cryptkeyarg), + (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres), + (char *) &res)) return -1; if (res.status != KEY_SUCCESS) @@ -139,8 +141,9 @@ key_decryptsession (char *remotename, des_block *deskey) arg.remotename = remotename; arg.deskey = *deskey; - if (!key_call ((u_long) KEY_DECRYPT, (xdrproc_t) xdr_cryptkeyarg, - (char *) &arg, (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_DECRYPT, (xdrproc_t) INTUSE(xdr_cryptkeyarg), + (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres), + (char *) &res)) return -1; if (res.status != KEY_SUCCESS) { @@ -161,8 +164,9 @@ key_encryptsession_pk (char *remotename, netobj *remotekey, arg.remotename = remotename; arg.remotekey = *remotekey; arg.deskey = *deskey; - if (!key_call ((u_long) KEY_ENCRYPT_PK, (xdrproc_t) xdr_cryptkeyarg2, - (char *) &arg, (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_ENCRYPT_PK, (xdrproc_t) INTUSE(xdr_cryptkeyarg2), + (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres), + (char *) &res)) return -1; if (res.status != KEY_SUCCESS) @@ -184,8 +188,9 @@ key_decryptsession_pk (char *remotename, netobj *remotekey, arg.remotename = remotename; arg.remotekey = *remotekey; arg.deskey = *deskey; - if (!key_call ((u_long) KEY_DECRYPT_PK, (xdrproc_t) xdr_cryptkeyarg2, - (char *) &arg, (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_DECRYPT_PK, (xdrproc_t) INTUSE(xdr_cryptkeyarg2), + (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres), + (char *) &res)) return -1; if (res.status != KEY_SUCCESS) @@ -216,8 +221,9 @@ key_gendes (des_block *key) if (client == NULL) return -1; - stat = clnt_call (client, KEY_GEN, (xdrproc_t) xdr_void, NULL, - (xdrproc_t) xdr_des_block, (caddr_t) key, tottimeout); + stat = clnt_call (client, KEY_GEN, (xdrproc_t) INTUSE(xdr_void), NULL, + (xdrproc_t) INTUSE(xdr_des_block), (caddr_t) key, + tottimeout); clnt_destroy (client); __close (socket); if (stat != RPC_SUCCESS) @@ -231,8 +237,9 @@ key_setnet (struct key_netstarg *arg) { keystatus status; - if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) xdr_key_netstarg, - (char *) arg,(xdrproc_t) xdr_keystatus, (char *) &status)) + if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) INTUSE(xdr_key_netstarg), + (char *) arg,(xdrproc_t) INTUSE(xdr_keystatus), + (char *) &status)) return -1; if (status != KEY_SUCCESS) @@ -248,8 +255,8 @@ key_get_conv (char *pkey, des_block *deskey) { cryptkeyres res; - if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) xdr_keybuf, pkey, - (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) INTUSE(xdr_keybuf), pkey, + (xdrproc_t) INTUSE(xdr_cryptkeyres), (char *) &res)) return -1; if (res.status != KEY_SUCCESS) @@ -317,7 +324,7 @@ key_call_keyenvoy (u_long proc, xdrproc_t xdr_arg, char *arg, xdrstdio_create (&xdrargs, fargs, XDR_ENCODE); xdrstdio_create (&xdrrslt, frslt, XDR_DECODE); - if (!xdr_u_long (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg)) + if (!INTUSE(xdr_u_long) (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg)) { debug ("xdr args"); success = 0; @@ -514,7 +521,8 @@ key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg, if (data_ptr == NULL) return 0; - xdrmem_create (&xdrs, &data_ptr[2 * sizeof (u_long)], data_len, XDR_ENCODE); + INTUSE(xdrmem_create) (&xdrs, &data_ptr[2 * sizeof (u_long)], data_len, + XDR_ENCODE); if (!xdr_arg (&xdrs, arg)) { xdr_destroy (&xdrs); @@ -545,8 +553,8 @@ key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg, return 0; memcpy (&data_len, &args.data_ptr[sizeof (u_long)], sizeof (u_long)); - xdrmem_create (&xdrs, &args.data_ptr[2 * sizeof (u_long)], - data_len, XDR_DECODE); + INTUSE(xdrmem_create) (&xdrs, &args.data_ptr[2 * sizeof (u_long)], + data_len, XDR_DECODE); if (!xdr_rslt (&xdrs, rslt)) { xdr_destroy (&xdrs); diff --git a/sunrpc/key_prot.c b/sunrpc/key_prot.c index 664013a71b..56a5414697 100644 --- a/sunrpc/key_prot.c +++ b/sunrpc/key_prot.c @@ -37,63 +37,68 @@ bool_t xdr_keystatus (XDR * xdrs, keystatus * objp) { - if (!xdr_enum (xdrs, (enum_t *) objp)) + if (!INTUSE(xdr_enum) (xdrs, (enum_t *) objp)) return FALSE; return TRUE; } +INTDEF(xdr_keystatus) bool_t xdr_keybuf (XDR * xdrs, keybuf objp) { - if (!xdr_opaque (xdrs, objp, HEXKEYBYTES)) + if (!INTUSE(xdr_opaque) (xdrs, objp, HEXKEYBYTES)) return FALSE; return TRUE; } +INTDEF(xdr_keybuf) bool_t xdr_netnamestr (XDR * xdrs, netnamestr * objp) { - if (!xdr_string (xdrs, objp, MAXNETNAMELEN)) + if (!INTUSE(xdr_string) (xdrs, objp, MAXNETNAMELEN)) return FALSE; return TRUE; } +INTDEF(xdr_netnamestr) bool_t xdr_cryptkeyarg (XDR * xdrs, cryptkeyarg * objp) { - if (!xdr_netnamestr (xdrs, &objp->remotename)) + if (!INTUSE(xdr_netnamestr) (xdrs, &objp->remotename)) return FALSE; - if (!xdr_des_block (xdrs, &objp->deskey)) + if (!INTUSE(xdr_des_block) (xdrs, &objp->deskey)) return FALSE; return TRUE; } +INTDEF(xdr_cryptkeyarg) bool_t xdr_cryptkeyarg2 (XDR * xdrs, cryptkeyarg2 * objp) { - if (!xdr_netnamestr (xdrs, &objp->remotename)) + if (!INTUSE(xdr_netnamestr) (xdrs, &objp->remotename)) return FALSE; - if (!xdr_netobj (xdrs, &objp->remotekey)) + if (!INTUSE(xdr_netobj) (xdrs, &objp->remotekey)) return FALSE; - if (!xdr_des_block (xdrs, &objp->deskey)) + if (!INTUSE(xdr_des_block) (xdrs, &objp->deskey)) return FALSE; return TRUE; } +INTDEF(xdr_cryptkeyarg2) bool_t xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp) { - if (!xdr_keystatus (xdrs, &objp->status)) + if (!INTUSE(xdr_keystatus) (xdrs, &objp->status)) return FALSE; switch (objp->status) { case KEY_SUCCESS: - if (!xdr_des_block (xdrs, &objp->cryptkeyres_u.deskey)) + if (!INTUSE(xdr_des_block) (xdrs, &objp->cryptkeyres_u.deskey)) return FALSE; break; default: @@ -101,30 +106,32 @@ xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp) } return TRUE; } +INTDEF(xdr_cryptkeyres) bool_t xdr_unixcred (XDR * xdrs, unixcred * objp) { - if (!xdr_u_int (xdrs, &objp->uid)) + if (!INTUSE(xdr_u_int) (xdrs, &objp->uid)) return FALSE; - if (!xdr_u_int (xdrs, &objp->gid)) + if (!INTUSE(xdr_u_int) (xdrs, &objp->gid)) return FALSE; - if (!xdr_array (xdrs, (char **) &objp->gids.gids_val, - (u_int *) & objp->gids.gids_len, MAXGIDS, - sizeof (u_int), (xdrproc_t) xdr_u_int)) + if (!INTUSE(xdr_array) (xdrs, (char **) &objp->gids.gids_val, + (u_int *) & objp->gids.gids_len, MAXGIDS, + sizeof (u_int), (xdrproc_t) INTUSE(xdr_u_int))) return FALSE; return TRUE; } +INTDEF(xdr_unixcred) bool_t xdr_getcredres (XDR * xdrs, getcredres * objp) { - if (!xdr_keystatus (xdrs, &objp->status)) + if (!INTUSE(xdr_keystatus) (xdrs, &objp->status)) return FALSE; switch (objp->status) { case KEY_SUCCESS: - if (!xdr_unixcred (xdrs, &objp->getcredres_u.cred)) + if (!INTUSE(xdr_unixcred) (xdrs, &objp->getcredres_u.cred)) return FALSE; break; default: @@ -136,24 +143,25 @@ xdr_getcredres (XDR * xdrs, getcredres * objp) bool_t xdr_key_netstarg (XDR * xdrs, key_netstarg * objp) { - if (!xdr_keybuf (xdrs, objp->st_priv_key)) + if (!INTUSE(xdr_keybuf) (xdrs, objp->st_priv_key)) return FALSE; - if (!xdr_keybuf (xdrs, objp->st_pub_key)) + if (!INTUSE(xdr_keybuf) (xdrs, objp->st_pub_key)) return FALSE; - if (!xdr_netnamestr (xdrs, &objp->st_netname)) + if (!INTUSE(xdr_netnamestr) (xdrs, &objp->st_netname)) return FALSE; return TRUE; } +INTDEF(xdr_key_netstarg) bool_t xdr_key_netstres (XDR * xdrs, key_netstres * objp) { - if (!xdr_keystatus (xdrs, &objp->status)) + if (!INTUSE(xdr_keystatus) (xdrs, &objp->status)) return FALSE; switch (objp->status) { case KEY_SUCCESS: - if (!xdr_key_netstarg (xdrs, &objp->key_netstres_u.knet)) + if (!INTUSE(xdr_key_netstarg) (xdrs, &objp->key_netstres_u.knet)) return FALSE; break; default: @@ -161,3 +169,4 @@ xdr_key_netstres (XDR * xdrs, key_netstres * objp) } return TRUE; } +INTDEF(xdr_key_netstres) diff --git a/sunrpc/openchild.c b/sunrpc/openchild.c index 4b5a0a5f24..16f6a34e7a 100644 --- a/sunrpc/openchild.c +++ b/sunrpc/openchild.c @@ -45,8 +45,8 @@ #ifdef USE_IN_LIBIO # include <libio/iolibio.h> -# define fflush(s) _IO_fflush (s) -# define __fdopen(fd,m) _IO_fdopen (fd,m) +# define fflush(s) INTUSE(_IO_fflush) (s) +# define __fdopen(fd,m) INTUSE(_IO_fdopen) (fd,m) #endif /* diff --git a/sunrpc/pm_getmaps.c b/sunrpc/pm_getmaps.c index 8f41a4568c..987ed5fe09 100644 --- a/sunrpc/pm_getmaps.c +++ b/sunrpc/pm_getmaps.c @@ -67,8 +67,8 @@ pmap_getmaps (struct sockaddr_in *address) PMAPVERS, &socket, 50, 500); if (client != (CLIENT *) NULL) { - if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)xdr_void, NULL, - (xdrproc_t)xdr_pmaplist, (caddr_t)&head, + if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)INTUSE(xdr_void), NULL, + (xdrproc_t)INTUSE(xdr_pmaplist), (caddr_t)&head, minutetimeout) != RPC_SUCCESS) { clnt_perror (client, _("pmap_getmaps rpc problem")); diff --git a/sunrpc/pm_getport.c b/sunrpc/pm_getport.c index b86472ccdf..c26183d75c 100644 --- a/sunrpc/pm_getport.c +++ b/sunrpc/pm_getport.c @@ -75,8 +75,8 @@ pmap_getport (address, program, version, protocol) parms.pm_vers = version; 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, + if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)INTUSE(xdr_pmap), + (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_u_short), (caddr_t)&port, tottimeout) != RPC_SUCCESS) { ce->cf_stat = RPC_PMAPFAILURE; diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c index 4db0f023b6..6e2c035a69 100644 --- a/sunrpc/pmap_clnt.c +++ b/sunrpc/pmap_clnt.c @@ -129,8 +129,8 @@ pmap_set (u_long program, u_long version, int protocol, u_short port) parms.pm_vers = version; 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, + if (CLNT_CALL (client, PMAPPROC_SET, (xdrproc_t)INTUSE(xdr_pmap), + (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_bool), (caddr_t)&rslt, tottimeout) != RPC_SUCCESS) { clnt_perror (client, _("Cannot register service")); @@ -163,8 +163,9 @@ pmap_unset (u_long program, u_long version) parms.pm_prog = program; 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, tottimeout); + CLNT_CALL (client, PMAPPROC_UNSET, (xdrproc_t)INTUSE(xdr_pmap), + (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_bool), (caddr_t)&rslt, + tottimeout); CLNT_DESTROY (client); /* (void)close(socket); CLNT_DESTROY already closed it */ return rslt; diff --git a/sunrpc/pmap_prot.c b/sunrpc/pmap_prot.c index 982971885a..3db27a90a4 100644 --- a/sunrpc/pmap_prot.c +++ b/sunrpc/pmap_prot.c @@ -49,9 +49,10 @@ xdr_pmap (xdrs, regs) struct pmap *regs; { - if (xdr_u_long (xdrs, ®s->pm_prog) && - xdr_u_long (xdrs, ®s->pm_vers) && - xdr_u_long (xdrs, ®s->pm_prot)) - return xdr_u_long (xdrs, ®s->pm_port); + if (INTUSE(xdr_u_long) (xdrs, ®s->pm_prog) && + INTUSE(xdr_u_long) (xdrs, ®s->pm_vers) && + INTUSE(xdr_u_long) (xdrs, ®s->pm_prot)) + return INTUSE(xdr_u_long) (xdrs, ®s->pm_port); return FALSE; } +INTDEF(xdr_pmap) diff --git a/sunrpc/pmap_prot2.c b/sunrpc/pmap_prot2.c index 6cb7c5e1b3..aa1f8eb8ad 100644 --- a/sunrpc/pmap_prot2.c +++ b/sunrpc/pmap_prot2.c @@ -98,7 +98,7 @@ xdr_pmaplist (xdrs, rp) while (TRUE) { more_elements = (bool_t) (*rp != NULL); - if (!xdr_bool (xdrs, &more_elements)) + if (!INTUSE(xdr_bool) (xdrs, &more_elements)) return FALSE; if (!more_elements) return TRUE; /* we are done */ @@ -109,10 +109,11 @@ xdr_pmaplist (xdrs, rp) */ if (freeing) next = &((*rp)->pml_next); - if (!xdr_reference (xdrs, (caddr_t *) rp, - (u_int) sizeof (struct pmaplist), - (xdrproc_t) xdr_pmap)) + if (!INTUSE(xdr_reference) (xdrs, (caddr_t *) rp, + (u_int) sizeof (struct pmaplist), + (xdrproc_t) INTUSE(xdr_pmap))) return FALSE; rp = freeing ? next : &((*rp)->pml_next); } } +INTDEF(xdr_pmaplist) diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c index bfc9cc8954..2f7592eb8e 100644 --- a/sunrpc/pmap_rmt.c +++ b/sunrpc/pmap_rmt.c @@ -95,8 +95,9 @@ 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, - (caddr_t)&a, (xdrproc_t)xdr_rmtcallres, + stat = CLNT_CALL (client, PMAPPROC_CALLIT, + (xdrproc_t)INTUSE(xdr_rmtcall_args), + (caddr_t)&a, (xdrproc_t)INTUSE(xdr_rmtcallres), (caddr_t)&r, tout); CLNT_DESTROY (client); } @@ -119,12 +120,12 @@ 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))) + if (INTUSE(xdr_u_long) (xdrs, &(cap->prog)) && + INTUSE(xdr_u_long) (xdrs, &(cap->vers)) && + INTUSE(xdr_u_long) (xdrs, &(cap->proc))) { lenposition = XDR_GETPOS (xdrs); - if (!xdr_u_long (xdrs, &(cap->arglen))) + if (!INTUSE(xdr_u_long) (xdrs, &(cap->arglen))) return FALSE; argposition = XDR_GETPOS (xdrs); if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr)) @@ -132,13 +133,14 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap) position = XDR_GETPOS (xdrs); cap->arglen = (u_long) position - (u_long) argposition; XDR_SETPOS (xdrs, lenposition); - if (!xdr_u_long (xdrs, &(cap->arglen))) + if (!INTUSE(xdr_u_long) (xdrs, &(cap->arglen))) return FALSE; XDR_SETPOS (xdrs, position); return TRUE; } return FALSE; } +INTDEF(xdr_rmtcall_args) /* * XDR remote call results @@ -152,14 +154,16 @@ xdr_rmtcallres (xdrs, crp) caddr_t port_ptr; port_ptr = (caddr_t) crp->port_ptr; - if (xdr_reference (xdrs, &port_ptr, sizeof (u_long), (xdrproc_t) xdr_u_long) - && xdr_u_long (xdrs, &crp->resultslen)) + if (INTUSE(xdr_reference) (xdrs, &port_ptr, sizeof (u_long), + (xdrproc_t) INTUSE(xdr_u_long)) + && INTUSE(xdr_u_long) (xdrs, &crp->resultslen)) { crp->port_ptr = (u_long *) port_ptr; return (*(crp->xdr_results)) (xdrs, crp->results_ptr); } return FALSE; } +INTDEF(xdr_rmtcallres) /* @@ -299,8 +303,9 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) r.port_ptr = &port; 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))) + INTUSE(xdrmem_create) (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE); + if ((!INTUSE(xdr_callmsg) (xdrs, &msg)) + || (!INTUSE(xdr_rmtcall_args) (xdrs, &a))) { stat = RPC_CANTENCODEARGS; goto done_broad; @@ -333,7 +338,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) recv_again: msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_results.where = (caddr_t) & r; - msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_rmtcallres; + msg.acpted_rply.ar_results.proc = (xdrproc_t) INTUSE(xdr_rmtcallres); milliseconds = t.tv_sec * 1000 + t.tv_usec / 1000; switch (__poll(&fd, 1, milliseconds)) { @@ -368,8 +373,8 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) * see if reply transaction id matches sent id. * If so, decode the results. */ - xdrmem_create (xdrs, inbuf, (u_int) inlen, XDR_DECODE); - if (xdr_replymsg (xdrs, &msg)) + INTUSE(xdrmem_create) (xdrs, inbuf, (u_int) inlen, XDR_DECODE); + if (INTUSE(xdr_replymsg) (xdrs, &msg)) { if (((u_int32_t) msg.rm_xid == (u_int32_t) xid) && (msg.rm_reply.rp_stat == MSG_ACCEPTED) && @@ -390,8 +395,8 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) #endif } xdrs->x_op = XDR_FREE; - msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; - (void) xdr_replymsg (xdrs, &msg); + msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void); + (void) INTUSE(xdr_replymsg) (xdrs, &msg); (void) (*xresults) (xdrs, resultsp); xdr_destroy (xdrs); if (done) diff --git a/sunrpc/rpc_cmsg.c b/sunrpc/rpc_cmsg.c index 8916504a39..dea07536a3 100644 --- a/sunrpc/rpc_cmsg.c +++ b/sunrpc/rpc_cmsg.c @@ -132,8 +132,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length)); if (buf == NULL) { - if (xdr_opaque (xdrs, oa->oa_base, - oa->oa_length) == FALSE) + if (INTUSE(xdr_opaque) (xdrs, oa->oa_base, + oa->oa_length) == FALSE) return FALSE; } else @@ -149,8 +149,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) buf = XDR_INLINE (xdrs, 2 * BYTES_PER_XDR_UNIT); if (buf == NULL) { - if (xdr_enum (xdrs, &oa->oa_flavor) == FALSE || - xdr_u_int (xdrs, &oa->oa_length) == FALSE) + if (INTUSE(xdr_enum) (xdrs, &oa->oa_flavor) == FALSE || + INTUSE(xdr_u_int) (xdrs, &oa->oa_length) == FALSE) { return FALSE; } @@ -172,8 +172,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length)); if (buf == NULL) { - if (xdr_opaque (xdrs, oa->oa_base, - oa->oa_length) == FALSE) + if (INTUSE(xdr_opaque) (xdrs, oa->oa_base, + oa->oa_length) == FALSE) return FALSE; } else @@ -189,15 +189,16 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) } } if ( - xdr_u_long (xdrs, &(cmsg->rm_xid)) && - xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) && + INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) && (cmsg->rm_direction == CALL) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) && (cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog)) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers)) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_proc)) && - xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_cred))) - return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf)); + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_proc)) && + INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_cred))) + return INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_verf)); return FALSE; } +INTDEF(xdr_callmsg) diff --git a/sunrpc/rpc_prot.c b/sunrpc/rpc_prot.c index 79a58c2732..59ec5058b6 100644 --- a/sunrpc/rpc_prot.c +++ b/sunrpc/rpc_prot.c @@ -58,11 +58,12 @@ bool_t xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap) { - if (xdr_enum (xdrs, &(ap->oa_flavor))) - return xdr_bytes (xdrs, &ap->oa_base, + if (INTUSE(xdr_enum) (xdrs, &(ap->oa_flavor))) + return INTUSE(xdr_bytes) (xdrs, &ap->oa_base, &ap->oa_length, MAX_AUTH_BYTES); return FALSE; } +INTDEF(xdr_opaque_auth) /* * XDR a DES block @@ -70,8 +71,9 @@ xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap) bool_t xdr_des_block (XDR *xdrs, des_block *blkp) { - return xdr_opaque (xdrs, (caddr_t) blkp, sizeof (des_block)); + return INTUSE(xdr_opaque) (xdrs, (caddr_t) blkp, sizeof (des_block)); } +INTDEF(xdr_des_block) /* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */ @@ -82,23 +84,24 @@ 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 (!INTUSE(xdr_opaque_auth) (xdrs, &(ar->ar_verf))) return FALSE; - if (!xdr_enum (xdrs, (enum_t *) & (ar->ar_stat))) + if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (ar->ar_stat))) return FALSE; switch (ar->ar_stat) { case SUCCESS: return ((*(ar->ar_results.proc)) (xdrs, ar->ar_results.where)); case PROG_MISMATCH: - if (!xdr_u_long (xdrs, &(ar->ar_vers.low))) + if (!INTUSE(xdr_u_long) (xdrs, &(ar->ar_vers.low))) return FALSE; - return (xdr_u_long (xdrs, &(ar->ar_vers.high))); + return (INTUSE(xdr_u_long) (xdrs, &(ar->ar_vers.high))); default: return TRUE; } return TRUE; /* TRUE => open ended set of problems */ } +INTDEF(xdr_accepted_reply) /* * XDR the MSG_DENIED part of a reply message union @@ -107,25 +110,26 @@ bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr) { /* personalized union, rather than calling xdr_union */ - if (!xdr_enum (xdrs, (enum_t *) & (rr->rj_stat))) + if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_stat))) return FALSE; switch (rr->rj_stat) { case RPC_MISMATCH: - if (!xdr_u_long (xdrs, &(rr->rj_vers.low))) + if (!INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.low))) return FALSE; - return xdr_u_long (xdrs, &(rr->rj_vers.high)); + return INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.high)); case AUTH_ERROR: - return xdr_enum (xdrs, (enum_t *) & (rr->rj_why)); + return INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_why)); } return FALSE; } +INTDEF(xdr_rejected_reply) static const struct xdr_discrim reply_dscrm[3] = { - {(int) MSG_ACCEPTED, (xdrproc_t) xdr_accepted_reply}, - {(int) MSG_DENIED, (xdrproc_t) xdr_rejected_reply}, + {(int) MSG_ACCEPTED, (xdrproc_t) INTUSE(xdr_accepted_reply)}, + {(int) MSG_DENIED, (xdrproc_t) INTUSE(xdr_rejected_reply)}, {__dontcare__, NULL_xdrproc_t}}; /* @@ -136,14 +140,15 @@ xdr_replymsg (xdrs, rmsg) XDR *xdrs; struct rpc_msg *rmsg; { - if (xdr_u_long (xdrs, &(rmsg->rm_xid)) && - xdr_enum (xdrs, (enum_t *) & (rmsg->rm_direction)) && + if (INTUSE(xdr_u_long) (xdrs, &(rmsg->rm_xid)) && + INTUSE(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, - NULL_xdrproc_t); + return INTUSE(xdr_union) (xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat), + (caddr_t) & (rmsg->rm_reply.ru), reply_dscrm, + NULL_xdrproc_t); return FALSE; } +INTDEF(xdr_replymsg) /* @@ -161,13 +166,14 @@ xdr_callhdr (xdrs, cmsg) cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION; if ( (xdrs->x_op == XDR_ENCODE) && - xdr_u_long (xdrs, &(cmsg->rm_xid)) && - xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog))) - return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers)); + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) && + INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog))) + return INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers)); return FALSE; } +INTDEF(xdr_callhdr) /* ************************** Client utility routine ************* */ diff --git a/sunrpc/svc_authux.c b/sunrpc/svc_authux.c index bf533a573c..e5edac71e8 100644 --- a/sunrpc/svc_authux.c +++ b/sunrpc/svc_authux.c @@ -69,7 +69,8 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) aup->aup_machname = area->area_machname; aup->aup_gids = area->area_gids; auth_len = (u_int) msg->rm_call.cb_cred.oa_length; - xdrmem_create (&xdrs, msg->rm_call.cb_cred.oa_base, auth_len, XDR_DECODE); + INTUSE(xdrmem_create) (&xdrs, msg->rm_call.cb_cred.oa_base, auth_len, + XDR_DECODE); buf = XDR_INLINE (&xdrs, auth_len); if (buf != NULL) { @@ -109,10 +110,10 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) goto done; } } - else if (!xdr_authunix_parms (&xdrs, aup)) + else if (!INTUSE(xdr_authunix_parms) (&xdrs, aup)) { xdrs.x_op = XDR_FREE; - (void) xdr_authunix_parms (&xdrs, aup); + (void) INTUSE(xdr_authunix_parms) (&xdrs, aup); stat = AUTH_BADCRED; goto done; } diff --git a/sunrpc/svc_raw.c b/sunrpc/svc_raw.c index e4752a6cd1..d9b1748815 100644 --- a/sunrpc/svc_raw.c +++ b/sunrpc/svc_raw.c @@ -91,7 +91,8 @@ svcraw_create (void) srp->server.xp_port = 0; srp->server.xp_ops = &server_ops; srp->server.xp_verf.oa_base = srp->verf_body; - xdrmem_create (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, XDR_FREE); + INTUSE(xdrmem_create) (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, + XDR_FREE); return &srp->server; } @@ -114,7 +115,7 @@ svcraw_recv (xprt, msg) xdrs = &srp->xdr_stream; xdrs->x_op = XDR_DECODE; XDR_SETPOS (xdrs, 0); - if (!xdr_callmsg (xdrs, msg)) + if (!INTUSE(xdr_callmsg) (xdrs, msg)) return FALSE; return TRUE; } @@ -130,7 +131,7 @@ svcraw_reply (SVCXPRT *xprt, struct rpc_msg *msg) xdrs = &srp->xdr_stream; xdrs->x_op = XDR_ENCODE; XDR_SETPOS (xdrs, 0); - if (!xdr_replymsg (xdrs, msg)) + if (!INTUSE(xdr_replymsg) (xdrs, msg)) return FALSE; (void) XDR_GETPOS (xdrs); /* called just for overhead */ return TRUE; diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c index 4bca7d0887..dbdb8f1501 100644 --- a/sunrpc/svc_simple.c +++ b/sunrpc/svc_simple.c @@ -50,7 +50,7 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include <wchar.h> # include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif struct proglst_ @@ -146,7 +146,8 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) */ if (rqstp->rq_proc == NULLPROC) { - if (svc_sendreply (transp_l, (xdrproc_t)xdr_void, (char *) NULL) == FALSE) + if (svc_sendreply (transp_l, (xdrproc_t)INTUSE(xdr_void), (char *) NULL) + == FALSE) { __write (STDERR_FILENO, "xxx\n", 4); exit (1); @@ -166,7 +167,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) return; } outdata = (*(pl->p_progname)) (xdrbuf); - if (outdata == NULL && pl->p_outproc != (xdrproc_t)xdr_void) + if (outdata == NULL && pl->p_outproc != (xdrproc_t)INTUSE(xdr_void)) /* there was an error */ return; if (!svc_sendreply (transp_l, pl->p_outproc, outdata)) diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index 8249474a57..9416b7e78f 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -54,7 +54,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include <wchar.h> # include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif /* @@ -232,8 +232,8 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize) return NULL; } cd->strm_stat = XPRT_IDLE; - xdrrec_create (&(cd->xdrs), sendsize, recvsize, - (caddr_t) xprt, readtcp, writetcp); + INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize, + (caddr_t) xprt, readtcp, writetcp); xprt->xp_p2 = NULL; xprt->xp_p1 = (caddr_t) cd; xprt->xp_verf.oa_base = cd->verf_body; @@ -370,7 +370,7 @@ svctcp_stat (SVCXPRT *xprt) if (cd->strm_stat == XPRT_DIED) return XPRT_DIED; - if (!xdrrec_eof (&(cd->xdrs))) + if (!INTUSE(xdrrec_eof) (&(cd->xdrs))) return XPRT_MOREREQS; return XPRT_IDLE; } @@ -382,8 +382,8 @@ svctcp_recv (SVCXPRT *xprt, struct rpc_msg *msg) XDR *xdrs = &(cd->xdrs); xdrs->x_op = XDR_DECODE; - (void) xdrrec_skiprecord (xdrs); - if (xdr_callmsg (xdrs, msg)) + (void) INTUSE(xdrrec_skiprecord) (xdrs); + if (INTUSE(xdr_callmsg) (xdrs, msg)) { cd->x_id = msg->rm_xid; return TRUE; @@ -417,7 +417,7 @@ svctcp_reply (SVCXPRT *xprt, struct rpc_msg *msg) xdrs->x_op = XDR_ENCODE; msg->rm_xid = cd->x_id; - stat = xdr_replymsg (xdrs, msg); - (void) xdrrec_endofrecord (xdrs, TRUE); + stat = INTUSE(xdr_replymsg) (xdrs, msg); + (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); return stat; } diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c index 17c4977e96..40de3c5e79 100644 --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -54,7 +54,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include <wchar.h> # include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif #define rpc_buffer(xprt) ((xprt)->xp_p1) @@ -163,7 +163,8 @@ svcudp_bufcreate (sock, sendsz, recvsz) } su->su_iosz = ((MAX (sendsz, recvsz) + 3) / 4) * 4; rpc_buffer (xprt) = buf; - xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_DECODE); + INTUSE(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_verf.oa_base = su->su_verfbody; @@ -271,7 +272,7 @@ again: return FALSE; xdrs->x_op = XDR_DECODE; XDR_SETPOS (xdrs, 0); - if (!xdr_callmsg (xdrs, msg)) + if (!INTUSE(xdr_callmsg) (xdrs, msg)) return FALSE; su->su_xid = msg->rm_xid; if (su->su_cache != NULL) @@ -312,7 +313,7 @@ svcudp_reply (xprt, msg) xdrs->x_op = XDR_ENCODE; XDR_SETPOS (xdrs, 0); msg->rm_xid = su->su_xid; - if (xdr_replymsg (xdrs, msg)) + if (INTUSE(xdr_replymsg) (xdrs, msg)) { slen = (int) XDR_GETPOS (xdrs); #ifdef IP_PKTINFO @@ -552,7 +553,8 @@ cache_set (SVCXPRT *xprt, u_long replylen) victim->cache_replylen = replylen; victim->cache_reply = rpc_buffer (xprt); rpc_buffer (xprt) = newbuf; - xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_ENCODE); + INTUSE(xdrmem_create) (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, + XDR_ENCODE); victim->cache_xid = su->su_xid; victim->cache_proc = uc->uc_proc; victim->cache_vers = uc->uc_vers; diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c index 763021f9a4..afe4494a36 100644 --- a/sunrpc/svc_unix.c +++ b/sunrpc/svc_unix.c @@ -228,8 +228,8 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize) return NULL; } cd->strm_stat = XPRT_IDLE; - xdrrec_create (&(cd->xdrs), sendsize, recvsize, - (caddr_t) xprt, readunix, writeunix); + INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize, + (caddr_t) xprt, readunix, writeunix); xprt->xp_p2 = NULL; xprt->xp_p1 = (caddr_t) cd; xprt->xp_verf.oa_base = cd->verf_body; @@ -472,7 +472,7 @@ svcunix_stat (SVCXPRT *xprt) if (cd->strm_stat == XPRT_DIED) return XPRT_DIED; - if (!xdrrec_eof (&(cd->xdrs))) + if (!INTUSE(xdrrec_eof) (&(cd->xdrs))) return XPRT_MOREREQS; return XPRT_IDLE; } @@ -484,8 +484,8 @@ svcunix_recv (SVCXPRT *xprt, struct rpc_msg *msg) XDR *xdrs = &(cd->xdrs); xdrs->x_op = XDR_DECODE; - xdrrec_skiprecord (xdrs); - if (xdr_callmsg (xdrs, msg)) + INTUSE(xdrrec_skiprecord) (xdrs); + if (INTUSE(xdr_callmsg) (xdrs, msg)) { cd->x_id = msg->rm_xid; /* set up verifiers */ @@ -525,7 +525,7 @@ svcunix_reply (SVCXPRT *xprt, struct rpc_msg *msg) xdrs->x_op = XDR_ENCODE; msg->rm_xid = cd->x_id; - stat = xdr_replymsg (xdrs, msg); - (void) xdrrec_endofrecord (xdrs, TRUE); + stat = INTUSE(xdr_replymsg) (xdrs, msg); + (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); return stat; } diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index cc1aa2c2b9..dbe1d88e1f 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -86,6 +86,7 @@ xdr_void (void) { return TRUE; } +INTDEF(xdr_void) /* * XDR integers @@ -114,13 +115,14 @@ xdr_int (XDR *xdrs, int *ip) } return FALSE; #elif INT_MAX == LONG_MAX - return xdr_long (xdrs, (long *) ip); + return INTUSE(xdr_long) (xdrs, (long *) ip); #elif INT_MAX == SHRT_MAX - return xdr_short (xdrs, (short *) ip); + return INTUSE(xdr_short) (xdrs, (short *) ip); #else #error unexpected integer sizes in_xdr_int() #endif } +INTDEF(xdr_int) /* * XDR unsigned integers @@ -148,13 +150,14 @@ xdr_u_int (XDR *xdrs, u_int *up) } return FALSE; #elif UINT_MAX == ULONG_MAX - return xdr_u_long (xdrs, (u_long *) up); + return INTUSE(xdr_u_long) (xdrs, (u_long *) up); #elif UINT_MAX == USHRT_MAX - return xdr_short (xdrs, (short *) up); + return INTUSE(xdr_short) (xdrs, (short *) up); #else #error unexpected integer sizes in_xdr_u_int() #endif } +INTDEF(xdr_u_int) /* * XDR long integers @@ -178,6 +181,7 @@ xdr_long (XDR *xdrs, long *lp) return FALSE; } +INTDEF(xdr_long) /* * XDR unsigned long integers @@ -212,6 +216,7 @@ xdr_u_long (XDR *xdrs, u_long *ulp) } return FALSE; } +INTDEF(xdr_u_long) /* * XDR hyper integers @@ -244,6 +249,7 @@ xdr_hyper (XDR *xdrs, quad_t *llp) return FALSE; } +INTDEF(xdr_hyper) /* @@ -277,17 +283,18 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp) return FALSE; } +INTDEF(xdr_u_hyper) bool_t xdr_longlong_t (XDR *xdrs, quad_t *llp) { - return xdr_hyper (xdrs, llp); + return INTUSE(xdr_hyper) (xdrs, llp); } bool_t xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp) { - return xdr_u_hyper (xdrs, ullp); + return INTUSE(xdr_u_hyper) (xdrs, ullp); } /* @@ -317,6 +324,7 @@ xdr_short (XDR *xdrs, short *sp) } return FALSE; } +INTDEF(xdr_short) /* * XDR unsigned short integers @@ -345,6 +353,7 @@ xdr_u_short (XDR *xdrs, u_short *usp) } return FALSE; } +INTDEF(xdr_u_short) /* @@ -356,7 +365,7 @@ xdr_char (XDR *xdrs, char *cp) int i; i = (*cp); - if (!xdr_int (xdrs, &i)) + if (!INTUSE(xdr_int) (xdrs, &i)) { return FALSE; } @@ -373,7 +382,7 @@ xdr_u_char (XDR *xdrs, u_char *cp) u_int u; u = (*cp); - if (!xdr_u_int (xdrs, &u)) + if (!INTUSE(xdr_u_int) (xdrs, &u)) { return FALSE; } @@ -408,6 +417,7 @@ xdr_bool (XDR *xdrs, bool_t *bp) } return FALSE; } +INTDEF(xdr_bool) /* * XDR enumerations @@ -446,18 +456,19 @@ xdr_enum (XDR *xdrs, enum_t *ep) } return FALSE; #else - return xdr_long (xdrs, (long *) ep); + return INTUSE(xdr_long) (xdrs, (long *) ep); #endif } else if (sizeof (enum sizecheck) == sizeof (short)) { - return xdr_short (xdrs, (short *) ep); + return INTUSE(xdr_short) (xdrs, (short *) ep); } else { return FALSE; } } +INTDEF(xdr_enum) /* * XDR opaque data @@ -508,6 +519,7 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt) } return FALSE; } +INTDEF(xdr_opaque) /* * XDR counted bytes @@ -527,7 +539,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize) /* * first deal with the length since xdr bytes are counted */ - if (!xdr_u_int (xdrs, sizep)) + if (!INTUSE(xdr_u_int) (xdrs, sizep)) { return FALSE; } @@ -564,7 +576,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize) /* fall into ... */ case XDR_ENCODE: - return xdr_opaque (xdrs, sp, nodesize); + return INTUSE(xdr_opaque) (xdrs, sp, nodesize); case XDR_FREE: if (sp != NULL) @@ -576,6 +588,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize) } return FALSE; } +INTDEF(xdr_bytes) /* * Implemented here due to commonality of the object. @@ -586,8 +599,9 @@ xdr_netobj (xdrs, np) struct netobj *np; { - return xdr_bytes (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ); + return INTUSE(xdr_bytes) (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ); } +INTDEF(xdr_netobj) /* * XDR a discriminated union @@ -613,7 +627,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault) /* * we deal with the discriminator; it's an enum */ - if (!xdr_enum (xdrs, dscmp)) + if (!INTUSE(xdr_enum) (xdrs, dscmp)) { return FALSE; } @@ -635,6 +649,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault) return ((dfault == NULL_xdrproc_t) ? FALSE : (*dfault) (xdrs, unp, LASTUNSIGNED)); } +INTDEF(xdr_union) /* @@ -680,7 +695,7 @@ xdr_string (xdrs, cpp, maxsize) case XDR_DECODE: break; } - if (!xdr_u_int (xdrs, &size)) + if (!INTUSE(xdr_u_int) (xdrs, &size)) { return FALSE; } @@ -717,7 +732,7 @@ xdr_string (xdrs, cpp, maxsize) /* fall into ... */ case XDR_ENCODE: - return xdr_opaque (xdrs, sp, size); + return INTUSE(xdr_opaque) (xdrs, sp, size); case XDR_FREE: mem_free (sp, nodesize); @@ -726,6 +741,7 @@ xdr_string (xdrs, cpp, maxsize) } return FALSE; } +INTDEF(xdr_string) /* * Wrapper for xdr_string that can be called directly from @@ -736,7 +752,7 @@ xdr_wrapstring (xdrs, cpp) XDR *xdrs; char **cpp; { - if (xdr_string (xdrs, cpp, LASTUNSIGNED)) + if (INTUSE(xdr_string) (xdrs, cpp, LASTUNSIGNED)) { return TRUE; } diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c index 2dbf8c1e8c..461a6ad9d8 100644 --- a/sunrpc/xdr_array.c +++ b/sunrpc/xdr_array.c @@ -76,7 +76,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc) u_int nodesize; /* like strings, arrays are really counted arrays */ - if (!xdr_u_int (xdrs, sizep)) + if (!INTUSE(xdr_u_int) (xdrs, sizep)) { return FALSE; } @@ -137,6 +137,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc) } return stat; } +INTDEF(xdr_array) /* * xdr_vector(): diff --git a/sunrpc/xdr_mem.c b/sunrpc/xdr_mem.c index b328d59829..1695feaf58 100644 --- a/sunrpc/xdr_mem.c +++ b/sunrpc/xdr_mem.c @@ -80,6 +80,7 @@ xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op) xdrs->x_private = xdrs->x_base = addr; xdrs->x_handy = size; } +INTDEF(xdrmem_create) /* * Nothing needs to be done for the memory case. The argument is clearly diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c index 941afa35de..15a41699c7 100644 --- a/sunrpc/xdr_rec.c +++ b/sunrpc/xdr_rec.c @@ -53,7 +53,7 @@ #ifdef USE_IN_LIBIO # include <wchar.h> # include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif static bool_t xdrrec_getlong (XDR *, long *); @@ -200,6 +200,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize, rstrm->fbtbc = 0; rstrm->last_frag = TRUE; } +INTDEF(xdrrec_create) /* @@ -487,6 +488,7 @@ xdrrec_skiprecord (XDR *xdrs) rstrm->last_frag = FALSE; return TRUE; } +INTDEF(xdrrec_skiprecord) /* * Lookahead function. @@ -510,6 +512,7 @@ xdrrec_eof (XDR *xdrs) return TRUE; return FALSE; } +INTDEF(xdrrec_eof) /* * The client must tell the package when an end-of-record has occurred. @@ -536,6 +539,7 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow) rstrm->out_finger += BYTES_PER_XDR_UNIT; return TRUE; } +INTDEF(xdrrec_endofrecord) /* diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c index e49329f20e..067d97eb79 100644 --- a/sunrpc/xdr_ref.c +++ b/sunrpc/xdr_ref.c @@ -49,7 +49,7 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI"; #ifdef USE_IN_LIBIO # include <wchar.h> # include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif #define LASTUNSIGNED ((u_int)0-1) @@ -107,6 +107,7 @@ xdr_reference (xdrs, pp, size, proc) } return stat; } +INTDEF(xdr_reference) /* @@ -139,7 +140,7 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj) bool_t more_data; more_data = (*objpp != NULL); - if (!xdr_bool (xdrs, &more_data)) + if (!INTUSE(xdr_bool) (xdrs, &more_data)) { return FALSE; } @@ -148,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 INTUSE(xdr_reference) (xdrs, objpp, obj_size, xdr_obj); } diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c index 411cf17da1..8a76b75030 100644 --- a/sunrpc/xdr_stdio.c +++ b/sunrpc/xdr_stdio.c @@ -43,10 +43,10 @@ #ifdef USE_IN_LIBIO # include <libio/iolibio.h> -# define fflush(s) _IO_fflush (s) -# define fread(p, m, n, s) _IO_fread (p, m, n, s) -# define ftell(s) _IO_ftell (s) -# define fwrite(p, m, n, s) _IO_fwrite (p, m, n, s) +# define fflush(s) INTUSE(_IO_fflush) (s) +# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s) +# define ftell(s) INTUSE(_IO_ftell) (s) +# define fwrite(p, m, n, s) INTUSE(_IO_fwrite) (p, m, n, s) #endif static bool_t xdrstdio_getlong (XDR *, long *); |