delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/07/02:16:29

Date: Mon, 7 May 2001 09:18:02 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
cc: djgpp-workers AT delorie DOT com
Subject: Re: ANNOUNCE: Fileutils 4.0 beta 2
In-Reply-To: <3AF5D99A.5CA13EFD@phekda.freeserve.co.uk>
Message-ID: <Pine.SUN.3.91.1010507091745.19812H@is>
MIME-Version: 1.0
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

On Mon, 7 May 2001, Richard Dawe wrote:

> >   C:\> ls a:
> >   c:/djgpp/bin/ls: a:: No more files (ENMFILE)
> > 
> > `ls' from Fileutils 3.16 would simply print nothing in this case,
> > which is what I'd expect.
> 
> Are you using 2.03-compiled Fileutils 3.16? I get a similar behaviour from
> 'ls' from the latest release of Fileutils 3.16 on the DJGPP archive:

It's possible I used the old binaries compiled with v2.01.  That was
at home, so I will not be able to check until later today.

> Debugging libc I see that rewinddir() calls __set_need_fake_dot_dotdot().
> __set_need_fake_dot_dotdot() calls findfirst(). On a floppy with no files
> findfirst() fails, returing ENOENT. Hence __set_need_fake_dot_dotdot()
> sets errno. It seems to me that it should not set errno.

I think it should know about ENOENT and ENMFILE, and if that's what
errno gets after findfirst, __set_need_fake_dot_dotdot should restore
the previous value of errno.  But if findfirst comes with some other
errno, like EACCES, it should let it be.

If this turns to be the solution, please put the modifed library
sources into the djgpp subdirectory, and add the appropriate text to
the README, so that people could build binaries without bugs.

Thanks for debugging this.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019