Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Parameter mismatch legality question Message-ID: <14502@smoke.brl.mil> Date: 17 Nov 90 14:04:27 GMT References: <1990Nov15.224353.155@mozart.amd.com> <14486@smoke.brl.mil> <1990Nov16.212511.13166@mozart.amd.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 15 In article <1990Nov16.212511.13166@mozart.amd.com> tim@amd.com (Tim Olson) writes: >I like that answer, but what about, say the UNIX "open" library call, >which has the optional "mode" parameter used this way... Originally, open() has exactly two arguments of fixed types, but USG decided to make it variadic when they added O_CREAT. I doubt very much that they worried at all about the non-portable aspects of such an interface. They're also the ones who made the USG 4.0/5.0 IPC functions return (pointer_type)-1 instead of null pointers as failure indicators. IEEE 1003.1 decided that open() had to be officially variadic, i.e. extern int open( const char *path, int flags, ... ); Since this requires ANSI C support, you're best off if you let declare open() for you.