2008-12-13 21:28:05 +00:00
|
|
|
/**
|
2007-09-24 11:40:54 +00:00
|
|
|
* This file has no copyright assigned and is placed in the Public Domain.
|
2008-12-13 21:28:05 +00:00
|
|
|
* This file is part of the w64 mingw-runtime package.
|
|
|
|
* No warranty is given; refer to the file DISCLAIMER within this package.
|
2007-09-24 11:40:54 +00:00
|
|
|
*/
|
2008-12-13 21:28:05 +00:00
|
|
|
#ifndef __ASSERT_H_
|
|
|
|
#define __ASSERT_H_
|
2007-09-24 11:40:54 +00:00
|
|
|
|
2008-12-21 23:33:19 +00:00
|
|
|
#include <crtdefs.h>
|
2007-09-24 11:40:54 +00:00
|
|
|
|
|
|
|
#ifdef NDEBUG
|
2008-12-22 20:59:56 +00:00
|
|
|
|
2008-12-13 21:28:05 +00:00
|
|
|
#ifndef assert
|
|
|
|
#define assert(_Expression) ((void)0)
|
|
|
|
#endif
|
2007-09-24 11:40:54 +00:00
|
|
|
|
2008-12-22 20:59:56 +00:00
|
|
|
#else /* !NDEBUG */
|
2007-09-24 11:40:54 +00:00
|
|
|
|
2008-12-13 21:28:05 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2007-09-24 11:40:54 +00:00
|
|
|
|
2013-03-04 21:24:47 +00:00
|
|
|
_CRTIMP
|
|
|
|
void
|
|
|
|
__cdecl
|
|
|
|
_assert(
|
|
|
|
_In_z_ const char *_Message,
|
|
|
|
_In_z_ const char *_File,
|
|
|
|
_In_ unsigned _Line);
|
|
|
|
|
|
|
|
_CRTIMP
|
|
|
|
void
|
|
|
|
__cdecl
|
|
|
|
_wassert(
|
|
|
|
_In_z_ const wchar_t *_Message,
|
|
|
|
_In_z_ const wchar_t *_File,
|
|
|
|
_In_ unsigned _Line);
|
2007-09-24 11:40:54 +00:00
|
|
|
|
2008-12-13 21:28:05 +00:00
|
|
|
#ifdef __cplusplus
|
2007-09-24 11:40:54 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-12-13 21:28:05 +00:00
|
|
|
#ifndef assert
|
2010-06-03 12:47:40 +00:00
|
|
|
#define assert(_Expression) (void)((!!(_Expression)) || (_assert(#_Expression,__FILE__,__LINE__),0))
|
2008-12-13 21:28:05 +00:00
|
|
|
#endif
|
|
|
|
|
2008-12-23 02:15:24 +00:00
|
|
|
#ifndef wassert
|
|
|
|
#define wassert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
|
|
|
|
#endif
|
|
|
|
|
2008-12-13 21:28:05 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|