Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Martin Knoblauch <Martin.Knoblauch@TeraPort.de>
Subject: Re: Tru64 .vs. HP-UX  (was: Compaq's Secret VMS Plans (The Inquirer))
Date: Thu, 29 Nov 2001 10:54:31 +0100	[thread overview]
Message-ID: <3C0605D7.5B093182@TeraPort.de> (raw)
In-Reply-To: Q6jN7.54684$RG1.29896820@news1.rdc1.sfba.home.com

Duane Sand wrote:
> 
> 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

 true for the OS, but not [neccessarily] true for runtime support. The
OS of course does not know the internals of a binary input file. The RTL
may very well know. The DEC/COMPAQ Frotran compiler has support for
reading/writing binary files both ways. I think it can even convert more
exotic stuff like the old VAX formats. But of course, the RTL "knows"
what to expect when it comes to a binary read.

> 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.
>

 The system doesn't, but the RTL may very well know. See above.
 
> 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).
>

 shoot. I should have read further :-)

> 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.)
>

 But in that case, the program was not [trivially] portable from the
beginning. I mean, next you will ask that you can read absolute pointer
values from a binary file :-))
 
Martin
-- 
------------------------------------------------------------------
Martin Knoblauch         |    email:  Martin.Knoblauch@TeraPort.de
TeraPort GmbH            |    Phone:  +49-89-510857-309
C+ITS                    |    Fax:    +49-89-510857-111
http://www.teraport.de   |    Mobile: +49-170-4904759


  reply	other threads:[~2001-11-29  9:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0033000042788869000002L092*@MHS>
     [not found] ` <91666EA00warrenspencer1977@207.126.101.97>
     [not found]   ` <D4PM7.70514$uB.11455648@bin3.nnrp.aus1.giganews.com>
     [not found]     ` <91668821Cwarrenspencer1977@207.126.101.97>
2001-11-27 19:00       ` Compaq's Secret VMS Plans (The Inquirer) Bill Todd
2001-11-28  1:52         ` John McNulty
2001-11-28  6:33         ` Bob Marcan
2001-11-28 14:43           ` Terry C. Shannon
2001-11-28  7:53         ` John McLean
2001-11-28 13:52           ` Tru64 .vs. HP-UX (was: Compaq's Secret VMS Plans (The Inquirer)) John McNulty
2001-11-28 14:33             ` Bob Koehler
2001-11-28 14:46             ` Terry C. Shannon
2001-11-29  7:54               ` Jack Patteeuw
2001-11-28 16:34             ` JF Mezei
2001-11-28 16:45               ` John F Carr
2001-11-28 16:49               ` david20
2001-11-28 17:20               ` Duane Sand
2001-11-28 22:04                 ` Bill Todd
2001-11-28 22:59                   ` Milton
2001-11-29  5:26                     ` Duane Sand
2001-11-29 11:55                       ` Larry Kilgallen
2001-11-29  4:48                   ` Duane Sand
2001-11-29  9:54                     ` Martin Knoblauch [this message]
2001-11-29  5:06                 ` Vance R. Haemmerle
2001-11-29  5:11                   ` Vance R. Haemmerle
2001-11-30 21:56                     ` The new Sun server, more Digital knock-offs Marty Kuhrt
2001-12-01 13:57                 ` Tru64 .vs. HP-UX (was: Compaq's Secret VMS Plans (The Inquirer)) Peter da Silva
2001-12-01 13:53               ` Peter da Silva
2001-12-01 17:05                 ` Bill Todd
2001-12-01 20:13                   ` Peter da Silva
2001-12-01 20:46                     ` Bill Todd
2001-12-03 14:04                 ` Bob Koehler
2001-12-04  3:52                   ` David J. Dachtera
2001-12-04 13:32                     ` Bob Koehler
2001-12-01 16:50               ` Linux? (was: Tru64 .vs. HP-UX) Mike Coleman
2001-12-01 17:11                 ` Tobias Ernst
2001-12-01 19:33                   ` Mike Coleman
2001-12-02  8:10                   ` Adam Price
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