From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: GNAT.Sockets
Date: Wed, 10 Oct 2007 05:52:41 +0100
Date: 2007-10-10T05:52:41+01:00 [thread overview]
Message-ID: <m24pgz8tba.fsf@mac.com> (raw)
In-Reply-To: 1191962179.754006.134610@k79g2000hse.googlegroups.com
Maciej Sobczak <see.my.homepage@gmail.com> writes:
> On 9 Pa , 17:10, a...@anon.org (anon) wrote:
>
>> -- Get message length
>>
>> Integer'Read ( Channel, Length_Message ) ;
>
> How does it deal with endianness issues?
> Or in general with different representation on two communicating
> platforms?
AdaCore supply an alternate body for System.Stream_Attributes
(s-stratt.adb) in s-strxdr.adb. This converts to/from XDR
representation on the fly.
One way to deal with this is to copy s-strxdr.adb to s-stratt.adb in
your source path and use gnatmake -a.
Another is to rebuild the RTS (there's a makefile in adalib or
adainclude, forget which) and use the --RTS= switch (I think in GPR
package Builder).
As a matter of interest, we found that the PowerPC (G4)'s native
representation is the same as XDR except for Wide_Character, which is
2 bytes natively and 4 via s-strxdr.adb. That's 3.16a1, not sure about
the latest releases. We don't use Wide_Character, so we can use the
native RTS on VxWorks/PPC and XDR on the host (intel) side; the XDR
conversions for floats look complex & possibly loady, not measured,
but more important is reducing the need to modify third-party tools
and code.
next prev parent reply other threads:[~2007-10-10 4:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 13:04 GNAT.Sockets Bartek
2007-10-09 15:10 ` GNAT.Sockets anon
2007-10-09 20:36 ` GNAT.Sockets Maciej Sobczak
2007-10-10 4:52 ` Simon Wright [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-23 12:20 GNAT.Sockets Alexei Polkhanov
2002-02-25 18:11 ` GNAT.Sockets Pascal Obry
2002-03-23 23:53 ` GNAT.Sockets Volkert
2002-03-24 7:22 ` GNAT.Sockets Pascal Obry
2002-03-24 8:56 ` GNAT.Sockets Volkert
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox