2 * D header file for C99.
4 * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_assert.h.html, _assert.h)
6 * License: Distributed under the
7 * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
8 * (See accompanying file LICENSE)
9 * Source: $(DRUNTIMESRC core/stdc/_assert_.d)
10 * Standards: ISO/IEC 9899:1999 (E)
13 /****************************
14 * These are the various functions called by the assert() macro.
17 module core
.stdc
.assert_
;
25 else version (WatchOS
)
33 version (CRuntime_Microsoft
)
36 * Assert failure function in the Microsoft C library.
37 * `_assert` is not in assert.h, but it is in the library.
39 noreturn
_wassert(const(wchar)* exp
, const(wchar)* file
, uint line
);
41 noreturn
_assert(const(char)* exp
, const(char)* file
, uint line
);
46 * Assert failure function in the Darwin C library.
48 noreturn
__assert_rtn(const(char)* func
, const(char)* file
, uint line
, const(char)* exp
);
50 else version (FreeBSD
)
53 * Assert failure function in the FreeBSD C library.
55 noreturn
__assert(const(char)* func
, const(char)* file
, uint line
, const(char)* exp
);
60 * Assert failure function in the NetBSD C library.
62 noreturn
__assert(const(char)* file
, int line
, const(char)* exp
);
64 noreturn
__assert13(const(char)* file
, int line
, const(char)* func
, const(char)* exp
);
66 else version (OpenBSD
)
69 * Assert failure function in the OpenBSD C library.
71 noreturn
__assert(const(char)* file
, int line
, const(char)* exp
);
73 noreturn
__assert2(const(char)* file
, int line
, const(char)* func
, const(char)* exp
);
75 else version (DragonFlyBSD
)
78 * Assert failure function in the DragonFlyBSD C library.
80 noreturn
__assert(const(char)* func
, const(char)* file
, uint line
, const(char)* exp
);
82 else version (CRuntime_Glibc
)
85 * Assert failure functions in the GLIBC library.
87 noreturn
__assert(const(char)* exp
, const(char)* file
, uint line
);
89 noreturn
__assert_fail(const(char)* exp
, const(char)* file
, uint line
, const(char)* func
);
91 noreturn
__assert_perror_fail(int errnum
, const(char)* file
, uint line
, const(char)* func
);
93 else version (CRuntime_Bionic
)
96 * Assert failure functions in the Bionic library.
98 noreturn
__assert(const(char)* __file
, int __line
, const(char)* __msg
);
100 noreturn
__assert2(const(char)* __file
, int __line
, const(char)* __function
, const(char)* __msg
);
102 else version (CRuntime_Musl
)
105 * Assert failure function in the Musl C library.
107 noreturn
__assert_fail(const(char)* exp
, const(char)* file
, uint line
, const(char)* func
);
109 else version (CRuntime_Newlib
)
112 * Assert failure function in the Newlib library.
114 noreturn
__assert(const(char)* file
, int line
, const(char)* exp
);
116 noreturn
__assert_func(const(char)* file
, int line
, const(char)* func
, const(char)* exp
);
118 else version (CRuntime_UClibc
)
120 noreturn
__assert(const(char)* exp
, const(char)* file
, uint line
, const(char)* func
);
122 else version (Solaris
)
124 noreturn
__assert_c99(const(char)* exp
, const(char)* file
, uint line
, const(char)* func
);