summaryrefslogtreecommitdiff
path: root/sunrpc/xdr_stdio.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-04-15 13:54:57 +0000
committerUlrich Drepper <drepper@redhat.com>1999-04-15 13:54:57 +0000
commitf8afba91cf8bf8f8324c3c88b8c368e7c2bd5894 (patch)
treedbdd5f960cf217c76d495ba44173feafae9d184f /sunrpc/xdr_stdio.c
parenta5486962345290853d7d42ef4a799f16bd6764e2 (diff)
downloadglibc-f8afba91cf8bf8f8324c3c88b8c368e7c2bd5894.tar.gz
Update.
* Versions.def: Add GLIBC_2.1.1 to libpthread. * iconvdata/Makefile (modules): Add KOI8-U. (distribute): Add koi8-u.c. (gen-8bit-gap-modules): Add koi8-u. * iconvdata/gconv-modules: Add KOI8-U entries. * iconvdata/koi8-u.c: New file. 1999-04-13 Thorsten Kukuk <kukuk@suse.de> * sunrpc/auth_des.c: 64bit fixes, security fixes. * sunrpc/auth_none.c: Pretty print. * sunrpc/auth_unix.c: Likewise. * sunrpc/authdes_prot.c: Likewise. * sunrpc/authuxprot.c: Likewise. * sunrpc/bindrsvprt.c: Likewise. * sunrpc/clnt_gen.c: Likewise. * sunrpc/rpc/xdr.h: Likewise. * sunrpc/rpc/auth_des.h: Add rpc_timeval struct. * sunrpc/rpc_cmsg.c: Don't use *long pointers. * sunrpc/rtime.c: Use new rpc_timeval. * sunrpc/svc_authux.c: Don't use *long pointers. * sunrpc/svcauth_des.c: Likewise + security fixes. * sunrpc/xdr_mem.c: Don't use *long pointers. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_sizeof.c: Likewise. * sunrpc/xdr_stdio.c: Likewise. 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
Diffstat (limited to 'sunrpc/xdr_stdio.c')
-rw-r--r--sunrpc/xdr_stdio.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c
index e58137c559..411cf17da1 100644
--- a/sunrpc/xdr_stdio.c
+++ b/sunrpc/xdr_stdio.c
@@ -1,4 +1,3 @@
-/* @(#)xdr_stdio.c 2.1 88/07/29 4.0 RPCSRC */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -27,9 +26,6 @@
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro";
-#endif
/*
* xdr_stdio.c, XDR implementation on standard i/o file.
@@ -59,7 +55,7 @@ static bool_t xdrstdio_getbytes (XDR *, caddr_t, u_int);
static bool_t xdrstdio_putbytes (XDR *, const char *, u_int);
static u_int xdrstdio_getpos (const XDR *);
static bool_t xdrstdio_setpos (XDR *, u_int);
-static long *xdrstdio_inline (XDR *, int);
+static int32_t *xdrstdio_inline (XDR *, int);
static void xdrstdio_destroy (XDR *);
static bool_t xdrstdio_getint32 (XDR *, int32_t *);
static bool_t xdrstdio_putint32 (XDR *, const int32_t *);
@@ -87,12 +83,8 @@ static const struct xdr_ops xdrstdio_ops =
* Operation flag is set to op.
*/
void
-xdrstdio_create (xdrs, file, op)
- XDR *xdrs;
- FILE *file;
- enum xdr_op op;
+xdrstdio_create (XDR *xdrs, FILE *file, enum xdr_op op)
{
-
xdrs->x_op = op;
/* We have to add the const since the `struct xdr_ops' in `struct XDR'
is not `const'. */
@@ -107,17 +99,14 @@ xdrstdio_create (xdrs, file, op)
* Cleans up the xdr stream handle xdrs previously set up by xdrstdio_create.
*/
static void
-xdrstdio_destroy (xdrs)
- XDR *xdrs;
+xdrstdio_destroy (XDR *xdrs)
{
(void) fflush ((FILE *) xdrs->x_private);
/* xx should we close the file ?? */
};
static bool_t
-xdrstdio_getlong (xdrs, lp)
- XDR *xdrs;
- long *lp;
+xdrstdio_getlong (XDR *xdrs, long *lp)
{
int32_t mycopy;
@@ -130,7 +119,6 @@ xdrstdio_getlong (xdrs, lp)
static bool_t
xdrstdio_putlong (XDR *xdrs, const long *lp)
{
-
long mycopy = htonl (*lp);
lp = &mycopy;
if (fwrite ((caddr_t) lp, 4, 1, (FILE *) xdrs->x_private) != 1)
@@ -139,13 +127,10 @@ xdrstdio_putlong (XDR *xdrs, const long *lp)
}
static bool_t
-xdrstdio_getbytes (xdrs, addr, len)
- XDR *xdrs;
- const caddr_t addr;
- u_int len;
+xdrstdio_getbytes (XDR *xdrs, const caddr_t addr, u_int len)
{
-
- if ((len != 0) && (fread (addr, (int) len, 1, (FILE *) xdrs->x_private) != 1))
+ if ((len != 0) && (fread (addr, (int) len, 1,
+ (FILE *) xdrs->x_private) != 1))
return FALSE;
return TRUE;
}
@@ -153,7 +138,8 @@ xdrstdio_getbytes (xdrs, addr, len)
static bool_t
xdrstdio_putbytes (XDR *xdrs, const char *addr, u_int len)
{
- if ((len != 0) && (fwrite (addr, (int) len, 1, (FILE *) xdrs->x_private) != 1))
+ if ((len != 0) && (fwrite (addr, (int) len, 1,
+ (FILE *) xdrs->x_private) != 1))
return FALSE;
return TRUE;
}
@@ -170,10 +156,9 @@ xdrstdio_setpos (XDR *xdrs, u_int pos)
return fseek ((FILE *) xdrs->x_private, (long) pos, 0) < 0 ? FALSE : TRUE;
}
-static long *
+static int32_t *
xdrstdio_inline (XDR *xdrs, int len)
{
-
/*
* Must do some work to implement this: must insure
* enough data in the underlying stdio buffer,