4 * Define the assert macro for debug output.
6 * This file is part of the Mingw32 package.
9 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 * $Date: 2005/04/17 13:14:29 $
30 /* All the headers include this file. */
42 * If not debugging, assert does nothing.
44 #define assert(x) ((void)0)
46 #else /* debugging enabled */
49 * CRTDLL nicely supplies a function which does the actual output and
52 void _assert (const char*, const char*, int)
54 __attribute__ ((noreturn
))
59 * Definition of the assert macro.
61 #define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
68 #endif /* Not RC_INVOKED */
70 #endif /* Not _ASSERT_H_ */