Rev 56474 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
XDR routines for R, gnuwin32 version====================================R can make use of XDR to read/write binary dumps in amachine-independent format. This directory was put together by BrianRipley from the version of the sunrpc distribution put together forONC RPC 1.10 for Windows NT by Martin F. Gergeleit. This is no longeravailable directly, but is part of the NISGINA distribution<www.dcs.qmw.ac.uk/~williams>. Only that part of XDR used by R isincluded.[A later version of ONC/RPC is available athttp://www.plt.rwth-aachen.de/ks/english/oncrpc.html]For copyright see the Oracle copyright in COPYRGHT.TXT and the headerof xdr.c.The only changes I made were(a) to comment out definitions in rpc/types.h that are duplicates ofthose in Windows/Sockets.h(b) to define ntohl and htonl via assembler code at the head ofxdr_stdio.c. This will need to be altered for any other little-endiansystem; generic code for 32-bit systems is provided.(c) to report errors directly rather than to NT services.Note that this code assume long is 4 bytes, and also implicitlyassumes that a pointer can be stored in a long.These functions are only used in saveload.c, which uses xdr_bytes,xdr_double, xdr_int, xdr_string, xdrmem_create and xdrstdio_create.There was some further tidying up in July 2011 to enable this to beused on other systems. In particular, we replaced 'long' by int32_tand 'u_long' by uint32_t to ensure 32-bit types.The original licence of the Sun RPC code was permissive but notGPL-compatible. This changed in 2010 when Oracle relicensed the codewith a GPL-compatible licence. All RPC licence headers were updated inMarch 2024 to use the 2010 licence.