2022-06-20 11:19:15 -04:00
|
|
|
#ifndef KERNAUX_INCLUDED_MACRO
|
|
|
|
#define KERNAUX_INCLUDED_MACRO
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-06-20 17:28:35 -04:00
|
|
|
#ifdef KERNAUX_ACCESS_PRIVATE
|
|
|
|
# define KERNAUX_PRIVATE_FIELD(id) id
|
|
|
|
# define KERNAUX_PROTECTED_FIELD(id) id
|
2022-06-20 11:19:15 -04:00
|
|
|
#else
|
2022-06-20 17:28:35 -04:00
|
|
|
# define KERNAUX_PRIVATE_FIELD(id) _private_##id
|
|
|
|
|
|
|
|
# ifdef KERNAUX_ACCESS_PROTECTED
|
|
|
|
# define KERNAUX_PROTECTED_FIELD(id) id
|
|
|
|
# else
|
|
|
|
# define KERNAUX_PROTECTED_FIELD(id) _protected_##id
|
|
|
|
# endif
|
|
|
|
#endif // KERNAUX_ACCESS_PRIVATE
|
2022-06-20 11:19:15 -04:00
|
|
|
|
2022-06-24 19:07:10 -04:00
|
|
|
#ifdef __TINYC__
|
|
|
|
# define KERNAUX_PACKING_ATTR
|
|
|
|
#else
|
|
|
|
# define KERNAUX_PACKING_ATTR __attribute__((packed))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define KERNAUX_STATIC_TEST_STRUCT_SIZE(name, size) \
|
|
|
|
__attribute__((unused)) \
|
|
|
|
static const int \
|
|
|
|
_kernaux_static_test_struct_size_##name[ \
|
|
|
|
sizeof(struct name) == (size) ? 1 : -1 \
|
|
|
|
]
|
|
|
|
|
2022-06-20 11:19:15 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|