mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx: перемещение MDBX_NORETURN
в прототипах assert-failed для нового clang.
This commit is contained in:
parent
d2b74e4da5
commit
22233b0991
17
src/osal.c
17
src/osal.c
@ -146,13 +146,14 @@ __extern_C void __assert2(const char *file, int line, const char *function,
|
|||||||
__assert2(file, line, function, assertion)
|
__assert2(file, line, function, assertion)
|
||||||
|
|
||||||
#elif defined(__UCLIBC__)
|
#elif defined(__UCLIBC__)
|
||||||
__extern_C void __assert(const char *, const char *, unsigned, const char *)
|
MDBX_NORETURN __extern_C void __assert(const char *, const char *, unsigned,
|
||||||
|
const char *)
|
||||||
#ifdef __THROW
|
#ifdef __THROW
|
||||||
__THROW
|
__THROW
|
||||||
#else
|
#else
|
||||||
__nothrow
|
__nothrow
|
||||||
#endif /* __THROW */
|
#endif /* __THROW */
|
||||||
MDBX_NORETURN;
|
;
|
||||||
#define __assert_fail(assertion, file, line, function) \
|
#define __assert_fail(assertion, file, line, function) \
|
||||||
__assert(assertion, file, line, function)
|
__assert(assertion, file, line, function)
|
||||||
|
|
||||||
@ -160,14 +161,15 @@ __extern_C void __assert(const char *, const char *, unsigned, const char *)
|
|||||||
/* workaround for avoid musl libc wrong prototype */ ( \
|
/* workaround for avoid musl libc wrong prototype */ ( \
|
||||||
defined(__GLIBC__) || defined(__GNU_LIBRARY__))
|
defined(__GLIBC__) || defined(__GNU_LIBRARY__))
|
||||||
/* Prototype should match libc runtime. ISO POSIX (2003) & LSB 1.x-3.x */
|
/* Prototype should match libc runtime. ISO POSIX (2003) & LSB 1.x-3.x */
|
||||||
__extern_C void __assert_fail(const char *assertion, const char *file,
|
MDBX_NORETURN __extern_C void __assert_fail(const char *assertion,
|
||||||
unsigned line, const char *function)
|
const char *file, unsigned line,
|
||||||
|
const char *function)
|
||||||
#ifdef __THROW
|
#ifdef __THROW
|
||||||
__THROW
|
__THROW
|
||||||
#else
|
#else
|
||||||
__nothrow
|
__nothrow
|
||||||
#endif /* __THROW */
|
#endif /* __THROW */
|
||||||
MDBX_NORETURN;
|
;
|
||||||
|
|
||||||
#elif defined(__APPLE__) || defined(__MACH__)
|
#elif defined(__APPLE__) || defined(__MACH__)
|
||||||
__extern_C void __assert_rtn(const char *function, const char *file, int line,
|
__extern_C void __assert_rtn(const char *function, const char *file, int line,
|
||||||
@ -185,8 +187,9 @@ __extern_C void __assert_rtn(const char *function, const char *file, int line,
|
|||||||
#define __assert_fail(assertion, file, line, function) \
|
#define __assert_fail(assertion, file, line, function) \
|
||||||
__assert_rtn(function, file, line, assertion)
|
__assert_rtn(function, file, line, assertion)
|
||||||
#elif defined(__sun) || defined(__SVR4) || defined(__svr4__)
|
#elif defined(__sun) || defined(__SVR4) || defined(__svr4__)
|
||||||
__extern_C void __assert_c99(const char *assection, const char *file, int line,
|
MDBX_NORETURN __extern_C void __assert_c99(const char *assection,
|
||||||
const char *function) MDBX_NORETURN;
|
const char *file, int line,
|
||||||
|
const char *function);
|
||||||
#define __assert_fail(assertion, file, line, function) \
|
#define __assert_fail(assertion, file, line, function) \
|
||||||
__assert_c99(assertion, file, line, function)
|
__assert_c99(assertion, file, line, function)
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user