diff options
author | lloyd <[email protected]> | 2007-12-24 20:54:30 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-12-24 20:54:30 +0000 |
commit | 769e503fd8e4cf0f3072e04afffb61db5b48d777 (patch) | |
tree | b5d5c5e88bcfa0c3790571c82cde222bec1addb3 /modules/es_ftw/es_ftw.cpp | |
parent | cf2f188f4ad96abb26400e2dc62e2012826d10e7 (diff) |
Qualify (some) calls to functions in the global namespace using an
explicit :: (it is unfortunate that there is no good way to detect all
of such calls in an automated manner). Also use new-style casts in parts
of the zlib code.
Diffstat (limited to 'modules/es_ftw/es_ftw.cpp')
-rw-r--r-- | modules/es_ftw/es_ftw.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/es_ftw/es_ftw.cpp b/modules/es_ftw/es_ftw.cpp index 412a95f57..63531eb53 100644 --- a/modules/es_ftw/es_ftw.cpp +++ b/modules/es_ftw/es_ftw.cpp @@ -56,32 +56,32 @@ void FTW_EntropySource::gather_from_dir(const std::string& dirname) if(dirname == "" || files_read >= max_read) return; - DIR* dir = opendir(dirname.c_str()); + DIR* dir = ::opendir(dirname.c_str()); if(dir == 0) return; std::vector<std::string> subdirs; - dirent* entry = readdir(dir); + dirent* entry = ::readdir(dir); while(entry && (files_read < max_read)) { if((std::strcmp(entry->d_name, ".") == 0) || (std::strcmp(entry->d_name, "..") == 0)) - { entry = readdir(dir); continue; } + { entry = ::readdir(dir); continue; } const std::string filename = dirname + '/' + entry->d_name; - struct stat stat_buf; - if(lstat(filename.c_str(), &stat_buf) == -1) - { entry = readdir(dir); continue; } + struct ::stat stat_buf; + if(::lstat(filename.c_str(), &stat_buf) == -1) + { entry = ::readdir(dir); continue; } if(S_ISREG(stat_buf.st_mode)) gather_from_file(filename); else if(S_ISDIR(stat_buf.st_mode)) subdirs.push_back(filename); - entry = readdir(dir); + entry = ::readdir(dir); } - closedir(dir); + ::closedir(dir); for(u32bit j = 0; j != subdirs.size(); j++) gather_from_dir(subdirs[j]); @@ -98,7 +98,7 @@ void FTW_EntropySource::gather_from_file(const std::string& filename) SecureVector<byte> read_buf(1024); ssize_t got = ::read(fd, read_buf.begin(), read_buf.size()); - close(fd); + ::close(fd); if(got > 0) { |