Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/rpc Use C89 definitions



details:   https://anonhg.NetBSD.org/src/rev/66110a6eb86f
branches:  trunk
changeset: 778251:66110a6eb86f
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Mar 20 17:14:50 2012 +0000

description:
Use C89 definitions
Remove use of __P

diffstat:

 lib/libc/rpc/auth_none.c      |   33 +++----
 lib/libc/rpc/auth_unix.c      |   49 ++++-------
 lib/libc/rpc/authunix_prot.c  |    8 +-
 lib/libc/rpc/bindresvport.c   |   12 +-
 lib/libc/rpc/clnt_bcast.c     |   56 ++++++------
 lib/libc/rpc/clnt_dg.c        |   77 +++++++----------
 lib/libc/rpc/clnt_generic.c   |   54 ++++++------
 lib/libc/rpc/clnt_perror.c    |   35 +++-----
 lib/libc/rpc/clnt_raw.c       |   56 ++++--------
 lib/libc/rpc/clnt_simple.c    |   25 +++--
 lib/libc/rpc/getnetconfig.c   |   40 +++-----
 lib/libc/rpc/getnetpath.c     |   11 +-
 lib/libc/rpc/getrpcport.c     |    8 +-
 lib/libc/rpc/mt_misc.c        |    7 +-
 lib/libc/rpc/pmap_getmaps.c   |    7 +-
 lib/libc/rpc/pmap_prot.c      |    8 +-
 lib/libc/rpc/pmap_prot2.c     |   12 +-
 lib/libc/rpc/pmap_rmt.c       |   12 +-
 lib/libc/rpc/rpc_callmsg.c    |    8 +-
 lib/libc/rpc/rpc_dtablesize.c |    8 +-
 lib/libc/rpc/rpc_generic.c    |   44 ++++------
 lib/libc/rpc/rpc_prot.c       |   44 +++-------
 lib/libc/rpc/rpc_soc.c        |   72 ++++++----------
 lib/libc/rpc/rpcb_clnt.c      |  117 +++++++++-----------------
 lib/libc/rpc/svc.c            |  104 +++++++----------------
 lib/libc/rpc/svc_auth.c       |   20 +--
 lib/libc/rpc/svc_dg.c         |   75 +++++-----------
 lib/libc/rpc/svc_generic.c    |   38 ++++----
 lib/libc/rpc/svc_raw.c        |   54 ++++--------
 lib/libc/rpc/svc_simple.c     |   27 +++---
 lib/libc/rpc/svc_vc.c         |    7 +-
 lib/libc/rpc/xdr_mem.c        |   76 +++++-----------
 lib/libc/rpc/xdr_rec.c        |  179 ++++++++++++++++-------------------------
 lib/libc/rpc/xdr_sizeof.c     |   31 ++-----
 lib/libc/rpc/xdr_stdio.c      |   57 ++++--------
 35 files changed, 561 insertions(+), 910 deletions(-)

diffs (truncated from 3705 to 300 lines):

diff -r bb0594c86ca5 -r 66110a6eb86f lib/libc/rpc/auth_none.c
--- a/lib/libc/rpc/auth_none.c  Tue Mar 20 17:13:44 2012 +0000
+++ b/lib/libc/rpc/auth_none.c  Tue Mar 20 17:14:50 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auth_none.c,v 1.14 2001/01/16 15:46:52 lukem Exp $     */
+/*     $NetBSD: auth_none.c,v 1.15 2012/03/20 17:14:50 matt Exp $      */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
 static char *sccsid = "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)auth_none.c 2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: auth_none.c,v 1.14 2001/01/16 15:46:52 lukem Exp $");
+__RCSID("$NetBSD: auth_none.c,v 1.15 2012/03/20 17:14:50 matt Exp $");
 #endif
 #endif
 
@@ -66,11 +66,11 @@
  * Authenticator operations routines
  */
 
-static bool_t authnone_marshal __P((AUTH *, XDR *));
-static void authnone_verf __P((AUTH *));
-static bool_t authnone_validate __P((AUTH *, struct opaque_auth *));
-static bool_t authnone_refresh __P((AUTH *));
-static void authnone_destroy __P((AUTH *));
+static bool_t authnone_marshal(AUTH *, XDR *);
+static void authnone_verf(AUTH *);
+static bool_t authnone_validate(AUTH *, struct opaque_auth *);
+static bool_t authnone_refresh(AUTH *);
+static void authnone_destroy(AUTH *);
 
 static const struct auth_ops ops = {
        authnone_verf,
@@ -87,7 +87,7 @@
 } *authnone_private;
 
 AUTH *
-authnone_create()
+authnone_create(void)
 {
        struct authnone_private *ap = authnone_private;
        XDR xdr_stream;
@@ -115,9 +115,7 @@
 
 /*ARGSUSED*/
 static bool_t
-authnone_marshal(client, xdrs)
-       AUTH *client;
-       XDR *xdrs;
+authnone_marshal(AUTH *client, XDR *xdrs)
 {
        struct authnone_private *ap = authnone_private;
 
@@ -131,16 +129,13 @@
 
 /*ARGSUSED*/
 static void 
-authnone_verf(client)
-       AUTH *client;
+authnone_verf(AUTH *client)
 {
 }
 
 /*ARGSUSED*/
 static bool_t
-authnone_validate(client, auth)
-       AUTH *client;
-       struct opaque_auth *auth;
+authnone_validate(AUTH *client, struct opaque_auth *auth)
 {
 
        return (TRUE);
@@ -148,8 +143,7 @@
 
 /*ARGSUSED*/
 static bool_t
-authnone_refresh(client)
-       AUTH *client;
+authnone_refresh(AUTH *client)
 {
 
        return (FALSE);
@@ -157,7 +151,6 @@
 
 /*ARGSUSED*/
 static void
-authnone_destroy(client)
-       AUTH *client;
+authnone_destroy(AUTH *client)
 {
 }
diff -r bb0594c86ca5 -r 66110a6eb86f lib/libc/rpc/auth_unix.c
--- a/lib/libc/rpc/auth_unix.c  Tue Mar 20 17:13:44 2012 +0000
+++ b/lib/libc/rpc/auth_unix.c  Tue Mar 20 17:14:50 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auth_unix.c,v 1.22 2009/01/11 02:46:29 christos Exp $  */
+/*     $NetBSD: auth_unix.c,v 1.23 2012/03/20 17:14:50 matt Exp $      */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
 static char *sccsid = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)auth_unix.c 2.2 88/08/01 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: auth_unix.c,v 1.22 2009/01/11 02:46:29 christos Exp $");
+__RCSID("$NetBSD: auth_unix.c,v 1.23 2012/03/20 17:14:50 matt Exp $");
 #endif
 #endif
 
@@ -74,13 +74,13 @@
 
 
 /* auth_unix.c */
-static void authunix_nextverf __P((AUTH *));
-static bool_t authunix_marshal __P((AUTH *, XDR *));
-static bool_t authunix_validate __P((AUTH *, struct opaque_auth *));
-static bool_t authunix_refresh __P((AUTH *));
-static void authunix_destroy __P((AUTH *));
-static void marshal_new_auth __P((AUTH *));
-static const struct auth_ops *authunix_ops __P((void));
+static void authunix_nextverf(AUTH *);
+static bool_t authunix_marshal(AUTH *, XDR *);
+static bool_t authunix_validate(AUTH *, struct opaque_auth *);
+static bool_t authunix_refresh(AUTH *);
+static void authunix_destroy(AUTH *);
+static void marshal_new_auth(AUTH *);
+static const struct auth_ops *authunix_ops(void);
 
 /*
  * This struct is pointed to by the ah_private field of an auth_handle.
@@ -99,12 +99,7 @@
  * Returns an auth handle with the given stuff in it.
  */
 AUTH *
-authunix_create(machname, uid, gid, len, aup_gids)
-       char *machname;
-       int uid;
-       int gid;
-       int len;
-       int *aup_gids;
+authunix_create(char *machname, int uid, int gid, int len, int *aup_gids)
 {
        struct authunix_parms aup;
        char mymem[MAX_AUTH_BYTES];
@@ -190,7 +185,7 @@
  * syscalls.
  */
 AUTH *
-authunix_create_default()
+authunix_create_default(void)
 {
        int len;
        char machname[MAXHOSTNAMELEN + 1];
@@ -216,16 +211,13 @@
 
 /* ARGSUSED */
 static void
-authunix_nextverf(auth)
-       AUTH *auth;
+authunix_nextverf(AUTH *auth)
 {
        /* no action necessary */
 }
 
 static bool_t
-authunix_marshal(auth, xdrs)
-       AUTH *auth;
-       XDR *xdrs;
+authunix_marshal(AUTH *auth, XDR *xdrs)
 {
        struct audata *au;
 
@@ -237,9 +229,7 @@
 }
 
 static bool_t
-authunix_validate(auth, verf)
-       AUTH *auth;
-       struct opaque_auth *verf;
+authunix_validate(AUTH *auth, struct opaque_auth *verf)
 {
        struct audata *au;
        XDR xdrs;
@@ -271,8 +261,7 @@
 }
 
 static bool_t
-authunix_refresh(auth)
-       AUTH *auth;
+authunix_refresh(AUTH *auth)
 {
        struct audata *au = AUTH_PRIVATE(auth);
        struct authunix_parms aup;
@@ -316,8 +305,7 @@
 }
 
 static void
-authunix_destroy(auth)
-       AUTH *auth;
+authunix_destroy(AUTH *auth)
 {
        struct audata *au;
 
@@ -342,8 +330,7 @@
  * sets private data, au_marshed and au_mpos
  */
 static void
-marshal_new_auth(auth)
-       AUTH *auth;
+marshal_new_auth(AUTH *auth)
 {
        XDR     xdr_stream;
        XDR     *xdrs = &xdr_stream;
@@ -362,7 +349,7 @@
 }
 
 static const struct auth_ops *
-authunix_ops()
+authunix_ops(void)
 {
        static struct auth_ops ops;
 #ifdef _REENTRANT
diff -r bb0594c86ca5 -r 66110a6eb86f lib/libc/rpc/authunix_prot.c
--- a/lib/libc/rpc/authunix_prot.c      Tue Mar 20 17:13:44 2012 +0000
+++ b/lib/libc/rpc/authunix_prot.c      Tue Mar 20 17:14:50 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: authunix_prot.c,v 1.14 2012/03/13 21:13:44 christos Exp $      */
+/*     $NetBSD: authunix_prot.c,v 1.15 2012/03/20 17:14:50 matt Exp $  */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
 static char *sccsid = "@(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)authunix_prot.c     2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: authunix_prot.c,v 1.14 2012/03/13 21:13:44 christos Exp $");
+__RCSID("$NetBSD: authunix_prot.c,v 1.15 2012/03/20 17:14:50 matt Exp $");
 #endif
 #endif
 
@@ -63,9 +63,7 @@
  * XDR for unix authentication parameters.
  */
 bool_t
-xdr_authunix_parms(xdrs, p)
-       XDR *xdrs;
-       struct authunix_parms *p;
+xdr_authunix_parms(XDR *xdrs, struct authunix_parms *p)
 {
 
        _DIAGASSERT(xdrs != NULL);
diff -r bb0594c86ca5 -r 66110a6eb86f lib/libc/rpc/bindresvport.c
--- a/lib/libc/rpc/bindresvport.c       Tue Mar 20 17:13:44 2012 +0000
+++ b/lib/libc/rpc/bindresvport.c       Tue Mar 20 17:14:50 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bindresvport.c,v 1.22 2012/03/13 21:13:44 christos Exp $       */
+/*     $NetBSD: bindresvport.c,v 1.23 2012/03/20 17:14:50 matt Exp $   */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
 static char *sccsid = "@(#)bindresvport.c 1.8 88/02/08 SMI";
 static char *sccsid = "@(#)bindresvport.c      2.2 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: bindresvport.c,v 1.22 2012/03/13 21:13:44 christos Exp $");
+__RCSID("$NetBSD: bindresvport.c,v 1.23 2012/03/20 17:14:50 matt Exp $");
 #endif
 #endif
 
@@ -65,9 +65,7 @@
  * Bind a socket to a privileged IP port
  */
 int
-bindresvport(sd, brsin)
-       int sd;
-       struct sockaddr_in *brsin;
+bindresvport(int sd, struct sockaddr_in *brsin)
 {
        return bindresvport_sa(sd, (struct sockaddr *)(void *)brsin);
 }
@@ -76,9 +74,7 @@
  * Bind a socket to a privileged IP port
  */
 int
-bindresvport_sa(sd, sa)
-       int sd;
-       struct sockaddr *sa;
+bindresvport_sa(int sd, struct sockaddr *sa)
 {
        int error, old;
        struct sockaddr_storage myaddr;
diff -r bb0594c86ca5 -r 66110a6eb86f lib/libc/rpc/clnt_bcast.c
--- a/lib/libc/rpc/clnt_bcast.c Tue Mar 20 17:13:44 2012 +0000
+++ b/lib/libc/rpc/clnt_bcast.c Tue Mar 20 17:14:50 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clnt_bcast.c,v 1.23 2012/03/13 21:13:44 christos Exp $ */
+/*     $NetBSD: clnt_bcast.c,v 1.24 2012/03/20 17:14:50 matt Exp $     */
 



Home | Main Index | Thread Index | Old Index