which included commits to RCS files with non-trunk default branches.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
-#ifndef NeXT
-#ifndef lint
-static char sccsid[] = "@(#)xdr.c 1.1 86/02/03 Copyr 1984 Sun Micro";
+
+#include <afsconfig.h>
+#ifdef KERNEL
+#include "../afs/param.h"
+#else
+#include <afs/param.h>
#endif
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/xdr.c,v 1.1.1.3.2.1 2002/08/03 21:33:30 hartmans Exp $");
+
/*
* xdr.c, Generic XDR routines implementation.
*
* xdr.
*/
+#ifndef NeXT
+
#ifdef KERNEL
-#include "../afs/param.h"
#include <sys/param.h>
#ifndef AFS_LINUX20_ENV
#include <sys/systm.h>
u_int size;
u_int nodesize;
+ if (maxsize > ((~0) >> 1) - 1) maxsize = ((~0) >> 1) - 1;
+
/*
* first deal with the length since xdr strings are counted-strings
*/
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
+#include <afsconfig.h>
#include <afs/param.h>
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/xdr_array.c,v 1.1.1.4.2.1 2002/08/03 21:33:30 hartmans Exp $");
+
#ifndef NeXT
-#ifndef lint
-static char sccsid[] = "@(#)xdr_array.c 1.1 86/02/03 Copyr 1984 Sun Micro";
-#endif
/*
* xdr_array.c, Generic XDR routines impelmentation.
#include <sys/param.h>
#ifdef AFS_LINUX20_ENV
#include "../h/string.h"
+#if 0
#define bzero(A,C) memset((A), 0, (C))
+#endif
#else
#include <sys/systm.h>
#endif /* AFS_LINUX20_ENV */
register caddr_t target = *addrp;
register u_int c; /* the actual element count */
register bool_t stat = TRUE;
- register int nodesize;
+ register u_int nodesize;
+
+ i = ((~0) >> 1) / elsize;
+ if (maxsize > i) maxsize = i;
/* like strings, arrays are really counted arrays */
if (! xdr_u_int(xdrs, sizep)) {
if (target == NULL) {
return (FALSE);
}
- bzero(target, (u_int)nodesize);
+ memset(target, 0, (u_int)nodesize);
break;
case XDR_FREE:
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
+#include <afsconfig.h>
#include <afs/param.h>
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/xdr_arrayn.c,v 1.1.1.4.2.1 2002/08/03 21:33:30 hartmans Exp $");
+
#if !defined(NeXT)
-#ifndef lint
-static char sccsid[] = "@(#)xdr_array.c 1.1 86/02/03 Copyr 1984 Sun Micro";
-#endif
/*
* xdr_array.c, Generic XDR routines impelmentation.
#include <sys/param.h>
#ifdef AFS_LINUX20_ENV
#include "../h/string.h"
+#if 0
#define bzero(A,C) memset((A), 0, (C))
+#endif
#else
#include <sys/systm.h>
#endif
register caddr_t target = *addrp;
register u_int c; /* the actual element count */
register bool_t stat = TRUE;
- register int nodesize;
+ register u_int nodesize;
+
+ i = ((~0) >> 1) / elsize;
+ if (maxsize > i) maxsize = i;
/* like strings, arrays are really counted arrays */
if (! xdr_u_int(xdrs, sizep)) {
if (target == NULL) {
return (FALSE);
}
- bzero(target, (u_int)nodesize);
+ memset(target, 0, (u_int)nodesize);
break;
case XDR_FREE: