From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,a988bcb65ddc0b1c X-Google-Attributes: gidfa528,public X-Google-Thread: f7344,bbc2c03c35f9c8f0 X-Google-Attributes: gidf7344,public X-Google-ArrivalTime: 2001-11-28 20:48:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!hub1.nntpserver.com!nntp-relay.ihug.net!ihug.co.nz!feeder.via.net!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: "Duane Sand" Newsgroups: comp.os.vms,comp.unix.tru64 References: <0033000042788869000002L092*@MHS> <91668821Cwarrenspencer1977@207.126.101.97> <3C04980A.4010005@swissonline.delete.ch> <3C051224.4A2BB9CC@videotron.ca> Subject: Re: Tru64 .vs. HP-UX (was: Compaq's Secret VMS Plans (The Inquirer)) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Thu, 29 Nov 2001 04:48:48 GMT NNTP-Posting-Host: 24.7.82.37 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 1007009328 24.7.82.37 (Wed, 28 Nov 2001 20:48:48 PST) NNTP-Posting-Date: Wed, 28 Nov 2001 20:48:48 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.os.vms:53175 comp.unix.tru64:5945 > Duane Sand wrote > > The starting question is, > > Will the merged Unix be big-endian, like PA-RISC and IPF HP-UX are, > > or little-endian, like Tru64? > > The IPF hardware can do both, even at same time for different processes, > > but no practical OS will ever be bi-endian in its raw file support. Bill Todd wrote: > I'm not sure what you mean by the last clause above: while applications > may (or may not) elect to embed endian-sensitive data in their files (and > if they do will certainly have problems sharing that data with other-endian > applications), that's an application-level rather than a file-system issue, > so it's not clear what application-visible implications file-system > endianness has (assuming of course that at the API appropriate > conversions are made when dealing with other-endian applications)? Sorry, that phrase "bi-endian in its raw file support" was unclear and/or wrong. Of course, the file system's support for byte stream files or disk block files doesn't care in any way, how those bytes and words are arranged and interpreted by applications. A big-endian file server can service little-endian clients and vice versa, no problem. What I should have said, is that any automatic byte-swapping service supplied by the OS or runtime library, is going to be useless for automatically converting files whose internal layouts are unknown to the system. So the system generally can't help a big-endian version of an application work together with a little-endian version of that same application. The problem is that when items of different sizes are intermixed in a file or struct, the two-byte numbers must be byte-reversed on a two-byte basis, and four-byte numbers must be byte- reversed on a four-byte basis, etc. The system doesn't know enough about each application's declarations or methods to know how to parse and reverse each part. Some cases of file interchange can work via automatic byte swapping. This includes data bases (whose internal structures are self-described somewhere), and simple files where all items are the same size (eg text files), and Fortran binary files (where the read/write statements show how to parse each record into bigger and smaller fields). The cases that don't work, include C programs reading and writing structs with scalar fields of different sizes, or worse yet, unions of those. (And that's most every program I deal with.) > > One camp of users or the other will be losers, in having to fix endian- > > sensitive nonportable source code before doing the "just a recompile", > > even if both sets of APIs are supported, and in not having the option > > for a binary translator for unchanged PA-RISC or Alpha binary > > programs. > > While I agree that any migration to an other-endian environment > requires at a minimum exhaustive testing to ensure that there is no > endian-sensitive code in one's applications, In my experience, nearly every program is endian-sensitive, unless it has already been ported back and forth between big- and little-endian machines already. And it's some hassle to find declarations or methods that need changing, and some hassle to make those changes. > I would have thought that the ability to run a > process in either-endian mode on IA64 would make binary translation > possible - and 'just a recompile' migration possible as well if an IA64 > compiler that generates same-endian output code was available. > Assuming, again, that the OS was capable of handling either-endian > processes (possibly by stub translators). Yes, yes, and yes. It's possible to create an entirely big-endian environment on top of a little-endian machine, and vice versa. It's not even particularly inefficient; just requires inserting an XOR operation on addresses, and many of those can be folded at compile time or moved out of loops. But what sucks, is trying to have anything in that application environment talk to opposite-endian software outside that environment, including the OS.