Skip to content

Commit faacb7b

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into trailing_whitespace
Conflicts: Release/include/compat/pplxtasks.h Release/include/cpprest/astreambuf.h Release/include/cpprest/details/windows_compat.h Release/include/cpprest/filestream.h Release/include/cpprest/streams.h Release/src/http/client/http_win7.cpp Release/src/http/client/http_win8.cpp Release/src/json/json.cpp
2 parents 1b52425 + 9244af5 commit faacb7b

File tree

144 files changed

+2985
-2697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+2985
-2697
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ obj/
4444
[Bb]in
4545
Binaries/
4646
Intermediate/
47+
# The packages folder can be ignored because of Package Restore
48+
**/packages/*
49+
# except build/, which is used as an MSBuild target.
50+
!**/packages/build/
51+

Build/version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<CppRestBaseFileName>cpprest</CppRestBaseFileName>
55
<CppRestSDKVersionMajor>2</CppRestSDKVersionMajor>
6-
<CppRestSDKVersionMinor>2</CppRestSDKVersionMinor>
6+
<CppRestSDKVersionMinor>3</CppRestSDKVersionMinor>
77
<CppRestSDKVersionRevision>0</CppRestSDKVersionRevision>
88
<CppRestSDKVersionFileSuffix>$(CppRestSDKVersionMajor)_$(CppRestSDKVersionMinor)</CppRestSDKVersionFileSuffix>
99
<CppRestSDKVersionString>$(CppRestSDKVersionMajor).$(CppRestSDKVersionMinor)</CppRestSDKVersionString>

Build_iOS/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ execute_process(WORKING_DIRECTORY ${ARM_BINARY_DIR}
3535
add_custom_target(sim
3636
COMMAND ${CMAKE_COMMAND}
3737
--build ${SIM_BINARY_DIR}
38-
--target cpprest
3938
--config ${CMAKE_BUILD_TYPE}
4039
COMMENT "Building for i386 (simulator)"
4140
VERBATIM
@@ -45,7 +44,6 @@ add_custom_target(sim
4544
add_custom_target(arm
4645
COMMAND ${CMAKE_COMMAND}
4746
--build ${ARM_BINARY_DIR}
48-
--target cpprest
4947
--config ${CMAKE_BUILD_TYPE}
5048
COMMENT "Building for armv7, armv7s, arm64"
5149
VERBATIM

Build_iOS/configure.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
#!/bin/bash
22
set -e
33

4-
git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
5-
pushd OpenSSL-for-iPhone
6-
./build-libssl.sh
7-
popd
8-
mkdir openssl
9-
mv OpenSSL-for-iPhone/include openssl
10-
mv OpenSSL-for-iPhone/lib openssl
114
git clone https://git.gitorious.org/boostoniphone/galbraithjosephs-boostoniphone.git boostoniphone
125
pushd boostoniphone
13-
sed -e 's/\${BOOST_LIBS:=".*"}/\${BOOST_LIBS:="random thread filesystem regex locale system"}/g' -i .bak boost.sh
6+
git apply ../fix_boost_version.patch
147
./boost.sh
158
pushd ios/framework/boost.framework/Versions/A
169
mkdir Headers2
@@ -19,6 +12,15 @@ mv Headers2 Headers
1912
popd
2013
popd
2114
mv boostoniphone/ios/framework/boost.framework .
15+
16+
git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
17+
pushd OpenSSL-for-iPhone
18+
./build-libssl.sh
19+
popd
20+
mkdir openssl
21+
mv OpenSSL-for-iPhone/include openssl
22+
mv OpenSSL-for-iPhone/lib openssl
23+
2224
hg clone https://code.google.com/p/ios-cmake/
2325
mkdir build.ios
2426
pushd build.ios

Build_iOS/fix_boost_version.patch

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From e5b3bf1392d3dc04f1391c4ad60118a394b5219f Mon Sep 17 00:00:00 2001
2+
From: Steve Gates <[email protected]>
3+
Date: Thu, 30 Oct 2014 17:42:43 -0700
4+
Subject: [PATCH] Fixing boost.sh to use Boost version 1.56 and iOS 8.0.
5+
6+
---
7+
boost.sh | 6 +++---
8+
1 file changed, 3 insertions(+), 3 deletions(-)
9+
10+
diff --git a/boost.sh b/boost.sh
11+
index 8847aac..2a76aec 100755
12+
--- a/boost.sh
13+
+++ b/boost.sh
14+
@@ -18,8 +18,8 @@
15+
# same directory as this script, and run "./boost.sh". Grab a cuppa. And voila.
16+
#===============================================================================
17+
18+
-: ${BOOST_LIBS:="filesystem date_time system"}
19+
-: ${IPHONE_SDKVERSION:=7.0}
20+
+: ${BOOST_LIBS:="thread chrono filesystem regex locale system random"}
21+
+: ${IPHONE_SDKVERSION:=8.0}
22+
: ${OSX_SDKVERSION:=10.9}
23+
: ${XCODE_ROOT:=`xcode-select -print-path`}
24+
: ${EXTRA_CPPFLAGS:="-DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS -std=c++11 -stdlib=libc++"}
25+
@@ -84,7 +84,7 @@ updateBoost()
26+
then
27+
git checkout $BOOST_SRC/tools/build/v2/user-config.jam
28+
else
29+
- git clone --recursive https://github.com/boostorg/boost.git $BOOST_SRC
30+
+ git clone --recursive --branch boost-1.56.0 https://github.com/boostorg/boost.git $BOOST_SRC
31+
pushd $BOOST_SRC
32+
./bootstrap.sh
33+
./b2 headers
34+
--
35+
1.9.3 (Apple Git-50)
36+

Build_iOS/ios_cmake_clang3.patch

Lines changed: 0 additions & 34 deletions
This file was deleted.

Release/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ elseif(UNIX) # This includes OSX
7171
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
7272
option(BUILD_TESTS "Build tests." ON)
7373
option(BUILD_SAMPLES "Build samples." ON)
74+
option(CASA_INSTALL_HEADERS "Install header files." ON)
75+
if(CASA_INSTALL_HEADERS)
76+
file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h)
77+
install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest)
78+
file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h)
79+
install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx)
80+
file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h)
81+
install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details)
82+
endif()
7483
elseif(WIN32)
7584
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
7685
option(BUILD_TESTS "Build tests." ON)
@@ -169,4 +178,3 @@ endif()
169178
if(BUILD_SAMPLES)
170179
add_subdirectory(samples)
171180
endif()
172-

Release/include/compat/pplxtasks.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

Release/include/cpprest/astreambuf.h

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,47 +60,64 @@ namespace concurrency = Concurrency;
6060
#pragma warning(disable : 4718)
6161
#endif
6262

63-
#ifndef _MS_WINDOWS
64-
// TFS 579628 - 1206: figure out how to avoid having this specialization for Linux (beware of 64-bit Linux)
65-
namespace std {
63+
namespace Concurrency
64+
{
65+
/// Library for asynchronous streams.
66+
namespace streams
67+
{
68+
/// <summary>
69+
/// Extending the standard char_traits type with one that adds values and types
70+
/// that are unique to "C++ REST SDK" streams.
71+
/// </summary>
72+
/// <typeparam name="_CharType">
73+
/// The data type of the basic element of the stream.
74+
/// </typeparam>
75+
template<typename _CharType>
76+
struct char_traits : std::char_traits<_CharType>
77+
{
78+
/// <summary>
79+
/// Some synchronous functions will return this value if the operation
80+
/// requires an asynchronous call in a given situation.
81+
/// </summary>
82+
/// <returns>An <c>int_type</c> value which implies that an asynchronous call is required.</returns>
83+
static typename std::char_traits<_CharType>::int_type requires_async() { return std::char_traits<_CharType>::eof()-1; }
84+
};
85+
#if !defined(_MS_WINDOWS)
6686
template<>
67-
struct char_traits<unsigned char> : private char_traits<char>
87+
struct char_traits<unsigned char> : private std::char_traits<char>
6888
{
6989
public:
7090
typedef unsigned char char_type;
7191

72-
using char_traits<char>::eof;
73-
using char_traits<char>::int_type;
74-
using char_traits<char>::off_type;
75-
using char_traits<char>::pos_type;
92+
using std::char_traits<char>::eof;
93+
using std::char_traits<char>::int_type;
94+
using std::char_traits<char>::off_type;
95+
using std::char_traits<char>::pos_type;
7696

7797
static size_t length(const unsigned char* str)
7898
{
79-
return char_traits<char>::length(reinterpret_cast<const char*>(str));
99+
return std::char_traits<char>::length(reinterpret_cast<const char*>(str));
80100
}
81101

82102
static void assign(unsigned char& left, const unsigned char& right) { left = right; }
83103
static unsigned char* assign(unsigned char* left, size_t n, unsigned char value)
84104
{
85-
return reinterpret_cast<unsigned char*>(char_traits<char>::assign(reinterpret_cast<char*>(left), n, static_cast<char>(value)));
105+
return reinterpret_cast<unsigned char*>(std::char_traits<char>::assign(reinterpret_cast<char*>(left), n, static_cast<char>(value)));
86106
}
87107

88108
static unsigned char* copy(unsigned char* left, const unsigned char* right, size_t n)
89109
{
90-
return reinterpret_cast<unsigned char*>(char_traits<char>::copy(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
110+
return reinterpret_cast<unsigned char*>(std::char_traits<char>::copy(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
91111
}
92112

93113
static unsigned char* move(unsigned char* left, const unsigned char* right, size_t n)
94114
{
95-
return reinterpret_cast<unsigned char*>(char_traits<char>::move(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
115+
return reinterpret_cast<unsigned char*>(std::char_traits<char>::move(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
96116
}
97-
};
98-
}
99-
#endif // _MS_WINDOWS
100117

101118
namespace Concurrency
102119
{
103-
/// Library for asychronous streams.
120+
/// Library for asynchronous streams.
104121
namespace streams
105122
{
106123
/// <summary>
@@ -120,6 +137,7 @@ namespace streams
120137
/// <returns>An <c>int_type</c> value which implies that an asynchronous call is required.</returns>
121138
static typename std::char_traits<_CharType>::int_type requires_async() { return std::char_traits<_CharType>::eof()-1; }
122139
};
140+
#endif
123141

124142
namespace details {
125143

@@ -424,7 +442,7 @@ namespace streams
424442
}
425443

426444
// After the flush_internal task completed, "this" object may have been destroyed,
427-
// accessing the memebers is invalid, use shared_from_this to avoid access violation exception.
445+
// accessing the members is invalid, use shared_from_this to avoid access violation exception.
428446
auto this_ptr = std::static_pointer_cast<streambuf_state_manager>(this->shared_from_this());
429447

430448
if (mode & std::ios_base::out && can_write()) {

Release/include/cpprest/asyncrt_utils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ namespace details
250250
class windows_category_impl : public std::error_category
251251
{
252252
public:
253-
virtual const char *name() const _noexcept { return "windows"; }
253+
virtual const char *name() const CPPREST_NOEXCEPT { return "windows"; }
254254

255-
_ASYNCRTIMP virtual std::string message(int errorCode) const _noexcept;
255+
_ASYNCRTIMP virtual std::string message(int errorCode) const CPPREST_NOEXCEPT;
256256

257-
_ASYNCRTIMP virtual std::error_condition default_error_condition(int errorCode) const _noexcept;
257+
_ASYNCRTIMP virtual std::error_condition default_error_condition(int errorCode) const CPPREST_NOEXCEPT;
258258
};
259259

260260
/// <summary>

0 commit comments

Comments
 (0)