On 3/30/22 14:55, DJ Delorie via Libc-alpha wrote: > Copied from gnulib/lib/glob.c in order to fix rhbz 1982608 > > Used config.h instead of libc-config.h I don't see why this change is needed. This code is inside "#ifndef _LIBC" so this change should have no effect for glibc. And the change is harmful for Gnulib, since for this file Gnulib relies on including libc-config.h instead of plain config.h. > The #ifdef around #define dirfd() was changed to #undef due to > conflicts between glibc's internal and external definitions of > dirfd(). This has been reported to gnulib. I updated Gnulib to reflect this change; see first attached patch. That being said, I don't fully understand it. Wouldn't it be more efficient for glibc glob to use glibc's internal dirfd by whatever name you prefer? Anyway, the only difference between what you proposed for glibc and current Gnulib glob is the second attached patch; could you please merge that into your proposal? That way, the two glob.c files can be identical, which is a good thing. Thanks for following up on this.