14
#define CG_BEGIN_DEFS extern "C" {
26
# if __STDC_VERSION__ > 201710L // We are using C2X
27
# define UNUSED [[maybe_unused]]
29
# define UNUSED __attribute__((unused))
35
# if __STDC_VERSION__ > 201710L // We are using C2X
36
# define DEPRECATED [[deprecated]]
38
# define DEPRECATED __attribute__((deprecated))
43
# define ALIGNED(N) __attribute__((aligned (N)))
47
# define F_FORMAT_STR(start, end) __attribute__((format (printf, start, end)))
51
# define CLEANUP(func) __attribute__((cleanup (func)))
54
#ifndef NOT_IMPLEMENTED
55
# define NOT_IMPLEMENTED {\
56
err_print ("[%s:%i] Function %s is not implemented yet.", __FILE__, __LINE__ , __func__); \
70
typedef enum SEEK_OFFSET {
71
/** Beginning of file */
72
SEEK_OFFSET_SET = SEEK_SET,
74
/** Current position of the pointer */
75
SEEK_OFFSET_CUR = SEEK_CUR,
78
SEEK_OFFSET_END = SEEK_END,
90
#define auto __auto_type