From 4cc1c7d8de39bc5cb895be23066314bc38f3b04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sat, 9 Nov 2024 22:09:37 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=B4=D0=BE=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=20`MDBX=5FDEPRECATED=5FENUM`=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D1=81=D1=82=D0=B0=D1=80=D1=8B=D1=85=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=B8=D0=BB=D1=8F=D1=82=D0=BE=D1=80=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D0=B2=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=A1++11.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mdbx.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/mdbx.h b/mdbx.h index 2ae43a68..4b0ebbb9 100644 --- a/mdbx.h +++ b/mdbx.h @@ -323,14 +323,16 @@ typedef mode_t mdbx_mode_t; #ifdef __deprecated #define MDBX_DEPRECATED __deprecated #elif defined(DOXYGEN) || \ - (defined(__cplusplus) && __cplusplus >= 201403L && \ - __has_cpp_attribute(deprecated) && \ - __has_cpp_attribute(deprecated) >= 201309L) || \ - (!defined(__cplusplus) && defined(__STDC_VERSION__) && \ - __STDC_VERSION__ >= 202304L) + ((!defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5) && \ + ((defined(__cplusplus) && __cplusplus >= 201403L && \ + __has_cpp_attribute(deprecated) && \ + __has_cpp_attribute(deprecated) >= 201309L) || \ + (!defined(__cplusplus) && defined(__STDC_VERSION__) && \ + __STDC_VERSION__ >= 202304L))) #define MDBX_DEPRECATED [[deprecated]] #elif (defined(__GNUC__) && __GNUC__ > 5) || \ - (__has_attribute(__deprecated__) && !defined(__GNUC__)) + (__has_attribute(__deprecated__) && \ + (!defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5)) #define MDBX_DEPRECATED __attribute__((__deprecated__)) #elif defined(_MSC_VER) #define MDBX_DEPRECATED __declspec(deprecated) @@ -340,7 +342,10 @@ typedef mode_t mdbx_mode_t; #endif /* MDBX_DEPRECATED */ #ifndef MDBX_DEPRECATED_ENUM -#if !defined(DOXYGEN) && (!defined(_MSC_VER) || _MSC_VER >= 1930) +#if !defined(DOXYGEN) && \ + (!defined(_MSC_VER) || (defined(__cplusplus) && __cplusplus >= 201403L && \ + __has_cpp_attribute(deprecated) && \ + __has_cpp_attribute(deprecated) >= 201309L)) #define MDBX_DEPRECATED_ENUM MDBX_DEPRECATED #else #define MDBX_DEPRECATED_ENUM /* avoid madness MSVC */