Portability across architectures..

Richard A. O'Keefe ok at quintus.uucp
Tue Aug 30 14:17:44 AEST 1988


In article <103 at simsdevl.UUCP> dandc at simsdevl.UUCP (Dan DeClerck) writes:
>A fellow programmer suggested an "XDR" standard from SUN,
>but this seems to only work with inter-process communication.

Have you *tried* it?
Look at the name of the manual:
	"External Data Representation Protocol Specification"
in "Networking on the Sun Workstation".  You can send XDR-encoded
data through sockets, but there is no necessary connexion between
XDR and IPC.  For your application, you want to use
	xdrstdio_create()
to convert stdio streams to your files to XDR streams, and then
just read and write the data with appropriate XDR calls.  In fact,
you will probably use the same routine for reading and writing, as
the direction is encoded in the XDR stream, not in the calls.

It's really very easy to use.  (Easier than scanf(), anyway.)



More information about the Comp.lang.c mailing list