diff options
Diffstat (limited to 'common/t-support.h')
-rw-r--r-- | common/t-support.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/t-support.h b/common/t-support.h index 8316909b5..0dfcc7a40 100644 --- a/common/t-support.h +++ b/common/t-support.h @@ -44,6 +44,11 @@ # define getenv(a) (NULL) #endif +#ifndef DIM +# define DIM(v) (sizeof(v)/sizeof((v)[0])) +# define DIMof(type,member) DIM(((type *)0)->member) +#endif + /* Replacement prototypes. */ void *gcry_xmalloc (size_t n); |