From c1422e5b7cdb4400f934c91bcefa3a1a96d789fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 9 Oct 1999 21:56:43 +0000 Subject: Update. Patch by khendricks@ivey.uwo.ca [libc/1382]. --- sunrpc/rpc/auth.h | 61 +++++++++++----------- sunrpc/rpc/auth_des.h | 17 +++---- sunrpc/rpc/auth_unix.h | 4 +- sunrpc/rpc/clnt.h | 82 ++++++++++++++--------------- sunrpc/rpc/des_crypt.h | 24 ++++----- sunrpc/rpc/netdb.h | 26 +++++----- sunrpc/rpc/pmap_clnt.h | 50 +++++++++--------- sunrpc/rpc/pmap_prot.h | 4 +- sunrpc/rpc/pmap_rmt.h | 5 +- sunrpc/rpc/rpc_msg.h | 10 ++-- sunrpc/rpc/svc.h | 78 ++++++++++++++-------------- sunrpc/rpc/svc_auth.h | 4 +- sunrpc/rpc/xdr.h | 136 ++++++++++++++++++++++++------------------------- 13 files changed, 246 insertions(+), 255 deletions(-) (limited to 'sunrpc') diff --git a/sunrpc/rpc/auth.h b/sunrpc/rpc/auth.h index e0e1e5f..6612957 100644 --- a/sunrpc/rpc/auth.h +++ b/sunrpc/rpc/auth.h @@ -77,7 +77,7 @@ union des_block { char c[8]; }; typedef union des_block des_block; -extern bool_t xdr_des_block __P ((XDR *__xdrs, des_block *__blkp)); +extern bool_t xdr_des_block (XDR *__xdrs, des_block *__blkp) __THROW; /* * Authentication info. Opaque to client. @@ -97,12 +97,12 @@ struct AUTH { struct opaque_auth ah_verf; union des_block ah_key; struct auth_ops { - void (*ah_nextverf) __PMT ((AUTH *)); - int (*ah_marshal) __PMT ((AUTH *, XDR *)); /* nextverf & serialize */ - int (*ah_validate) __PMT ((AUTH *, struct opaque_auth *)); + void (*ah_nextverf) (AUTH *); + int (*ah_marshal) (AUTH *, XDR *); /* nextverf & serialize */ + int (*ah_validate) (AUTH *, struct opaque_auth *); /* validate verifier */ - int (*ah_refresh) __PMT ((AUTH *)); /* refresh credentials */ - void (*ah_destroy) __PMT ((AUTH *)); /* destroy this structure */ + int (*ah_refresh) (AUTH *); /* refresh credentials */ + void (*ah_destroy) (AUTH *); /* destroy this structure */ } *ah_ops; caddr_t ah_private; }; @@ -158,16 +158,15 @@ extern struct opaque_auth _null_auth; * int len; * int *aup_gids; */ -extern AUTH *authunix_create __P ((char *__machname, __uid_t __uid, - __gid_t __gid, int __len, - __gid_t *__aup_gids)); -extern AUTH *authunix_create_default __P ((void)); -extern AUTH *authnone_create __P ((void)); -extern AUTH *authdes_create __P ((const char *__servername, u_int __window, - struct sockaddr *__syncaddr, - des_block *__ckey)); -extern AUTH *authdes_pk_create __P ((const char *, netobj *, u_int, - struct sockaddr *, des_block *)); +extern AUTH *authunix_create (char *__machname, __uid_t __uid, __gid_t __gid, + int __len, __gid_t *__aup_gids) __THROW; +extern AUTH *authunix_create_default (void) __THROW; +extern AUTH *authnone_create (void) __THROW; +extern AUTH *authdes_create (const char *__servername, u_int __window, + struct sockaddr *__syncaddr, des_block *__ckey) + __THROW; +extern AUTH *authdes_pk_create (const char *, netobj *, u_int, + struct sockaddr *, des_block *) __THROW; #define AUTH_NONE 0 /* no authentication */ @@ -183,31 +182,31 @@ extern AUTH *authdes_pk_create __P ((const char *, netobj *, u_int, * Netname manipulating functions * */ -extern int getnetname __P ((char *)); -extern int host2netname __P ((char *, __const char *, __const char *)); -extern int user2netname __P ((char *, __const uid_t, __const char *)); -extern int netname2user __P ((__const char *, uid_t *, gid_t *, int *, - gid_t *)); -extern int netname2host __P ((__const char *, char *, __const int)); +extern int getnetname (char *) __THROW; +extern int host2netname (char *, __const char *, __const char *) __THROW; +extern int user2netname (char *, __const uid_t, __const char *) __THROW; +extern int netname2user (__const char *, uid_t *, gid_t *, int *, gid_t *) + __THROW; +extern int netname2host (__const char *, char *, __const int) __THROW; /* * * These routines interface to the keyserv daemon * */ -extern int key_decryptsession __P ((char *, des_block *)); -extern int key_decryptsession_pk __P ((char *, netobj *, des_block *)); -extern int key_encryptsession __P ((char *, des_block *)); -extern int key_encryptsession_pk __P ((char *, netobj *, des_block *)); -extern int key_gendes __P ((des_block *)); -extern int key_setsecret __P ((char *)); -extern int key_secretkey_is_set __P ((void)); -extern int key_get_conv __P ((char *, des_block *)); +extern int key_decryptsession (char *, des_block *) __THROW; +extern int key_decryptsession_pk (char *, netobj *, des_block *) __THROW; +extern int key_encryptsession (char *, des_block *) __THROW; +extern int key_encryptsession_pk (char *, netobj *, des_block *) __THROW; +extern int key_gendes (des_block *) __THROW; +extern int key_setsecret (char *) __THROW; +extern int key_secretkey_is_set (void) __THROW; +extern int key_get_conv (char *, des_block *) __THROW; /* * XDR an opaque authentication struct. */ -extern bool_t xdr_opaque_auth __P ((XDR *, struct opaque_auth *)); +extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *) __THROW; __END_DECLS diff --git a/sunrpc/rpc/auth_des.h b/sunrpc/rpc/auth_des.h index b94bafb..198b299 100644 --- a/sunrpc/rpc/auth_des.h +++ b/sunrpc/rpc/auth_des.h @@ -86,26 +86,25 @@ struct authdes_verf #define adv_nickname adv_int_u /* Map a des credential into a unix cred. */ -extern int authdes_getucred __P ((__const struct authdes_cred * __adc, - uid_t * __uid, gid_t * __gid, - short *__grouplen, gid_t * __groups)); +extern int authdes_getucred (__const struct authdes_cred * __adc, + uid_t * __uid, gid_t * __gid, + short *__grouplen, gid_t * __groups) __THROW; /* Get the public key for NAME and place it in KEY. NAME can only be up to MAXNETNAMELEN bytes long and the destination buffer KEY should have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getpublickey __P ((__const char *__name, char *__key)); +extern int getpublickey (__const char *__name, char *__key) __THROW; /* Get the secret key for NAME and place it in KEY. PASSWD is used to decrypt the encrypted key stored in the database. NAME can only be up to MAXNETNAMELEN bytes long and the destination buffer KEY should have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getsecretkey __P ((__const char *__name, char *__key, - __const char *__passwd)); +extern int getsecretkey (__const char *__name, char *__key, + __const char *__passwd) __THROW; -extern int rtime __P ((struct sockaddr_in *__addrp, - struct rpc_timeval *__timep, - struct rpc_timeval *__timeout)); +extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep, + struct rpc_timeval *__timeout) __THROW; __END_DECLS diff --git a/sunrpc/rpc/auth_unix.h b/sunrpc/rpc/auth_unix.h index ed3b932..424661d 100644 --- a/sunrpc/rpc/auth_unix.h +++ b/sunrpc/rpc/auth_unix.h @@ -72,8 +72,8 @@ struct authunix_parms __gid_t *aup_gids; }; -extern bool_t xdr_authunix_parms __P ((XDR *__xdrs, - struct authunix_parms *__p)); +extern bool_t xdr_authunix_parms (XDR *__xdrs, struct authunix_parms *__p) + __THROW; /* * If a response verifier has flavor AUTH_SHORT, diff --git a/sunrpc/rpc/clnt.h b/sunrpc/rpc/clnt.h index b385292..47bd0b5 100644 --- a/sunrpc/rpc/clnt.h +++ b/sunrpc/rpc/clnt.h @@ -133,17 +133,16 @@ typedef struct CLIENT CLIENT; struct CLIENT { AUTH *cl_auth; /* authenticator */ struct clnt_ops { - enum clnt_stat (*cl_call) __PMT ((CLIENT *, u_long, xdrproc_t, - caddr_t, xdrproc_t, - caddr_t, struct timeval)); + enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t, + caddr_t, struct timeval); /* call remote procedure */ - void (*cl_abort) __PMT ((void)); /* abort a call */ - void (*cl_geterr) __PMT ((CLIENT *, struct rpc_err *)); + void (*cl_abort) (void); /* abort a call */ + void (*cl_geterr) (CLIENT *, struct rpc_err *); /* get specific error code */ - bool_t (*cl_freeres) __PMT ((CLIENT *, xdrproc_t, caddr_t)); + bool_t (*cl_freeres) (CLIENT *, xdrproc_t, caddr_t); /* frees results */ - void (*cl_destroy) __PMT ((CLIENT *)); /* destroy this structure */ - bool_t (*cl_control) __PMT ((CLIENT *, int, char *)); + 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 */ @@ -278,8 +277,8 @@ struct CLIENT { * u_long prog; * u_long vers; */ -extern CLIENT *clntraw_create __P ((__const u_long __prog, - __const u_long __vers)); +extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers) + __THROW; /* @@ -292,8 +291,9 @@ extern CLIENT *clntraw_create __P ((__const u_long __prog, * u_ong vers; -- version number * char *prot; -- protocol */ -extern CLIENT *clnt_create __P ((__const char *__host, __const u_long __prog, - __const u_long __vers, __const char *__prot)); +extern CLIENT *clnt_create (__const char *__host, __const u_long __prog, + __const u_long __vers, __const char *__prot) + __THROW; /* @@ -307,10 +307,9 @@ extern CLIENT *clnt_create __P ((__const char *__host, __const u_long __prog, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr, - u_long __prog, u_long __version, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clnttcp_create (struct sockaddr_in *__raddr, u_long __prog, + u_long __version, int *__sockp, u_int __sendsz, + u_int __recvsz) __THROW; /* * UDP based rpc. @@ -333,15 +332,13 @@ extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clntudp_create __P ((struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, - int *__sockp)); -extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, u_long __program, + u_long __version, struct timeval __wait_resend, + int *__sockp) __THROW; +extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr, + u_long __program, u_long __version, + struct timeval __wait_resend, int *__sockp, + u_int __sendsz, u_int __recvsz) __THROW; /* @@ -355,35 +352,34 @@ extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clntunix_create __P ((struct sockaddr_un *__raddr, - u_long __program, u_long __version, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clntunix_create (struct sockaddr_un *__raddr, u_long __program, + u_long __version, int *__sockp, + u_int __sendsz, u_int __recvsz) __THROW; -extern int callrpc __P ((__const char *__host, __const u_long __prognum, - __const u_long __versnum, __const u_long __procnum, - __const xdrproc_t __inproc, __const char *__in, - __const xdrproc_t __outproc, char *__out)); -extern int _rpc_dtablesize __P ((void)); +extern int callrpc (__const char *__host, __const u_long __prognum, + __const u_long __versnum, __const u_long __procnum, + __const xdrproc_t __inproc, __const char *__in, + __const xdrproc_t __outproc, char *__out) __THROW; +extern int _rpc_dtablesize (void) __THROW; /* * Print why creation failed */ -extern void clnt_pcreateerror __P ((__const char *__msg)); /* stderr */ -extern char *clnt_spcreateerror __P ((__const char *__msg)); /* string */ +extern void clnt_pcreateerror (__const char *__msg) __THROW; /* stderr */ +extern char *clnt_spcreateerror(__const char *__msg) __THROW; /* string */ /* * Like clnt_perror(), but is more verbose in its output */ -extern void clnt_perrno __P ((enum clnt_stat __num)); /* stderr */ +extern void clnt_perrno (enum clnt_stat __num) __THROW; /* stderr */ /* * Print an English error message, given the client error code */ -extern void clnt_perror __P ((CLIENT *__clnt, __const char *__msg)); +extern void clnt_perror (CLIENT *__clnt, __const char *__msg) __THROW; /* stderr */ -extern char *clnt_sperror __P ((CLIENT *__clnt, __const char *__msg)); +extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW; /* string */ /* @@ -401,19 +397,19 @@ extern struct rpc_createerr rpc_createerr; /* * Copy error message to buffer. */ -extern char *clnt_sperrno __P ((enum clnt_stat __num)); /* string */ +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 __P ((__const char * __host, u_long __prognum, - u_long __versnum, u_int proto)); +extern int getrpcport (__const char * __host, u_long __prognum, + u_long __versnum, u_int proto) __THROW; /* * get the local host's IP address without consulting * name service library functions */ -extern void get_myaddress __P ((struct sockaddr_in *)); +extern void get_myaddress (struct sockaddr_in *) __THROW; #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ #define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ diff --git a/sunrpc/rpc/des_crypt.h b/sunrpc/rpc/des_crypt.h index e20cc38..6a65887 100644 --- a/sunrpc/rpc/des_crypt.h +++ b/sunrpc/rpc/des_crypt.h @@ -11,23 +11,23 @@ * may copy or modify Sun RPC without charge, but are not authorized * to license or distribute it to anyone else except as part of a product or * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * + * * Sun RPC is provided with no support and without any obligation on the * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -47,7 +47,7 @@ __BEGIN_DECLS #define DES_DEVMASK (1 << 1) -#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ +#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ #define DES_SW (1*DES_DEVMASK) /* Use software device */ @@ -77,20 +77,20 @@ __BEGIN_DECLS /* * Cipher Block Chaining mode */ -extern int cbc_crypt __P ((char *__key, char *__buf, unsigned __len, - unsigned __mode, char *__ivec)); +extern int cbc_crypt (char *__key, char *__buf, unsigned __len, + unsigned __mode, char *__ivec) __THROW; /* * Electronic Code Book mode */ -extern int ecb_crypt __P ((char *__key, char *__buf, unsigned __len, - unsigned __mode)); +extern int ecb_crypt (char *__key, char *__buf, unsigned __len, + unsigned __mode) __THROW; -/* +/* * Set des parity for a key. * DES parity is odd and in the low bit of each byte */ -extern void des_setparity __P ((char *__key)); +extern void des_setparity (char *__key) __THROW; __END_DECLS diff --git a/sunrpc/rpc/netdb.h b/sunrpc/rpc/netdb.h index 6b820c8..539d8c3 100644 --- a/sunrpc/rpc/netdb.h +++ b/sunrpc/rpc/netdb.h @@ -50,23 +50,23 @@ struct rpcent int r_number; /* RPC program number. */ }; -extern void setrpcent __P ((int _stayopen)); -extern void endrpcent __P ((void)); -extern struct rpcent *getrpcbyname __P ((__const char *__name)); -extern struct rpcent *getrpcbynumber __P ((int __number)); -extern struct rpcent *getrpcent __P ((void)); +extern void setrpcent (int __stayopen) __THROW; +extern void endrpcent (void) __THROW; +extern struct rpcent *getrpcbyname (__const char *__name) __THROW; +extern struct rpcent *getrpcbynumber (int __number) __THROW; +extern struct rpcent *getrpcent (void) __THROW; #ifdef __USE_MISC -extern int getrpcbyname_r __P ((__const char *__name, - struct rpcent *__result_buf, char *__buffer, - size_t __buflen, struct rpcent **__result)); +extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __THROW; -extern int getrpcbynumber_r __P ((int __number, struct rpcent *__result_buf, - char *__buffer, size_t __buflen, - struct rpcent **__result)); +extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __THROW; -extern int getrpcent_r __P ((struct rpcent *__result_buf, char *__buffer, - size_t __buflen, struct rpcent **__result)); +extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, + size_t __buflen, struct rpcent **__result) __THROW; #endif __END_DECLS diff --git a/sunrpc/rpc/pmap_clnt.h b/sunrpc/rpc/pmap_clnt.h index d9800d4..1b1c452 100644 --- a/sunrpc/rpc/pmap_clnt.h +++ b/sunrpc/rpc/pmap_clnt.h @@ -45,8 +45,7 @@ __BEGIN_DECLS -typedef bool_t (*resultproc_t) __PMT ((caddr_t resp, - struct sockaddr_in *raddr)); +typedef bool_t (*resultproc_t) (caddr_t resp, struct sockaddr_in *raddr); /* * Usage: @@ -70,30 +69,29 @@ typedef bool_t (*resultproc_t) __PMT ((caddr_t resp, * address if the responder to the broadcast. */ -extern bool_t pmap_set __P ((__const u_long __program, __const u_long __vers, - int __protocol, u_short __port)); -extern bool_t pmap_unset __P ((__const u_long __program, __const u_long __vers)); -extern struct pmaplist *pmap_getmaps __P ((struct sockaddr_in *__address)); -extern enum clnt_stat pmap_rmtcall __P ((struct sockaddr_in *__addr, - __const u_long __prog, - __const u_long __vers, - __const u_long __proc, - xdrproc_t __xdrargs, - caddr_t __argsp, xdrproc_t __xdrres, - caddr_t __resp, struct timeval __tout, - u_long *__port_ptr)); -extern enum clnt_stat clnt_broadcast __P ((__const u_long __prog, - __const u_long __vers, - __const u_long __proc, - xdrproc_t __xargs, - caddr_t __argsp, - xdrproc_t __xresults, - caddr_t __resultsp, - resultproc_t __eachresult)); -extern u_short pmap_getport __P ((struct sockaddr_in *__address, - __const u_long __program, - __const u_long __version, - u_int __protocol)); +extern bool_t pmap_set (__const u_long __program, __const u_long __vers, + int __protocol, u_short __port) __THROW; +extern bool_t pmap_unset (__const u_long __program, __const u_long __vers) + __THROW; +extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW; +extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr, + __const u_long __prog, + __const u_long __vers, + __const u_long __proc, + xdrproc_t __xdrargs, + caddr_t __argsp, xdrproc_t __xdrres, + caddr_t __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, + resultproc_t __eachresult) __THROW; +extern u_short pmap_getport (struct sockaddr_in *__address, + __const u_long __program, + __const u_long __version, u_int __protocol) + __THROW; __END_DECLS diff --git a/sunrpc/rpc/pmap_prot.h b/sunrpc/rpc/pmap_prot.h index 52185d3..cd64e36 100644 --- a/sunrpc/rpc/pmap_prot.h +++ b/sunrpc/rpc/pmap_prot.h @@ -94,14 +94,14 @@ struct pmap { long unsigned pm_port; }; -extern bool_t xdr_pmap __P ((XDR *__xdrs, struct pmap *__regs)); +extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW; struct pmaplist { struct pmap pml_map; struct pmaplist *pml_next; }; -extern bool_t xdr_pmaplist __P ((XDR *__xdrs, struct pmaplist **__rp)); +extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW; __END_DECLS diff --git a/sunrpc/rpc/pmap_rmt.h b/sunrpc/rpc/pmap_rmt.h index bb35ad6..7a38b5f 100644 --- a/sunrpc/rpc/pmap_rmt.h +++ b/sunrpc/rpc/pmap_rmt.h @@ -51,7 +51,8 @@ struct rmtcallargs { xdrproc_t xdr_args; }; -extern bool_t xdr_rmtcall_args __P ((XDR *__xdrs, struct rmtcallargs *__crp)); +extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp) + __THROW; struct rmtcallres { u_long *port_ptr; @@ -60,7 +61,7 @@ struct rmtcallres { xdrproc_t xdr_results; }; -extern bool_t xdr_rmtcallres __P ((XDR *__xdrs, struct rmtcallres *__crp)); +extern bool_t xdr_rmtcallres (XDR *__xdrs, struct rmtcallres *__crp) __THROW; __END_DECLS diff --git a/sunrpc/rpc/rpc_msg.h b/sunrpc/rpc/rpc_msg.h index e2908ac..636d60e 100644 --- a/sunrpc/rpc/rpc_msg.h +++ b/sunrpc/rpc/rpc_msg.h @@ -170,7 +170,7 @@ struct rpc_msg { * XDR *xdrs; * struct rpc_msg *cmsg; */ -extern bool_t xdr_callmsg __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); +extern bool_t xdr_callmsg (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; /* * XDR routine to pre-serialize the static part of a rpc message. @@ -178,7 +178,7 @@ extern bool_t xdr_callmsg __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); * XDR *xdrs; * struct rpc_msg *cmsg; */ -extern bool_t xdr_callhdr __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); +extern bool_t xdr_callhdr (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; /* * XDR routine to handle a rpc reply. @@ -186,7 +186,7 @@ extern bool_t xdr_callhdr __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); * XDR *xdrs; * struct rpc_msg *rmsg; */ -extern bool_t xdr_replymsg __P ((XDR *__xdrs, struct rpc_msg *__rmsg)); +extern bool_t xdr_replymsg (XDR *__xdrs, struct rpc_msg *__rmsg) __THROW; /* * Fills in the error part of a reply message. @@ -194,8 +194,8 @@ extern bool_t xdr_replymsg __P ((XDR *__xdrs, struct rpc_msg *__rmsg)); * struct rpc_msg *msg; * struct rpc_err *error; */ -extern void _seterr_reply __P ((struct rpc_msg *__msg, - struct rpc_err *__error)); +extern void _seterr_reply (struct rpc_msg *__msg, struct rpc_err *__error) + __THROW; __END_DECLS diff --git a/sunrpc/rpc/svc.h b/sunrpc/rpc/svc.h index f607d6b..d740f18 100644 --- a/sunrpc/rpc/svc.h +++ b/sunrpc/rpc/svc.h @@ -77,18 +77,18 @@ struct SVCXPRT { int xp_sock; u_short xp_port; /* associated port number */ const struct xp_ops { - bool_t (*xp_recv) __PMT ((SVCXPRT *__xprt, struct rpc_msg *__msg)); + bool_t (*xp_recv) (SVCXPRT *__xprt, struct rpc_msg *__msg); /* receive incoming requests */ - enum xprt_stat (*xp_stat) __PMT ((SVCXPRT *__xprt)); + enum xprt_stat (*xp_stat) (SVCXPRT *__xprt); /* get transport status */ - bool_t (*xp_getargs) __PMT ((SVCXPRT *__xprt, xdrproc_t __xdr_args, - caddr_t args_ptr)); /* get arguments */ - bool_t (*xp_reply) __PMT ((SVCXPRT *__xprt, struct rpc_msg *__msg)); + bool_t (*xp_getargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, + caddr_t args_ptr); /* get arguments */ + bool_t (*xp_reply) (SVCXPRT *__xprt, struct rpc_msg *__msg); /* send reply */ - bool_t (*xp_freeargs) __PMT ((SVCXPRT *__xprt, xdrproc_t __xdr_args, - caddr_t args_ptr)); + bool_t (*xp_freeargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, + caddr_t args_ptr); /* free mem allocated for args */ - void (*xp_destroy) __PMT ((SVCXPRT *__xprt)); + void (*xp_destroy) (SVCXPRT *__xprt); /* destroy this struct */ } *xp_ops; int xp_addrlen; /* length of remote address */ @@ -156,7 +156,7 @@ struct svc_req { #ifndef __DISPATCH_FN_T #define __DISPATCH_FN_T -typedef void (*__dispatch_fn_t) __PMT ((struct svc_req*, SVCXPRT*)); +typedef void (*__dispatch_fn_t) (struct svc_req*, SVCXPRT*); #endif /* @@ -169,9 +169,9 @@ typedef void (*__dispatch_fn_t) __PMT ((struct svc_req*, SVCXPRT*)); * void (*dispatch)(); * rpcprot_t protocol; like TCP or UDP, zero means do not register */ -extern bool_t svc_register __P ((SVCXPRT *__xprt, rpcprog_t __prog, - rpcvers_t __vers, __dispatch_fn_t __dispatch, - rpcprot_t __protocol)); +extern bool_t svc_register (SVCXPRT *__xprt, rpcprog_t __prog, + rpcvers_t __vers, __dispatch_fn_t __dispatch, + rpcprot_t __protocol) __THROW; /* * Service un-registration @@ -180,7 +180,7 @@ extern bool_t svc_register __P ((SVCXPRT *__xprt, rpcprog_t __prog, * rpcprog_t prog; * rpcvers_t vers; */ -extern void svc_unregister __P ((rpcprog_t __prog, rpcvers_t __vers)); +extern void svc_unregister (rpcprog_t __prog, rpcvers_t __vers) __THROW; /* * Transport registration. @@ -188,7 +188,7 @@ extern void svc_unregister __P ((rpcprog_t __prog, rpcvers_t __vers)); * xprt_register(xprt) * SVCXPRT *xprt; */ -extern void xprt_register __P ((SVCXPRT *__xprt)); +extern void xprt_register (SVCXPRT *__xprt) __THROW; /* * Transport un-register @@ -196,7 +196,7 @@ extern void xprt_register __P ((SVCXPRT *__xprt)); * xprt_unregister(xprt) * SVCXPRT *xprt; */ -extern void xprt_unregister __P ((SVCXPRT *__xprt)); +extern void xprt_unregister (SVCXPRT *__xprt) __THROW; /* @@ -225,23 +225,23 @@ extern void xprt_unregister __P ((SVCXPRT *__xprt)); * deadlock the caller and server processes! */ -extern bool_t svc_sendreply __P ((SVCXPRT *xprt, xdrproc_t __xdr_results, - caddr_t __xdr_location)); +extern bool_t svc_sendreply (SVCXPRT *xprt, xdrproc_t __xdr_results, + caddr_t __xdr_location) __THROW; -extern void svcerr_decode __P ((SVCXPRT *__xprt)); +extern void svcerr_decode (SVCXPRT *__xprt) __THROW; -extern void svcerr_weakauth __P ((SVCXPRT *__xprt)); +extern void svcerr_weakauth (SVCXPRT *__xprt) __THROW; -extern void svcerr_noproc __P ((SVCXPRT *__xprt)); +extern void svcerr_noproc (SVCXPRT *__xprt) __THROW; -extern void svcerr_progvers __P ((SVCXPRT *__xprt, rpcvers_t __low_vers, - rpcvers_t __high_vers)); +extern void svcerr_progvers (SVCXPRT *__xprt, rpcvers_t __low_vers, + rpcvers_t __high_vers) __THROW; -extern void svcerr_auth __P ((SVCXPRT *__xprt, enum auth_stat __why)); +extern void svcerr_auth (SVCXPRT *__xprt, enum auth_stat __why) __THROW; -extern void svcerr_noprog __P ((SVCXPRT *__xprt)); +extern void svcerr_noprog (SVCXPRT *__xprt) __THROW; -extern void svcerr_systemerr __P ((SVCXPRT *__xprt)); +extern void svcerr_systemerr (SVCXPRT *__xprt) __THROW; /* * Lowest level dispatching -OR- who owns this process anyway. @@ -268,12 +268,12 @@ extern fd_set svc_fdset; * a small program implemented by the svc_rpc implementation itself; * also see clnt.h for protocol numbers. */ -extern void svc_getreq __P ((int __rdfds)); -extern void svc_getreq_common __P ((const int __fd)); -extern void svc_getreqset __P ((fd_set *__readfds)); -extern void svc_getreq_poll __P ((struct pollfd *, const int)); -extern void svc_exit __P ((void)); -extern void svc_run __P ((void)); +extern void svc_getreq (int __rdfds) __THROW; +extern void svc_getreq_common (const int __fd) __THROW; +extern void svc_getreqset (fd_set *__readfds) __THROW; +extern void svc_getreq_poll (struct pollfd *, const int) __THROW; +extern void svc_exit (void) __THROW; +extern void svc_run (void) __THROW; /* * Socket to use on svcxxx_create call to get default socket @@ -287,27 +287,27 @@ extern void svc_run __P ((void)); /* * Memory based rpc for testing and timing. */ -extern SVCXPRT *svcraw_create __P ((void)); +extern SVCXPRT *svcraw_create (void) __THROW; /* * Udp based rpc. */ -extern SVCXPRT *svcudp_create __P ((int __sock)); -extern SVCXPRT *svcudp_bufcreate __P ((int __sock, u_int __sendsz, - u_int __recvsz)); +extern SVCXPRT *svcudp_create (int __sock) __THROW; +extern SVCXPRT *svcudp_bufcreate (int __sock, u_int __sendsz, u_int __recvsz) + __THROW; /* * Tcp based rpc. */ -extern SVCXPRT *svctcp_create __P ((int __sock, u_int __sendsize, - u_int __recvsize)); +extern SVCXPRT *svctcp_create (int __sock, u_int __sendsize, u_int __recvsize) + __THROW; /* * Unix based rpc. */ -extern SVCXPRT *svcunix_create __P ((int __sock, u_int __sendsize, - u_int __recvsize, char *__path)); +extern SVCXPRT *svcunix_create (int __sock, u_int __sendsize, u_int __recvsize, + char *__path) __THROW; __END_DECLS diff --git a/sunrpc/rpc/svc_auth.h b/sunrpc/rpc/svc_auth.h index ad08b71..1c1a715 100644 --- a/sunrpc/rpc/svc_auth.h +++ b/sunrpc/rpc/svc_auth.h @@ -46,8 +46,8 @@ __BEGIN_DECLS /* * Server side authenticator */ -extern enum auth_stat _authenticate __P ((struct svc_req *__rqst, - struct rpc_msg *__msg)); +extern enum auth_stat _authenticate (struct svc_req *__rqst, + struct rpc_msg *__msg) __THROW; __END_DECLS diff --git a/sunrpc/rpc/xdr.h b/sunrpc/rpc/xdr.h index 91dbcc3..0b70344 100644 --- a/sunrpc/rpc/xdr.h +++ b/sunrpc/rpc/xdr.h @@ -114,27 +114,25 @@ struct XDR enum xdr_op x_op; /* operation; fast additional param */ struct xdr_ops { - bool_t (*x_getlong) __PMT ((XDR *__xdrs, long *__lp)); + bool_t (*x_getlong) (XDR *__xdrs, long *__lp); /* get a long from underlying stream */ - bool_t (*x_putlong) __PMT ((XDR *__xdrs, __const long *__lp)); + bool_t (*x_putlong) (XDR *__xdrs, __const long *__lp); /* put a long to " */ - bool_t (*x_getbytes) __PMT ((XDR *__xdrs, caddr_t __addr, - u_int __len)); + bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len); /* get some bytes from " */ - bool_t (*x_putbytes) __PMT ((XDR *__xdrs, __const char *__addr, - u_int __len)); + bool_t (*x_putbytes) (XDR *__xdrs, __const char *__addr, u_int __len); /* put some bytes to " */ - u_int (*x_getpostn) __PMT ((__const XDR *__xdrs)); + u_int (*x_getpostn) (__const XDR *__xdrs); /* returns bytes off from beginning */ - bool_t (*x_setpostn) __PMT ((XDR *__xdrs, u_int pos)); + bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos); /* lets you reposition the stream */ - int32_t *(*x_inline) __PMT ((XDR *__xdrs, int len)); + int32_t *(*x_inline) (XDR *__xdrs, int __len); /* buf quick ptr to buffered data */ - void (*x_destroy) __PMT ((XDR *__xdrs)); + void (*x_destroy) (XDR *__xdrs); /* free privates of this xdr_stream */ - bool_t (*x_getint32) __PMT ((XDR *__xdrs, int32_t *__ip)); + bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip); /* get a int from underlying stream */ - bool_t (*x_putint32) __PMT ((XDR *__xdrs, __const int32_t *__ip)); + bool_t (*x_putint32) (XDR *__xdrs, __const int32_t *__ip); /* put a int to " */ } *x_ops; @@ -153,7 +151,7 @@ struct XDR * allocate dynamic storage of the appropriate size and return it. * bool_t (*xdrproc_t)(XDR *, caddr_t *); */ -typedef bool_t (*xdrproc_t) __PMT ((XDR *, void *,...)); +typedef bool_t (*xdrproc_t) (XDR *, void *,...); /* @@ -288,49 +286,49 @@ struct xdr_discrim * know whether the call is a read or a write to the passed parameter * also, the XDR structure is always updated by some of these calls. */ -extern bool_t xdr_void __P ((void)); -extern bool_t xdr_short __P ((XDR *__xdrs, short *__sp)); -extern bool_t xdr_u_short __P ((XDR *__xdrs, u_short *__usp)); -extern bool_t xdr_int __P ((XDR *__xdrs, int *__ip)); -extern bool_t xdr_u_int __P ((XDR *__xdrs, u_int *__up)); -extern bool_t xdr_long __P ((XDR *__xdrs, long *__lp)); -extern bool_t xdr_u_long __P ((XDR *__xdrs, u_long *__ulp)); -extern bool_t xdr_hyper __P ((XDR *__xdrs, quad_t *__llp)); -extern bool_t xdr_u_hyper __P ((XDR *__xdrs, u_quad_t *__ullp)); -extern bool_t xdr_longlong_t __P ((XDR *__xdrs, quad_t *__llp)); -extern bool_t xdr_u_longlong_t __P ((XDR *__xdrs, u_quad_t *__ullp)); -extern bool_t xdr_int8_t __P ((XDR *__xdrs, int8_t *__ip)); -extern bool_t xdr_uint8_t __P ((XDR *__xdrs, uint8_t *__up)); -extern bool_t xdr_int16_t __P ((XDR *__xdrs, int16_t *__ip)); -extern bool_t xdr_uint16_t __P ((XDR *__xdrs, uint16_t *__up)); -extern bool_t xdr_int32_t __P ((XDR *__xdrs, int32_t *__ip)); -extern bool_t xdr_uint32_t __P ((XDR *__xdrs, uint32_t *__up)); -extern bool_t xdr_int64_t __P ((XDR *__xdrs, int64_t *__ip)); -extern bool_t xdr_uint64_t __P ((XDR *__xdrs, uint64_t *__up)); -extern bool_t xdr_bool __P ((XDR *__xdrs, bool_t *__bp)); -extern bool_t xdr_enum __P ((XDR *__xdrs, enum_t *__ep)); -extern bool_t xdr_array __P ((XDR * _xdrs, caddr_t *__addrp, u_int *__sizep, - u_int __maxsize, u_int __elsize, - xdrproc_t __elproc)); -extern bool_t xdr_bytes __P ((XDR *__xdrs, char **__cpp, u_int *__sizep, - u_int __maxsize)); -extern bool_t xdr_opaque __P ((XDR *__xdrs, caddr_t __cp, u_int __cnt)); -extern bool_t xdr_string __P ((XDR *__xdrs, char **__cpp, u_int __maxsize)); -extern bool_t xdr_union __P ((XDR *__xdrs, enum_t *__dscmp, char *__unp, - __const struct xdr_discrim *__choices, - xdrproc_t dfault)); -extern bool_t xdr_char __P ((XDR *__xdrs, char *__cp)); -extern bool_t xdr_u_char __P ((XDR *__xdrs, u_char *__cp)); -extern bool_t xdr_vector __P ((XDR *__xdrs, char *__basep, u_int __nelem, - u_int __elemsize, xdrproc_t __xdr_elem)); -extern bool_t xdr_float __P ((XDR *__xdrs, float *__fp)); -extern bool_t xdr_double __P ((XDR *__xdrs, double *__dp)); -extern bool_t xdr_reference __P ((XDR *__xdrs, caddr_t *__xpp, u_int __size, - xdrproc_t __proc)); -extern bool_t xdr_pointer __P ((XDR *__xdrs, char **__objpp, - u_int __obj_size, xdrproc_t __xdr_obj)); -extern bool_t xdr_wrapstring __P ((XDR *__xdrs, char **__cpp)); -extern u_long xdr_sizeof __P ((xdrproc_t, void *)); +extern bool_t xdr_void (void) __THROW; +extern bool_t xdr_short (XDR *__xdrs, short *__sp) __THROW; +extern bool_t xdr_u_short (XDR *__xdrs, u_short *__usp) __THROW; +extern bool_t xdr_int (XDR *__xdrs, int *__ip) __THROW; +extern bool_t xdr_u_int (XDR *__xdrs, u_int *__up) __THROW; +extern bool_t xdr_long (XDR *__xdrs, long *__lp) __THROW; +extern bool_t xdr_u_long (XDR *__xdrs, u_long *__ulp) __THROW; +extern bool_t xdr_hyper (XDR *__xdrs, quad_t *__llp) __THROW; +extern bool_t xdr_u_hyper (XDR *__xdrs, u_quad_t *__ullp) __THROW; +extern bool_t xdr_longlong_t (XDR *__xdrs, quad_t *__llp) __THROW; +extern bool_t xdr_u_longlong_t (XDR *__xdrs, u_quad_t *__ullp) __THROW; +extern bool_t xdr_int8_t (XDR *__xdrs, int8_t *__ip) __THROW; +extern bool_t xdr_uint8_t (XDR *__xdrs, uint8_t *__up) __THROW; +extern bool_t xdr_int16_t (XDR *__xdrs, int16_t *__ip) __THROW; +extern bool_t xdr_uint16_t (XDR *__xdrs, uint16_t *__up) __THROW; +extern bool_t xdr_int32_t (XDR *__xdrs, int32_t *__ip) __THROW; +extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW; +extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW; +extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_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, + 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_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, + xdrproc_t dfault) __THROW; +extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW; +extern bool_t xdr_u_char (XDR *__xdrs, u_char *__cp) __THROW; +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, + xdrproc_t __proc) __THROW; +extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp, + u_int __obj_size, xdrproc_t __xdr_obj) __THROW; +extern bool_t xdr_wrapstring (XDR *__xdrs, char **__cpp) __THROW; +extern u_long xdr_sizeof (xdrproc_t, void *) __THROW; /* * Common opaque bytes objects used by many rpc protocols; @@ -343,7 +341,7 @@ struct netobj char *n_bytes; }; typedef struct netobj netobj; -extern bool_t xdr_netobj __P ((XDR *__xdrs, struct netobj *__np)); +extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW; /* * These are the public routines for the various implementations of @@ -351,30 +349,30 @@ extern bool_t xdr_netobj __P ((XDR *__xdrs, struct netobj *__np)); */ /* XDR using memory buffers */ -extern void xdrmem_create __P ((XDR *__xdrs, __const caddr_t __addr, - u_int __size, enum xdr_op __xop)); +extern void xdrmem_create (XDR *__xdrs, __const caddr_t __addr, + u_int __size, enum xdr_op __xop) __THROW; /* XDR using stdio library */ -extern void xdrstdio_create __P ((XDR *__xdrs, FILE *__file, - enum xdr_op __xop)); +extern void xdrstdio_create (XDR *__xdrs, FILE *__file, enum xdr_op __xop) + __THROW; /* XDR pseudo records for tcp */ -extern void xdrrec_create __P ((XDR *__xdrs, u_int __sendsize, - u_int __recvsize, caddr_t __tcp_handle, - int (*__readit) (char *, char *, int), - int (*__writeit) (char *, char *, int))); +extern void xdrrec_create (XDR *__xdrs, u_int __sendsize, + u_int __recvsize, caddr_t __tcp_handle, + int (*__readit) (char *, char *, int), + int (*__writeit) (char *, char *, int)) __THROW; /* make end of xdr record */ -extern bool_t xdrrec_endofrecord __P ((XDR *__xdrs, bool_t __sendnow)); +extern bool_t xdrrec_endofrecord (XDR *__xdrs, bool_t __sendnow) __THROW; /* move to beginning of next record */ -extern bool_t xdrrec_skiprecord __P ((XDR *__xdrs)); +extern bool_t xdrrec_skiprecord (XDR *__xdrs) __THROW; /* true if no more input */ -extern bool_t xdrrec_eof __P ((XDR *__xdrs)); +extern bool_t xdrrec_eof (XDR *__xdrs) __THROW; /* free memory buffers for xdr */ -extern void xdr_free __P ((xdrproc_t __proc, char *__objp)); +extern void xdr_free (xdrproc_t __proc, char *__objp) __THROW; __END_DECLS -- cgit v1.1