Bump github.com/microsoft/vcpkg from master to ef7dbf94b9198bc58f45951adcf1f041fcbc5ea0 (#6659)
* Bump github.com/microsoft/vcpkg --- updated-dependencies: - dependency-name: github.com/microsoft/vcpkg dependency-version: ef7dbf94b9198bc58f45951adcf1f041fcbc5ea0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Update vcpkg.json * Update default VCPKG commit hash in AzureVcpkg.cmake * try fixing CI by updating xcode version * 16.2 -> 16.4 * Fix the reason for overfow warning * Suppress warning C6326: Potential comparison of a constant with another constant. * Undo unintended format * Correct condition to check whether it is possible to add epoch to system clock max without overflow * Insert info for debugging on mac * Better temp log formatting * Use largest int type for calcuations (mac fix) * In case system clock is lesser resolution than Azure::DateTime, do all calculations in a greater ration to avoid integer overflows * Avoid overflowing system clock max when converting to time since epoch * Add one more variable for debug logging on mac * Avoid one more integer overflow * Remove debug stuff * CLang-format * More clang-format * Less conversions if equal * Commit to reset CI * Undo commit to reset CI --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rick Winter <rick.winter@microsoft.com> Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
parent
bc178b1f98
commit
2d969df700
@ -18,7 +18,7 @@ macro(az_vcpkg_integrate)
|
||||
message("AZURE_SDK_DISABLE_AUTO_VCPKG is not defined. Fetch a local copy of vcpkg.")
|
||||
# GET VCPKG FROM SOURCE
|
||||
# User can set env var AZURE_SDK_VCPKG_COMMIT to pick the VCPKG commit to fetch
|
||||
set(VCPKG_COMMIT_STRING 2c7705e70dcfb70e5f726459c3e399bd780bc1fc) # default SDK tested commit
|
||||
set(VCPKG_COMMIT_STRING ef7dbf94b9198bc58f45951adcf1f041fcbc5ea0) # default SDK tested commit
|
||||
if(DEFINED ENV{AZURE_SDK_VCPKG_COMMIT})
|
||||
message("AZURE_SDK_VCPKG_COMMIT is defined. Using that instead of the default.")
|
||||
set(VCPKG_COMMIT_STRING "$ENV{AZURE_SDK_VCPKG_COMMIT}") # default SDK tested commit
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"OSConfiguration": {
|
||||
"macos-latest": {
|
||||
"OSVmImage": "env:MACVMIMAGE",
|
||||
"XCODE_VERSION": "15.4"
|
||||
"XCODE_VERSION": "16.4"
|
||||
}
|
||||
},
|
||||
"StaticConfigs": {
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#include <ctime>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ratio>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
@ -43,16 +44,65 @@ DateTime GetSystemClockEpoch()
|
||||
|
||||
DateTime GetMaxDateTime()
|
||||
{
|
||||
auto const systemClockMax = std::chrono::duration_cast<DateTime::clock::duration>(
|
||||
(std::chrono::system_clock::time_point::max)().time_since_epoch())
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
// warning C6326: Potential comparison of a constant with another constant.
|
||||
#pragma warning(disable : 6326)
|
||||
#endif
|
||||
static_assert(
|
||||
std::is_same<DateTime::clock::duration::rep, std::chrono::system_clock::duration::rep>::value,
|
||||
"DateTime::clock::duration::rep must be the same as "
|
||||
"std::chrono::system_clock::duration::rep");
|
||||
|
||||
using Rep = DateTime::clock::duration::rep;
|
||||
|
||||
using CommonDuration = std::chrono::duration<
|
||||
Rep,
|
||||
std::conditional<
|
||||
std::ratio_greater<
|
||||
DateTime::clock::duration::period,
|
||||
std::chrono::system_clock::duration::period>::value,
|
||||
DateTime::clock::duration::period,
|
||||
std::chrono::system_clock::duration::period>::type>;
|
||||
|
||||
std::chrono::system_clock::time_point const scEpochTimePoint
|
||||
= std::chrono::system_clock::time_point();
|
||||
|
||||
std::chrono::system_clock::duration const scSystemClockMaxDuration
|
||||
= (scEpochTimePoint + ((std::chrono::system_clock::time_point::max)() - scEpochTimePoint))
|
||||
.time_since_epoch();
|
||||
|
||||
Rep const commonSystemClockMax
|
||||
= std::chrono::duration_cast<CommonDuration>(scSystemClockMaxDuration).count();
|
||||
|
||||
Rep const commonDtClockMax
|
||||
= std::chrono::duration_cast<CommonDuration>((DateTime::clock::duration::max)()).count();
|
||||
|
||||
Rep const dtSystemClockMax = (commonSystemClockMax < commonDtClockMax)
|
||||
? std::chrono::duration_cast<DateTime::clock::duration>(scSystemClockMaxDuration).count()
|
||||
: ((DateTime::clock::duration::max)()).count();
|
||||
|
||||
Azure::DateTime::duration const dtSystemClockEpochDuration
|
||||
= GetSystemClockEpoch().time_since_epoch();
|
||||
|
||||
Rep const commonSystemClockEpoch
|
||||
= std::chrono::duration_cast<CommonDuration>(dtSystemClockEpochDuration).count();
|
||||
|
||||
Rep const dtSystemClockEpoch
|
||||
= std::chrono::duration_cast<DateTime::clock::duration>(dtSystemClockEpochDuration).count();
|
||||
|
||||
constexpr Rep commonRepMax = std::chrono::duration_cast<CommonDuration>(
|
||||
DateTime::duration((std::numeric_limits<Rep>::max)()))
|
||||
.count();
|
||||
|
||||
auto const systemClockEpoch = GetSystemClockEpoch().time_since_epoch().count();
|
||||
|
||||
constexpr auto repMax = (std::numeric_limits<DateTime::clock::duration::rep>::max)();
|
||||
|
||||
return DateTime(DateTime::time_point(DateTime::duration(
|
||||
systemClockMax + (std::min)(systemClockEpoch, (repMax - systemClockMax)))));
|
||||
(commonSystemClockMax < commonRepMax
|
||||
&& commonSystemClockEpoch < (commonRepMax - commonSystemClockMax))
|
||||
? (dtSystemClockEpoch + dtSystemClockMax)
|
||||
: dtSystemClockMax)));
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -422,8 +472,8 @@ DateTime::DateTime(
|
||||
|
||||
DateTime::operator std::chrono::system_clock::time_point() const
|
||||
{
|
||||
static DateTime SystemClockMin((std::chrono::system_clock::time_point::min)());
|
||||
static DateTime SystemClockMax(GetMaxDateTime());
|
||||
static DateTime const SystemClockMin((std::chrono::system_clock::time_point::min)());
|
||||
static DateTime const SystemClockMax(GetMaxDateTime());
|
||||
|
||||
auto outOfRange = 0;
|
||||
if (*this < SystemClockMin)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "azure-sdk-for-cpp",
|
||||
"version": "1.5.0",
|
||||
"builtin-baseline": "2c7705e70dcfb70e5f726459c3e399bd780bc1fc",
|
||||
"builtin-baseline": "ef7dbf94b9198bc58f45951adcf1f041fcbc5ea0",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl"
|
||||
@ -16,7 +16,9 @@
|
||||
},
|
||||
{
|
||||
"name": "opentelemetry-cpp",
|
||||
"features": ["otlp-http"],
|
||||
"features": [
|
||||
"otlp-http"
|
||||
],
|
||||
"platform": "!(windows & !static)",
|
||||
"version>=": "1.3.0"
|
||||
},
|
||||
@ -37,6 +39,5 @@
|
||||
"platform": "!uwp"
|
||||
}
|
||||
],
|
||||
"overrides": [
|
||||
]
|
||||
"overrides": []
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user