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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7345e706c651a1a3 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!news.highwinds-media.com!xara.net!gxn.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: pragma Pack does not work on GNAT 5.01a for Redhat Linux. Date: Wed, 20 Jun 2007 21:50:12 +0100 Organization: Pushface Message-ID: References: <1182259013.590515.118310@g4g2000hsf.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1182372612 21390 62.49.19.209 (20 Jun 2007 20:50:12 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 20 Jun 2007 20:50:12 +0000 (UTC) Cancel-Lock: sha1:FtU6RptLEjl4DuZky6KaiErJIek= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news1.google.com comp.lang.ada:16285 Date: 2007-06-20T21:50:12+01:00 List-Id: "Bob Spooner" writes: > For exchanging binary data between heterogeneous systems, my > experience has been that record representation clauses are necessary > to insure that the data representations are identical. Or (if on GNAT) you could use a version of the compiler's stream support that uses XDR representations 'on the wire' -- we transparently communicate between PowerPC and Intel hardware like this as a matter of course without having to think about it or expend any effort. There's always a price to pay, of course; the packing isn't dense, and it can be quite a challenge to work out what bytes are actually being sent (eg, if you find yourself having to talk to C after all).