summaryrefslogtreecommitdiffstats
path: root/cpukit/librpc
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-11-21 05:33:00 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-11-21 05:33:00 +0000
commit5220ae2f71bd24ceb4863375f037bfb27bf8d80d (patch)
tree4f0fc3609f3430e5159214bafc837ab0ae5570f6 /cpukit/librpc
parentddb56f497d21aa84cf3311ac665744243cd627a0 (diff)
downloadrtems-5220ae2f71bd24ceb4863375f037bfb27bf8d80d.tar.bz2
2004-11-21 Ralf Corsepius <ralf.corsepius@rtems.org>
* librpc/include/rpc/types.h: Include <rtems/stdint.h>. * librpc/src/rpc/clnt_raw.c, librpc/src/rpc/rpcdname.c, librpc/src/rpc/rtems_portmapper.c, librpc/src/rpc/svc.c, librpc/src/rpc/svc_simple.c: Misc. cast-related fixes. Convert to ANSI.
Diffstat (limited to 'cpukit/librpc')
-rw-r--r--cpukit/librpc/include/rpc/types.h2
-rw-r--r--cpukit/librpc/src/rpc/clnt_raw.c30
-rw-r--r--cpukit/librpc/src/rpc/rpcdname.c8
-rw-r--r--cpukit/librpc/src/rpc/rtems_portmapper.c55
-rw-r--r--cpukit/librpc/src/rpc/svc.c90
-rw-r--r--cpukit/librpc/src/rpc/svc_simple.c17
6 files changed, 104 insertions, 98 deletions
diff --git a/cpukit/librpc/include/rpc/types.h b/cpukit/librpc/include/rpc/types.h
index c907674c51..b962fd3e43 100644
--- a/cpukit/librpc/include/rpc/types.h
+++ b/cpukit/librpc/include/rpc/types.h
@@ -37,6 +37,8 @@
#ifndef _RPC_TYPES_H
#define _RPC_TYPES_H
+#include <rtems/stdint.h>
+
#define bool_t int32_t
#define enum_t int32_t
#define __dontcare__ -1
diff --git a/cpukit/librpc/src/rpc/clnt_raw.c b/cpukit/librpc/src/rpc/clnt_raw.c
index 300a14cf8d..9195e55887 100644
--- a/cpukit/librpc/src/rpc/clnt_raw.c
+++ b/cpukit/librpc/src/rpc/clnt_raw.c
@@ -84,9 +84,9 @@ void svc_getreq();
* Create a client handle for memory based rpc.
*/
CLIENT *
-clntraw_create(prog, vers)
- u_long prog;
- u_long vers;
+clntraw_create(
+ u_long prog,
+ u_long vers )
{
register struct clnt_raw_private *clp = clntraw_private;
struct rpc_msg call_msg;
@@ -127,14 +127,14 @@ clntraw_create(prog, vers)
}
static enum clnt_stat
-clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
- CLIENT *h;
- u_long proc;
- xdrproc_t xargs;
- caddr_t argsp;
- xdrproc_t xresults;
- caddr_t resultsp;
- struct timeval timeout;
+clntraw_call(
+ CLIENT *h,
+ u_long proc,
+ xdrproc_t xargs,
+ caddr_t argsp,
+ xdrproc_t xresults,
+ caddr_t resultsp,
+ struct timeval timeout )
{
register struct clnt_raw_private *clp = clntraw_private;
register XDR *xdrs = &clp->xdr_stream;
@@ -208,10 +208,10 @@ clntraw_geterr()
static bool_t
-clntraw_freeres(cl, xdr_res, res_ptr)
- CLIENT *cl;
- xdrproc_t xdr_res;
- caddr_t res_ptr;
+clntraw_freeres(
+ CLIENT *cl,
+ xdrproc_t xdr_res,
+ caddr_t res_ptr )
{
register struct clnt_raw_private *clp = clntraw_private;
register XDR *xdrs = &clp->xdr_stream;
diff --git a/cpukit/librpc/src/rpc/rpcdname.c b/cpukit/librpc/src/rpc/rpcdname.c
index be7e634872..10886d2226 100644
--- a/cpukit/librpc/src/rpc/rpcdname.c
+++ b/cpukit/librpc/src/rpc/rpcdname.c
@@ -54,8 +54,8 @@ get_default_domain()
return (default_domain);
if (getdomainname(temp, sizeof(temp)) < 0)
return (0);
- if ((int) strlen(temp) > 0) {
- default_domain = (char *)malloc((strlen(temp)+(unsigned)1));
+ if (strlen(temp) > 0) {
+ default_domain = (char *)malloc((strlen(temp)+(size_t)1));
if (default_domain == 0)
return (0);
(void) strcpy(default_domain, temp);
@@ -71,8 +71,8 @@ get_default_domain()
* get rejected elsewhere in the NIS client package.
*/
int
-_rpc_get_default_domain(domain)
- char **domain;
+_rpc_get_default_domain(
+ char **domain )
{
if ((*domain = get_default_domain()) != 0)
return (0);
diff --git a/cpukit/librpc/src/rpc/rtems_portmapper.c b/cpukit/librpc/src/rpc/rtems_portmapper.c
index c8be0b3188..f49482d918 100644
--- a/cpukit/librpc/src/rpc/rtems_portmapper.c
+++ b/cpukit/librpc/src/rpc/rtems_portmapper.c
@@ -77,7 +77,7 @@ static rtems_task rtems_portmapper (rtems_task_argument unused)
rtems_task_delete (RTEMS_SELF);
}
/* make an entry for ourself */
- pml = (struct pmaplist *)malloc((u_int)sizeof(struct pmaplist));
+ pml = (struct pmaplist *)malloc(sizeof(struct pmaplist));
pml->pml_next = 0;
pml->pml_map.pm_prog = PMAPPROG;
pml->pml_map.pm_vers = PMAPVERS;
@@ -102,7 +102,7 @@ static rtems_task rtems_portmapper (rtems_task_argument unused)
rtems_task_delete (RTEMS_SELF);
}
/* make an entry for ourself */
- pml = (struct pmaplist *)malloc((u_int)sizeof(struct pmaplist));
+ pml = (struct pmaplist *)malloc(sizeof(struct pmaplist));
pml->pml_map.pm_prog = PMAPPROG;
pml->pml_map.pm_vers = PMAPVERS;
pml->pml_map.pm_prot = IPPROTO_TCP;
@@ -119,9 +119,10 @@ static rtems_task rtems_portmapper (rtems_task_argument unused)
}
static struct pmaplist *
-find_service(prog, vers, prot)
-u_long prog;
-u_long vers;
+find_service(
+ u_long prog,
+ u_long vers,
+ int prot )
{
register struct pmaplist *hit = NULL;
register struct pmaplist *pml;
@@ -140,9 +141,9 @@ for (pml = pmaplist; pml != NULL; pml = pml->pml_next) {
/*
* 1 OK, 0 not
*/
-static void reg_service(rqstp, xprt)
- struct svc_req *rqstp;
- SVCXPRT *xprt;
+static void reg_service(
+ struct svc_req *rqstp,
+ SVCXPRT *xprt )
{
struct pmap reg;
struct pmaplist *pml, *prevpml, *fnd;
@@ -190,7 +191,7 @@ static void reg_service(rqstp, xprt)
* add to END of list
*/
pml = (struct pmaplist *)
- malloc((u_int)sizeof(struct pmaplist));
+ malloc(sizeof(struct pmaplist));
pml->pml_map = reg;
pml->pml_next = 0;
if (pmaplist == 0) {
@@ -309,9 +310,9 @@ struct encap_parms {
};
static bool_t
-xdr_encap_parms(xdrs, epp)
- XDR *xdrs;
- struct encap_parms *epp;
+xdr_encap_parms(
+ XDR *xdrs,
+ struct encap_parms *epp )
{
return (xdr_bytes(xdrs, &(epp->args), (u_int*)&(epp->arglen), ARGSIZE));
@@ -326,9 +327,9 @@ struct rmtcallargs {
};
static bool_t
-xdr_rmtcall_args(xdrs, cap)
- register XDR *xdrs;
- register struct rmtcallargs *cap;
+xdr_rmtcall_args(
+ register XDR *xdrs,
+ register struct rmtcallargs *cap )
{
/* does not get a port number */
@@ -341,9 +342,9 @@ xdr_rmtcall_args(xdrs, cap)
}
static bool_t
-xdr_rmtcall_result(xdrs, cap)
- register XDR *xdrs;
- register struct rmtcallargs *cap;
+xdr_rmtcall_result(
+ register XDR *xdrs,
+ register struct rmtcallargs *cap )
{
if (xdr_u_long(xdrs, &(cap->rmt_port)))
return (xdr_encap_parms(xdrs, &(cap->rmt_args)));
@@ -355,9 +356,9 @@ xdr_rmtcall_result(xdrs, cap)
* The arglen must already be set!!
*/
static bool_t
-xdr_opaque_parms(xdrs, cap)
- XDR *xdrs;
- struct rmtcallargs *cap;
+xdr_opaque_parms(
+ XDR *xdrs,
+ struct rmtcallargs *cap )
{
return (xdr_opaque(xdrs, cap->rmt_args.args, cap->rmt_args.arglen));
@@ -368,9 +369,9 @@ xdr_opaque_parms(xdrs, cap)
* and then calls xdr_opaque_parms.
*/
static bool_t
-xdr_len_opaque_parms(xdrs, cap)
- register XDR *xdrs;
- struct rmtcallargs *cap;
+xdr_len_opaque_parms(
+ register XDR *xdrs,
+ struct rmtcallargs *cap )
{
register u_int beginpos, lowpos, highpos, currpos, pos;
@@ -401,9 +402,9 @@ xdr_len_opaque_parms(xdrs, cap)
* back to the portmapper.
*/
static void
-callit(rqstp, xprt)
- struct svc_req *rqstp;
- SVCXPRT *xprt;
+callit(
+ struct svc_req *rqstp,
+ SVCXPRT *xprt )
{
struct rmtcallargs a;
struct pmaplist *pml;
diff --git a/cpukit/librpc/src/rpc/svc.c b/cpukit/librpc/src/rpc/svc.c
index 0d9aac82cf..b5c7e27332 100644
--- a/cpukit/librpc/src/rpc/svc.c
+++ b/cpukit/librpc/src/rpc/svc.c
@@ -79,8 +79,8 @@ static struct svc_callout *svc_find();
* Activate a transport handle.
*/
void
-xprt_register(xprt)
- SVCXPRT *xprt;
+xprt_register(
+ SVCXPRT *xprt )
{
register int sock = xprt->xp_sock;
@@ -125,8 +125,8 @@ xprt_register(xprt)
* De-activate a transport handle.
*/
void
-xprt_unregister(xprt)
- SVCXPRT *xprt;
+xprt_unregister(
+ SVCXPRT *xprt )
{
register int sock = xprt->xp_sock;
@@ -156,12 +156,12 @@ xprt_unregister(xprt)
* program number comes in.
*/
bool_t
-svc_register(xprt, prog, vers, dispatch, protocol)
- SVCXPRT *xprt;
- u_long prog;
- u_long vers;
- void (*dispatch)();
- int protocol;
+svc_register(
+ SVCXPRT *xprt,
+ u_long prog,
+ u_long vers,
+ void (*dispatch)(),
+ int protocol )
{
struct svc_callout *prev;
register struct svc_callout *s;
@@ -192,9 +192,9 @@ pmap_it:
* Remove a service program from the callout list.
*/
void
-svc_unregister(prog, vers)
- u_long prog;
- u_long vers;
+svc_unregister(
+ u_long prog,
+ u_long vers )
{
struct svc_callout *prev;
register struct svc_callout *s;
@@ -217,10 +217,10 @@ svc_unregister(prog, vers)
* struct.
*/
static struct svc_callout *
-svc_find(prog, vers, prev)
- u_long prog;
- u_long vers;
- struct svc_callout **prev;
+svc_find(
+ u_long prog,
+ u_long vers,
+ struct svc_callout **prev )
{
register struct svc_callout *s, *p;
@@ -241,10 +241,10 @@ done:
* Send a reply to an rpc request
*/
bool_t
-svc_sendreply(xprt, xdr_results, xdr_location)
- register SVCXPRT *xprt;
- xdrproc_t xdr_results;
- caddr_t xdr_location;
+svc_sendreply(
+ register SVCXPRT *xprt,
+ xdrproc_t xdr_results,
+ caddr_t xdr_location )
{
struct rpc_msg rply;
@@ -261,8 +261,8 @@ svc_sendreply(xprt, xdr_results, xdr_location)
* No procedure error reply
*/
void
-svcerr_noproc(xprt)
- register SVCXPRT *xprt;
+svcerr_noproc(
+ register SVCXPRT *xprt )
{
struct rpc_msg rply;
@@ -277,8 +277,8 @@ svcerr_noproc(xprt)
* Can't decode args error reply
*/
void
-svcerr_decode(xprt)
- register SVCXPRT *xprt;
+svcerr_decode(
+ register SVCXPRT *xprt )
{
struct rpc_msg rply;
@@ -293,8 +293,8 @@ svcerr_decode(xprt)
* Some system error
*/
void
-svcerr_systemerr(xprt)
- register SVCXPRT *xprt;
+svcerr_systemerr(
+ register SVCXPRT *xprt )
{
struct rpc_msg rply;
@@ -309,9 +309,9 @@ svcerr_systemerr(xprt)
* Authentication error reply
*/
void
-svcerr_auth(xprt, why)
- SVCXPRT *xprt;
- enum auth_stat why;
+svcerr_auth(
+ SVCXPRT *xprt,
+ enum auth_stat why )
{
struct rpc_msg rply;
@@ -326,8 +326,8 @@ svcerr_auth(xprt, why)
* Auth too weak error reply
*/
void
-svcerr_weakauth(xprt)
- SVCXPRT *xprt;
+svcerr_weakauth(
+ SVCXPRT *xprt )
{
svcerr_auth(xprt, AUTH_TOOWEAK);
@@ -337,8 +337,8 @@ svcerr_weakauth(xprt)
* Program unavailable error reply
*/
void
-svcerr_noprog(xprt)
- register SVCXPRT *xprt;
+svcerr_noprog(
+ register SVCXPRT *xprt )
{
struct rpc_msg rply;
@@ -353,10 +353,10 @@ svcerr_noprog(xprt)
* Program version mismatch error reply
*/
void
-svcerr_progvers(xprt, low_vers, high_vers)
- register SVCXPRT *xprt;
- u_long low_vers;
- u_long high_vers;
+svcerr_progvers(
+ register SVCXPRT *xprt,
+ u_long low_vers,
+ u_long high_vers )
{
struct rpc_msg rply;
@@ -388,8 +388,8 @@ svcerr_progvers(xprt, low_vers, high_vers)
*/
void
-svc_getreq(rdfds)
- int rdfds;
+svc_getreq(
+ int rdfds )
{
fd_set readfds;
@@ -399,16 +399,16 @@ svc_getreq(rdfds)
}
void
-svc_getreqset(readfds)
- fd_set *readfds;
+svc_getreqset(
+ fd_set *readfds )
{
svc_getreqset2(readfds, FD_SETSIZE);
}
void
-svc_getreqset2(readfds, width)
- fd_set *readfds;
- int width;
+svc_getreqset2(
+ fd_set *readfds,
+ int width )
{
enum xprt_stat stat;
struct rpc_msg msg;
diff --git a/cpukit/librpc/src/rpc/svc_simple.c b/cpukit/librpc/src/rpc/svc_simple.c
index 300ec93085..0f91127b02 100644
--- a/cpukit/librpc/src/rpc/svc_simple.c
+++ b/cpukit/librpc/src/rpc/svc_simple.c
@@ -61,10 +61,13 @@ static void universal();
#define transp (rtems_rpc_task_variables->svc_simple_transp)
int
-registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
- int prognum, versnum, procnum;
- char *(*progname)();
- xdrproc_t inproc, outproc;
+registerrpc(
+ int prognum,
+ int versnum,
+ int procnum,
+ char *(*progname)(),
+ xdrproc_t inproc,
+ xdrproc_t outproc )
{
if (procnum == NULLPROC) {
@@ -102,9 +105,9 @@ registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
}
static void
-universal(rqstp, atransp)
- struct svc_req *rqstp;
- SVCXPRT *atransp;
+universal(
+ struct svc_req *rqstp,
+ SVCXPRT *atransp )
{
int prog, proc;
char *outdata;