X-Git-Url: https://unix4lyfe.org/gitweb/darkstat-debian/blobdiff_plain/a1e8056c92203d02860d719abb1d562453896da8..HEAD:/cdefs.h diff --git a/cdefs.h b/cdefs.h index a0405eb..05c8172 100644 --- a/cdefs.h +++ b/cdefs.h @@ -1,5 +1,5 @@ /* darkstat 3 - * copyright (c) 2001-2011 Emil Mikulic. + * copyright (c) 2001-2014 Emil Mikulic. * * cdefs.h: compiler-specific defines * @@ -17,18 +17,6 @@ # define _printflike_(fmtarg, firstvararg) #endif -#if __GNUC__ == 2 -# define inline __inline__ -#else -# ifdef __TenDRA__ -# define inline __inline -# endif -#endif - -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 -#define restrict __restrict -#endif - #ifndef MAX # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif @@ -37,4 +25,14 @@ # define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L +# ifdef __COUNTER__ +# define _Static_assert(x, y) __Static_assert(x, __COUNTER__) +# else +# define _Static_assert(x, y) __Static_assert(x, __LINE__) +# endif +# define __Static_assert(x, y) ___Static_assert(x, y) +# define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#endif + /* vim:set ts=3 sw=3 tw=78 expandtab: */