Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4680 | right-hear | 1 | /* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ |
2 | #ifndef __dj_ENFORCE_ANSI_FREESTANDING |
||
3 | |||
4 | #undef assert |
||
5 | #undef unimpl |
||
6 | |||
7 | #define assert(test) ((void)((test)||(__dj_assert(#test,__FILE__,__LINE__),0))) |
||
8 | #define unimpl() __dj_unimp("Called unimplemented function in file \"" __FILE__ "\"\n") |
||
9 | |||
10 | #ifndef __dj_include_assert_h_ |
||
11 | #define __dj_include_assert_h_ |
||
12 | |||
13 | #ifdef __cplusplus |
||
14 | extern "C" { |
||
15 | #endif |
||
16 | |||
17 | #ifdef _MSC_VER |
||
18 | void __declspec(noreturn) __dj_assert(const char *,const char *,int); |
||
19 | void __declspec(noreturn) __dj_unimp(const char *fn); |
||
20 | #else |
||
21 | void __dj_assert(const char *,const char *,int) __attribute__((__noreturn__)); |
||
22 | void __dj_unimp(const char *fn) __attribute__((__noreturn__)); |
||
23 | #endif |
||
24 | |||
25 | #ifdef __cplusplus |
||
26 | } |
||
27 | #endif |
||
28 | |||
29 | #endif /* !__dj_include_assert_h_ */ |
||
30 | |||
31 | #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |