Imported Upstream version 3.0.717
[darkstat-debian] / cdefs.h
1 /* darkstat 3
2 * copyright (c) 2001-2011 Emil Mikulic.
3 *
4 * cdefs.h: compiler-specific defines
5 *
6 * This file borrows from FreeBSD's sys/cdefs.h
7 */
8
9 #ifdef __GNUC__
10 # define _unused_ __attribute__((__unused__))
11 # define _noreturn_ __attribute__((__noreturn__))
12 # define _printflike_(fmtarg, firstvararg) \
13 __attribute__((__format__ (__printf__, fmtarg, firstvararg) ))
14 #else
15 # define _unused_
16 # define _noreturn_
17 # define _printflike_(fmtarg, firstvararg)
18 #endif
19
20 #if __GNUC__ == 2
21 # define inline __inline__
22 #else
23 # ifdef __TenDRA__
24 # define inline __inline
25 # endif
26 #endif
27
28 #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901
29 #define restrict __restrict
30 #endif
31
32 #ifndef MAX
33 # define MAX(a,b) ((a) > (b) ? (a) : (b))
34 #endif
35
36 #ifndef MIN
37 # define MIN(a,b) ((a) < (b) ? (a) : (b))
38 #endif
39
40 /* vim:set ts=3 sw=3 tw=78 expandtab: */