Commit Graph

7 Commits

Author SHA1 Message Date
Andrey Semashev
c03249c375 Reformatted code for more consistent look and better readability. 2021-04-24 22:37:57 +03:00
Andrey Semashev
1104092053 Extracted platform defines to a separate header and include it everywhere.
This should fix readdir(_r) on 32-bit systems, which was not 64-bit after
commit c758552338 because _FILE_OFFSET_BITS=64
was not defined in directory.cpp. Also, there were filesystem-related system
calls in unique_path.cpp, where the macro was not defined either. Including
the platform header in all source files is useful for possible future changes
that may require the platform-specific macros.

Closes https://github.com/boostorg/filesystem/pull/150.
2020-07-02 13:37:45 +03:00
Andrey Semashev
f4769bd4c7 Extracted file_status and error handling helpers to separate headers.
This simplifies maintenance of the operations.hpp/cpp files.

Also, moved BOOST_FILESYSTEM_SOURCE definition to the build system files
instead of defining it in every source file.
2019-07-31 23:12:56 +03:00
Andrey Semashev
498a090b53 Added support for movability to directory iterators, code cleanup.
Switched directory_iterator and recursive_directory_iterator to use
intrusive_ptr internally to reduce the iterator size and avoid virtual
function calls. The iterators now support move semantics. Fixed a warning
about deprecated in C++20 implicit generation of copy constructor and
assignment operator if there is a user-defined destructor.

Also updated a few includes to refer to non-deprecated headers. Trimmed
trailing spaces in headers and sources.
2018-11-24 15:06:01 +03:00
Beman
490c2c3298 For all path_traits convert() and dispatch() functions provide two overloads, one with a "const codecvt_type&" argument, and one without. The overload without a codecvt argument calls path::codecvt() iff a conversion actually needs to be performed. Change all uses of path_traits convert() and dispatch() functions call the appropriate overload, rather than calling with path::codecvt() as a default. This limits the impact of locale("") initialization failures on Linux and other non-BSD POSIX systems to programs that actually depend on locale(""). It further ensures that exceptions thrown as a result of such failures occur after main() has started, and so can be caught. 2014-10-27 19:20:17 -04:00
Beman Dawes
7941871477 Filesystem - Delete v3 directories no longer needed. Cleanup links, namespaces, and other residue from dual v2/v3 support.
[SVN r77555]
2012-03-26 12:44:24 +00:00
Beman Dawes
16099b4c7d Filesystem - Move V3 files and directories into place
[SVN r77554]
2012-03-26 12:31:06 +00:00