Source-Changes-HG archive

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

[src/trunk]: src provide a complete prototype for xdrproc_t



details:   https://anonhg.NetBSD.org/src/rev/d141f845ad65
branches:  trunk
changeset: 769039:d141f845ad65
user:      plunky <plunky%NetBSD.org@localhost>
date:      Tue Aug 30 17:09:51 2011 +0000

description:
provide a complete prototype for xdrproc_t

(I found no instances where three arguments were actually
used, as per the claim in the comment. If there are any
in third party code then they will need to use a cast)

diffstat:

 include/rpc/xdr.h  |  6 ++----
 lib/libc/rpc/rpc.3 |  5 ++---
 2 files changed, 4 insertions(+), 7 deletions(-)

diffs (43 lines):

diff -r 950c47f3544b -r d141f845ad65 include/rpc/xdr.h
--- a/include/rpc/xdr.h Tue Aug 30 17:06:20 2011 +0000
+++ b/include/rpc/xdr.h Tue Aug 30 17:09:51 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xdr.h,v 1.26 2011/07/04 07:54:38 manu Exp $    */
+/*     $NetBSD: xdr.h,v 1.27 2011/08/30 17:09:51 plunky Exp $  */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -130,10 +130,8 @@
  * The opaque pointer generally points to a structure of the data type
  * to be decoded.  If this pointer is 0, then the type routines should
  * allocate dynamic storage of the appropriate size and return it.
- *
- * XXX can't actually prototype it, because some take three args!!!
  */
-typedef        bool_t (*xdrproc_t)(/* XDR *, void *, u_int */);
+typedef        bool_t (*xdrproc_t)(XDR *, const void *); 
 
 /*
  * Operations defined on a XDR handle
diff -r 950c47f3544b -r d141f845ad65 lib/libc/rpc/rpc.3
--- a/lib/libc/rpc/rpc.3        Tue Aug 30 17:06:20 2011 +0000
+++ b/lib/libc/rpc/rpc.3        Tue Aug 30 17:09:51 2011 +0000
@@ -1,6 +1,6 @@
 .\" @(#)rpc.3n 1.31 93/08/31 SMI; from SVr4
 .\" Copyright 1989 AT&T
-.\"    $NetBSD: rpc.3,v 1.22 2010/03/22 19:30:54 joerg Exp $
+.\"    $NetBSD: rpc.3,v 1.23 2011/08/30 17:09:52 plunky Exp $
 .Dd May 7, 1993
 .Dt RPC 3
 .Os
@@ -254,9 +254,8 @@
  * structure of the data type to be decoded.  If this points to 0,
  * then the type routines should allocate dynamic storage of the
  * appropriate size and return it.
- * bool_t  (*xdrproc_t)(XDR *, caddr_t *);
  */
-typedef  bool_t (*xdrproc_t)();
+typedef  bool_t (*xdrproc_t)(XDR *, const void *);
 
 /*
  * The XDR handle.



Home | Main Index | Thread Index | Old Index