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

  1. Submitted-by: rfg@lupine.uucp (Ron Guilmette)
  2.  
  3. It is somewhat dated now, but the only book I have about POSIX is
  4. copyright 1988.
  5.  
  6. Reading that book, it seems that the POSIX committee didn't want to
  7. use ANSI C function prototypes for their specification of the C language
  8. binding because prototypes were too "new-fangled".  Specifically, they
  9. apparently choose not to express the binding in terms of prototypes because:
  10.  
  11.     "... the Working Group was aware that some vendors would wish
  12.     to implement POSIX in terms of a binding to an historical
  13.     variant of the C language..."
  14.  
  15. So in effect, it seems that the bindings given in the book I'm looking
  16. at are for "traditional C" (rather than ANSI C).
  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. Now even thought I don't really keep up on such things, I assume that
  23. some progress has been made since 1988.  Is there now also an ANSI C
  24. binding for POSIX?  If so, please tell me the exact name of *that*
  25. document so that I can go buy a copy.
  26.  
  27. The thing that I most want to know at the moment is the "correct" (or
  28. "standard") prototype for the `execvp' function.  The POSIX book I have
  29. here doesn't use any ANSI C type qualifiers at all, and so I have no
  30. idea what (if any) type qualifiers should be used to declare the types
  31. of the formal parameters for execvp.
  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. But somebody else disagrees with me.
  39.  
  40. It seems that this sort of thing could be an important "standards" issue
  41. because many variants of UN*X operating systems are now shipping with fully
  42. prototyped system include files.  Are they "POSIX-conformant" with respect
  43. to the qualifiers used to declare the types of their formals?  How would
  44. one be able know one way or the other?
  45.  
  46. Please excuse me if this has all been resolved long ago (and if my nearly
  47. total ignorance is showing).
  48.  
  49. Volume-Number: Volume 22, Number 87
  50.  
  51.