home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.22 / text0094.txt < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.9 KB  |  55 lines

  1. Submitted-by: donn@hpfcrn.fc.hp.com (Donn Terry)
  2.  
  3. >Submitted-by: rfg@lupine.uucp (Ron Guilmette)
  4.  
  5. >Reading that book, it seems that the POSIX committee didn't want to
  6. >use ANSI C function prototypes for their specification of the C language
  7. >binding because prototypes were too "new-fangled".  Specifically, they
  8. >apparently choose not to express the binding in terms of prototypes because:
  9.  
  10. >    "... the Working Group was aware that some vendors would wish
  11. >    to implement POSIX in terms of a binding to an historical
  12. >    variant of the C language..."
  13.  
  14. That was appropriate at the time.  The -1990 version uses ANSI C
  15. prototypes (now that ANSI C is approved, and implementations are
  16. available).  
  17.  
  18. >In addition to avoiding prototypes, the POSIX folks also (apparently)
  19. >decided to avoid the use of ANSI C type qualifiers (i.e. "const" and
  20. >"volatile") in the C binding.
  21.  
  22. Avoided for the same reasons.
  23.  
  24. >Now even thought I don't really keep up on such things, I assume that
  25. >some progress has been made since 1988.  Is there now also an ANSI C
  26. >binding for POSIX?  If so, please tell me the exact name of *that*
  27. >document so that I can go buy a copy.
  28.  
  29. Specifically IEEE Std. 1003.1-1990
  30. a.k.a. ISO/IEC JTC-1 IS 9945-1:1990
  31. (Available from IEEE at the same place you got your -1988 version.)
  32.  
  33. >For example, my intuition tells me that a "proper" prototype for `execvp'
  34. >should look like:
  35.  
  36. >    extern int execvp (const char *, const char *const *);
  37.  
  38. The new standard has the declaration as:
  39.  
  40.     int execvp (const char *file, char *const argv[]);
  41.  
  42. It was generally agreed during balloting that what really was wanted
  43. was "const char * const argv[]".  However, ANSI C disagrees: that's
  44. a syntax error!
  45.  
  46. (There's a bunch of rationale about why the specific declaration was
  47. chosen, I won't repeat it here, but the bottom line is that given
  48. that you can't have both const's, this is the best choice remaining.)
  49.  
  50. Donn Terry
  51. Speaking only for myself.
  52.  
  53. Volume-Number: Volume 22, Number 98
  54.  
  55.