mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-30 15:19:01 +08:00
mdbx: refine attribute-based macros.
This commit is contained in:
38
src/osal.c
38
src/osal.c
@@ -157,18 +157,44 @@ typedef struct _FILE_PROVIDER_EXTERNAL_INFO_V1 {
|
||||
/* workaround for avoid musl libc wrong prototype */ ( \
|
||||
defined(__GLIBC__) || defined(__GNU_LIBRARY__))
|
||||
/* Prototype should match libc runtime. ISO POSIX (2003) & LSB 1.x-3.x */
|
||||
__nothrow __noreturn void __assert_fail(const char *assertion, const char *file,
|
||||
unsigned line, const char *function);
|
||||
__extern_C void __assert_fail(const char *assertion, const char *file,
|
||||
unsigned line, const char *function)
|
||||
#ifdef __THROW
|
||||
__THROW
|
||||
#else
|
||||
__nothrow
|
||||
#endif /* __THROW */
|
||||
__noreturn;
|
||||
|
||||
#elif defined(__APPLE__) || defined(__MACH__)
|
||||
__nothrow __noreturn void __assert_rtn(const char *function, const char *file,
|
||||
int line, const char *assertion);
|
||||
__extern_C void __assert_rtn(const char *function, const char *file, int line,
|
||||
const char *assertion) /* __nothrow */
|
||||
#ifdef __dead2
|
||||
__dead2
|
||||
#else
|
||||
__noreturn
|
||||
#endif /* __dead2 */
|
||||
#ifdef __disable_tail_calls
|
||||
__disable_tail_calls
|
||||
#endif /* __disable_tail_calls */
|
||||
;
|
||||
|
||||
#define __assert_fail(assertion, file, line, function) \
|
||||
__assert_rtn(function, file, line, assertion)
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
|
||||
defined(__BSD__) || defined(__NETBSD__) || defined(__bsdi__) || \
|
||||
defined(__DragonFly__)
|
||||
__nothrow __noreturn void __assert(const char *function, const char *file,
|
||||
int line, const char *assertion);
|
||||
__extern_C void __assert(const char *function, const char *file, int line,
|
||||
const char *assertion) /* __nothrow */
|
||||
#ifdef __dead2
|
||||
__dead2
|
||||
#else
|
||||
__noreturn
|
||||
#endif /* __dead2 */
|
||||
#ifdef __disable_tail_calls
|
||||
__disable_tail_calls
|
||||
#endif /* __disable_tail_calls */
|
||||
;
|
||||
#define __assert_fail(assertion, file, line, function) \
|
||||
__assert(function, file, line, assertion)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user