Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mimsy!oddjob!hao!ames!lll-lcc!lll-tis!ptsfa!hoptoad!gnu From: gnu@hoptoad.uucp (John Gilmore) Newsgroups: comp.lang.c Subject: Re: Function prototypes versus open() Message-ID: <2210@hoptoad.uucp> Date: Fri, 29-May-87 00:01:47 EDT Article-I.D.: hoptoad.2210 Posted: Fri May 29 00:01:47 1987 Date-Received: Sat, 30-May-87 10:07:26 EDT References: <18346@ucbvax.BERKELEY.EDU> <8042@utzoo.UUCP> Organization: Nebula Consultants in San Francisco Lines: 18 I think I've found a problem with the C standard. (greek chorus: It says that functions with variable numbers of "so what else arguments cannot be called unless a function is new?") prototype is in scope. The standard Unix open() call can take either two or three parameters, but you are not required to #include any header files to use it. Now, if you are using the third operand, you will be including to get O_CREAT, but if not, it seems to be perfectly acceptable to use a small integer constant as the second operand. It seems that if a compiler really believed the restriction in the draft standard, it would not be able to correctly compile many Unix programs which haven't heard of three operand open() or . -- Copyright 1987 John Gilmore; you may redistribute only if your recipients may. (This is an effort to bend Stargate to work with Usenet, not against it.) {sun,ptsfa,lll-crg,ihnp4,ucbvax}!hoptoad!gnu gnu@ingres.berkeley.edu