mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 18:54:14 +08:00
mdbx: add __printf_args into defs.h
Change-Id: I0e6da5115bc427d04eb3ab59184152275c2a7cae
This commit is contained in:
parent
32c63077a4
commit
dbf66ec0bb
@ -327,6 +327,13 @@
|
|||||||
# define mdbx_func_ "<mdbx_unknown>"
|
# define mdbx_func_ "<mdbx_unknown>"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || __has_attribute(format)
|
||||||
|
#define __printf_args(format_index, first_arg) \
|
||||||
|
__attribute__((format(printf, format_index, first_arg)))
|
||||||
|
#else
|
||||||
|
#define __printf_args(format_index, first_arg)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#if defined(USE_VALGRIND)
|
#if defined(USE_VALGRIND)
|
||||||
|
@ -17,16 +17,7 @@
|
|||||||
#include "base.h"
|
#include "base.h"
|
||||||
|
|
||||||
void __noreturn usage(void);
|
void __noreturn usage(void);
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#define __printf_args(format_index, first_arg) \
|
|
||||||
__attribute__((format(printf, format_index, first_arg)))
|
|
||||||
#else
|
|
||||||
#define __printf_args(format_index, first_arg)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void __noreturn __printf_args(1, 2) failure(const char *fmt, ...);
|
void __noreturn __printf_args(1, 2) failure(const char *fmt, ...);
|
||||||
|
|
||||||
void __noreturn failure_perror(const char *what, int errnum);
|
void __noreturn failure_perror(const char *what, int errnum);
|
||||||
const char *test_strerror(int errnum);
|
const char *test_strerror(int errnum);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user