Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.std.c Subject: Re: Prototypes (variable # of arguments) Message-ID: <1528@mcgill-vision.UUCP> Date: 10 May 89 09:35:54 GMT References: <2775@cps3xx.UUCP> <12864@haddock.ima.isc.com> Organization: McGill University, Montreal Lines: 19 In article <12864@haddock.ima.isc.com>, karl@haddock.ima.isc.com (Karl Heuer) writes: > In article <2775@cps3xx.UUCP> rang@cpswh.cps.msu.edu (Anton Rang) writes: >> I'm trying to do a prototype for BSD's "open" >> extern int open(char *, int, ...); > The prototype you gave is the best possible under the circumstances. > (Except that the first arg should be declared with "const".) Every BSD manpage for three-argument open() I've seen doesn't show the third argument as optional. (BSD not to be confused with, for example, Sun, which does show the third argument as optional.) You'll normally get away with omitting it (when not including O_CREAT), but that doesn't make it optional. Or is it supposed to be optional and the manpage is wrong? der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu