diff options
author | Werner Koch <[email protected]> | 2014-02-26 15:18:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-02-26 15:18:45 +0000 |
commit | c72762f9acf3eef5c466ba76e895d7654df12ff7 (patch) | |
tree | bcb93136c589e406f69ae0d219402c5300d05654 /common/t-support.h | |
parent | common: New function get_membuf_shrink. (diff) | |
download | gnupg-c72762f9acf3eef5c466ba76e895d7654df12ff7.tar.gz gnupg-c72762f9acf3eef5c466ba76e895d7654df12ff7.zip |
common: New function map_static_macro_string.
* common/mapstrings.c: New.
* common/t-mapstrings.c: New.
* common/t-support.h (DIM, DIMof): Define if not defined.
* common/Makefile.am: Add new files.
Diffstat (limited to '')
-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); |