Skip to content

Commit 6bf4300

Browse files
committed
applied aws#45
1 parent 0b16f4f commit 6bf4300

File tree

6 files changed

+34
-24
lines changed

6 files changed

+34
-24
lines changed
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
/*
2-
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License").
5-
* You may not use this file except in compliance with the License.
6-
* A copy of the License is located at
7-
*
8-
* http://aws.amazon.com/apache2.0
9-
*
10-
* or in the "license" file accompanying this file. This file is distributed
11-
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12-
* express or implied. See the License for the specific language governing
13-
* permissions and limitations under the License.
14-
*/
15-
16-
#define AWS_SDK_VERSION_STRING "1.3.29"
1+
/*
2+
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
#define AWS_SDK_VERSION_STRING "1.3.29"

aws-cpp-sdk-core/include/aws/core/utils/Array.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
#include <cstring>
2525
#include <algorithm>
2626

27-
#ifdef _WIN32
27+
#ifdef _MSC_VER
2828

2929
#include <iterator>
3030

31-
#endif // _WIN32
31+
#endif // _MSC_VER
3232

3333
namespace Aws
3434
{
@@ -64,7 +64,7 @@ namespace Aws
6464
{
6565
m_data.reset(Aws::NewArray<T>(m_size, ARRAY_ALLOCATION_TAG));
6666

67-
#ifdef _WIN32
67+
#ifdef _MSC_VER
6868
std::copy(arrayToCopy, arrayToCopy + arraySize, stdext::checked_array_iterator< T * >(m_data.get(), m_size));
6969
#else
7070
std::copy(arrayToCopy, arrayToCopy + arraySize, m_data.get());
@@ -92,7 +92,7 @@ namespace Aws
9292
if(arr->m_size > 0 && arr->m_data)
9393
{
9494
size_t arraySize = arr->m_size;
95-
#ifdef _WIN32
95+
#ifdef _MSC_VER
9696
std::copy(arr->m_data.get(), arr->m_data.get() + arraySize, stdext::checked_array_iterator< T * >(m_data.get() + location, m_size));
9797
#else
9898
std::copy(arr->m_data.get(), arr->m_data.get() + arraySize, m_data.get() + location);
@@ -111,7 +111,7 @@ namespace Aws
111111
{
112112
m_data.reset(Aws::NewArray<T>(m_size, ARRAY_ALLOCATION_TAG));
113113

114-
#ifdef _WIN32
114+
#ifdef _MSC_VER
115115
std::copy(other.m_data.get(), other.m_data.get() + other.m_size, stdext::checked_array_iterator< T * >(m_data.get(), m_size));
116116
#else
117117
std::copy(other.m_data.get(), other.m_data.get() + other.m_size, m_data.get());
@@ -144,7 +144,7 @@ namespace Aws
144144
{
145145
m_data.reset(Aws::NewArray<T>(m_size, ARRAY_ALLOCATION_TAG));
146146

147-
#ifdef _WIN32
147+
#ifdef _MSC_VER
148148
std::copy(other.m_data.get(), other.m_data.get() + other.m_size, stdext::checked_array_iterator< T * >(m_data.get(), m_size));
149149
#else
150150
std::copy(other.m_data.get(), other.m_data.get() + other.m_size, m_data.get());

aws-cpp-sdk-core/source/http/HttpClientFactory.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,17 @@
1818
#if ENABLE_CURL_CLIENT
1919
#include <aws/core/http/curl/CurlHttpClient.h>
2020
#include <signal.h>
21+
#ifndef SIGPIPE
22+
#define SIGPIPE 13
23+
#endif
2124

2225
#elif ENABLE_WINDOWS_CLIENT
26+
#error "Please force libcurl"
2327
#include <aws/core/client/ClientConfiguration.h>
2428
#if ENABLE_WINDOWS_IXML_HTTP_REQUEST_2_CLIENT
2529
#include <aws/core/http/windows/IXmlHttpRequest2HttpClient.h>
2630
#else
31+
#error "Please force libcurl"
2732
#include <aws/core/http/windows/WinINetSyncHttpClient.h>
2833
#include <aws/core/http/windows/WinHttpSyncHttpClient.h>
2934
#endif

aws-cpp-sdk-core/source/platform/windows/Environment.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ that would need to be manually freed in all the client functions, just copy it i
2929
*/
3030
Aws::String GetEnv(const char *variableName)
3131
{
32+
#ifdef _MSC_VER
3233
char* variableValue = nullptr;
3334
std::size_t valueSize = 0;
3435
auto queryResult = _dupenv_s(&variableValue, &valueSize, variableName);
@@ -39,7 +40,9 @@ Aws::String GetEnv(const char *variableName)
3940
result.assign(variableValue, valueSize - 1); // don't copy the c-string terminator byte
4041
free(variableValue);
4142
}
42-
43+
#else
44+
Aws::String result = std::getenv(variablename);
45+
#endif
4346
return result;
4447
}
4548

aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ Aws::String CreateTempFilePath()
279279
{
280280
#ifdef _MSC_VER
281281
#pragma warning(disable: 4996) // _CRT_SECURE_NO_WARNINGS
282+
#else
283+
#define L_tmpname_s 4095
282284
#endif
283285
char s_tempName[L_tmpnam_s+1];
284286

cmake/compiler_settings.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ macro(set_gcc_flags)
4949
endmacro()
5050

5151
macro(set_gcc_warnings)
52-
list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")
52+
list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-pedantic" "-Wextra")
5353
if(COMPILER_CLANG)
5454
if(PLATFORM_ANDROID)
5555
# when using clang with libc and API lower than 21 we need to include Android support headers and ignore the gnu-include-next warning.

0 commit comments

Comments
 (0)