Skip to content

Commit 0696ab3

Browse files
committed
Fixing up macro check for websocket enablement.
1 parent 9480db1 commit 0696ab3

File tree

7 files changed

+26
-17
lines changed

7 files changed

+26
-17
lines changed

Release/include/cpprest/details/basic_types.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <iostream>
3131
#include <sstream>
3232
#include "cpprest/details/cpprest_compat.h"
33+
#include "cpprest/details/basic_types.h"
3334

3435
#ifndef _WIN32
3536
# define __STDC_LIMIT_MACROS
@@ -122,3 +123,19 @@ typedef std::basic_ostream<utf16char> utf16ostream;
122123
typedef std::basic_istream<utf16char> utf16istream;
123124
typedef std::basic_istringstream<utf16char> utf16istringstream;
124125
#endif
126+
127+
128+
#if defined(_WIN32)
129+
// Include on everything except Windows Desktop ARM, unless explicitly excluded.
130+
#if !defined(CPPREST_EXCLUDE_WEBSOCKETS)
131+
#if defined(WINAPI_FAMILY)
132+
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && defined(_M_ARM)
133+
#define CPPREST_EXCLUDE_WEBSOCKETS
134+
#endif
135+
#else
136+
#if defined(_M_ARM)
137+
#define CPPREST_EXCLUDE_WEBSOCKETS
138+
#endif
139+
#endif
140+
#endif
141+
#endif

Release/include/cpprest/details/cpprest_compat.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@
3636

3737
#define CASABLANCA_UNREFERENCED_PARAMETER(x) (x)
3838

39-
#if _MSC_VER >= 1700
40-
// Support VS2012 SAL syntax only
4139
#include <sal.h>
42-
#else
43-
#include "cpprest/details/nosal.h"
44-
#endif
4540

4641
#else // End settings specific to Windows
4742

Release/include/cpprest/ws_client.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
#ifndef _CASA_WS_CLIENT_H
2626
#define _CASA_WS_CLIENT_H
2727

28-
// Include on everything except Windows Desktop ARM, unless explicitly excluded.
29-
#if !defined(_MSC_VER) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(_M_ARM)) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
28+
#include "cpprest/details/basic_types.h"
29+
30+
#if !defined(CPPREST_EXCLUDE_WEBSOCKETS)
3031

3132
#include <memory>
3233
#include <limits>
@@ -37,7 +38,6 @@
3738
#include "cpprest/uri.h"
3839
#include "cpprest/details/web_utilities.h"
3940
#include "cpprest/http_headers.h"
40-
#include "cpprest/details/basic_types.h"
4141
#include "cpprest/asyncrt_utils.h"
4242
#include "cpprest/ws_msg.h"
4343

Release/include/cpprest/ws_msg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
****/
2323
#pragma once
2424

25-
// Include on everything except Windows Desktop ARM, unless explicitly excluded.
26-
#if !defined(_MSC_VER) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(_M_ARM)) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
25+
#include "cpprest/details/basic_types.h"
26+
27+
#if !defined(CPPREST_EXCLUDE_WEBSOCKETS)
2728

2829
#include <memory>
2930
#include <limits>
@@ -32,7 +33,6 @@
3233
#include "cpprest/streams.h"
3334
#include "cpprest/containerstream.h"
3435
#include "cpprest/uri.h"
35-
#include "cpprest/details/basic_types.h"
3636
#include "cpprest/asyncrt_utils.h"
3737

3838
namespace web

Release/src/websockets/client/ws_client.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
****/
2323
#include "stdafx.h"
2424

25-
// Include on everything except Windows Desktop ARM, unless explicitly excluded.
26-
#if !defined(_MSC_VER) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(_M_ARM)) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
25+
#if !defined(CPPREST_EXCLUDE_WEBSOCKETS)
2726

2827
namespace web
2928
{

Release/src/websockets/client/ws_client_wspp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
#include "stdafx.h"
2727
#include "cpprest/details/x509_cert_utilities.h"
2828

29-
// Include on everything except Windows Desktop ARM, unless explicitly excluded.
30-
#if !defined(_MSC_VER) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(_M_ARM)) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
29+
#if !defined(CPPREST_EXCLUDE_WEBSOCKETS)
3130

3231
// Force websocketpp to use C++ std::error_code instead of Boost.
3332
#define _WEBSOCKETPP_CPP11_SYSTEM_ERROR_

Release/src/websockets/client/ws_msg.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
****/
2727
#include "stdafx.h"
2828

29-
// Include on everything except Windows Desktop ARM, unless explicitly excluded.
30-
#if !defined(_MSC_VER) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(_M_ARM)) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
29+
#if !defined(CPPREST_EXCLUDE_WEBSOCKETS)
3130

3231
using namespace concurrency;
3332
using namespace concurrency::streams::details;

0 commit comments

Comments
 (0)