diff options
author | 2014-12-11 15:24:42 +0800 | |
---|---|---|
committer | 2014-12-21 23:38:02 +0800 | |
commit | a10f729ef9f778f09d8e0995f43551b3990daae7 (patch) | |
tree | 15d91e8967f31deea4f2bc94fef25e0e1e982053 /wutil.cpp | |
parent | b9db5553430d8355bab48275727f685c7c42fa66 (diff) |
use configure to detect dirent.d_type
Diffstat (limited to 'wutil.cpp')
-rw-r--r-- | wutil.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -81,7 +81,7 @@ bool wreaddir_resolving(DIR *dir, const std::wstring &dir_path, std::wstring &ou /* We may be able to skip stat, if the readdir can tell us the file type directly */ bool check_with_stat = true; -#if defined(_DIRENT_HAVE_D_TYPE) || __APPLE__ +#ifdef HAVE_STRUCT_DIRENT_D_TYPE if (d->d_type == DT_DIR) { /* Known directory */ @@ -99,7 +99,7 @@ bool wreaddir_resolving(DIR *dir, const std::wstring &dir_path, std::wstring &ou is_dir = false; check_with_stat = false; } -#endif +#endif // HAVE_STRUCT_DIRENT_D_TYPE if (check_with_stat) { /* We couldn't determine the file type from the dirent; check by stat'ing it */ |