Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved directory tools to separate files. Reworked readdir_r support.
Directory iteration components were moved to separate files to simplify maintenance of operations.hpp/cpp. directory_iterator implementation on POSIX platforms has been reworked to only allocate internal buffer when readdir_r is used. When readdir is used, the dirent structure returned by readdir is used directly, which eliminates the potential of buffer overrun in case if some directory name exceeds the buffer size. This also removes the need to copy dirent members into the buffer, which improves performance and simplifies maintenance. For buffer size we now use the max path size as opposed to max filename size. This is done to minimize the possibility of buffer overruns when readdir_r is used. On Windows, use Boost.WinAPI to configure the default target Windows version. This removes WINVER and _WIN32_WINNT defines in Boost.Filesystem as these macros should be defined by Boost.WinAPI now. Additionally, exception.hpp and directory.hpp includes in operations.hpp are marked as deprecated as operations.hpp do not need those components. Users are encouraged to include the new headers explicitly in their code, as needed.
- Loading branch information