blocksruntime
blocksruntime copied to clipboard
Fixed bool type for c89
Before c99 doesn't have _Bool‘ and STDC_VERSION'. Compensate.
#ifndef __STDC_VERSION__
#define __STDC_VERSION__ 0
#endif
#if defined(_MSC_VER) || (__STDC_VERSION__ < 199901L)
/* `MSVC' and `Before c99' doesn't have <stdbool.h>. Compensate. */
typedef char bool;
#define true (bool) 1
#define false (bool) 0
#else
#include <stdbool.h>
#endif
This may not be correct in general case. Darwin ppc ABI has 4-byte bool, for example.