From: "Mike Holland" <hollandm@logicaDOTcom>
Subject: Re: Porting from Compaq Alpha to HP-UX
Date: 2000/02/01 [thread overview]
Message-ID: <876e69$4ui@romeo.logica.co.uk> (raw)
In-Reply-To: 2000Jan31.141639.1@eisner
Thanks for that. Actually, I think I'll be OK with my alignment since the
application has all its data explicitly padded so that it lies on natural
boundaries.
Where I'm expecting the real trouble is where bit-fields have been used:
the Alpha compiler puts the first bit-field it finds at the least
significant end of the word, whereas the HP-UX puts it at the most
significant end. So any assumptions about the layout of bitfield go
horribly wrong! It's expecially horrible where unions are involved.
Mike Holland
Bob Koehler wrote in message <2000Jan31.141639.1@eisner>...
>In article <873qtt$fds@romeo.logica.co.uk>, "Mike Holland"
<hollandm@logicaDOTcom> writes:
>> I need to port a large-ish application (about a million lines of 'C'
code)
>> from Compaq Alpha UNIX 4.0e to run additionally on HP-UX. It will be
>> particularly entertaining because the application exchanges messages with
>> programs running on Windows NT.
>>
>
> Something I missed on the first followup. On Compaq UNIX you can
> control whether structure and union fields are naturally aligned or
> packed. On HP-UX you can't. I've had trouble getting two programs
> which used the same .h file to declare a struct on HP-UX to agree
> how the data should be aligned. So if you do read and writes of
> entire structs you may have to re-write it as field-by-field I/O.
>
>----------------------------------------------------------------------
>Bob Koehler | Computer Sciences Corporation
>Hubble Space Telescope Payload | Federal Sector, Civil Group
> Flight Software Team | please remove ".aspm" when replying
next prev parent reply other threads:[~2000-02-01 5:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-31 5:00 Porting from Compaq Alpha to HP-UX Mike Holland
2000-01-31 5:00 ` Bob Koehler
2000-01-31 5:00 ` Bob Koehler
2000-02-01 5:00 ` Mike Holland [this message]
2000-01-31 5:00 ` Mike Holland
2000-02-01 5:00 ` Rick Jones
2000-02-01 5:00 ` John Neumann
2000-01-31 5:00 ` David Peter
2000-02-01 5:00 ` Rick Jones
2000-02-03 5:00 ` Aurel Balmosan
2000-02-05 5:00 ` Shane Seymour
2000-02-04 5:00 ` Computing Services
2000-02-07 5:00 ` Bob Koehler
2000-02-08 5:00 ` Computing Services
2000-02-08 5:00 ` Daniel S. Riley
2000-02-08 5:00 ` Adam Price
2000-02-09 5:00 ` Bob Koehler
2000-02-09 5:00 ` Aurel Balmosan
2000-02-09 5:00 ` Shane Seymour
2000-02-06 5:00 ` hbw
2000-01-31 5:00 ` Rick Jones
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox