summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-11-10 15:33:39 -0800
committerElliott Hughes <enh@google.com>2014-11-10 15:33:39 -0800
commit07793e18801bcc5ae3b6e4b3e8131aa22c4ad0b9 (patch)
tree947344d63dae478e46a6e781721946307e3c0ad4 /tools
parent1036850f8f8607f4d2898fcc73abb1fff23570d6 (diff)
downloadbuild-07793e18801bcc5ae3b6e4b3e8131aa22c4ad0b9.zip
build-07793e18801bcc5ae3b6e4b3e8131aa22c4ad0b9.tar.gz
build-07793e18801bcc5ae3b6e4b3e8131aa22c4ad0b9.tar.bz2
Remove HAVE_DIRENT_D_TYPE.
Only Windows doesn't have it, and we don't build atree for Windows. Change-Id: Ib6e96be73340c36cdfcb3654ed540f690bf7550b
Diffstat (limited to 'tools')
-rw-r--r--tools/atree/files.cpp9
-rw-r--r--tools/atree/fs.cpp7
2 files changed, 1 insertions, 15 deletions
diff --git a/tools/atree/files.cpp b/tools/atree/files.cpp
index df3e987..d945f58 100644
--- a/tools/atree/files.cpp
+++ b/tools/atree/files.cpp
@@ -447,14 +447,7 @@ list_dir(const string& path, const FileRecord& rec,
continue;
}
string entry = path_append(path, ent->d_name);
-#ifdef HAVE_DIRENT_D_TYPE
- bool is_directory = (ent->d_type == DT_DIR);
-#else
- // If dirent.d_type is missing, then use stat instead
- struct stat stat_buf;
- stat(entry.c_str(), &stat_buf);
- bool is_directory = S_ISDIR(stat_buf.st_mode);
-#endif
+ bool is_directory = (ent->d_type == DT_DIR);
add_more(entry, is_directory, rec, more);
if (is_directory) {
dirs.push_back(entry);
diff --git a/tools/atree/fs.cpp b/tools/atree/fs.cpp
index 9468cfd..6cd080e 100644
--- a/tools/atree/fs.cpp
+++ b/tools/atree/fs.cpp
@@ -63,14 +63,7 @@ remove_recursively(const string& path)
string full = path;
full += '/';
full += ent->d_name;
-#ifdef HAVE_DIRENT_D_TYPE
bool is_directory = (ent->d_type == DT_DIR);
-#else
- // If dirent.d_type is missing, then use stat instead
- struct stat stat_buf;
- stat(full.c_str(), &stat_buf);
- bool is_directory = S_ISDIR(stat_buf.st_mode);
-#endif
if (is_directory) {
dirs.push_back(full);
} else {