[NDK]
[reactos.git] / include / crt / assert.h
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #ifndef __ASSERT_H_
7 #define __ASSERT_H_
8
9 #include <crtdefs.h>
10
11 #ifdef NDEBUG
12
13 #ifndef assert
14 #define assert(_Expression) ((void)0)
15 #endif
16
17 #else /* !NDEBUG */
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 _CRTIMP void __cdecl _assert(const char *_Message,const char *_File,unsigned _Line);
24 _CRTIMP void __cdecl _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line);
25
26 #ifdef __cplusplus
27 }
28 #endif
29
30 #ifndef assert
31 //#define assert(_Expression) (void)((!!(_Expression)) || (_assert(#_Expression,__FILE__,__LINE__),0))
32 #define assert(_Expression) (void)((!!(_Expression)))// || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
33 #endif
34
35 #ifndef wassert
36 #define wassert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
37 #endif
38
39 #endif
40
41 #endif