diff options
Diffstat (limited to 'dirmngr/t-support.h')
-rw-r--r-- | dirmngr/t-support.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dirmngr/t-support.h b/dirmngr/t-support.h index f773f1efb..7f60c942b 100644 --- a/dirmngr/t-support.h +++ b/dirmngr/t-support.h @@ -31,6 +31,12 @@ #ifndef DIRMNGR_T_SUPPORT_H #define DIRMNGR_T_SUPPORT_H 1 +#ifndef DIM +# define DIM(v) (sizeof(v)/sizeof((v)[0])) +# define DIMof(type,member) DIM(((type *)0)->member) +#endif + + /* Macros to print the result of a test. */ #define pass() do { ; } while(0) #define fail(a) do { fprintf (stderr, "%s:%d: test %d failed\n",\ |