off_t telldir(void *dir) { if (smbw_dirp(dir)) { return smbw_telldir(dir); } return real_telldir(dir); }
void *readdir(void *dir) { if (smbw_dirp(dir)) { return (void *)smbw_readdir(dir); } return (void *)real_readdir(dir); }
int closedir(void *dir) { if (smbw_dirp(dir)) { return smbw_closedir(dir); } return real_closedir(dir); }
int seekdir(void *dir, off_t offset) { if (smbw_dirp(dir)) { smbw_seekdir(dir, offset); return 0; } real_seekdir(dir, offset); return 0; }
long telldir(DIR *dir) { check_init("telldir"); if (smbw_dirp(dir)) { return (long) smbw_telldir(dir); } return (* smbw_libc.telldir)(dir); }
int closedir(DIR *dir) { check_init("closedir"); if (smbw_dirp(dir)) { return smbw_closedir(dir); } return (* smbw_libc.closedir)(dir); }
void seekdir(DIR *dir, long offset) { check_init("seekdir"); if (smbw_dirp(dir)) { smbw_seekdir(dir, (long long) offset); return; } (* smbw_libc.seekdir)(dir, offset); }
void *readdir64(void *dir) { if (smbw_dirp(dir)) { static double xx[70]; void *d; d = (void *)readdir(dir); if (!d) return NULL; dirent64_convert(d, xx); return xx; } return (void *)real_readdir64(dir); }
struct dirent *readdir(DIR *dir) { check_init("readdir"); if (smbw_dirp(dir)) { static struct dirent external; struct SMBW_dirent * internal = (void *)smbw_readdir(dir); if (internal != NULL) { dirent_convert(internal, &external); return &external; } return NULL; } return (* smbw_libc.readdir)(dir); }
int readdir64_r(DIR *dir, struct dirent64 *external, struct dirent64 **result) { check_init("readdir64_r"); if (smbw_dirp(dir)) { struct SMBW_dirent internal; int ret = smbw_readdir_r(dir, &internal, NULL); if (ret == 0) { dirent64_convert(&internal, external); *result = external; } return ret; } return (* smbw_libc.readdir64_r)(dir, external, result); }