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 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!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.sun.com!news.sun.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 29 Jun 2007 05:21:47 -0500 Newsgroups: comp.lang.ada Subject: Re: pragma Pack does not work on GNAT 5.01a for Redhat Linux. References: <1182259013.590515.118310@g4g2000hsf.googlegroups.com> From: Ole-Hjalmar Kristensen Organization: Sun Microsystems Date: 29 Jun 2007 12:21:46 +0200 Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cache-Post-Path: news1nwk!unknown@khepri06.norway.sun.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 192.18.43.225 X-Trace: sv3-FntPrncccfu0EjYa1A4Nu7prv8zwpVEazB/af76KXZXNXYQpsw5at5cDRb1ZGMktisL4K32GLFBRfC9!9eDze563ygUMyv49hbblOhs2SUV7aDOCOxQgRS+A5WOEkSv5UB0gC3OG X-Complaints-To: abuse@sun.com X-DMCA-Complaints-To: abuse@sun.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Xref: g2news1.google.com comp.lang.ada:16338 Date: 2007-06-29T12:21:46+02:00 List-Id: >>>>> "SW" == Simon Wright writes: SW> "Bob Spooner" writes: >> "Simon Wright" wrote in message >> news:m2hcp2e4fv.fsf@mac.com... >>> >>> 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). >> >> Yes, XDR takes care of things like endianness, etc. that otherwise get in >> the way, but as you point out, there's always a price to be paid for >> generality. In some cases it looks like it even will take care of differing >> floating point representations, although I wonder about out of range >> problems when converting. Isn't there an XDR library for C? I know that >> there is one for Fortran. I would think that as long as you have an XDR >> library for the language with which you need to communicate, you wouldn't >> have to decode the bytes yourself; or have I misunderstood what you are >> saying? C has had XDR and RPC at least since 1987. Try man xdr or man rpcgen on any unix box. See [Sun Microsystems XDR: External Data Representation Standard Internet Network Working Group RFC1014 Internet Request For Comments, June 1987] -- C++: The power, elegance and simplicity of a hand grenade.