allocating memory from a pool and then having it be freed out from under you is unwise
afs_PutCell(tcell, READ_LOCK);
}
- t_name = (char *)rxi_Alloc(i+1);
+ t_name = (char *)afs_osi_Alloc(i+1);
if (t_name == NULL) {
ReleaseReadLock(&afs_xcell);
RX_AFS_GUNLOCK();
plen = strlen(p_name);
else
plen = 0;
- t_name = (char *)rxi_Alloc(plen+1);
+ t_name = (char *)afs_osi_Alloc(plen+1);
if (t_name == NULL) {
ReleaseReadLock(&afs_xcell);
RX_AFS_GUNLOCK();
* Currently only support version 1
*/
allocsize = sizeof(cm_initparams_v1);
- t_config = (afs_uint32 *)rxi_Alloc(allocsize);
+ t_config = (afs_uint32 *)afs_osi_Alloc(allocsize);
if (t_config == NULL) {
RX_AFS_GUNLOCK();
return ENOMEM;
#endif /* AFS_SUN5_ENV */
#include "../rpc/types.h"
-#include "../rpc/xdr.h"
+#include "../rx/xdr.h"
#ifdef AFS_AIX32_ENV
# include "net/spl.h"
#undef register
#endif /* AFS_ALPHA_ENV */
-#include <rpc/xdr.h>
+#include <rx/xdr.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
#else
#include "../h/types.h"
#include "../rpc/types.h"
-#include "../rpc/xdr.h"
+#include "../rx/xdr.h"
#endif
#if !defined(AFS_ALPHA_ENV)
#ifndef XDR_GETINT32
#define XDR_PUTINT32 XDR_PUTLONG
#endif
#endif
-#ifndef AFS_LINUX22_ENV
-#include "../rpc/auth.h"
-#endif
#endif /* defined(UKERNEL) */
#include "../afsint/afsint.h"
#else /* KERNEL */
%#define SymbolicLink 3
%#ifdef KERNEL
-%#define xdr_array(a,b,c,d,e,f) xdr_arrayN(a,b,c,d,e,f)
+%#define afs_xdr_array(a,b,c,d,e,f) afs_xdr_arrayN(a,b,c,d,e,f)
%#endif
struct BD {
afsaux.o \
Kvice.xdr.o \
xdr_arrayn.o \
+ xdr_array.o \
+ xdr_int64.o \
Kvice.cs.o \
fcrypt.o \
rx.o \
rxkad_client.o \
rxkad_common.o \
xdr_afsuuid.o \
+ xdr.o \
afs_uuid.o $(AFS_OS_OBJS)
# These next two allow nfs and nonfs builds to occur in the same directory.
$(CRULE1)
xdr_arrayn.o: $(RX)/xdr_arrayn.c
$(CRULE1)
+xdr_array.o: $(RX)/xdr_array.c
+ $(CRULE1)
+xdr_int64.o: $(RX)/xdr_int64.c
+ $(CRULE1)
+xdr.o: $(RX)/xdr.c
+ $(CRULE1)
Kvldbint.cs.o: $(AFSINT)/Kvldbint.cs.c
$(CRULE1)
Kvldbint.xdr.o: $(AFSINT)/Kvldbint.xdr.c
#include "../afs/afs_osi.h"
#include "../rx/rx_kmutex.h"
#include "../afs/lock.h"
-#ifndef AFS_LINUX22_ENV
-#include "../rpc/xdr.h"
-#endif
+#include "../rx/xdr.h"
#include "../rx/rx.h"
#include "../rx/rx_globals.h"
#include "../afs/longc_procs.h"
return (FALSE);
}
-
+#else
/*
* XDR afs_int32 integers
* same as xdr_u_long - open coded to save a proc call!
*/
bool_t
-xdr_long(xdrs, lp)
+xdr_int(xdrs, lp)
register XDR *xdrs;
- long *lp;
+ int *lp;
{
if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, lp));
+ return (XDR_PUTINT32(xdrs, (long *)lp));
if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, lp));
+ return (XDR_GETINT32(xdrs, (long *)lp));
if (xdrs->x_op == XDR_FREE)
return (TRUE);
* same as xdr_long - open coded to save a proc call!
*/
bool_t
-xdr_u_long(xdrs, ulp)
+xdr_u_int(xdrs, ulp)
register XDR *xdrs;
- u_long *ulp;
+ int *ulp;
{
if (xdrs->x_op == XDR_DECODE)
return (XDR_GETINT32(xdrs, (long *)ulp));
-
if (xdrs->x_op == XDR_ENCODE)
return (XDR_PUTINT32(xdrs, (long *)ulp));
-
if (xdrs->x_op == XDR_FREE)
return (TRUE);
-
return (FALSE);
}
-#else
+#endif
+
+
/*
* XDR afs_int32 integers
* same as xdr_u_long - open coded to save a proc call!
*/
bool_t
-xdr_int(xdrs, lp)
+xdr_long(xdrs, lp)
register XDR *xdrs;
- int *lp;
+ long *lp;
{
if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, (long *)lp));
+ return (XDR_PUTINT32(xdrs, lp));
if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, (long *)lp));
+ return (XDR_GETINT32(xdrs, lp));
if (xdrs->x_op == XDR_FREE)
return (TRUE);
* same as xdr_long - open coded to save a proc call!
*/
bool_t
-xdr_u_int(xdrs, ulp)
+xdr_u_long(xdrs, ulp)
register XDR *xdrs;
- int *ulp;
+ u_long *ulp;
{
if (xdrs->x_op == XDR_DECODE)
return (XDR_GETINT32(xdrs, (long *)ulp));
+
if (xdrs->x_op == XDR_ENCODE)
return (XDR_PUTINT32(xdrs, (long *)ulp));
+
if (xdrs->x_op == XDR_FREE)
return (TRUE);
+
return (FALSE);
}
-#endif
+
/*
* XDR chars
*/
void *afs_osi_Alloc();
#define osi_alloc afs_osi_Alloc
#define osi_free afs_osi_Free
+
+#ifndef UKERNEL
+#define xdr_void afs_xdr_void
+#define xdr_int afs_xdr_int
+#define xdr_u_int afs_xdr_u_int
+#define xdr_short afs_xdr_short
+#define xdr_u_short afs_xdr_u_short
+#define xdr_long afs_xdr_long
+#define xdr_u_long afs_xdr_u_long
+#define xdr_char afs_xdr_char
+#define xdr_u_char afs_xdr_u_char
+#define xdr_bool afs_xdr_bool
+#define xdr_enum afs_xdr_enum
+#define xdr_array afs_xdr_array
+#define xdr_arrayN afs_xdr_arrayN
+#define xdr_bytes afs_xdr_bytes
+#define xdr_opaque afs_xdr_opaque
+#define xdr_string afs_xdr_string
+#define xdr_union afs_xdr_union
+#define xdr_float afs_xdr_float
+#define xdr_double afs_xdr_double
+#define xdr_reference afs_xdr_reference
+#define xdr_wrapstring afs_xdr_wrapstring
+#define xdr_vector afs_xdr_vector
+#define xdr_int64 afs_xdr_int64
+#define xdr_uint64 afs_xdr_uint64
+#endif
#endif
#ifndef major /* ouch! */
#include <sys/types.h>
#define u_quad_t __u_quad_t
#endif
#endif
-#include "../rpc/xdr.h"
+#include "../rx/xdr.h"
#include "../netinet/in.h"
#else /* !UKERNEL */
#include "../afs/sysincludes.h"
f_print(fout, "#include \"../h/stat.h\"\n");
f_print(fout, "#include \"../netinet/in.h\"\n");
f_print(fout, "#include \"../h/time.h\"\n");
- f_print(fout, "#ifndef AFS_LINUX22_ENV\n");
- f_print(fout, "#include \"../rpc/types.h\"\n");
- f_print(fout, "#endif /* AFS_LINUX22_ENV */\n");
- f_print(fout, "#ifdef AFS_LINUX22_ENV\n");
f_print(fout, "#include \"../rx/xdr.h\"\n");
- f_print(fout, "#else /* AFS_LINUX22_ENV */\n");
- f_print(fout, "#include \"../rpc/xdr.h\"\n");
- f_print(fout, "#endif /* AFS_LINUX22_ENV */\n");
f_print(fout, "#include \"../afsint/rxgen_consts.h\"\n");
} else {
f_print(fout, "#include <rx/xdr.h>\n");
f_print(fout, "#define u_quad_t __u_quad_t\n");
f_print(fout, "#endif\n");
f_print(fout, "#endif\n");
- f_print(fout, "#ifdef AFS_LINUX22_ENV\n");
f_print(fout, "#include \"../rx/xdr.h\"\n");
- f_print(fout, "#else /* AFS_LINUX22_ENV */\n");
- f_print(fout, "extern bool_t xdr_int64();\n");
- f_print(fout, "extern bool_t xdr_uint64();\n");
- f_print(fout, "#include \"../rpc/xdr.h\"\n");
- f_print(fout, "#endif /* AFS_LINUX22_ENV */\n");
f_print(fout, "#endif /* XDR_GETLONG */\n");
f_print(fout, "#endif /* UKERNEL */\n");
f_print(fout, "#include \"../afsint/rxgen_consts.h\"\n");
f_print(fout, "#include \"../netinet/in.h\"\n");
f_print(fout, "#include \"../h/time.h\"\n");
f_print(fout, "#include \"../rpc/types.h\"\n");
- f_print(fout, "#ifdef AFS_LINUX22_ENV\n");
f_print(fout, "#include \"../rx/xdr.h\"\n");
- f_print(fout, "#else /* AFS_LINUX22_ENV */\n");
- f_print(fout, "#include \"../rpc/xdr.h\"\n");
- f_print(fout, "#endif /* AFS_LINUX22_ENV */\n");
f_print(fout, "#include \"../afsint/rxgen_consts.h\"\n");
f_print(fout, "#include \"../afs/afs_osi.h\"\n");
f_print(fout, "#include \"../rx/rx.h\"\n");
f_print(fout, "#include \"../netinet/in.h\"\n");
f_print(fout, "#include \"../h/time.h\"\n");
f_print(fout, "#include \"../rpc/types.h\"\n");
- f_print(fout, "#ifdef AFS_LINUX22_ENV\n");
f_print(fout, "#include \"../rx/xdr.h\"\n");
- f_print(fout, "#else /* AFS_LINUX22_ENV */\n");
- f_print(fout, "#include \"../rpc/xdr.h\"\n");
- f_print(fout, "#endif /* AFS_LINUX22_ENV */\n");
f_print(fout, "#include \"../afsint/rxgen_consts.h\"\n");
f_print(fout, "#include \"../afs/afs_osi.h\"\n");
f_print(fout, "#include \"../rx/rx.h\"\n");
#endif /* !UKERNEL */
#ifndef AFS_LINUX22_ENV
#include "../rpc/types.h"
-#include "../rpc/xdr.h"
+#include "../rx/xdr.h"
#endif
#include "../rx/rx.h"
#else /* ! KERNEL */
#include "../h/time.h"
#ifndef AFS_LINUX22_ENV
#include "../rpc/types.h"
-#include "../rpc/xdr.h"
+#include "../rx/xdr.h"
#endif /* AFS_LINUX22_ENV */
#else /* !UKERNEL */
#include "../afs/sysincludes.h"