diff options
Diffstat (limited to 'src/common/cbasetypes.h')
-rw-r--r-- | src/common/cbasetypes.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 3ff0db795..ce8fc6bcf 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -97,6 +97,7 @@ #include <inttypes.h> #include <stdint.h> #include <limits.h> +#include <time.h> // temporary fix for bugreport:4961 (unintended conversion from signed to unsigned) // (-20 >= UCHAR_MAX) returns true @@ -419,4 +420,10 @@ typedef char bool; #define h64BPTRSIZE(y) (y) #endif +/** Support macros for marking blocks to memset to 0 */ +#define BEGIN_ZEROED_BLOCK int8 HERC__zeroed_block_BEGIN +#define END_ZEROED_BLOCK int8 HERC__zeroed_block_END +#define ZEROED_BLOCK_POS(x) (&(x)->HERC__zeroed_block_BEGIN) +#define ZEROED_BLOCK_SIZE(x) ((char*)&((x)->HERC__zeroed_block_END) - (char*)&((x)->HERC__zeroed_block_BEGIN) + sizeof((x)->HERC__zeroed_block_END)) + #endif /* COMMON_CBASETYPES_H */ |