summaryrefslogtreecommitdiffstats
path: root/cpukit/librpc
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2005-05-25 15:07:19 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2005-05-25 15:07:19 +0000
commit12db3bda883a0cdef6ee86c916667b8925c3fed3 (patch)
treea692f4f71323ee4008278182865cf8cf11a1b128 /cpukit/librpc
parentc11cb9a5a967cb61dcf57136a7576abc07c98589 (diff)
downloadrtems-12db3bda883a0cdef6ee86c916667b8925c3fed3.tar.bz2
Misc. fixes.
Diffstat (limited to 'cpukit/librpc')
-rw-r--r--cpukit/librpc/include/rpc/rpc_com.h40
-rw-r--r--cpukit/librpc/include/rpc/rpc_msg.h21
-rw-r--r--cpukit/librpc/src/rpc/svc_simple.c7
3 files changed, 31 insertions, 37 deletions
diff --git a/cpukit/librpc/include/rpc/rpc_com.h b/cpukit/librpc/include/rpc/rpc_com.h
index 2cf5995d2d..7697b9a44c 100644
--- a/cpukit/librpc/include/rpc/rpc_com.h
+++ b/cpukit/librpc/include/rpc/rpc_com.h
@@ -1,3 +1,6 @@
+/* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */
+/* $FreeBSD: src/include/rpc/rpc_com.h,v 1.6 2003/01/16 07:13:51 mbr Exp $ */
+
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -31,6 +34,10 @@
*/
/*
+ * $Id$
+ */
+
+/*
* rpc_com.h, Common definitions for both the server and client side.
* All for the topmost layer of rpc
*
@@ -39,40 +46,23 @@
#ifndef _RPC_RPCCOM_H
#define _RPC_RPCCOM_H
-/* From: #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
+#include <sys/cdefs.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
/*
- * File descriptor to be used on xxx_create calls to get default descriptor
- */
-#define RPC_ANYSOCK -1
-#define RPC_ANYFD RPC_ANYSOCK
-/*
* The max size of the transport, if the size cannot be determined
* by other means.
*/
#define RPC_MAXDATASIZE 9000
#define RPC_MAXADDRSIZE 1024
-#if defined(__STDC__) || defined(__cplusplus)
-extern u_int __rpc_get_t_size (int, long);
-extern u_int __rpc_get_a_size (long);
-extern int __rpc_dtbsize (void);
-extern int _rpc_dtablesize (void);
+__BEGIN_DECLS
+extern u_int __rpc_get_a_size(int);
+extern u_int __rpc_get_t_size(int, long);
+extern int __rpc_dtbsize(void);
+extern int _rpc_dtablesize(void);
extern int _rpc_get_default_domain(char **);
-#else
-extern u_int __rpc_get_t_size ();
-extern u_int __rpc_get_a_size ();
-extern int __rpc_dtbsize ();
-extern int _rpc_dtablesize ();
-extern int _rpc_get_default_domain();
-#endif
-
-#ifdef __cplusplus
-}
-#endif
+__END_DECLS
#endif /* _RPC_RPCCOM_H */
diff --git a/cpukit/librpc/include/rpc/rpc_msg.h b/cpukit/librpc/include/rpc/rpc_msg.h
index bc5dc223fd..733a5e2892 100644
--- a/cpukit/librpc/include/rpc/rpc_msg.h
+++ b/cpukit/librpc/include/rpc/rpc_msg.h
@@ -28,7 +28,7 @@
*
* from: @(#)rpc_msg.h 1.7 86/07/16 SMI
* from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/rpc_msg.h,v 1.12 1999/08/27 23:45:05 peter Exp $
+ * $FreeBSD: src/include/rpc/rpc_msg.h,v 1.15 2003/01/01 18:48:42 schweikh Exp $
*/
/*
@@ -38,10 +38,14 @@
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#ifndef _RPC_RPCMSG_H
-#define _RPC_RPCMSG_H
+/*
+ * $Id$
+ */
+
+#ifndef _RPC_RPC_MSG_H
+#define _RPC_RPC_MSG_H
-#define RPC_MSG_VERSION ((u_long) 2)
+#define RPC_MSG_VERSION ((u_int32_t) 2)
#define RPC_SERVICE_PORT ((u_short) 2048)
/*
@@ -165,7 +169,7 @@ __BEGIN_DECLS
* XDR *xdrs;
* struct rpc_msg *cmsg;
*/
-extern bool_t xdr_callmsg __P((XDR *, struct rpc_msg *));
+extern bool_t xdr_callmsg(XDR *, struct rpc_msg *);
/*
* XDR routine to pre-serialize the static part of a rpc message.
@@ -173,7 +177,7 @@ extern bool_t xdr_callmsg __P((XDR *, struct rpc_msg *));
* XDR *xdrs;
* struct rpc_msg *cmsg;
*/
-extern bool_t xdr_callhdr __P((XDR *, struct rpc_msg *));
+extern bool_t xdr_callhdr(XDR *, struct rpc_msg *);
/*
* XDR routine to handle a rpc reply.
@@ -189,8 +193,7 @@ extern bool_t xdr_replymsg __P((XDR *, struct rpc_msg *));
* struct rpc_msg *msg;
* struct rpc_err *error;
*/
-struct rpc_err;
-extern void _seterr_reply __P((struct rpc_msg *, struct rpc_err *));
+extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
__END_DECLS
-#endif /* !_RPC_RPCMSG_H */
+#endif /* !_RPC_RPC_MSG_H */
diff --git a/cpukit/librpc/src/rpc/svc_simple.c b/cpukit/librpc/src/rpc/svc_simple.c
index cd19a5c112..1ad846981a 100644
--- a/cpukit/librpc/src/rpc/svc_simple.c
+++ b/cpukit/librpc/src/rpc/svc_simple.c
@@ -43,6 +43,7 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc_simple.c,v 1.9 1999/08/28 0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <inttypes.h>
#include <rpc/rpc.h>
#include <rpc/pmap_clnt.h>
#include <sys/socket.h>
@@ -50,8 +51,8 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc_simple.c,v 1.9 1999/08/28 0
struct prog_lst {
char *(*p_progname)();
- int p_prognum;
- int p_procnum;
+ rpcprog_t p_prognum;
+ rpcproc_t p_procnum;
xdrproc_t p_inproc, p_outproc;
struct prog_lst *p_nxt;
};
@@ -72,7 +73,7 @@ registerrpc(
if (procnum == NULLPROC) {
(void) fprintf(stderr,
- "can't reassign procedure number %ld\n", NULLPROC);
+ "can't reassign procedure number %" PRIu32 "\n", NULLPROC);
return (-1);
}
if (transp == 0) {