Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows GetMessage #2589

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/aws-cpp-sdk-core/include/aws/core/client/AWSError.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/StringUtils.h>

// TODO: temporary fix for naming conflicts on Windows.
#ifdef _WIN32
#ifdef GetMessage
#undef GetMessage
#endif
#endif

namespace Aws
{
namespace Client
Expand Down Expand Up @@ -114,7 +107,17 @@ namespace Aws
/**
* Gets the error message.
*/
#ifdef _WIN32
#pragma push_macro("GetMessage")
#undef GetMessage
inline const Aws::String& GetMessage() const { return m_message; }
inline const Aws::String& GetMessageW() const { return GetMessage(); }
inline const Aws::String& GetMessageA() const { return GetMessage(); }

#pragma pop_macro("GetMessage")
#else
inline const Aws::String& GetMessage() const { return m_message; }
#endif //#ifdef _WIN32
/**
* Sets the error message
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

// TODO: temporary fix for naming conflicts on Windows.
#ifdef _WIN32
#ifdef GetMessage
#undef GetMessage
#endif
#ifdef GetObject
#undef GetObject
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ using namespace Aws::KMS::Model;
using namespace Aws::Client;
using namespace Aws::S3Encryption;

// TODO: temporary fix for naming conflicts on Windows.
#ifdef _WIN32
#ifdef GetMessage
#undef GetMessage
#endif
#endif

namespace Aws
{
namespace S3Encryption
Expand Down
7 changes: 0 additions & 7 deletions tests/aws-cpp-sdk-core-tests/aws/client/AWSClientTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@
#include <thread>
#include <aws/core/utils/logging/LogMacros.h>

// TODO: temporary fix for naming conflicts for Windows.
#ifdef _WIN32
#ifdef GetMessage
#undef GetMessage
#endif
#endif

using namespace Aws;
using namespace Aws::Client;
using namespace Aws::Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ using namespace Aws::MediaStoreData::Model;

// TODO: temporary fix for naming conflicts on Windows.
#ifdef _WIN32
#ifdef GetMessage
#undef GetMessage
#endif
#ifdef GetObject
#undef GetObject
#endif
Expand Down
4 changes: 0 additions & 4 deletions tests/testing-resources/include/aws/testing/AwsTestHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#include <aws/core/VersionConfig.h>
#include <aws/core/utils/DateTime.h>

#if defined(GetMessage)
#undef GetMessage
#endif

#define AWS_ASSERT_SUCCESS(awsCppSdkOutcome) \
ASSERT_TRUE(awsCppSdkOutcome.IsSuccess()) << "Error details: " << awsCppSdkOutcome.GetError() \
<< "\nNow timestamp: " << Aws::Utils::DateTime::Now().ToGmtString(Aws::Utils::DateFormat::ISO_8601_BASIC)
Expand Down