Skip to content

Commit e4c3c54

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into development
2 parents e83d8b9 + b6de9c2 commit e4c3c54

File tree

9 files changed

+23
-34
lines changed

9 files changed

+23
-34
lines changed

CONTRIBUTORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jracle
2020
gandziej
2121
adish
2222
LeonidCSIT
23+
LocutusOfBorg
2324

2425
AutoDesk Inc.
2526
Cyrille Fauvel (cyrillef)

Release/CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,20 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
165165

166166
# These settings can be used by the test targets
167167
set(Casablanca_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
168-
set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include ${Boost_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libs/websocketpp)
168+
169+
find_path(WEBSOCKETPP_CONFIG websocketpp-config.cmake
170+
HINTS /usr/lib/cmake/websocketpp)
171+
find_path(WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake
172+
HINTS /usr/lib/cmake/websocketpp)
173+
if(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
174+
include(${WEBSOCKETPP_CONFIG}/websocketpp-config.cmake)
175+
include(${WEBSOCKETPP_CONFIG}/websocketpp-configVersion.cmake)
176+
message("-- Found websocketpp version " ${PACKAGE_VERSION} " on system")
177+
set(Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${WEBSOCKETPP_INCLUDE_DIR})
178+
else(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
179+
set(Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libs/websocketpp)
180+
message("-- websocketpp not found, using the embedded version")
181+
endif(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
169182

170183
set(Casablanca_LIBRARY ${LIB}cpprest)
171184
set(Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK})

Release/include/cpprest/details/basic_types.h

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

3534
#ifndef _WIN32
3635
# define __STDC_LIMIT_MACROS

Release/include/cpprest/details/cpprest_compat.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,11 @@
5555
// No SAL on non Windows platforms
5656
#include "cpprest/details/nosal.h"
5757

58-
#if defined(__APPLE__) // Settings specific to Apple
59-
#define __cdecl
58+
#if not defined __cdecl
59+
#if defined cdecl
60+
#define __cdecl __attribute__ ((cdecl))
6061
#else
61-
62-
// Settings specific to Linux and Android
63-
64-
// Ignore cdecl on ANDROID ARM and 64bit
65-
#if defined(__ANDROID__) && defined(__arm__) || defined(__LP64__)
6662
#define __cdecl
67-
#else
68-
#define __cdecl __attribute__ ((cdecl))
6963
#endif
7064

7165
#if defined(__ANDROID__)

Release/include/pplx/pplxcancellation_token.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#endif
3636

3737
#include <string>
38-
#include <pplx/pplxinterface.h>
38+
#include "pplx/pplxinterface.h"
3939

4040
#pragma pack(push,_CRT_PACKING)
4141
// All header files are required to be protected from the macro new

Release/include/pplx/pplxinterface.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,7 @@
4646
#include <atomic>
4747
#endif
4848

49-
#if (defined(ANDROID) || defined(__ANDROID__))
50-
// This prevents users from requiring -Wno-attributes when using gcc-4.8 with the android NDK.
51-
#define _pplx_cdecl
52-
#else
5349
#define _pplx_cdecl __cdecl
54-
#endif
5550

5651
namespace pplx
5752
{

Release/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include_directories(../include pch ${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR})
1+
include_directories(pch ${OPENSSL_INCLUDE_DIR})
22

33
set(SOURCES_COMMON
44
http/client/http_client_msg.cpp

Release/src/utilities/base64.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@ std::vector<unsigned char> _from_base64(const utility::string_t& input)
102102

103103
for (auto iter = input.begin(); iter != input.end(); ++iter,--size)
104104
{
105-
const auto ch = *iter;
106-
if ( ch < 0 )
107-
{
108-
throw std::runtime_error("invalid character found in base64 string");
109-
}
110-
const size_t ch_sz = static_cast<size_t>(ch);
105+
const size_t ch_sz = static_cast<size_t>(*iter);
111106
if ( ch_sz >= _base64_dectbl.size() || _base64_dectbl[ch_sz] == 255 )
112107
{
113108
throw std::runtime_error("invalid character found in base64 string");
@@ -122,12 +117,7 @@ std::vector<unsigned char> _from_base64(const utility::string_t& input)
122117
}
123118
if ( size == 2 )
124119
{
125-
const auto ch2 = *(iter+1);
126-
if ( ch2 < 0 )
127-
{
128-
throw std::runtime_error("invalid padding character found in base64 string");
129-
}
130-
const size_t ch2_sz = static_cast<size_t>(ch2);
120+
const size_t ch2_sz = static_cast<size_t>(*(iter+1));
131121
if ( ch2_sz >= _base64_dectbl.size() || _base64_dectbl[ch2_sz] != 254 )
132122
{
133123
throw std::runtime_error("invalid padding character found in base64 string");

Release/tests/common/TestRunner/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
include_directories(${Casablanca_INCLUDE_DIR}
2-
../UnitTestpp
3-
${Boost_INCLUDE_DIR}
4-
)
1+
include_directories(${Casablanca_INCLUDE_DIRS})
52

63
set(TR_SOURCES
74
test_runner.cpp

0 commit comments

Comments
 (0)