Article View: comp.sys.sun
Article #9883Re: Can I force a Sun 4 *NOT* to align elements on 16 bit boundaries
From: Mark Stein
Date: Thu, 22 Dec 1988 19:38
Date: Thu, 22 Dec 1988 19:38
15 lines
1104 bytes
1104 bytes
> I think the best way out is to write a routine to do the I/O on your file, > treating it as a byte stream, and fill in or read out of the struct > aligned how the host machine wants it. Now that should port .... ;-)! Hmmm. This sounds suspiciously like XDR. Designed for precisely this purpose. Portable, too. Hint1: Look at xdrstdio_create(). This attaches an XDR data stream to a stdio file pointer. Hint2: rpcgen can be used to generate XDR routines for your data types independent of whether they will be used in RPC requests. --Mark Stein <marks@sun.com> Sun Microsystems, Distributed System Software
Technical Details
Message-ID:
<8812152248.AA22277@ferne.sun.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rice!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rice!sun-spots-request From: marks@sun.com (Mark Stein) Newsgroups: comp.sys.sun Subject: Re: Can I force a Sun 4 *NOT* to align elements on 16 bit boundaries Message-ID: <8812152248.AA22277@ferne.sun.com> Date: 22 Dec 88 19:38:47 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 15 Approved: Sun-Spots@rice.edu Original-Date: Thu, 15 Dec 88 14:48:41 PST X-Sun-Spots-Digest: Volume 7, Issue 74, message 10 of 16