Date: Tue, 3 Sep 1996 08:00:11 PDT From: "Marty Leisner" <leisner@sdsp.mc.xerox.com> To: M C Wong <mcw@hpato.aus.hp.com> Cc: questions@freebsd.org Subject: Re: conditionally optional parameter in C function declartion Message-ID: <9609031500.AA00633@gnu.mc.xerox.com> In-Reply-To: Your message of "Tue, 03 Sep 1996 08:38:59 PDT." <199609030039.AA027771143@hpcsos.col.hp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Hi, > Maybe I am being paranoia, but different systems have > different declaration for open(2): > > eg on HPUX: > #include <fcntl.h> > > int open( const char *path, int oflag, ... /* mode_t mode */); > > eg on FreeBSD: > int open(const char *path, int flags, mode_t mode) > > Which is more POSIX than another ? > > Neither...this is a problem (we can't specify "optional parameters", but varargs parameters). Maybe the best way is to use creat for three arg open, and open for two arg open...(don't give open a third arg). -- marty leisner@sdsp.mc.xerox.com Member of the League for Programming Freedom
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9609031500.AA00633>