From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_05,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d2fe923345e67606,start X-Google-Attributes: gid103376,public From: Steven O'Neill Subject: Byte sex confusion Date: 1997/05/07 Message-ID: <33716475.43A9@top.monad.net>#1/1 X-Deja-AN: 240238079 Organization: Black Amber Consulting Reply-To: oneills@top.monad.net Newsgroups: comp.lang.ada Date: 1997-05-07T00:00:00+00:00 List-Id: I have an interesting problem well known to anyone who has tried to develop on multiple platforms. I have binary data that was recorded on a big-endian machine (SGI) which I am in need of reading on a little-endian machine (Intel). The current method involves using C routines to fread the data into buffers and then casting the data into a variety of Ada records. This is a dangerous practice (its not my code) but it works fine as long as the layout of the records remain the same and the underlying data formats are consistent. What I'm looking for are ideas on how to access this data in an easy anc consistent fashion on both architectures... Any ideas? Thanks, Steve O'Neill