_MD_ERRNO() = 0;
char * _MD_read_dir(_MDDir *d, PRIntn flags){struct dirent *de;int err;    for (;;) {        /*          * XXX: readdir() is not MT-safe. There is an MT-safe version          * readdir_r() on some systems.          */        de = readdir(d->d);        if (!de) {            err = _MD_ERRNO();            _PR_MD_MAP_READDIR_ERROR(err);            return 0;        }                if ((flags & PR_SKIP_DOT) &&            (de->d_name[0] == '.') && (de->d_name[1] == 0))            continue;        if ((flags & PR_SKIP_DOT_DOT) &&            (de->d_name[0] == '.') && (de->d_name[1] == '.') &&            (de->d_name[2] == 0))            continue;        if ((flags & PR_SKIP_HIDDEN) && (de->d_name[0] == '.'))            continue;        break;    }    return de->d_name;}