Date: Wed, 19 Mar 2003 17:47:25 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: rich AT phekda DOT freeserve DOT co DOT uk Message-Id: <7458-Wed19Mar2003174724+0200-eliz@elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: (rich AT phekda DOT freeserve DOT co DOT uk) Subject: Re: fchdir, revision 2 [PATCH] References: Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Wed, 19 Mar 2003 12:46:02 +0000 > From: "Richard Dawe" > > Here's revision 2 of the patch to add fchdir support to DJGPP. > I'm pretty happy with this version. The C stream I/O functions > should now work on directories. Well, they don't do anything weird > on directories. They should behave in a similar way to the POSIX I/O > functions - reads & writes fail, seeks are ignored. > > OK to commit? Fine with me, but I have one question. In the following snippet from fstat: > + /* See if this is a file descriptor for a directory. If so, just > + * use a normal stat call. */ > + if (__get_fd_flags(handle) & FILE_DESC_DIRECTORY) > + { > + const char *filename = __get_fd_name(handle); > + > + if (filename) > + return stat(filename, statbuf); should we call `stat' or `lstat'?