1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00
1999-03-08  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/ttyname.c (ttyname): Undo last change.
	/dev/pts status may change during runtime.

1999-03-08  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/ttyname_r.c (__ttyname_r): Undo last
	change.  /dev/pts status can change during runtime.

1999-03-07  Thorsten Kukuk  <kukuk@suse.de>

	* sunrpc/svc_tcp.c (readtcp): go into fatal error state if
	poll reports error.
	* nis/nss_nisplus/nisplus-parser.c: Avoid duplicate strlen calls,
	add some more sanity checks.
	* nis/nss_nisplus/nisplus-pwd.c: Include nisplus-parser.h for
	parser prototype.

1999-03-05  Thorsten Kukuk  <kukuk@suse.de>

	* sunrpc/rpc/xdr.h: Add x_getint32/x_putint32 to xdr_ops,
	change XDR_GETINT32/XDR_PUTINT32 to sue new functions.
	* sunrpc/xdr_mem.c: Add xdrmem_getint32, xdrmem_putint32.
	* sunrpc/xdr_rec.c: Add xdrrec_getint32, xdrrec_putint32.
	* sunrpc/xdr_sizeof.c: Add x_putint32, add dummy function
	for x_getint32.
	* sunrpc/xdr_stdio.c: Add xdrstdio_getint32, xdrstdio_putint32.
	* nis/nis_print.c: Fix ctime argument for platforms where
	sizeof (time_t) != sizeof (int).

	255.  Patch by Bruno Haible <haible@ilog.fr> [PR libc/1010].
This commit is contained in:
Ulrich Drepper
1999-03-08 11:46:22 +00:00
parent b74656f982
commit 7d1de115db
13 changed files with 284 additions and 102 deletions

View File

@@ -61,6 +61,8 @@ static u_int xdrstdio_getpos (const XDR *);
static bool_t xdrstdio_setpos (XDR *, u_int);
static long *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 *);
/*
* Ops vector for stdio type XDR
@@ -74,7 +76,9 @@ static const struct xdr_ops xdrstdio_ops =
xdrstdio_getpos, /* get offset in the stream */
xdrstdio_setpos, /* set offset in the stream */
xdrstdio_inline, /* prime stream for inline macros */
xdrstdio_destroy /* destroy stream */
xdrstdio_destroy, /* destroy stream */
xdrstdio_getint32, /* deserialize a int */
xdrstdio_putint32 /* serialize a int */
};
/*
@@ -181,3 +185,25 @@ xdrstdio_inline (XDR *xdrs, int len)
*/
return NULL;
}
static bool_t
xdrstdio_getint32 (XDR *xdrs, int32_t *ip)
{
int32_t mycopy;
if (fread ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
return FALSE;
*ip = ntohl (mycopy);
return TRUE;
}
static bool_t
xdrstdio_putint32 (XDR *xdrs, const int32_t *ip)
{
int32_t mycopy = htonl (*ip);
ip = &mycopy;
if (fwrite ((caddr_t) ip, 4, 1, (FILE *) xdrs->x_private) != 1)
return FALSE;
return TRUE;
}