🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2983

Re: POSIX means *Binary* Compatibility ! NOT !

#2983
From: Fergus James HENDERSON
Date: Mon, 23 Nov 1992 03:25
37 lines
2273 bytes
rob@hp11 (Rob Freyder) writes:

>Just  had  a  conversation with a consultant regarding POSIX. According to
>this  consultant  if  I  compile a POSIX program with a POSIX compiler the
>resultant binary will run on any machine that supports the POSIX std. !
>
>I  found  this  very  amusing. For example if I compile on my SUN Sparc II
>the  binary  can  be  copied  unmodified  to  my  HP 730 Snake box and run
>unmodified !   Amazing story 31b !!!

Theoretically it's quite possible.
Programs could be compiled to a standard bytecode format which would then
be interpreted, or even compiled to machine code at load-time.
Such files would be ``binary'', although they would not be machine code.
So long as POSIX were to specify the standard format for these bytecode
files, probably starting with something like
	#!/bin/bytecode_int
so that programs could be invoked without having to explicitly specify that
they were to be interpreted, then things would work fine.

>Has anyone done this ?

I haven't done it with C programs, but I have done it with
programs in other languages. Using a standard bytecode format,
we achieved seamless portability from DOS to VAX to OS/2 to about a dozen
different unix-based systems. Indeed, the interpreter for the bytecode
was available for over 700 different machines. For a company with limited
staff resources, this sort of seamless portability was invaluable.

On the other hand, I have not heard that POSIX was to include such a
standard. Maybe you should double-check with your consultant? :-)

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature virus is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
Technical Details
Message-ID: <9232814.13793@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
References: <rob.722278425@hp11>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c,comp.std.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: POSIX means *Binary* Compatibility ! NOT !
Message-ID: <9232814.13793@mulga.cs.mu.OZ.AU>
Followup-To: comp.std.misc
Sender: news@cs.mu.OZ.AU
Organization: Computer Science, University of Melbourne, Australia
References: <rob.722278425@hp11>
Date: Mon, 23 Nov 1992 03:25:40 GMT
Lines: 37