aboutsummaryrefslogtreecommitdiffstats
path: root/l4common.h
blob: 34eef264c0d2404daca8f060a70efc5fa5770da1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 */