Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!jsq From: rfg@lupine.uucp (Ron Guilmette) Newsgroups: comp.std.unix Subject: Is there a standard prototype for `execvp'? Message-ID: <17501@cs.utexas.edu> Date: 30 Jan 91 01:54:04 GMT Sender: jsq@cs.utexas.edu Organization: Network Computing Devices, Inc., Mt. View, CA Lines: 49 Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman) X-Submissions: std-unix@uunet.uu.net Submitted-by: rfg@lupine.uucp (Ron Guilmette) It is somewhat dated now, but the only book I have about POSIX is copyright 1988. Reading that book, it seems that the POSIX committee didn't want to use ANSI C function prototypes for their specification of the C language binding because prototypes were too "new-fangled". Specifically, they apparently choose not to express the binding in terms of prototypes because: "... the Working Group was aware that some vendors would wish to implement POSIX in terms of a binding to an historical variant of the C language..." So in effect, it seems that the bindings given in the book I'm looking at are for "traditional C" (rather than ANSI C). In addition to avoiding prototypes, the POSIX folks also (apparently) decided to avoid the use of ANSI C type qualifiers (i.e. "const" and "volatile") in the C binding. Now even thought I don't really keep up on such things, I assume that some progress has been made since 1988. Is there now also an ANSI C binding for POSIX? If so, please tell me the exact name of *that* document so that I can go buy a copy. The thing that I most want to know at the moment is the "correct" (or "standard") prototype for the `execvp' function. The POSIX book I have here doesn't use any ANSI C type qualifiers at all, and so I have no idea what (if any) type qualifiers should be used to declare the types of the formal parameters for execvp. For example, my intuition tells me that a "proper" prototype for `execvp' should look like: extern int execvp (const char *, const char *const *); But somebody else disagrees with me. It seems that this sort of thing could be an important "standards" issue because many variants of UN*X operating systems are now shipping with fully prototyped system include files. Are they "POSIX-conformant" with respect to the qualifiers used to declare the types of their formals? How would one be able know one way or the other? Please excuse me if this has all been resolved long ago (and if my nearly total ignorance is showing). Volume-Number: Volume 22, Number 87