move complex macros from picrin.h to util.h
This commit is contained in:
parent
6a692541a6
commit
d11da3a400
|
@ -34,20 +34,6 @@ extern "C" {
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
# define bool char
|
||||
# define true 1
|
||||
# define false 0
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
# include <stddef.h>
|
||||
#elif ! defined(offsetof)
|
||||
# define offsetof(s,m) ((size_t)&(((s *)NULL)->m))
|
||||
#endif
|
||||
|
||||
#include "picrin/config.h"
|
||||
#include "picrin/util.h"
|
||||
#include "picrin/compat.h"
|
||||
|
|
|
@ -9,6 +9,20 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
# define bool char
|
||||
# define true 1
|
||||
# define false 0
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
# include <stddef.h>
|
||||
#elif ! defined(offsetof)
|
||||
# define offsetof(s,m) ((size_t)&(((s *)NULL)->m))
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
# include <stdnoreturn.h>
|
||||
# define PIC_NORETURN noreturn
|
||||
|
|
Loading…
Reference in New Issue