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=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY autolearn=no 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!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.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: Sun, 01 Jul 2007 11:57:10 +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 1183287430 208 62.49.19.209 (1 Jul 2007 10:57:10 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 1 Jul 2007 10:57:10 +0000 (UTC) Cancel-Lock: sha1:+A8f0m7CntJSvvBZ4RZEGj2yuHY= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news1.google.com comp.lang.ada:16371 Date: 2007-07-01T11:57:10+01:00 List-Id: Ole-Hjalmar Kristensen writes: >>>>>> "SW" == Simon Wright writes: You seem to have snipped the last bit that I actually did say .. > 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. True but not helpful if one side of the interface is implemented in Ada and the other side uses just C and sockets (and you are on the Ada side with no influence on the protocol). VxWorks both sides would probably add to the fun. I realise I didn't note these extra influences in my original remarks ..