Date: Sun, 23 Aug 1998 17:23:56 +0300 (IDT) From: Eli Zaretskii To: DJ Delorie cc: djgpp-workers AT delorie DOT com, Franz Zimmer Subject: Re: [zimmer AT dpk DOT berlin DOT fido DOT de: djdev202/djlsr202 from 26.jul.98] In-Reply-To: <199808201402.KAA13999@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 20 Aug 1998, DJ Delorie wrote: > I found a strange behaviour of the stat-function. > If the named file is missing, i get the error-code ENFILE instead of ENOENT. > Maybe this ist located in the transformation-table from dos-error to errno. > If findfirst/findnext fail, the resulting dos-error-code is 12h, which will be > remapped to the errno-value ENFILE :-( The bug is in src/libc/dos/errno/doserr2e.c: error code 12h should be converted to ENMFILE, not ENFILE. Note that it is okay for findfirst/findnext to return ENMFILE when all the files are exhausted.