From: xyzzy AT snafu DOT fubar (Roger) Newsgroups: comp.os.msdos.djgpp Subject: Re: access() in DJGPP and TC/BC Date: Fri, 23 Jan 1998 18:19:29 GMT Message-ID: <34c86442.2868782@news.dircon.co.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 194.112.52.20 Lines: 18 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Thu, 22 Jan 1998 18:44:34 +0200 (IST), Eli Zaretskii wrote: > On Unix, `access' doesn't predict well the actual >accessability of files, since it doesn't use the effective user id >(it's a long story). This makes `access' very non-portable. In >addition, it is very expensive on some systems. > >For those reasons, I would suggest to avoid `access' altogether and >use `stat' instead. `stat' is POSIX and is therefore much more >portable, even to DOS compilers such as TC. I have open in front of me "POSIX Programmer's Guide" page 213 which describes access(). Is the book is wrong? access() and stat() are equally valid on a POSIX system. -- Roger