mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-10-31 15:38:57 +08:00 
			
		
		
		
	mdbx: доработка MDBX_DEPRECATED_ENUM для старых компиляторов при включении С++11.
				
					
				
			This commit is contained in:
		
							
								
								
									
										19
									
								
								mdbx.h
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								mdbx.h
									
									
									
									
									
								
							| @@ -323,14 +323,16 @@ typedef mode_t mdbx_mode_t; | |||||||
| #ifdef __deprecated | #ifdef __deprecated | ||||||
| #define MDBX_DEPRECATED __deprecated | #define MDBX_DEPRECATED __deprecated | ||||||
| #elif defined(DOXYGEN) ||                                                      \ | #elif defined(DOXYGEN) ||                                                      \ | ||||||
|     (defined(__cplusplus) && __cplusplus >= 201403L &&                         \ |     ((!defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5) &&             \ | ||||||
|      __has_cpp_attribute(deprecated) &&                                        \ |      ((defined(__cplusplus) && __cplusplus >= 201403L &&                       \ | ||||||
|      __has_cpp_attribute(deprecated) >= 201309L) ||                            \ |        __has_cpp_attribute(deprecated) &&                                      \ | ||||||
|     (!defined(__cplusplus) && defined(__STDC_VERSION__) &&                     \ |        __has_cpp_attribute(deprecated) >= 201309L) ||                          \ | ||||||
|      __STDC_VERSION__ >= 202304L) |       (!defined(__cplusplus) && defined(__STDC_VERSION__) &&                   \ | ||||||
|  |        __STDC_VERSION__ >= 202304L))) | ||||||
| #define MDBX_DEPRECATED [[deprecated]] | #define MDBX_DEPRECATED [[deprecated]] | ||||||
| #elif (defined(__GNUC__) && __GNUC__ > 5) ||                                   \ | #elif (defined(__GNUC__) && __GNUC__ > 5) ||                                   \ | ||||||
|     (__has_attribute(__deprecated__) && !defined(__GNUC__)) |     (__has_attribute(__deprecated__) &&                                        \ | ||||||
|  |      (!defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5)) | ||||||
| #define MDBX_DEPRECATED __attribute__((__deprecated__)) | #define MDBX_DEPRECATED __attribute__((__deprecated__)) | ||||||
| #elif defined(_MSC_VER) | #elif defined(_MSC_VER) | ||||||
| #define MDBX_DEPRECATED __declspec(deprecated) | #define MDBX_DEPRECATED __declspec(deprecated) | ||||||
| @@ -340,7 +342,10 @@ typedef mode_t mdbx_mode_t; | |||||||
| #endif /* MDBX_DEPRECATED */ | #endif /* MDBX_DEPRECATED */ | ||||||
|  |  | ||||||
| #ifndef MDBX_DEPRECATED_ENUM | #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 | #define MDBX_DEPRECATED_ENUM MDBX_DEPRECATED | ||||||
| #else | #else | ||||||
| #define MDBX_DEPRECATED_ENUM /* avoid madness MSVC */ | #define MDBX_DEPRECATED_ENUM /* avoid madness MSVC */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user