* and two private fields for the use of the particular impelementation.
*/
-#if defined(KERNEL) && ((defined(AFS_SGI61_ENV) && (_MIPS_SZLONG != _MIPS_SZINT)) || defined(AFS_HPUX_64BIT_ENV))
-/* NOTE: SGI 6.1 adds two routines to the xdr_ops if the size of a long is
- * 64 bits. I've only done this for the kernel, since other changes may
- * be necessary if we make a 64 bit user version of AFS.
- */
-#define AFS_XDR_64BITOPS 1
-#endif
-
typedef struct __afs_xdr {
enum xdr_op x_op; /* operation; fast additional param */
struct xdr_ops {
-#ifdef AFS_XDR_64BITOPS
- bool_t(*x_getint64) (struct __afs_xdr *xdrs, afs_int64 * lp); /* get 32 bits into a long */
- bool_t(*x_putint64) (struct __afs_xdr *xdrs, afs_int64 * lp); /* send 32 bits of a long */
-#endif
-#if !(defined(KERNEL) && defined(AFS_SUN57_ENV))
bool_t(*x_getint32) (struct __afs_xdr *xdrs, afs_int32 * lp); /* get an afs_int32 from underlying stream */
bool_t(*x_putint32) (struct __afs_xdr *xdrs, afs_int32 * lp); /* put an afs_int32 to " */
-#endif
bool_t(*x_getbytes) (struct __afs_xdr *xdrs, caddr_t addr, u_int len); /* get some bytes from " */
bool_t(*x_putbytes) (struct __afs_xdr *xdrs, caddr_t addr, u_int len); /* put some bytes to " */
u_int(*x_getpostn) (struct __afs_xdr *xdrs); /* returns bytes off from beginning */
bool_t(*x_setpostn) (struct __afs_xdr *xdrs, u_int pos); /* lets you reposition the stream */
afs_int32 *(*x_inline) (struct __afs_xdr *xdrs, u_int len); /* buf quick ptr to buffered data */
void (*x_destroy) (struct __afs_xdr *xdrs); /* free privates of this xdr_stream */
-#if defined(KERNEL) && defined(AFS_SUN57_ENV)
- bool_t(*x_control) (struct __afs_xdr *xdrs);
- bool_t(*x_getint32) (struct __afs_xdr *xdrs, afs_int32 * lp);
- bool_t(*x_putint32) (struct __afs_xdr *xdrs, afs_int32 * lp);
-#endif
} *x_ops;
caddr_t x_public; /* users' data */
caddr_t x_private; /* pointer to private data */
* u_int len;
* u_int pos;
*/
-#ifdef AFS_XDR_64BITOPS
-#define XDR_GETINT64(xdrs, int64p) \
- (*(xdrs)->x_ops->x_getint64)(xdrs, int64p)
-#define xdr_getint64(xdrs, int64p) \
- (*(xdrs)->x_ops->x_getint64)(xdrs, int64p)
-
-#define XDR_PUTINT64(xdrs, int64p) \
- (*(xdrs)->x_ops->x_putint64)(xdrs, int64p)
-#define xdr_putint64(xdrs, int64p) \
- (*(xdrs)->x_ops->x_putint64)(xdrs, int64p)
-#endif /* AFS_XDR_64BITOPS */
-
#define XDR_GETINT32(xdrs, int32p) \
(*(xdrs)->x_ops->x_getint32)(xdrs, int32p)
#define xdr_getint32(xdrs, int32p) \
static struct xdr_ops xdrlen_ops = {
#ifndef HAVE_STRUCT_LABEL_SUPPORT
-#ifdef AFS_XDR_64BITOPS
- NULL,
- NULL,
-#endif
/* Windows does not support labeled assigments */
-#if !(defined(KERNEL) && defined(AFS_SUN57_ENV))
xdrlen_getint32, /* not supported */
xdrlen_putint32, /* serialize an afs_int32 */
-#endif
xdrlen_getbytes, /* not supported */
xdrlen_putbytes, /* serialize counted bytes */
xdrlen_getpos, /* get offset in the stream */
xdrlen_setpos, /* set offset in the stream */
xdrlen_inline, /* not supported */
xdrlen_destroy, /* destroy stream */
-#if (defined(KERNEL) && defined(AFS_SUN57_ENV))
- NULL, /* control - not implemented */
- xdrlen_getint32, /* not supported */
- xdrlen_putint32, /* serialize an afs_int32 */
-#endif
#else
-#ifdef AFS_XDR_64BITOPS
- .x_getint64 = NULL,
- .x_putint64 = NULL,
-#endif
.x_getint32 = xdrlen_getint32,
.x_putint32 = xdrlen_putint32,
.x_getbytes = xdrlen_getbytes,
static struct xdr_ops xdrmem_ops = {
#ifndef HAVE_STRUCT_LABEL_SUPPORT
-#ifdef AFS_XDR_64BITOPS
- NULL,
- NULL,
-#endif
/* Windows does not support labeled assigments */
-#if !(defined(KERNEL) && defined(AFS_SUN57_ENV))
xdrmem_getint32, /* deserialize an afs_int32 */
xdrmem_putint32, /* serialize an afs_int32 */
-#endif
xdrmem_getbytes, /* deserialize counted bytes */
xdrmem_putbytes, /* serialize counted bytes */
xdrmem_getpos, /* get offset in the stream: not supported. */
xdrmem_setpos, /* set offset in the stream: not supported. */
xdrmem_inline, /* prime stream for inline macros */
xdrmem_destroy, /* destroy stream */
-#if (defined(KERNEL) && defined(AFS_SUN57_ENV))
- NULL, /* control - not implemented */
- xdrmem_getint32, /* not supported */
- xdrmem_putint32, /* serialize an afs_int32 */
-#endif
#else
-#ifdef AFS_XDR_64BITOPS
- .x_getint64 = NULL,
- .x_putint64 = NULL,
-#endif
.x_getint32 = xdrmem_getint32,
.x_putint32 = xdrmem_putint32,
.x_getbytes = xdrmem_getbytes,
static struct xdr_ops xdrrec_ops = {
#ifdef AFS_NT40_ENV
-#ifdef AFS_XDR_64BITOPS
- NULL,
- NULL,
-#endif
/* Windows does not support labeled assignments */
#if !(defined(KERNEL) && defined(AFS_SUN57_ENV))
xdrrec_getint32, /* deserialize an afs_int32 */
xdrrec_putint32, /* serialize an afs_int32 */
#endif
#else
-#ifdef AFS_XDR_64BITOPS
- .x_getint64 = NULL,
- .x_putint64 = NULL,
-#endif
.x_getint32 = xdrrec_getint32,
.x_putint32 = xdrrec_putint32,
.x_getbytes = xdrrec_getbytes,
#include "xdr.h"
/* Static prototypes */
-#ifdef AFS_XDR_64BITOPS
-static bool_t xdrrx_getint64(XDR *axdrs, long *lp);
-static bool_t xdrrx_putint64(XDR *axdrs, long *lp);
-#endif /* AFS_XDR_64BITOPS */
-
static bool_t xdrrx_getint32(XDR *axdrs, afs_int32 * lp);
static bool_t xdrrx_putint32(XDR *axdrs, afs_int32 * lp);
static bool_t xdrrx_getbytes(XDR *axdrs, caddr_t addr,
*/
static struct xdr_ops xdrrx_ops = {
#ifndef HAVE_STRUCT_LABEL_SUPPORT
-#ifdef AFS_XDR_64BITOPS
- xdrrx_getint64, /* deserialize an afs_int64 */
- xdrrx_putint64, /* serialize an afs_int64 */
-#endif
/* Windows does not support labeled assigments */
-#if !(defined(KERNEL) && defined(AFS_SUN57_ENV))
xdrrx_getint32, /* deserialize an afs_int32 */
xdrrx_putint32, /* serialize an afs_int32 */
-#endif
xdrrx_getbytes, /* deserialize counted bytes */
xdrrx_putbytes, /* serialize counted bytes */
NULL, /* get offset in the stream: not supported. */
NULL, /* set offset in the stream: not supported. */
xdrrx_inline, /* prime stream for inline macros */
NULL, /* destroy stream */
-#if (defined(KERNEL) && defined(AFS_SUN57_ENV))
- NULL, /* control - not implemented */
- xdrrx_getint32, /* not supported */
- xdrrx_putint32, /* serialize an afs_int32 */
-#endif
#else
-#ifdef AFS_XDR_64BITOPS
- .x_getint64 = xdrrx_getint64,
- .x_putint64 = xdrrx_putint64,
-#endif /* AFS_XDR_64BITOPS */
.x_getint32 = xdrrx_getint32, /* deserialize an afs_int32 */
.x_putint32 = xdrrx_putint32, /* serialize an afs_int32 */
.x_getbytes = xdrrx_getbytes, /* deserialize counted bytes */
.x_setpostn = NULL, /* set offset in the stream: not supported. */
.x_inline = xdrrx_inline, /* prime stream for inline macros */
.x_destroy = NULL, /* destroy stream */
-#if defined(KERNEL) && defined(AFS_SUN57_ENV)
- .x_control = NULL,
-#endif
#endif
};
int rx_pin_failed = 0;
#endif
-#ifdef AFS_XDR_64BITOPS
-static bool_t
-xdrrx_getint64(XDR *axdrs, long *lp)
-{
- XDR * xdrs = (XDR *)axdrs;
- struct rx_call *call = ((struct rx_call *)(xdrs)->x_private);
- afs_int32 i;
-
- if (rx_Read32(call, &i) == sizeof(i)) {
- *lp = ntohl(i);
- return TRUE;
- }
- return FALSE;
-}
-
-static bool_t
-xdrrx_putint64(XDR *axdrs, long *lp)
-{
- XDR * xdrs = (XDR *)axdrs;
- afs_int32 code, i = htonl(*lp);
- struct rx_call *call = ((struct rx_call *)(xdrs)->x_private);
-
- code = (rx_Write32(call, &i) == sizeof(i));
- return code;
-}
-#endif /* AFS_XDR_64BITOPS */
-
static bool_t
xdrrx_getint32(XDR *axdrs, afs_int32 * lp)
{
*/
static struct xdr_ops xdrstdio_ops = {
#ifdef AFS_NT40_ENV
-#ifdef AFS_XDR_64BITOPS
- NULL,
- NULL,
-#endif
/* Windows does not support labeled assignments */
#if !(defined(KERNEL) && defined(AFS_SUN57_ENV))
xdrstdio_getint32, /* deserialize an afs_int32 */
xdrstdio_putint32, /* serialize an afs_int32 */
#endif
#else
-#ifdef AFS_XDR_64BITOPS
- .x_getint64 = NULL,
- .x_putint64 = NULL,
-#endif
.x_getint32 = xdrstdio_getint32, /* deserialize an afs_int32 */
.x_putint32 = xdrstdio_putint32, /* serialize an afs_int32 */
.x_getbytes = xdrstdio_getbytes, /* deserialize counted bytes */