#include <string.h>
#endif
-RCSID
- ("$Header$");
/*
* xdr.c, Generic XDR routines implementation.
#ifndef NeXT
-#ifdef KERNEL
+#if defined(KERNEL) && !defined(UKERNEL)
#include <sys/param.h>
#ifndef AFS_LINUX20_ENV
#include <sys/systm.h>
#include <stdio.h>
#endif
#include "xdr.h"
-#include "rx_internal.h"
#include "rx.h"
/*
case XDR_ENCODE:
l = (afs_uint32) * uip;
- return (XDR_PUTINT32(xdrs, &l));
+ return (XDR_PUTINT32(xdrs, (afs_int32 *) &l));
case XDR_DECODE:
- if (!XDR_GETINT32(xdrs, &l)) {
+ if (!XDR_GETINT32(xdrs, (afs_int32 *) &l)) {
return (FALSE);
}
*uip = (u_int) l;
case XDR_ENCODE:
l = (afs_uint32) * ulp;
- return (XDR_PUTINT32(xdrs, &l));
+ return (XDR_PUTINT32(xdrs, (afs_int32 *)&l));
case XDR_DECODE:
- if (!XDR_GETINT32(xdrs, &l)) {
+ if (!XDR_GETINT32(xdrs, (afs_int32 *)&l)) {
return (FALSE);
}
*ulp = (u_long) l;
case XDR_ENCODE:
l = (afs_uint32) * usp;
- return (XDR_PUTINT32(xdrs, &l));
+ return (XDR_PUTINT32(xdrs, (afs_int32 *)&l));
case XDR_DECODE:
- if (!XDR_GETINT32(xdrs, &l)) {
+ if (!XDR_GETINT32(xdrs, (afs_int32 *)&l)) {
return (FALSE);
}
*usp = (u_char) l;
case XDR_ENCODE:
l = (afs_uint32) * usp;
- return (XDR_PUTINT32(xdrs, &l));
+ return (XDR_PUTINT32(xdrs, (afs_int32 *)&l));
case XDR_DECODE:
- if (!XDR_GETINT32(xdrs, &l)) {
+ if (!XDR_GETINT32(xdrs, (afs_int32 *)&l)) {
return (FALSE);
}
*usp = (u_short) l;
}
#endif
-void
-xdr_free(void *x, afs_int32 size)
+void *
+xdr_alloc(afs_int32 size)
{
- osi_free(x, size);
+ return osi_alloc(size);
+}
+
+void
+xdr_free(xdrproc_t proc, void *obj)
+{
+ XDR x;
+
+ x.x_op = XDR_FREE;
+
+ /* See note in xdr.h for the method behind this madness */
+#if defined(AFS_I386_LINUX26_ENV) && defined(KERNEL) && !defined(UKERNEL)
+ (*proc)(&x, obj, 0);
+#else
+ (*proc)(&x, obj);
+#endif
}
#endif /* NeXT */