Skip to content

Commit

Permalink
Fix compiler errors and mint v2.10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed Aug 20, 2018
1 parent f9f518e commit 66e50f0
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Build/version.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<CppRestBaseFileName>cpprest</CppRestBaseFileName>
<CppRestSDKVersionMajor>2</CppRestSDKVersionMajor>
<CppRestSDKVersionMinor>10</CppRestSDKVersionMinor>
<CppRestSDKVersionRevision>4</CppRestSDKVersionRevision>
<CppRestSDKVersionRevision>6</CppRestSDKVersionRevision>
<CppRestSDKVersionFileSuffix>$(CppRestSDKVersionMajor)_$(CppRestSDKVersionMinor)</CppRestSDKVersionFileSuffix>
<CppRestSDKVersionString>$(CppRestSDKVersionMajor).$(CppRestSDKVersionMinor)</CppRestSDKVersionString>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Release/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

set(CPPREST_VERSION_MAJOR 2)
set(CPPREST_VERSION_MINOR 10)
set(CPPREST_VERSION_REVISION 4)
set(CPPREST_VERSION_REVISION 6)

enable_testing()

Expand Down
8 changes: 1 addition & 7 deletions Release/include/cpprest/asyncrt_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,7 @@ namespace details
inline bool __cdecl is_alnum(const unsigned char uch) CPPREST_NOEXCEPT
{ // test if uch is an alnum character
// special casing char to avoid branches
static
#if !defined(_MSC_VER) || _MSC_VER >= 1900
constexpr
#else
const
#endif
bool is_alnum_table[UCHAR_MAX + 1] =
static CPPREST_CONSTEXPR bool is_alnum_table[UCHAR_MAX + 1] =
{
/* X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF */
/* 0X */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand Down
3 changes: 3 additions & 0 deletions Release/include/cpprest/details/cpprest_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

#if _MSC_VER >= 1900
#define CPPREST_NOEXCEPT noexcept
#define CPPREST_CONSTEXPR constexpr
#else
#define CPPREST_NOEXCEPT
#define CPPREST_CONSTEXPR const
#endif

#define CASABLANCA_UNREFERENCED_PARAMETER(x) (x)
Expand All @@ -36,6 +38,7 @@
#define __assume(x) do { if (!(x)) __builtin_unreachable(); } while (false)
#define CASABLANCA_UNREFERENCED_PARAMETER(x) (void)x
#define CPPREST_NOEXCEPT noexcept
#define CPPREST_CONSTEXPR constexpr

#include <assert.h>
#define _ASSERTE(x) assert(x)
Expand Down
2 changes: 1 addition & 1 deletion Release/include/cpprest/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
*
*/
#define CPPREST_VERSION_REVISION 5
#define CPPREST_VERSION_REVISION 6
#define CPPREST_VERSION_MINOR 10
#define CPPREST_VERSION_MAJOR 2

Expand Down
2 changes: 1 addition & 1 deletion Release/src/http/client/http_client_winhttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct security_failure_message
const char * text;
};

constexpr security_failure_message g_security_failure_messages[] = {
CPPREST_CONSTEXPR security_failure_message g_security_failure_messages[] = {
{ WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED,
"WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED failed to check revocation status."},
{ WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CERT,
Expand Down
4 changes: 2 additions & 2 deletions Release/src/http/common/x509_cert_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace details
struct winhttp_cert_context
{
PCCERT_CONTEXT raw;
winhttp_cert_context() noexcept : raw(nullptr) {}
winhttp_cert_context() CPPREST_NOEXCEPT : raw(nullptr) {}
winhttp_cert_context(const winhttp_cert_context&) = delete;
winhttp_cert_context& operator=(const winhttp_cert_context&) = delete;
~winhttp_cert_context()
Expand All @@ -44,7 +44,7 @@ struct winhttp_cert_context
struct winhttp_cert_chain_context
{
PCCERT_CHAIN_CONTEXT raw;
winhttp_cert_chain_context() noexcept : raw(nullptr) {}
winhttp_cert_chain_context() CPPREST_NOEXCEPT : raw(nullptr) {}
winhttp_cert_chain_context(const winhttp_cert_chain_context&) = delete;
winhttp_cert_chain_context& operator=(const winhttp_cert_chain_context&) = delete;
~winhttp_cert_chain_context()
Expand Down
8 changes: 4 additions & 4 deletions Release/src/utilities/asyncrt_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace
}
};

constexpr to_lower_ch_impl to_lower_ch{};
CPPREST_CONSTEXPR to_lower_ch_impl to_lower_ch{};

struct eq_lower_ch_impl
{
Expand All @@ -62,7 +62,7 @@ namespace
}
};

constexpr eq_lower_ch_impl eq_lower_ch{};
CPPREST_CONSTEXPR eq_lower_ch_impl eq_lower_ch{};

struct lt_lower_ch_impl
{
Expand All @@ -73,8 +73,8 @@ namespace
}
};

constexpr lt_lower_ch_impl lt_lower_ch{};
}
CPPREST_CONSTEXPR lt_lower_ch_impl lt_lower_ch{};
}

namespace utility
{
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
cpprestsdk (2.10.6)
----------------------
* PR#844 Fix clang build error
-- cpprestsdk team <[email protected]> MON, 30 Aug 2018 16:51:00 -0800

cpprestsdk (2.10.5)
----------------------
* Issue#842 Fix incorrect `cpprest/version.h`
Expand Down

0 comments on commit 66e50f0

Please sign in to comment.