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,7e353b2859884173 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-17 17:46:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Adasockets storage problem Date: 17 Feb 2002 20:37:33 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1013996523 13089 128.183.220.71 (18 Feb 2002 01:42:03 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 18 Feb 2002 01:42:03 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:20097 Date: 2002-02-18T01:42:03+00:00 List-Id: "Nazgul" writes: > Hi, > > I'm using the Adasockets library to have network funcionallity in a program. > The problem is, it works fine if the server and the client are both running > in the same architecture, for example i386, but when the server runs in a > HP-UX and the client in i386, the client raises and STORAGE_ERROR when > receiving a string. > > I suppose it's something about little endian/big endian and using htons(), > htonl(),... like in C, but I don't know how to fix it. Probably the string length is sent as a multibyte integer. You may have to override String'Output, and send the length in a canonical endianness. SAL has some packages that help do endian conversions; see SAL.Endianness and SAL.Gen.Word_Order_Convert.* SAL is available at http://users.erols.com/leakstan/Stephe/Ada/sal.html GLADE (the multi-partition product that goes with GNAT) also has an XDR package, that provides similar functionality (I've never used it). -- -- Stephe