_MD_ERRNO() = 0;
_MD_read_dir (_MDDir *md, PRIntn flags){struct dirent *de;int err;	for (;;) {		/*		 * XXX: readdir() is not MT-safe		 */		de = readdir(md->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[1] == '.'))			continue;		break;	}	return de->d_name;}