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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cb5fcf665827cdc5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-12 01:00:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: Thierry Lelegard Newsgroups: comp.lang.ada Subject: Re: Gnat Ada binary compatibility Date: Thu, 12 Dec 2002 09:56:42 +0100 Organization: CANAL+ TECHNOLOGIES Message-ID: <3DF84F4A.C0D73F0A@canal-plus.fr> References: <3df79d5a$1@news.swissonline.ch> NNTP-Posting-Host: host227.canal-plus.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: s1.read.news.oleane.net 1039683403 10896 194.2.208.227 (12 Dec 2002 08:56:43 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 12 Dec 2002 08:56:43 +0000 (UTC) X-Mailer: Mozilla 4.78 [fr]C-CCK-MCD C+ (WinNT; U) X-Accept-Language: fr,en,zh-CN,zh-TW Xref: archiver1.google.com comp.lang.ada:31726 Date: 2002-12-12T09:56:42+01:00 List-Id: > we use Dec Ada in a homogenous VMS AXP environment. Now, we want to migrate > to Gnat Ada95 first and then to Gnat Ada on Tru64 Unix (both alpha hardware > and little endian). We are using an RPC mechanism, which tranfers binary > data, represented by complex Ada variant records. Is there a chance, that we > can continue doing this between OpenVMS AXP and Tru64 AXP? Or do we have to > introduce data mashalling in any case. We had exactly the same situation: moving to GNAT/multi-OS a DEC Ada/VMS application which did binary transfers (without marshalling) of variant Ada records. This approach is buggy, even in Ada83, even using DEC Ada only. It works only by chance. More precisely, it works only if write and read buffers (ie. the Ada variables) either are both unconstrained or have both the same constraints. But, anyway, this is only a fortunate (?) undocumented unsupported side effect of the compiler. We solved that by using marshalling. This approach is correct, portable and inter-operable. If you do not want to do the marshalling yourself, you may use some middleware that will do this for you (CORBA or DSA, although DSA is non-inter-operable outside GNAT). We now use both approaches (hand-made marshalling and CORBA) successfully. -Thierry