Misc. fixes.

This commit is contained in:
Ralf Corsepius
2005-05-25 15:07:19 +00:00
parent c11cb9a5a9
commit 12db3bda88
3 changed files with 31 additions and 37 deletions

View File

@@ -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
@@ -30,6 +33,10 @@
* Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
*/
/*
* $Id$
*/
/*
* rpc_com.h, Common definitions for both the server and client side.
* All for the topmost layer of rpc
@@ -39,17 +46,10 @@
#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.
@@ -57,22 +57,12 @@ extern "C" {
#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 */

View File

@@ -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$
*/
#define RPC_MSG_VERSION ((u_long) 2)
#ifndef _RPC_RPC_MSG_H
#define _RPC_RPC_MSG_H
#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 */

View File

@@ -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) {