Commit Graph

1038 Commits

Author SHA1 Message Date
Andrey Semashev
b9a6648b93 Fixed a typo in the comment. 2019-04-16 12:17:05 +03:00
Andrey Semashev
192866fb0e Merge pull request #24 from muggenhor/wince-missing-current-directory
WinCE has no current directory
2019-04-16 12:16:19 +03:00
Andrey Semashev
28ccca4ef8 Fixed incorrect error_code returned from dir_it increment when readdir_r is used
readdir_r doesn't set errno, so the calling function must use the returned error
code to construct error_code. errno is not part of the Boost.Filesystem contract
anyway.
2019-04-16 11:38:54 +03:00
Andrey Semashev
1bcf925afc Merge pull request #106 from Mike-Devel/min_cmake
[CMake] Add minimal cmake support
2019-04-15 12:10:24 +03:00
Mike-Devel
8ae582a321 [CMake] Add missing private dependency on winapi 2019-04-15 10:49:27 +02:00
Andrey Semashev
cdc79612a1 Changed VS2013 images to VS2015 to work around bootstrap failures in Appveyor CI. 2019-04-15 11:48:40 +03:00
Andrey Semashev
5f74f5c594 Merge pull request #107 from Kojoley/patch-1
operations_test: Enable locale query on MinGW/Cygwin
2019-04-14 20:48:42 +03:00
Nikita Kniazev
a5c4b21988 operations_test: Enable locale query on MinGW/Cygwin
The `GetUserDefaultUILanguage` is available for a quite long time already (about 19 years for Cygwin, and 7-12 years for MinGW).
2019-04-02 15:29:13 +03:00
Mike Dev
0f8e3acd06 [CMake] Add minimal cmake support
- CMake file only supports add_subdirectory workflow.
- Compiles boost filesystem (without name mangling).
- Provides target Boost::filesystem to link against.
- Does NOT compile/run unit tests (yet) and
  doesn't support installation.
2019-03-08 16:08:42 +01:00
Andrey Semashev
e49775e8bb Merge pull request #105 from MarcelRaad/extra_semi
Fix -Wextra-semi clang warnings
boost-1.70.0.beta1 boost-1.70.0
2019-02-25 12:32:14 +03:00
Marcel Raad
1cf17855b2 Fix -Wextra-semi clang warnings
Remove superfluous semicola.
2019-02-25 10:26:56 +01:00
Andrey Semashev
b0a0fde650 Enabled multiple git fetch jobs while executing depinst in CI. Increased the number of jobs to 8. 2019-01-15 13:48:10 +03:00
Andrey Semashev
27256f9d55 Removed asynch-exceptions=on for MSVC. 2019-01-14 20:46:59 +03:00
Andrey Semashev
c0c93a0c58 Removed linking with Boost.System from docs and examples. 2019-01-14 20:40:06 +03:00
Andrey Semashev
2c1fa1a4a0 Removed linking with Boost.System.
Since Boost.System is now header-only, no need to depend on its library.

Fixes https://github.com/boostorg/filesystem/issues/98.
2019-01-14 20:08:41 +03:00
Andrey Semashev
bbe9d1771e Fixed possible use of uninitialized dirent::d_type in dir_iterator increment.
The readdir_r wrapper function used to leave d_type member uninitialized, which
it is after the buffer for the dirent structure is allocated on the iterator
construction. The wrapper now copies the d_type value from the dirent structure
obtained from readdir. Additionally, dir_itr_first now clears the allocated
buffer.
2019-01-09 16:58:51 +03:00
Andrey Semashev
31812f82c6 Use the actual number of logical CPUs for the number of CI build/test jobs. 2019-01-03 23:08:36 +03:00
Andrey Semashev
ccbdab82a1 Re-added manual checkout of libs/config in CI as Boost.Build depends on it. 2018-12-20 20:45:02 +03:00
Andrey Semashev
f0f77cfe73 Revert "Added an experimental partial CMakeLists.txt for dependency tracking in CMake projects."
This reverts commit 3c18ac362e.

Apparently, just adding include paths to user's CMake projects is not enough
for the original requester.

https://github.com/boostorg/atomic/pull/20#issuecomment-448345886
2018-12-18 23:02:52 +03:00
Andrey Semashev
4ee7e0f773 Use a separate submodule update step with parallel checkouts to speedup CI job startup. 2018-12-18 22:32:37 +03:00
Andrey Semashev
5889d32391 Added tools/boost_install and libs/headers manual checkout to CI jobs. 2018-12-18 21:56:14 +03:00
Andrey Semashev
3c18ac362e Added an experimental partial CMakeLists.txt for dependency tracking in CMake projects. 2018-12-18 19:41:59 +03:00
Andrey Semashev
015d414fca Fixed use of std::move in a constexpr condtructor. Formatting changes.
std::move is not constexpr in C++11, so we can't use it in a constexpr move
constructor. Also, directory_entry move constructor now uses move constructors
of its data members instead of assignment.

Done some formatting changes to make the code look a bit more unified.
2018-12-11 18:03:19 +03:00
Andrey Semashev
f6306bae0f Silence MSVC warning C4250 about overriding virtual functions from iostream base classes. 2018-12-09 18:43:40 +03:00
Andrey Semashev
4e639c353e Fixed compilation in C++03 mode caused by incorrect casts of scoped enums. 2018-12-09 17:10:22 +03:00
Andrey Semashev
3a90694383 Export dir_entry members instead of the class. Move rdit impl to the library.
This should silence MSVC warnings about path not being exported when used in
directory_entry. This should also remove unnecessary references to the library
for the inline members of directory_entry.

Removed library exports markup for file_status as there were nothing to export.
Also marked its methods constexpr.

Moved recursive_directory_iterator implementation to the library. MSVC should
not issue warnings since we're only exporting member functions.

Updated BOOST_SCOPED_ENUM emulation use to the more recent macros. Made sure
recursive_directory_iterator implementation uses binary compatible
representation for scoped enums between the library and user's code regardless
of C++ versions used.
2018-12-09 15:51:35 +03:00
Andrey Semashev
ed5f5aa080 Refactored current_path() and read_symlink(), corrected errno handling.
The current_path() and read_symlink() algorithms had the potential to cause
memory exhaustion as they were looping trying to allocate exponentially larger
buffers without limit. Now the common limit is defined to 16MiB, the library
will not accept larger paths from the system calls. This is mostly a precaution
against broken or maliciously tampered with filesystems. Also, the functions
will start with a larger stack-based buffer to avoid dynamic memory allocation
at all in the best case scenario.

Also, increased the size of the buffer used by copy_file().

Corrected errno uses in a few places and made sure errno is read before it could
be modified by any system calls made by the error handling machinery.
2018-12-09 14:22:54 +03:00
Andrey Semashev
a5dce21b60 Removed test log. 2018-12-09 01:30:50 +03:00
Andrey Semashev
1428b4f55c Changed the way path exports are declared. Some code cleanup.
Instead of exporting the whole path class, export only the functions that
are actually implemented in the shared library and leave the rest inline.
Also, move the definition of the static constants of the path class to
the header to avoid problems with exporting them from the shared library,
as observed with various MSVC versions and also gcc 7.3 from MinGW-w64.

Also, reduced code duplication and added a more efficient operator/
implementation when rvalue references are available.
2018-12-09 01:26:24 +03:00
Andrey Semashev
0405bf95e7 Added MinGW-w64 gcc 7.3 job. 2018-12-08 19:27:27 +03:00
Andrey Semashev
ab4806b7f6 Added a workaround for MSVC <= 12 linking bug because of multiple definitions of path static constants. 2018-11-25 01:16:14 +03:00
Andrey Semashev
0703e62a31 Fixed Boost.WinAPI namespace qualification. 2018-11-24 23:48:38 +03:00
Andrey Semashev
28d0a6b763 Improve compatibility with GetProcAddress on Windows CE.
Use Boost.WinAPI to work around Windows SDK differences with Windows CE.

Closes https://github.com/boostorg/filesystem/pull/23.
2018-11-24 21:34:10 +03:00
Andrey Semashev
6ffe7f09cc Updated status functions for directory_entry. 2018-11-24 21:33:56 +03:00
Andrey Semashev
1cfaf4839d Converted tabs to spaces in the Jamfile. 2018-11-24 21:26:14 +03:00
Andrey Semashev
f8a3d096f7 Merge pull request #78 from datadiode/develop
path.hpp: Unify coding style of path_traits::convert() calls
2018-11-24 21:06:09 +03:00
emmett-b
4731ce79de Added directory_entry overloads for status query functions 2018-11-24 20:52:12 +03:00
Andrey Semashev
8de281773f Added definitions for path static constants.
This fixes compilation if user's code attempts to ODR-use the constants.

Fixes https://svn.boost.org/trac10/ticket/12759.
Closes https://github.com/boostorg/filesystem/pull/40.
2018-11-24 20:34:44 +03:00
Andrey Semashev
613df5a93d Merge pull request #38 from jwilk-forks/spelling
Fix typos in documentation
2018-11-24 20:17:54 +03:00
Andrey Semashev
8c9bba511c More robust error handling in directory_iterator_increment. 2018-11-24 20:15:40 +03:00
Andrey Semashev
fe0e264cf6 Merge pull request #46 from programmerjake/develop
fix ISO9660 Joliet name and remove extraneous character
2018-11-24 19:57:14 +03:00
Andrey Semashev
5a70ced692 Reverted the previous change regarding warnings aboit slicing exceptions.
Apparently, slicing was intentional, and the test verified that it worked.
This commit restores the previous behavior and disables the gcc warning
instead.
2018-11-24 18:59:08 +03:00
Andrey Semashev
8e4a631231 Fixed termination on OOM in directory iterators. Added non-throwing rdit::pop().
When an out-of-memory condition is detected (either by catching std::bad_alloc
or by receiving null on memory allocation), do not propagate the exception and
set an appropriate error code instead. This fix only concerns directory_iterator
and recursive_directory_iterator for now; it is possible that other operations
remain not ready for memory allocation failures.

Also, added recursive_directory_iterator::pop() that returns error code instead
of throwing an exception. This overload is present in C++17.

Fixes https://github.com/boostorg/filesystem/issues/58.
Closes https://github.com/boostorg/filesystem/pull/63.
2018-11-24 18:36:54 +03:00
Andrey Semashev
e268f557df Trim trailing spaces in the tests. 2018-11-24 15:23:43 +03:00
Andrey Semashev
d710f5d9d9 Fixed warnings about slicing exceptions and ignoring std::system result. 2018-11-24 15:21:19 +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
Andrey Semashev
7dc1712f2d Fix compilation on QNX up to and including version 7.
Reportedly, QNX does not support fchmodat, although it may support it
in the future.

Fixes https://github.com/boostorg/filesystem/issues/89.
boost-1.69.0
2018-11-12 17:52:18 +03:00
Andrey Semashev
6f89f73d7e Added clang 7 CI job. boost-1.69.0-beta1 2018-11-01 20:26:11 +03:00
Andrey Semashev
0872f63031 Adde more directions to the readme file. 2018-11-01 16:46:17 +03:00
Andrey Semashev
26bf8bef94 Added a readme file. 2018-11-01 16:31:28 +03:00