move complex macros from picrin.h to util.h

This commit is contained in:
Yuichi Nishiwaki 2015-05-28 16:54:36 +09:00
parent 6a692541a6
commit d11da3a400
2 changed files with 14 additions and 14 deletions

View File

@ -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"

View File

@ -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