diff options
author | Werner Koch <[email protected]> | 2015-07-26 10:50:16 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-07-26 10:50:24 +0000 |
commit | d382242fb6789973ce8d246ec154a4a1468c24c0 (patch) | |
tree | 3809b220992ea4e49942a3dec3d7a2f5e96738f6 /common/types.h | |
parent | scd: support any curves defined by libgcrypt. (diff) | |
download | gnupg-d382242fb6789973ce8d246ec154a4a1468c24c0.tar.gz gnupg-d382242fb6789973ce8d246ec154a4a1468c24c0.zip |
Replace GNUPG_GCC_A_ macros by GPGRT_ATTR_ macros.
* common/util.h: Provide replacement for GPGRT_ATTR_ macros when using
libgpg-error < 1.20.
* common/mischelp.h: Ditto.
* common/types.h: Ditto.
--
Given that libgpg-error is a dependency of all GnuPG related libraries
it is better to define such macros at only one place instead of having
similar macros at a lot of places. For now we need repalcement
macros, though.
Diffstat (limited to 'common/types.h')
-rw-r--r-- | common/types.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/types.h b/common/types.h index 8d7730b2e..2bb817faf 100644 --- a/common/types.h +++ b/common/types.h @@ -114,13 +114,13 @@ #endif -/* Some GCC attributes. Note that we use also define some in - mischelp.h, but this header and types.h are not always included. - Should eventually be put into one file (e.g. nlib-common.h). */ -#if __GNUC__ >= 4 -# define GNUPG_GCC_A_SENTINEL(a) __attribute__ ((sentinel(a))) -#else -# define GNUPG_GCC_A_SENTINEL(a) +/* Some GCC attributes. These are replacements for libgpg-error < 1.20. */ +#ifndef GPGRT_GCC_VERSION +# if __GNUC__ >= 4 +# define GPGRT_ATTR_SENTINEL(a) __attribute__ ((sentinel(a))) +# else +# define GPGRT_ATTR_SENTINEL(a) +# endif #endif #endif /*GNUPG_COMMON_TYPES_H*/ |