/* We put this in a separate function mainly to allow the memory
allocated with alloca to be recycled. */
/* We put this in a separate function mainly to allow the memory
allocated with alloca to be recycled. */
static int
__attribute_noinline__
link_exists2_p (const char *dir, size_t dirlen, const char *fname,
static int
__attribute_noinline__
link_exists2_p (const char *dir, size_t dirlen, const char *fname,
mempcpy (mempcpy (mempcpy (fullname, dir, dirlen), "/", 1),
fname, fnamelen + 1);
mempcpy (mempcpy (mempcpy (fullname, dir, dirlen), "/", 1),
fname, fnamelen + 1);
link_exists_p (int dfd, const char *dir, size_t dirlen, const char *fname,
glob_t *pglob, int flags)
{
link_exists_p (int dfd, const char *dir, size_t dirlen, const char *fname,
glob_t *pglob, int flags)
{
if (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0))
return link_exists2_p (dir, dirlen, fname, pglob);
else
if (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0))
return link_exists2_p (dir, dirlen, fname, pglob);
else
struct_stat64 st64;
return __fxstatat64 (_STAT_VER, dfd, fname, &st64, 0) == 0;
}
struct_stat64 st64;
return __fxstatat64 (_STAT_VER, dfd, fname, &st64, 0) == 0;
}