[bug #52018] suggestion: test case for glob with dangling symlink

2017-09-24 Thread Paul Eggert
Follow-up Comment #4, bug #52018 (project make): You'd have to run bleeding-edge-from-git glibc to get the new behavior, or copy glob.c from bleeding-edge Gnulib and use that instead of glibc glob. The new implementation will use gl_lstat when testing for existence, and will use gl_stat only

Re: [PATCH] Do not assume glibc glob internals

2017-09-24 Thread Paul Eggert
Paul Smith wrote: I can't answer your question, but the previous version of this function didn't do anything special with a "foo/" path, so if it doesn't work here it didn't work there either...? Now I *know* I should have kept my mouth shut. :-) Sorry, I'm lost here, partly because I don't

[bug #52076] wildcard/glob should be sorted

2017-09-24 Thread Bernhard M.
Follow-up Comment #11, bug #52076 (project make): Over the last months I pushed dozens of patches to various upstream projects e.g. [1] so that they use $(sort $(wildcard but it is a lot of effort and it would never stop, because people keep creating new code and new Makefiles. Because (for

Re: [PATCH] Do not assume glibc glob internals

2017-09-24 Thread Paul Smith
On Sun, 2017-09-24 at 11:29 -0700, Paul Eggert wrote: > Paul Smith wrote: > > +  size_t plen = strlen (path); > > + > > +  /* If path ends in /. make sure it is a directory.  This is because > > + 'lstat' on Windows normalizes the argument foo/. => foo without > > + 

Re: [PATCH] Do not assume glibc glob internals

2017-09-24 Thread Paul Eggert
Paul Smith wrote: +  size_t plen = strlen (path); + +  /* If path ends in /. make sure it is a directory.  This is because + 'lstat' on Windows normalizes the argument foo/. => foo without + checking first that foo is a directory.  */ +  if (plen > 1 && path[plen - 1]

Re: [PATCH] Do not assume glibc glob internals

2017-09-24 Thread Paul Smith
On Sun, 2017-09-24 at 09:16 -0400, Paul Smith wrote: > On Sat, 2017-09-23 at 23:27 -0700, Paul Eggert wrote: > > Yes, that sounds right. I copied that boilerplate from local_stat, so > > local_stat > > could be simplified too. > > This is what I applied.  Thanks! Actually, using lstat() on

[bug #52076] wildcard/glob should be sorted

2017-09-24 Thread Paul D. Smith
Follow-up Comment #10, bug #52076 (project make): The test attached here is not a good one: since you create files in the directory such that they're mostly ordered already, the sort operation doesn't need to do much work. However, I created my own test using uuidgen to create files named with

[bug #52018] suggestion: test case for glob with dangling symlink

2017-09-24 Thread Paul D. Smith
Follow-up Comment #3, bug #52018 (project make): Hm, well, I don't have a newer glibc and I don't know how the newer glob will utilize the gl_lstat element, so I don't know exactly what the test needs to do in order to stress this. Do I just need to get the wildcard function to expand a symlink

Re: [PATCH v2 0/6] Miscellaneous speedup patches

2017-09-24 Thread Paolo Bonzini
> I'll need to think about the hash patches: the hash implementation in > GNU make is taken pretty straightforwardly from id-utils. If we start > to modify it significantly here we'd be cutting that relationship. That > may be OK, but I'd need to think about it. Maybe you want to backport those

Re: [PATCH] Do not assume glibc glob internals

2017-09-24 Thread Paul Eggert
Paul Smith wrote: Thanks for this patch, Paul. One question: On Sun, 2017-09-10 at 09:40 -0700, Paul Eggert wrote: +  /* Make sure the parent of "." exists and is a directory, not a + file.  This is because 'lstat' on Windows normalizes the argument + foo/. => foo without checking