From 623911eac45b06be5ed5ba683d0044bc73acae3d Mon Sep 17 00:00:00 2001 From: "Qi Liu (whitebob)" Date: Tue, 12 May 2020 17:11:49 +0800 Subject: [PATCH] Bugfix: Macro INTERNAL conflict with gRPC header status contant defintion. In grpc/include/grpcpp/impl/codegen/status_code_enum.h , enum StatusCode 117- /// Internal errors. Means some invariants expected by underlying System has 118- /// been broken. If you see one of these errors, Something is very broken. 119: INTERNAL = 13, Replace Macro INTERNAL with INTERNAL_API will solve this conflict. --- include/mysqlx/common/api.h | 8 ++++---- include/mysqlx/devapi/detail/result.h | 2 +- include/mysqlx/devapi/detail/row.h | 2 +- include/mysqlx/devapi/detail/session.h | 6 +++--- include/mysqlx/devapi/document.h | 6 +++--- include/mysqlx/devapi/result.h | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/mysqlx/common/api.h b/include/mysqlx/common/api.h index 9e0525f35..a48a386a5 100644 --- a/include/mysqlx/common/api.h +++ b/include/mysqlx/common/api.h @@ -165,16 +165,16 @@ MYSQLX_ABI_END(2,0) #if defined CONCPP_BUILD_SHARED #define PUBLIC_API DLL_EXPORT - #define INTERNAL DLL_LOCAL + #define INTERNAL_API DLL_LOCAL #elif defined CONCPP_BUILD_STATIC #define PUBLIC_API - #define INTERNAL + #define INTERNAL_API #elif !defined STATIC_CONCPP #define PUBLIC_API DLL_IMPORT - #define INTERNAL + #define INTERNAL_API #else #define PUBLIC_API - #define INTERNAL + #define INTERNAL_API #endif diff --git a/include/mysqlx/devapi/detail/result.h b/include/mysqlx/devapi/detail/result.h index d2c291335..51a5cfc61 100644 --- a/include/mysqlx/devapi/detail/result.h +++ b/include/mysqlx/devapi/detail/result.h @@ -238,7 +238,7 @@ class PUBLIC_API Column_detail friend Result_detail; friend RowResult; - struct INTERNAL Access; + struct INTERNAL_API Access; friend Access; }; diff --git a/include/mysqlx/devapi/detail/row.h b/include/mysqlx/devapi/detail/row.h index c20c51dba..953d56753 100644 --- a/include/mysqlx/devapi/detail/row.h +++ b/include/mysqlx/devapi/detail/row.h @@ -58,7 +58,7 @@ class PUBLIC_API Row_detail { protected: - class INTERNAL Impl; + class INTERNAL_API Impl; DLL_WARNINGS_PUSH std::shared_ptr m_impl; DLL_WARNINGS_POP diff --git a/include/mysqlx/devapi/detail/session.h b/include/mysqlx/devapi/detail/session.h index 38230519c..4dda9e9f8 100644 --- a/include/mysqlx/devapi/detail/session.h +++ b/include/mysqlx/devapi/detail/session.h @@ -291,7 +291,7 @@ struct PUBLIC_API Client_detail common::Shared_session_pool& get_session_pool(); - struct INTERNAL Impl; + struct INTERNAL_API Impl; DLL_WARNINGS_PUSH Shared_client_impl m_impl = NULL; @@ -351,7 +351,7 @@ struct PUBLIC_API Session_detail } - struct INTERNAL Impl; + struct INTERNAL_API Impl; /* Note: Session implementation is shared with result objects because it @@ -394,7 +394,7 @@ struct PUBLIC_API Session_detail return *m_impl; } - INTERNAL cdk::Session& get_cdk_session(); + INTERNAL_API cdk::Session& get_cdk_session(); void close(); diff --git a/include/mysqlx/devapi/document.h b/include/mysqlx/devapi/document.h index f376707d0..ca30f1cfe 100644 --- a/include/mysqlx/devapi/document.h +++ b/include/mysqlx/devapi/document.h @@ -78,7 +78,7 @@ class PUBLIC_API DbDoc { // TODO: move PUBLIC_API stuff to a detail class - class INTERNAL Impl; + class INTERNAL_API Impl; DLL_WARNINGS_PUSH @@ -86,7 +86,7 @@ DLL_WARNINGS_PUSH DLL_WARNINGS_POP - INTERNAL DbDoc(const std::shared_ptr&); + INTERNAL_API DbDoc(const std::shared_ptr&); const char* get_json() const; @@ -517,7 +517,7 @@ class Value friend mysqlx::string; ///@endcond IGNORE - struct INTERNAL Access; + struct INTERNAL_API Access; friend Access; }; diff --git a/include/mysqlx/devapi/result.h b/include/mysqlx/devapi/result.h index bc56c0bab..ca96e7027 100644 --- a/include/mysqlx/devapi/result.h +++ b/include/mysqlx/devapi/result.h @@ -431,7 +431,7 @@ class Column public: friend RowResult; - struct INTERNAL Access; + struct INTERNAL_API Access; friend Access; };