diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/files.h | 3 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/vcpkgcmdarguments.h | 4 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/versiont.h | 13 |
3 files changed, 14 insertions, 6 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 68ef2dbcd..a202bfdef 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -190,6 +190,9 @@ namespace vcpkg::Files virtual void current_path(const fs::path& path, std::error_code&) = 0; void current_path(const fs::path& path, LineInfo li); + // waits forever for the file lock + virtual fs::SystemHandle take_exclusive_file_lock(const fs::path& path, std::error_code&) = 0; + // waits, at most, 1.5 seconds, for the file lock virtual fs::SystemHandle try_take_exclusive_file_lock(const fs::path& path, std::error_code&) = 0; virtual void unlock_file_lock(fs::SystemHandle handle, std::error_code&) = 0; diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index 0ab5917b5..bcbf10619 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -149,6 +149,9 @@ namespace vcpkg constexpr static StringLiteral PRINT_METRICS_SWITCH = "printmetrics"; Optional<bool> print_metrics = nullopt; + constexpr static StringLiteral WAIT_FOR_LOCK_SWITCH = "x-wait-for-lock"; + Optional<bool> wait_for_lock = nullopt; + // feature flags constexpr static StringLiteral FEATURE_FLAGS_ENV = "VCPKG_FEATURE_FLAGS"; constexpr static StringLiteral FEATURE_FLAGS_ARG = "feature-flags"; @@ -175,6 +178,7 @@ namespace vcpkg void check_feature_flag_consistency() const; + void debug_print_feature_flags() const; void track_feature_flag_metrics() const; private: diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h index e893f1abc..768ca0c47 100644 --- a/toolsrc/include/vcpkg/versiont.h +++ b/toolsrc/include/vcpkg/versiont.h @@ -6,18 +6,19 @@ namespace vcpkg struct VersionT { VersionT() noexcept; - VersionT(std::string&& value); - VersionT(const std::string& value); + VersionT(std::string&& value, int port_version); + VersionT(const std::string& value, int port_version); - const std::string& to_string() const; + std::string to_string() const; + + friend bool operator==(const VersionT& left, const VersionT& right); + friend bool operator!=(const VersionT& left, const VersionT& right); private: std::string value; + int port_version; }; - bool operator==(const VersionT& left, const VersionT& right); - bool operator!=(const VersionT& left, const VersionT& right); - struct VersionDiff { VersionT left; |
