diff options
Diffstat (limited to 'l4common.h')
-rw-r--r-- | l4common.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/l4common.h b/l4common.h new file mode 100644 index 0000000..34eef26 --- /dev/null +++ b/l4common.h @@ -0,0 +1,23 @@ +#ifndef LBS_COMMON_H +#define LBS_COMMON_H + +#include <stddef.h> + +#ifdef __STDC_VERSION__ +# include <stdbool.h> +# if __STDC_VERSION__ >= 201112L +# define LBS_COMMON_ISO_C11 +# define LBS_COMMON_CHECK_TYPE(x,type) (_Generic ((x), type: (x))) +# else +# define LBS_COMMON_ISO_C99 +# define LBS_COMMON_CHECK_TYPE(x,type) (x) +# endif +#else +# define bool char +# define true 1 +# define false 0 +# define LBS_COMMON_ISO_C89 +# define LBS_COMMON_CHECK_TYPE(x,type) (x) +#endif /* __STDC_VERSION__ */ + +#endif /* LBS_COMMON_H */ |