From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,9af04b2baa5a026a X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-03-20 08:59:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!ihug.co.nz!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail Message-ID: <3E79F33A.1020405@nospam_hp.com> From: Brian Haley Organization: Tru64 UNIX Networking User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: Data structure alignment question References: <8df11a0.0303191636.389f8f0c@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 20 Mar 2003 16:59:07 GMT NNTP-Posting-Host: 16.141.152.117 X-Complaints-To: abuse@HP.com X-Trace: news.cpqcorp.net 1048179547 16.141.152.117 (Thu, 20 Mar 2003 08:59:07 PST) NNTP-Posting-Date: Thu, 20 Mar 2003 08:59:07 PST Xref: archiver1.google.com comp.unix.tru64:9740 Marc S. Gibian wrote: > I am porting a program that runs on a number of other Unix/Linux > platforms to Tru64 5.1, GCC 3.2.2. This program interchanges messages > via sockets with other systems. Thus, the data alignment in > structures/classes is critical. To my surprise, I find that my data is > begin laid out more compactly than on the other platforms. It seems > like there must be a pragma or other mechanism within GCC that would > allow me to instruct the compiler to align the data on long word (32 > bit) boundries. If not, I'm going to be stuck adding pad fields to a > non-trival set of structures. Hi Marc, It would help if you posted at least one of the data structures in question. Also, on Alpha, longword alignment is 64-bits, not 32, maybe that's the problem? I would also recommend reading the Programmers Guide, Section 2 on the "Compiling System", it explains data structure alignment on Tru64 Unix. http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/ARH9VDTE/TITLE.HTM -Brian Haley, Tru64 Unix Networking