bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "*** INTERNAL: readdir: Invalid argument" error


From: Eli Zaretskii
Subject: Re: "*** INTERNAL: readdir: Invalid argument" error
Date: Wed, 15 May 2013 18:41:39 +0300

> Date: Wed, 15 May 2013 08:07:55 -0700
> From: David Boyce <address@hidden>
> Cc: Paul Smith <address@hidden>, bug-make <address@hidden>
> 
> On Wed, May 15, 2013 at 7:54 AM, Eli Zaretskii <address@hidden> wrote:
> 
> >  because of the need to convert the file names from UTF-16 to
> > something the rest of the code can grok.
> 
> Well, if I understand correctly there's no need to actually grok the
> UTF-16 filenames, just to get past them with a more graceful failure
> condition, and I was hoping these other APIs would fail differently.

The Unicode APIs won't fail.  But we will have to loop over each file
name they return, converting it to the current codepage, before the
file names could be used.  That sounds excessive.

> > In any case, there's no reason to use any of this just to check
> > whether a file by a specific name exists in a directory.
> 
> Are you saying you'd just walk along PATH doing a stat() or access()
> or equivalent on <dir>/sh.exe?

Exactly.  Right now, the code already walks along PATH, and constructs
<dir>/sh.exe, but instead of calling 'stat' or 'access', it calls
'file_exists_p', and the side effect of that is that Make reads the
entire directory <dir> into its internal storage, hashes it, etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]