Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ptsfa!ihnp4!inuxc!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP Newsgroups: comp.lang.c Subject: Re: Function prototypes versus open() Message-ID: <749@bsu-cs.UUCP> Date: Tue, 9-Jun-87 20:18:11 EDT Article-I.D.: bsu-cs.749 Posted: Tue Jun 9 20:18:11 1987 Date-Received: Sat, 13-Jun-87 02:34:15 EDT References: <18346@ucbvax.BERKELEY.EDU> <8042@utzoo.UUCP> <2210@hoptoad.uucp> <514@haddock.UUCP> <20539@sun.uucp> <524@haddock.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 20 Summary: 4.2BSD open() does not have a variable number of parameters Re: Much discussion about how open() can break C code on an ANSI- compliant system if a function prototype is omitted. The original discussion arose because somebody said that AT&T's open() system call could take either 2 or 3 arguments, causing possible problems on systems that implemented function calls with a known argument count differently from function calls with a variable argument count. Somebody suggested that 4.2BSD code would break too. It should be noted that the 4.2BSD manual page for open(2), dated 2 July 1983, and the 4.3BSD manual page for open(2), dated May 14 1986, both clearly show that open() has three, and exactly three, parameters. The value of the third parameter is simply ignored in most cases, which is quite different from saying that the presence of the parameter is optional. AT&T's manual page for open(2), as supplied with Microport System V/AT, does show the third argument as being optional. -- Rahul Dhesi UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhesi