X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fhelper%2Ftypes.h;h=1516bc2178c39056e8431a72f4cf6d2b8d53b777;hp=82368a9246aa8f399ceb90e9c65259a104ccd22d;hb=591a23ec8d803c34f4168001202a736d643d2b20;hpb=865c5dcc2a0d27ded9135acf7fd1066f55acf5ca diff --git a/src/helper/types.h b/src/helper/types.h index 82368a9246..1516bc2178 100644 --- a/src/helper/types.h +++ b/src/helper/types.h @@ -27,6 +27,10 @@ #include "config.h" #endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif + #ifndef u8 typedef unsigned char u8; #endif @@ -45,6 +49,26 @@ typedef unsigned long long u64; typedef struct jtag_tap_s jtag_tap_t; +#ifdef HAVE_STDBOOL_H +#include +#else /* HAVE_STDBOOL_H */ +#define __bool_true_false_are_defined 1 + +#ifndef HAVE__BOOL +#ifndef __cplusplus + +#define false 0 +#define true 1 + +typedef int _Bool; +#else +typedef bool _Bool; +#endif /* __cplusplus */ +#endif /* HAVE__BOOL */ + +#define bool _Bool + +#endif /* HAVE_STDBOOL_H */ /* DANGER!!!! here be dragons! *