mdbx: add mdbx_printf_args() macro.

Change-Id: I7fca72f8cc912d8644ecf149b755c78fb3cc7e23
This commit is contained in:
Leonid Yuriev
2020-09-10 15:35:43 +03:00
parent 369612a9b2
commit 58bcfb006e
7 changed files with 27 additions and 27 deletions

9
mdbx.h
View File

@@ -432,6 +432,15 @@ typedef mode_t mdbx_mode_t;
#endif
#endif /* __noreturn */
#ifndef mdbx_printf_args
#if defined(__GNUC__) || __has_attribute(__format__)
#define mdbx_printf_args(format_index, first_arg) \
__attribute__((__format__(__printf__, format_index, first_arg)))
#else
#define mdbx_printf_args(format_index, first_arg)
#endif
#endif /* mdbx_printf_args */
#ifndef DEFINE_ENUM_FLAG_OPERATORS
#if defined(__cplusplus)
/// Define operator overloads to enable bit operations on enum values that are