diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/cpprest')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/1094.patch | 307 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/950-fix.patch | 26 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-float-tests.patch | 25 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch | 142 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-test-timeouts.patch | 103 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch | 38 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.12.bb (renamed from meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.7.bb) | 13 |
7 files changed, 311 insertions, 343 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/1094.patch b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/1094.patch new file mode 100644 index 000000000..3daad97f0 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/1094.patch @@ -0,0 +1,307 @@ +From d672de675a16e5ab9efcf783705cbd171f38188e Mon Sep 17 00:00:00 2001 +From: "Billy O'Neal (VC LIBS)" <bion@microsoft.com> +Date: Thu, 28 Mar 2019 15:17:12 -0700 +Subject: [PATCH] Avoid tripping over 32 bit time_t mistakes. + +Resolves https://github.com/Microsoft/cpprestsdk/issues/1090 +--- + Release/src/utilities/asyncrt_utils.cpp | 30 ++--- + Release/tests/functional/utils/datetime.cpp | 140 ++++++++++---------- + 2 files changed, 84 insertions(+), 86 deletions(-) + +diff --git a/Release/src/utilities/asyncrt_utils.cpp b/Release/src/utilities/asyncrt_utils.cpp +index 4a692e5fa..986b64bb7 100644 +--- a/Release/src/utilities/asyncrt_utils.cpp ++++ b/Release/src/utilities/asyncrt_utils.cpp +@@ -618,7 +618,7 @@ std::string __cdecl conversions::to_utf8string(const utf16string& value) { retur + + utf16string __cdecl conversions::to_utf16string(const std::string& value) { return utf8_to_utf16(value); } + +-static const uint64_t ntToUnixOffsetSeconds = 11644473600U; // diff between windows and unix epochs (seconds) ++static const int64_t ntToUnixOffsetSeconds = 11644473600; // diff between windows and unix epochs (seconds) + + datetime __cdecl datetime::utc_now() + { +@@ -634,10 +634,10 @@ datetime __cdecl datetime::utc_now() + #else // LINUX + struct timeval time; + gettimeofday(&time, nullptr); +- uint64_t result = ntToUnixOffsetSeconds + time.tv_sec; ++ int64_t result = ntToUnixOffsetSeconds + time.tv_sec; + result *= _secondTicks; // convert to 10e-7 + result += time.tv_usec * 10; // convert and add microseconds, 10e-6 to 10e-7 +- return datetime(result); ++ return datetime(static_cast<interval_type>(result)); + #endif + } + +@@ -646,7 +646,7 @@ static const char monthNames[] = "Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0O + + utility::string_t datetime::to_string(date_format format) const + { +- const uint64_t input = m_interval / _secondTicks; // convert to seconds ++ const int64_t input = static_cast<int64_t>(m_interval / _secondTicks); // convert to seconds + const int frac_sec = static_cast<int>(m_interval % _secondTicks); + const time_t time = static_cast<time_t>(input - ntToUnixOffsetSeconds); + struct tm t; +@@ -797,22 +797,20 @@ static int atoi2(const CharT* str) + return (static_cast<unsigned char>(str[0]) - '0') * 10 + (static_cast<unsigned char>(str[1]) - '0'); + } + +-static const time_t maxTimeT = sizeof(time_t) == 4 ? (time_t)INT_MAX : (time_t)LLONG_MAX; +- +-static time_t timezone_adjust(time_t result, unsigned char chSign, int adjustHours, int adjustMinutes) ++static int64_t timezone_adjust(int64_t result, unsigned char chSign, int adjustHours, int adjustMinutes) + { + if (adjustHours > 23) + { +- return (time_t)-1; ++ return -1; + } + + // adjustMinutes > 59 is impossible due to digit 5 check + const int tzAdjust = adjustMinutes * 60 + adjustHours * 60 * 60; + if (chSign == '-') + { +- if (maxTimeT - result < tzAdjust) ++ if (INT64_MAX - result < tzAdjust) + { +- return (time_t)-1; ++ return -1; + } + + result += tzAdjust; +@@ -821,7 +819,7 @@ static time_t timezone_adjust(time_t result, unsigned char chSign, int adjustHou + { + if (tzAdjust > result) + { +- return (time_t)-1; ++ return -1; + } + + result -= tzAdjust; +@@ -830,10 +828,10 @@ static time_t timezone_adjust(time_t result, unsigned char chSign, int adjustHou + return result; + } + +-static time_t make_gm_time(struct tm* t) ++static int64_t make_gm_time(struct tm* t) + { + #ifdef _MSC_VER +- return _mkgmtime(t); ++ return static_cast<int64_t>(_mkgmtime(t)); + #elif (defined(ANDROID) || defined(__ANDROID__)) + // HACK: The (nonportable?) POSIX function timegm is not available in + // bionic. As a workaround[1][2], we set the C library timezone to +@@ -867,9 +865,9 @@ static time_t make_gm_time(struct tm* t) + unsetenv("TZ"); + } + } +- return time; ++ return static_cast<int64_t>(time); + #else // ^^^ ANDROID // Other POSIX platforms vvv +- return timegm(t); ++ return static_cast<int64_t>(timegm(t)); + #endif // _MSC_VER + } + +@@ -916,7 +914,7 @@ zone = "UT" / "GMT" ; Universal Time + datetime __cdecl datetime::from_string(const utility::string_t& dateString, date_format format) + { + datetime result; +- time_t seconds; ++ int64_t seconds; + uint64_t frac_sec = 0; + struct tm t{}; + auto str = dateString.c_str(); +diff --git a/Release/tests/functional/utils/datetime.cpp b/Release/tests/functional/utils/datetime.cpp +index ae7f7a5e4..acd6fddb0 100644 +--- a/Release/tests/functional/utils/datetime.cpp ++++ b/Release/tests/functional/utils/datetime.cpp +@@ -133,75 +133,77 @@ SUITE(datetime) + + TEST(parsing_time_rfc1123_accepts_each_day) + { +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:00:00 GMT"), (time_t) 0); +- TestRfc1123IsTimeT(_XPLATSTR("Fri, 02 Jan 1970 00:00:00 GMT"), (time_t) 86400 * 1); +- TestRfc1123IsTimeT(_XPLATSTR("Sat, 03 Jan 1970 00:00:00 GMT"), (time_t) 86400 * 2); +- TestRfc1123IsTimeT(_XPLATSTR("Sun, 04 Jan 1970 00:00:00 GMT"), (time_t) 86400 * 3); +- TestRfc1123IsTimeT(_XPLATSTR("Mon, 05 Jan 1970 00:00:00 GMT"), (time_t) 86400 * 4); +- TestRfc1123IsTimeT(_XPLATSTR("Tue, 06 Jan 1970 00:00:00 GMT"), (time_t) 86400 * 5); +- TestRfc1123IsTimeT(_XPLATSTR("Wed, 07 Jan 1970 00:00:00 GMT"), (time_t) 86400 * 6); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:00:00 GMT"), (time_t)0); ++ TestRfc1123IsTimeT(_XPLATSTR("Fri, 02 Jan 1970 00:00:00 GMT"), (time_t)86400 * 1); ++ TestRfc1123IsTimeT(_XPLATSTR("Sat, 03 Jan 1970 00:00:00 GMT"), (time_t)86400 * 2); ++ TestRfc1123IsTimeT(_XPLATSTR("Sun, 04 Jan 1970 00:00:00 GMT"), (time_t)86400 * 3); ++ TestRfc1123IsTimeT(_XPLATSTR("Mon, 05 Jan 1970 00:00:00 GMT"), (time_t)86400 * 4); ++ TestRfc1123IsTimeT(_XPLATSTR("Tue, 06 Jan 1970 00:00:00 GMT"), (time_t)86400 * 5); ++ TestRfc1123IsTimeT(_XPLATSTR("Wed, 07 Jan 1970 00:00:00 GMT"), (time_t)86400 * 6); + } + + TEST(parsing_time_rfc1123_boundary_cases) + { +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:00:00 GMT"), (time_t) 0); +- TestRfc1123IsTimeT(_XPLATSTR("19 Jan 2038 03:14:06 GMT"), (time_t) INT_MAX - 1); +-#ifndef _USE_32BIT_TIME_T +- TestRfc1123IsTimeT(_XPLATSTR("19 Jan 2038 03:13:07 -0001"), (time_t) INT_MAX); +- TestRfc1123IsTimeT(_XPLATSTR("19 Jan 2038 03:14:07 -0000"), (time_t) INT_MAX); +-#endif // _USE_32BIT_TIME_T +- TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 +0000"), (time_t) 1547507781); +- TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 -0001"), (time_t) 1547507841); +- TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 +0001"), (time_t) 1547507721); +- TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 -0100"), (time_t) 1547511381); +- TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 +0100"), (time_t) 1547504181); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:00:00 GMT"), (time_t)0); ++ TestRfc1123IsTimeT(_XPLATSTR("19 Jan 2038 03:14:06 GMT"), (time_t)INT_MAX - 1); ++ if (sizeof(time_t) == 8) ++ { ++ TestRfc1123IsTimeT(_XPLATSTR("19 Jan 2038 03:13:07 -0001"), (time_t)INT_MAX); ++ TestRfc1123IsTimeT(_XPLATSTR("19 Jan 2038 03:14:07 -0000"), (time_t)INT_MAX); ++ } ++ TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 +0000"), (time_t)1547507781); ++ TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 -0001"), (time_t)1547507841); ++ TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 +0001"), (time_t)1547507721); ++ TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 -0100"), (time_t)1547511381); ++ TestRfc1123IsTimeT(_XPLATSTR("14 Jan 2019 23:16:21 +0100"), (time_t)1547504181); + } + + TEST(parsing_time_rfc1123_uses_each_field) + { +- TestRfc1123IsTimeT(_XPLATSTR("02 Jan 1970 00:00:00 GMT"), (time_t) 86400); +- TestRfc1123IsTimeT(_XPLATSTR("12 Jan 1970 00:00:00 GMT"), (time_t) 950400); +- TestRfc1123IsTimeT(_XPLATSTR("01 Feb 1970 00:00:00 GMT"), (time_t) 2678400); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 2000 00:00:00 GMT"), (time_t) 946684800); +-#ifndef _USE_32BIT_TIME_T +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 2100 00:00:00 GMT"), (time_t) 4102444800); +-#endif // _USE_32BIT_TIME_T +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1990 00:00:00 GMT"), (time_t) 631152000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1971 00:00:00 GMT"), (time_t) 31536000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 10:00:00 GMT"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 01:00:00 GMT"), (time_t) 3600); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:10:00 GMT"), (time_t) 600); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:01:00 GMT"), (time_t) 60); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:00:10 GMT"), (time_t) 10); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:00:01 GMT"), (time_t) 1); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 10:00:00 GMT"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 02:00:00 PST"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 03:00:00 PDT"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 03:00:00 MST"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 04:00:00 MDT"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 04:00:00 CST"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 05:00:00 CDT"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 05:00:00 EST"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 06:00:00 EDT"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 06:00:00 -0400"), (time_t) 36000); +- TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 05:59:00 -0401"), (time_t) 36000); ++ TestRfc1123IsTimeT(_XPLATSTR("02 Jan 1970 00:00:00 GMT"), (time_t)86400); ++ TestRfc1123IsTimeT(_XPLATSTR("12 Jan 1970 00:00:00 GMT"), (time_t)950400); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Feb 1970 00:00:00 GMT"), (time_t)2678400); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 2000 00:00:00 GMT"), (time_t)946684800); ++ if (sizeof(time_t) == 8) ++ { ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 2100 00:00:00 GMT"), (time_t)4102444800); ++ } ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1990 00:00:00 GMT"), (time_t)631152000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1971 00:00:00 GMT"), (time_t)31536000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 10:00:00 GMT"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 01:00:00 GMT"), (time_t)3600); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:10:00 GMT"), (time_t)600); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:01:00 GMT"), (time_t)60); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:00:10 GMT"), (time_t)10); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 00:00:01 GMT"), (time_t)1); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 10:00:00 GMT"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 02:00:00 PST"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 03:00:00 PDT"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 03:00:00 MST"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 04:00:00 MDT"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 04:00:00 CST"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 05:00:00 CDT"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 05:00:00 EST"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 06:00:00 EDT"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 06:00:00 -0400"), (time_t)36000); ++ TestRfc1123IsTimeT(_XPLATSTR("01 Jan 1970 05:59:00 -0401"), (time_t)36000); + } + + TEST(parsing_time_rfc1123_max_days) + { +- TestRfc1123IsTimeT(_XPLATSTR("31 Jan 1970 00:00:00 GMT"), (time_t) 2592000); +- TestRfc1123IsTimeT(_XPLATSTR("28 Feb 2019 00:00:00 GMT"), (time_t) 1551312000); // non leap year allows feb 28 +- TestRfc1123IsTimeT(_XPLATSTR("29 Feb 2020 00:00:00 GMT"), (time_t) 1582934400); // leap year allows feb 29 +- TestRfc1123IsTimeT(_XPLATSTR("31 Mar 1970 00:00:00 GMT"), (time_t) 7689600); +- TestRfc1123IsTimeT(_XPLATSTR("30 Apr 1970 00:00:00 GMT"), (time_t) 10281600); +- TestRfc1123IsTimeT(_XPLATSTR("31 May 1970 00:00:00 GMT"), (time_t) 12960000); +- TestRfc1123IsTimeT(_XPLATSTR("30 Jun 1970 00:00:00 GMT"), (time_t) 15552000); +- TestRfc1123IsTimeT(_XPLATSTR("31 Jul 1970 00:00:00 GMT"), (time_t) 18230400); +- TestRfc1123IsTimeT(_XPLATSTR("31 Aug 1970 00:00:00 GMT"), (time_t) 20908800); +- TestRfc1123IsTimeT(_XPLATSTR("30 Sep 1970 00:00:00 GMT"), (time_t) 23500800); +- TestRfc1123IsTimeT(_XPLATSTR("31 Oct 1970 00:00:00 GMT"), (time_t) 26179200); +- TestRfc1123IsTimeT(_XPLATSTR("30 Nov 1970 00:00:00 GMT"), (time_t) 28771200); +- TestRfc1123IsTimeT(_XPLATSTR("31 Dec 1970 00:00:00 GMT"), (time_t) 31449600); ++ TestRfc1123IsTimeT(_XPLATSTR("31 Jan 1970 00:00:00 GMT"), (time_t)2592000); ++ TestRfc1123IsTimeT(_XPLATSTR("28 Feb 2019 00:00:00 GMT"), (time_t)1551312000); // non leap year allows feb 28 ++ TestRfc1123IsTimeT(_XPLATSTR("29 Feb 2020 00:00:00 GMT"), (time_t)1582934400); // leap year allows feb 29 ++ TestRfc1123IsTimeT(_XPLATSTR("31 Mar 1970 00:00:00 GMT"), (time_t)7689600); ++ TestRfc1123IsTimeT(_XPLATSTR("30 Apr 1970 00:00:00 GMT"), (time_t)10281600); ++ TestRfc1123IsTimeT(_XPLATSTR("31 May 1970 00:00:00 GMT"), (time_t)12960000); ++ TestRfc1123IsTimeT(_XPLATSTR("30 Jun 1970 00:00:00 GMT"), (time_t)15552000); ++ TestRfc1123IsTimeT(_XPLATSTR("31 Jul 1970 00:00:00 GMT"), (time_t)18230400); ++ TestRfc1123IsTimeT(_XPLATSTR("31 Aug 1970 00:00:00 GMT"), (time_t)20908800); ++ TestRfc1123IsTimeT(_XPLATSTR("30 Sep 1970 00:00:00 GMT"), (time_t)23500800); ++ TestRfc1123IsTimeT(_XPLATSTR("31 Oct 1970 00:00:00 GMT"), (time_t)26179200); ++ TestRfc1123IsTimeT(_XPLATSTR("30 Nov 1970 00:00:00 GMT"), (time_t)28771200); ++ TestRfc1123IsTimeT(_XPLATSTR("31 Dec 1970 00:00:00 GMT"), (time_t)31449600); + } + + TEST(parsing_time_rfc1123_invalid_cases) +@@ -266,7 +268,7 @@ SUITE(datetime) + _XPLATSTR("Thu, 01 Jan 1970 00:00:00 G"), + _XPLATSTR("Thu, 01 Jan 1970 00:00:00 GM"), + _XPLATSTR("Fri, 01 Jan 1970 00:00:00 GMT"), // wrong day +- _XPLATSTR("01 Jan 4970 00:00:00 GMT"), // year too big ++ _XPLATSTR("01 Jan 4970 00:00:00 GMT"), // year too big + _XPLATSTR("01 Jan 3001 00:00:00 GMT"), + _XPLATSTR("01 Xxx 1971 00:00:00 GMT"), // month bad + _XPLATSTR("00 Jan 1971 00:00:00 GMT"), // day too small +@@ -288,8 +290,8 @@ SUITE(datetime) + _XPLATSTR("01 Jan 1971 00:60:00 GMT"), // minute too big + _XPLATSTR("01 Jan 1971 00:00:70 GMT"), // second too big + _XPLATSTR("01 Jan 1971 00:00:61 GMT"), +- _XPLATSTR("01 Jan 1969 00:00:00 GMT"), // underflow +- _XPLATSTR("01 Jan 1969 00:00:00 CEST"), // bad tz ++ _XPLATSTR("01 Jan 1969 00:00:00 GMT"), // underflow ++ _XPLATSTR("01 Jan 1969 00:00:00 CEST"), // bad tz + _XPLATSTR("01 Jan 1970 00:00:00 +2400"), // bad tzoffsets + _XPLATSTR("01 Jan 1970 00:00:00 -3000"), + _XPLATSTR("01 Jan 1970 00:00:00 +2160"), +@@ -309,11 +311,12 @@ SUITE(datetime) + // boundary cases: + TestDateTimeRoundtrip(_XPLATSTR("1970-01-01T00:00:00Z")); // epoch + TestDateTimeRoundtrip(_XPLATSTR("2038-01-19T03:14:06+00:00"), _XPLATSTR("2038-01-19T03:14:06Z")); // INT_MAX - 1 +-#ifndef _USE_32BIT_TIME_T +- TestDateTimeRoundtrip(_XPLATSTR("2038-01-19T03:13:07-00:01"), +- _XPLATSTR("2038-01-19T03:14:07Z")); // INT_MAX after subtacting 1 +- TestDateTimeRoundtrip(_XPLATSTR("2038-01-19T03:14:07-00:00"), _XPLATSTR("2038-01-19T03:14:07Z")); +-#endif // _USE_32BIT_TIME_T ++ if (sizeof(time_t) == 8) ++ { ++ TestDateTimeRoundtrip(_XPLATSTR("2038-01-19T03:13:07-00:01"), ++ _XPLATSTR("2038-01-19T03:14:07Z")); // INT_MAX after subtacting 1 ++ TestDateTimeRoundtrip(_XPLATSTR("2038-01-19T03:14:07-00:00"), _XPLATSTR("2038-01-19T03:14:07Z")); ++ } + } + + TEST(parsing_time_iso8601_uses_each_timezone_digit) +@@ -456,11 +459,8 @@ SUITE(datetime) + _XPLATSTR("1971-01-01T00:60:00Z"), // minute too big + _XPLATSTR("1971-01-01T00:00:70Z"), // second too big + _XPLATSTR("1971-01-01T00:00:61Z"), +- _XPLATSTR("1969-01-01T00:00:00Z"), // underflow +-#ifdef _USE_32BIT_TIME_T +- _XPLATSTR("3000-01-01T00:00:01Z"), // overflow +-#endif +- _XPLATSTR("3001-01-01T00:00:00Z"), ++ _XPLATSTR("1969-01-01T00:00:00Z"), // underflow ++ _XPLATSTR("3001-01-01T00:00:00Z"), // overflow + _XPLATSTR("1970-01-01T00:00:00+00:01"), // time zone underflow + // _XPLATSTR("1970-01-01T00:00:00.Z"), // accepted as invalid timezone above + _XPLATSTR("1970-01-01T00:00:00+24:00"), // bad tzoffsets diff --git a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/950-fix.patch b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/950-fix.patch deleted file mode 100644 index 3ae46a115..000000000 --- a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/950-fix.patch +++ /dev/null @@ -1,26 +0,0 @@ -Origin: upstream -Bug: https://github.com/Microsoft/cpprestsdk/issues/950 -Last-Update: 2018-11-04 - -Index: cpprest/Release/src/utilities/asyncrt_utils.cpp -=================================================================== ---- cpprest.orig/Release/src/utilities/asyncrt_utils.cpp -+++ cpprest/Release/src/utilities/asyncrt_utils.cpp -@@ -356,7 +356,7 @@ - inline size_t count_utf8_to_utf16(const std::string& s) - { - const size_t sSize = s.size(); -- auto sData = reinterpret_cast<const UtilCharInternal_t* const>(s.data()); -+ auto const sData = reinterpret_cast<const UtilCharInternal_t*>(s.data()); - size_t result{ sSize }; - - for (size_t index = 0; index < sSize;) -@@ -441,7 +441,7 @@ - { - // Save repeated heap allocations, use the length of resulting sequence. - const size_t srcSize = s.size(); -- auto srcData = reinterpret_cast<const UtilCharInternal_t* const>(s.data()); -+ auto const srcData = reinterpret_cast<const UtilCharInternal_t*>(s.data()); - utf16string dest(count_utf8_to_utf16(s), L'\0'); - utf16string::value_type* const destData = &dest[0]; - size_t destIndex = 0; diff --git a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-float-tests.patch b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-float-tests.patch deleted file mode 100644 index 75f74ec65..000000000 --- a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-float-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -Description: new toolchain might have increased the float precision -Author: Gianfranco Costamagna <locutusofborg@debian.org> -Last-Update: 2017-10-28 -Forwarded: https://github.com/Microsoft/cpprestsdk/issues/576 - ---- casablanca-2.10.0.orig/Release/tests/functional/streams/istream_tests.cpp -+++ casablanca-2.10.0/Release/tests/functional/streams/istream_tests.cpp -@@ -1302,7 +1302,7 @@ void compare_float(float expected, float - { - compare_floating(expected, actual, FLT_EPSILON); - } -- -+/* - TEST(extract_floating_point) - { - std::string test_string; -@@ -1349,7 +1349,7 @@ TEST(extract_floating_point) - VERIFY_ARE_EQUAL(1 / expected, 1 / actual); - } while (!std_istream.eof()); - } -- -+*/ - TEST(extract_floating_point_with_exceptions) - { - std::vector<std::pair<std::string, std::string>> tests; diff --git a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch deleted file mode 100644 index 2dff0d97c..000000000 --- a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch +++ /dev/null @@ -1,142 +0,0 @@ -Description: Debian forbids calls to external websites. - -Author: Gianfranco Costamagna <locutus@debian.org> -Origin: Debian -Forwarded: not-needed -Reviewed-By: Gianfranco Costamagna <locutusofborg@debian.org> -Last-Update: 2015-11-25 - -Index: casablanca/Release/tests/functional/http/client/CMakeLists.txt -=================================================================== ---- casablanca.orig/Release/tests/functional/http/client/CMakeLists.txt -+++ casablanca/Release/tests/functional/http/client/CMakeLists.txt -@@ -12,7 +12,6 @@ - multiple_requests.cpp - oauth1_tests.cpp - oauth2_tests.cpp -- outside_tests.cpp - pipeline_stage_tests.cpp - progress_handler_tests.cpp - proxy_tests.cpp -Index: casablanca/Release/tests/functional/http/client/authentication_tests.cpp -=================================================================== ---- casablanca.orig/Release/tests/functional/http/client/authentication_tests.cpp -+++ casablanca/Release/tests/functional/http/client/authentication_tests.cpp -@@ -663,15 +663,19 @@ - VERIFY_ARE_EQUAL(return_code, response.status_code()); - } - -+/* - TEST(auth_no_data) - { - auth_test_impl(false); - } -+*/ - -+/* - TEST(unsuccessful_auth_with_basic_cred) - { - auth_test_impl(true); - } -+*/ - - TEST_FIXTURE(uri_address, set_user_options_asio_http) - { -@@ -692,7 +696,7 @@ - auto response = client.request(methods::GET).get(); - VERIFY_ARE_EQUAL(200, response.status_code()); - } -- -+/* - TEST_FIXTURE(uri_address, set_user_options_asio_https) - { - handle_timeout([] -@@ -714,7 +718,7 @@ - VERIFY_IS_FALSE(v.empty()); - }); - } -- -+*/ - #endif - - } // SUITE(authentication_tests) -Index: casablanca/Release/tests/functional/websockets/client/authentication_tests.cpp -=================================================================== ---- casablanca.orig/Release/tests/functional/websockets/client/authentication_tests.cpp -+++ casablanca/Release/tests/functional/websockets/client/authentication_tests.cpp -@@ -86,7 +86,7 @@ - } - return false; - } -- -+/* - TEST(ssl_test) - { - websocket_client client; -@@ -122,7 +122,7 @@ - throw; - } - } -- -+*/ - // These tests are specific to our websocketpp based implementation. - #if !defined(__cplusplus_winrt) - -@@ -153,14 +153,15 @@ - throw; - } - } -- -+/* - // Test specifically for server SignalR team hit interesting cases with. - TEST(sni_with_older_server_test) - { - websocket_client client; - sni_test_impl(client); - } -- -+*/ -+/* - // WinRT doesn't expose option for disabling. - // No stable server is available to reliably test this. - // The configuration below relies on a timeout in the success case. -@@ -188,7 +189,8 @@ - throw; - } - } -- -+*/ -+/* - // Winrt doesn't allow explicitly setting server host for SNI. - TEST(sni_explicit_hostname) - { -@@ -199,7 +201,7 @@ - websocket_client client(config); - sni_test_impl(client); - } -- -+*/ - void handshake_error_test_impl(const ::utility::string_t &host) - { - websocket_client client; -Index: casablanca/Release/tests/functional/http/client/connections_and_errors.cpp -=================================================================== ---- casablanca.orig/Release/tests/functional/http/client/connections_and_errors.cpp -+++ casablanca/Release/tests/functional/http/client/connections_and_errors.cpp -@@ -415,6 +415,7 @@ - } - #endif - -+/* - // Try to connect to a server on a closed port and cancel the operation. - TEST_FIXTURE(uri_address, cancel_bad_port) - { -@@ -446,7 +447,7 @@ - - VERIFY_THROWS_HTTP_ERROR_CODE(t.get(), std::errc::operation_canceled); - } -- -+*/ - } // SUITE(connections_and_errors) - - }}}} diff --git a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-test-timeouts.patch b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-test-timeouts.patch deleted file mode 100644 index 93c3e8a26..000000000 --- a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/disable-test-timeouts.patch +++ /dev/null @@ -1,103 +0,0 @@ -Description: Some tests takes too long on slow architectures and timeouts - We can safely disable them. - e.g. - Release/tests/functional/http/client/connections_and_errors.cpp:142: error: Failure in request_timeout_microsecond: Test case timed out and is hung. Aborting all remaining test cases. Expected under 180000ms. FAILED - -Index: casablanca/Release/tests/functional/http/client/connections_and_errors.cpp -=================================================================== ---- casablanca.orig/Release/tests/functional/http/client/connections_and_errors.cpp -+++ casablanca/Release/tests/functional/http/client/connections_and_errors.cpp -@@ -127,7 +127,7 @@ - // Try sending another request. - VERIFY_THROWS(client.request(methods::GET).wait(), web::http::http_exception); - } -- -+/* - TEST_FIXTURE(uri_address, request_timeout) - { - test_http_server::scoped_server scoped(m_uri); -@@ -146,7 +146,8 @@ - #endif - t.get(); - } -- -+*/ -+/* - TEST_FIXTURE(uri_address, request_timeout_microsecond) - { - pplx::task<test_request*> t; -@@ -168,7 +169,7 @@ - try { t.get(); } - catch (...) {} - } -- -+*/ - TEST_FIXTURE(uri_address, invalid_method) - { - web::http::uri uri(U("http://www.bing.com/")); -Index: casablanca/Release/tests/functional/http/listener/requests_tests.cpp -=================================================================== ---- casablanca.orig/Release/tests/functional/http/listener/requests_tests.cpp -+++ casablanca/Release/tests/functional/http/listener/requests_tests.cpp -@@ -173,7 +173,7 @@ - - listener.close().wait(); - } -- -+/* - TEST_FIXTURE(uri_address, response_order) - { - http_listener listener(m_uri); -@@ -217,7 +217,7 @@ - - listener.close().wait(); - } -- -+*/ - TEST_FIXTURE(uri_address, uri_encoding, "Ignore", "Codeplex 201") - { - http_listener listener(m_uri); -Index: casablanca/Release/tests/functional/websockets/client/authentication_tests.cpp -=================================================================== ---- casablanca.orig/Release/tests/functional/websockets/client/authentication_tests.cpp -+++ casablanca/Release/tests/functional/websockets/client/authentication_tests.cpp -@@ -221,7 +221,7 @@ - VERIFY_ARE_EQUAL("TLS handshake failed", e.error_code().message()); - } - } -- -+/* - TEST(self_signed_cert) - { - handshake_error_test_impl(U("wss://self-signed.badssl.com/")); -@@ -236,7 +236,7 @@ - { - handshake_error_test_impl(U("wss://expired.badssl.com/")); - } -- -+*/ - #endif - - } // SUITE(authentication_tests) -Index: casablanca/Release/tests/functional/websockets/client/client_construction.cpp -=================================================================== ---- casablanca.orig/Release/tests/functional/websockets/client/client_construction.cpp -+++ casablanca/Release/tests/functional/websockets/client/client_construction.cpp -@@ -81,7 +81,7 @@ - VERIFY_ARE_EQUAL(config2.credentials().username(), cred.username()); - } - -- -+/* - // Verify that we can get the baseuri from websocket_client connect. - TEST_FIXTURE(uri_address, uri_test) - { -@@ -101,7 +101,7 @@ - VERIFY_ARE_EQUAL(client2.uri(), m_uri); - client2.close().wait(); - } -- -+*/ - TEST_FIXTURE(uri_address, move_operations) - { - std::string body("hello"); diff --git a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch deleted file mode 100644 index e6f64772d..000000000 --- a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch +++ /dev/null @@ -1,38 +0,0 @@ -Description: Find system brotli -Author: Gianfranco Costamagna <locutusofborg@debian.org> -Forwarded: https://github.com/Microsoft/cpprestsdk/pull/952 -Last-Update: 2018-11-05 - ---- cpprest-2.10.7.orig/Release/cmake/cpprest_find_brotli.cmake -+++ cpprest-2.10.7/Release/cmake/cpprest_find_brotli.cmake -@@ -3,8 +3,17 @@ function(cpprest_find_brotli) - return() - endif() - -- find_package(unofficial-brotli REQUIRED) - -- add_library(cpprestsdk_brotli_internal INTERFACE) -- target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon) -+ find_package(PkgConfig) -+ pkg_check_modules(BROTLIENC libbrotlienc) -+ pkg_check_modules(BROTLIDEC libbrotlidec) -+ if(BROTLIDEC_FOUND AND BROTLIENC_FOUND) -+ target_link_libraries(cpprest PRIVATE ${BROTLIDEC_LDFLAGS} ${BROTLIENC_LDFLAGS}) -+ else(BROTLIDEC_FOUND AND BROTLIENC_FOUND) -+ find_package(unofficial-brotli REQUIRED) -+ add_library(cpprestsdk_brotli_internal INTERFACE) -+ target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon) -+ target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal) -+ endif(BROTLIDEC_FOUND AND BROTLIENC_FOUND) -+ - endfunction() ---- cpprest-2.10.7.orig/Release/src/CMakeLists.txt -+++ cpprest-2.10.7/Release/src/CMakeLists.txt -@@ -84,7 +84,6 @@ else() - target_compile_definitions(cpprest PRIVATE -DCPPREST_EXCLUDE_BROTLI=1) - else() - cpprest_find_brotli() -- target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal) - endif() - endif() - diff --git a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.7.bb b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.12.bb index 5cc6385df..67edf5691 100644 --- a/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.7.bb +++ b/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.12.bb @@ -8,16 +8,11 @@ DEPENDS = "openssl websocketpp zlib boost brotli" EXTRA_OECMAKE = "-DCPPREST_EXPORT_DIR=cmake -DCPPREST_EXCLUDE_BROTLI=OFF" SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master \ - file://disable-outside-tests.patch \ - file://disable-test-timeouts.patch \ - file://disable-float-tests.patch \ - file://950-fix.patch \ - file://system-brotli.patch \ - " + file://1094.patch " -# tag 2.10.7 -SRCREV= "c4cef129e880a3f9c23a480e8c983793963173bb" +# tag 2.10.12 +SRCREV= "d4fb1cf7f7d22c12e2e442ba5a5e98d09b0a28ab" S = "${WORKDIR}/git" -inherit cmake +inherit cmake pkgconfig |