From 7a5d90b7735e4047eb926dc03dbaafce556bccfe Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 21 Jan 2010 15:34:49 -0500 Subject: [PATCH] Undo labeling of elements of rx structures for Windows Change I006bbbdb8923dbb72a97fde931a1b23e303375c2 broke the Windows build. Restore the unlabled assignments for Windows since Windows always uses the AFS xdr implementation. Change-Id: I2eadc624d84f4100281424993b7287a330d6c753 Reviewed-on: http://gerrit.openafs.org/1136 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/rx/xdr_mem.c | 12 ++++++++++++ src/rx/xdr_rec.c | 12 ++++++++++++ src/rx/xdr_rx.c | 12 ++++++++++++ src/rx/xdr_stdio.c | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/src/rx/xdr_mem.c b/src/rx/xdr_mem.c index eeffd76d4..44c2aa179 100644 --- a/src/rx/xdr_mem.c +++ b/src/rx/xdr_mem.c @@ -60,6 +60,17 @@ static afs_int32 *xdrmem_inline(); static void xdrmem_destroy(); static struct xdr_ops xdrmem_ops = { +#ifdef AFS_NT40_ENV + /* Windows does not support labeled assigments */ + xdrmem_getint32, /* deserialize an afs_int32 */ + xdrmem_putint32, /* serialize an afs_int32 */ + 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 */ +#else .x_getint32 = xdrmem_getint32, .x_putint32 = xdrmem_putint32, .x_getbytes = xdrmem_getbytes, @@ -68,6 +79,7 @@ static struct xdr_ops xdrmem_ops = { .x_setpos = xdrmem_setpos, .x_inline = xdrmem_inline, .x_destroy = xdrmem_destroy +#endif }; /* diff --git a/src/rx/xdr_rec.c b/src/rx/xdr_rec.c index d19f763a6..885e6beed 100644 --- a/src/rx/xdr_rec.c +++ b/src/rx/xdr_rec.c @@ -117,6 +117,17 @@ static bool_t skip_input_bytes(RECSTREAM * rstrm, int cnt); static u_int fix_buf_size(u_int s); static struct xdr_ops xdrrec_ops = { +#ifdef AFS_NT40_ENV + /* Windows does not support labeled assignments */ + xdrrec_getint32, /* deserialize an afs_int32 */ + xdrrec_putint32, /* serialize an afs_int32 */ + xdrrec_getbytes, /* deserialize counted bytes */ + xdrrec_putbytes, /* serialize counted bytes */ + xdrrec_getpos, /* get offset in the stream: not supported. */ + xdrrec_setpos, /* set offset in the stream: not supported. */ + xdrrec_inline, /* prime stream for inline macros */ + xdrrec_destroy /* destroy stream */ +#else .x_getint32 = xdrrec_getint32, .x_putint32 = xdrrec_putint32, .x_getbytes = xdrrec_getbytes, @@ -125,6 +136,7 @@ static struct xdr_ops xdrrec_ops = { .x_setpos = xdrrec_setpos, .x_inline = xdrrec_inline, .x_destroy = xdrrec_destroy +#endif }; /* * Create an xdr handle for xdrrec diff --git a/src/rx/xdr_rx.c b/src/rx/xdr_rx.c index 8835f93c9..0aa7eed28 100644 --- a/src/rx/xdr_rx.c +++ b/src/rx/xdr_rx.c @@ -114,6 +114,17 @@ static AFS_RPC_INLINE_T *xdrrx_inline(AFS_XDRS_T axdrs, u_int len); * Ops vector for stdio type XDR */ static struct xdr_ops xdrrx_ops = { +#ifdef AFS_NT40_ENV + /* Windows does not support labeled assigments */ + xdrrx_getint32, /* deserialize an afs_int32 */ + xdrrx_putint32, /* serialize an afs_int32 */ + 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 */ +#else #if defined(KERNEL) && ((defined(AFS_SGI61_ENV) && (_MIPS_SZLONG != _MIPS_SZINT)) || defined(AFS_HPUX_64BIT_ENV)) .x_getint64 = xdrrx_getint64, .x_putint64 = xdrrx_putint64, @@ -136,6 +147,7 @@ static struct xdr_ops xdrrx_ops = { .x_getint32 = xdrrx_getint32, /* deserialize an afs_int32 */ .x_putint32 = xdrrx_putint32, /* serialize an afs_int32 */ #endif +#endif }; /* diff --git a/src/rx/xdr_stdio.c b/src/rx/xdr_stdio.c index 0b24f45bf..f5886fa36 100644 --- a/src/rx/xdr_stdio.c +++ b/src/rx/xdr_stdio.c @@ -58,6 +58,17 @@ static void xdrstdio_destroy(); * Ops vector for stdio type XDR */ static struct xdr_ops xdrstdio_ops = { +#ifdef AFS_NT40_ENV + /* Windows does not support labeled assignments */ + xdrstdio_getint32, /* deserialize an afs_int32 */ + xdrstdio_putint32, /* serialize an afs_int32 */ + xdrstdio_getbytes, /* deserialize counted bytes */ + xdrstdio_putbytes, /* serialize counted bytes */ + 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 */ +#else .x_getint32 = xdrstdio_getint32, /* deserialize an afs_int32 */ .x_putint32 = xdrstdio_putint32, /* serialize an afs_int32 */ .x_getbytes = xdrstdio_getbytes, /* deserialize counted bytes */ @@ -66,6 +77,7 @@ static struct xdr_ops xdrstdio_ops = { .x_setpos = xdrstdio_setpos, /* set offset in the stream */ .x_inline = xdrstdio_inline, /* prime stream for inline macros */ .x_destroy = xdrstdio_destroy /* destroy stream */ +#endif }; /* -- 2.39.5