home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / std / c / 3053 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  2.2 KB

  1. Xref: sparky comp.std.c:3053 comp.std.misc:143
  2. Newsgroups: comp.std.c,comp.std.misc
  3. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
  4. From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
  5. Subject: Re: POSIX means *Binary* Compatibility ! NOT !
  6. Message-ID: <9232814.13793@mulga.cs.mu.OZ.AU>
  7. Followup-To: comp.std.misc
  8. Sender: news@cs.mu.OZ.AU
  9. Organization: Computer Science, University of Melbourne, Australia
  10. References: <rob.722278425@hp11>
  11. Date: Mon, 23 Nov 1992 03:25:40 GMT
  12. Lines: 37
  13.  
  14. rob@hp11 (Rob Freyder) writes:
  15.  
  16. >Just  had  a  conversation with a consultant regarding POSIX. According to
  17. >this  consultant  if  I  compile a POSIX program with a POSIX compiler the
  18. >resultant binary will run on any machine that supports the POSIX std. !
  19. >
  20. >I  found  this  very  amusing. For example if I compile on my SUN Sparc II
  21. >the  binary  can  be  copied  unmodified  to  my  HP 730 Snake box and run
  22. >unmodified !   Amazing story 31b !!!
  23.  
  24. Theoretically it's quite possible.
  25. Programs could be compiled to a standard bytecode format which would then
  26. be interpreted, or even compiled to machine code at load-time.
  27. Such files would be ``binary'', although they would not be machine code.
  28. So long as POSIX were to specify the standard format for these bytecode
  29. files, probably starting with something like
  30.     #!/bin/bytecode_int
  31. so that programs could be invoked without having to explicitly specify that
  32. they were to be interpreted, then things would work fine.
  33.  
  34. >Has anyone done this ?
  35.  
  36. I haven't done it with C programs, but I have done it with
  37. programs in other languages. Using a standard bytecode format,
  38. we achieved seamless portability from DOS to VAX to OS/2 to about a dozen
  39. different unix-based systems. Indeed, the interpreter for the bytecode
  40. was available for over 700 different machines. For a company with limited
  41. staff resources, this sort of seamless portability was invaluable.
  42.  
  43. On the other hand, I have not heard that POSIX was to include such a
  44. standard. Maybe you should double-check with your consultant? :-)
  45.  
  46. -- 
  47. Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  48. This .signature virus is a self-referential statement that is true - but 
  49. you will only be able to consistently believe it if you copy it to your own
  50. .signature file!
  51.