From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: Ada and Motif libraries
Date: 1998/02/14
Date: 1998-02-14T00:00:00+00:00 [thread overview]
Message-ID: <x7vbtwadpvs.fsf@pogner.demon.co.uk> (raw)
In-Reply-To: 1998Feb13.170841.1@eisner
kilgallen@eisner.decus.org (Larry Kilgallen) writes:
> In article <x7vk9b01ot8.fsf@pogner.demon.co.uk>, Simon Wright <simon@pogner.demon.co.uk> writes:
> > Unless I missed an update (entirely possible), there's a lot of work
> > to do to convert the binding machinery to allow big-endian processors
> > (specifically, SPARC).
>
> I thought the method DEC posted on Gatekeeper was supposed to work
> with big-endian machines as well, because it read through the C header
> files and built a C program to emit the Ada declarations.
It does indeed build a C program as you say. But the problem I fixed
(solution not available for posting (if anyone's interested) unless I
get permission) revolved around the positions of bit fields in
records. I don't think that DEC had any interest in big-endian
machines.
For example,
type Event_Mask_Type is
record
Key_Press : Boolean;
needs with it
for Event_Mask_Type use
record
Key_Press at 0 range 0 .. 0;
on a little-endian machine and
for Event_Mask_Type use
record
Key_Press at 0 range 31 .. 31;
on a big-endian one. I have to say I can't see why Ada compilers force
this grief on us, we don't compute 'Position differently on different
machines. But then I came late to big-endian representations so they
have always seemed slightly crazy to me!
And you can't use
for Event_Mask_Type'Bit_Order use System.Low_Order_First;
(on GNAT anyway, which takes advantage of RM13.5.3(7).)
next prev parent reply other threads:[~1998-02-14 0:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-02-12 0:00 Ada and Motif libraries Trawa
1998-02-12 0:00 ` Larry Kilgallen
1998-02-12 0:00 ` Simon Wright
1998-02-13 0:00 ` Larry Kilgallen
1998-02-14 0:00 ` Simon Wright [this message]
1998-02-13 0:00 ` Brett Kettering
1998-02-13 0:00 ` Robert Dewar
1998-02-14 0:00 ` GNAT for VAX VMS ? Larry Kilgallen
1998-02-14 0:00 ` Robert Dewar
1998-02-15 0:00 ` Ada and Motif libraries Robert Deininger
1998-02-16 0:00 ` Robert Dewar
1998-02-17 0:00 ` Larry Kilgallen
1998-02-19 0:00 ` Alpha and Beta Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox