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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,21546edd0312e9ec X-Google-Attributes: gid103376,public From: Simon Wright Subject: Re: Ada and Motif libraries Date: 1998/02/14 Message-ID: #1/1 X-Deja-AN: 325292131 References: <34E2D398.C4652B5B@hotmail.com> <1998Feb12.150104.1@eisner> <1998Feb13.170841.1@eisner> X-NNTP-Posting-Host: pogner.demon.co.uk [158.152.70.98] Organization: At Home Newsgroups: comp.lang.ada Date: 1998-02-14T00:00:00+00:00 List-Id: kilgallen@eisner.decus.org (Larry Kilgallen) writes: > In article , Simon Wright 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).)