diff options
author | Guido van Rossum <guido@python.org> | 1994-08-01 11:34:53 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-08-01 11:34:53 (GMT) |
commit | b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af (patch) | |
tree | 9362939305b2d088b8f19a530c9015d886bc2801 /Modules/nismodule.c | |
parent | 2979b01ff88ac4c5b316d9bf98edbaaaffac8e24 (diff) | |
download | cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.zip cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.gz cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.bz2 |
Merge alpha100 branch back to main trunk
Diffstat (limited to 'Modules/nismodule.c')
-rw-r--r-- | Modules/nismodule.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Modules/nismodule.c b/Modules/nismodule.c index 5db26f4..00c3561 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -57,6 +57,8 @@ nis_mapname (map) return map; } +typedef int (*foreachfunc) PROTO((int, char *, int, char *, int, char *)); + static int nis_foreach (instatus, inkey, inkeylen, inval, invallen, indata) int instatus; @@ -134,7 +136,7 @@ nis_cat (self, args) cat = newdictobject (); if (cat == NULL) return NULL; - cb.foreach = nis_foreach; + cb.foreach = (foreachfunc)nis_foreach; cb.data = (char *)cat; BGN_SAVE map = nis_mapname (map); @@ -147,9 +149,17 @@ nis_cat (self, args) return cat; } -#define YPPROC_MAPLIST ((u_long)11) -#define YPPROG ((u_long)100004) -#define YPVERS ((u_long)2) +/* These should be u_long on Sun h/w but not on 64-bit h/w. + This is not portable to machines with 16-bit ints and no prototypes */ +#ifndef YPPROC_MAPLIST +#define YPPROC_MAPLIST 11 +#endif +#ifndef YPPROG +#define YPPROG 100004 +#endif +#ifndef YPVERS +#define YPVERS 2 +#endif typedef char *domainname; typedef char *mapname; @@ -260,8 +270,9 @@ nisproc_maplist_2(argp, clnt) static nisresp_maplist res; memset(&res, 0, sizeof(res)); - if (clnt_call(clnt, YPPROC_MAPLIST, nis_xdr_domainname, argp, nis_xdr_ypresp_maplist -, &res, TIMEOUT) != RPC_SUCCESS) { + if (clnt_call(clnt, YPPROC_MAPLIST, nis_xdr_domainname, (caddr_t)argp, + nis_xdr_ypresp_maplist, (caddr_t)&res, TIMEOUT) + != RPC_SUCCESS) { return (NULL); } return (&res); |