Futher changes to casts
[tinycc/daniel.git] / win32 / include / assert.h
blob959c803511ffcff1c259a9727beb3f327ead5008
1 /*
2 * assert.h
4 * Define the assert macro for debug output.
6 * This file is part of the Mingw32 package.
8 * Contributors:
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.
21 * $Revision: 1.2 $
22 * $Author: bellard $
23 * $Date: 2005/04/17 13:14:29 $
27 #ifndef _ASSERT_H_
28 #define _ASSERT_H_
30 /* All the headers include this file. */
31 #include <_mingw.h>
33 #ifndef RC_INVOKED
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 #ifdef NDEBUG
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
50 * call to abort.
52 void _assert (const char*, const char*, int)
53 #ifdef __GNUC__
54 __attribute__ ((noreturn))
55 #endif
59 * Definition of the assert macro.
61 #define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
62 #endif /* NDEBUG */
64 #ifdef __cplusplus
66 #endif
68 #endif /* Not RC_INVOKED */
70 #endif /* Not _ASSERT_H_ */