Project

General

Profile

Bug #13573 ยป ruby24-fgetattrlist.diff

takashiyoshi (Takashi Yoshi), 05/18/2017 07:23 PM

View differences:

dir.c 2017-05-18 20:49:54.000000000 +0200
#ifdef HAVE_GETATTRLIST
static int
#ifdef HAVE_FGETATTRLIST
is_case_sensitive(DIR *dirp)
#else
is_case_sensitive(const char *path)
#endif
{
struct {
u_int32_t length;
......
const int idx = VOL_CAPABILITIES_FORMAT;
const uint32_t mask = VOL_CAP_FMT_CASE_SENSITIVE;
#if defined HAVE_FGETATTRLIST
if (fgetattrlist(dirfd(dirp), &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW))
#elif defined HAVE_GETATTRLIST
if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW))
#endif
return -1;
if (!(cap->valid[idx] & mask))
return -1;
......
goto literally;
}
# endif
# ifdef HAVE_GETATTRLIST
# if defined HAVE_FGETATTRLIST || defined HAVE_GETATTRLIST
# ifdef HAVE_FGETATTRLIST
if (is_case_sensitive(dirp) == 0)
# else
if (is_case_sensitive(path) == 0)
# endif
flags |= FNM_CASEFOLD;
# endif
while ((dp = READDIR(dirp, enc)) != NULL) {
    (1-1/1)