diff options
| author | Werner Koch <[email protected]> | 2015-08-26 07:16:36 +0000 | 
|---|---|---|
| committer | Werner Koch <[email protected]> | 2015-08-26 07:16:36 +0000 | 
| commit | c4f4b5c0a6fc172f7ceedc1a0021169e7f31b941 (patch) | |
| tree | 63bcbb94f8ba87d85289abffcb910d740238bf91 | |
| parent | Avoid -Wundef warnings if gpgme.h is used by g++. (diff) | |
| download | gpgme-c4f4b5c0a6fc172f7ceedc1a0021169e7f31b941.tar.gz gpgme-c4f4b5c0a6fc172f7ceedc1a0021169e7f31b941.zip | |
Make use of GPGRT macros is available.
* src/gpgme.h.in (_GPGME_INLINE): Define using GPGRT_INLINE if
possible.  Fix problem with -Wundef by adding an extra "defined()".
(_GPGME_GCC_VERSION): Define using GPGRT_ macro if possible.
| -rw-r--r-- | src/gpgme.h.in | 29 | 
1 files changed, 17 insertions, 12 deletions
| diff --git a/src/gpgme.h.in b/src/gpgme.h.in index a0d9d31b..6cea2c77 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -56,28 +56,33 @@ extern "C" {  /*   * Check for compiler features.   */ -#ifdef __GNUC__ +#ifdef GPGRT_INLINE +# define _GPGME_INLINE GPGRT_INLINE +#elif defined(__GNUC__)  # define _GPGME_INLINE __inline__ -#elif __STDC_VERSION__ >= 199901L +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L  # define _GPGME_INLINE inline  #else  # define _GPGME_INLINE  #endif -#if __GNUC__ -#define _GPGME_GCC_VERSION (__GNUC__ * 10000 \ -                            + __GNUC_MINOR__ * 100 \ -                            + __GNUC_PATCHLEVEL__) +#ifdef GPGRT_ATTR_DEPRECATED +# define _GPGME_DEPRECATED GPGRT_ATTR_DEPRECATED +#elif defined(__GNUC__) +# define _GPGME_GCC_VERSION (__GNUC__ * 10000 \ +                             + __GNUC_MINOR__ * 100 \ +                             + __GNUC_PATCHLEVEL__) -#if _GPGME_GCC_VERSION > 30100 -#define _GPGME_DEPRECATED	__attribute__ ((__deprecated__)) -#endif +# if _GPGME_GCC_VERSION > 30100 +#  define _GPGME_DEPRECATED  __attribute__ ((__deprecated__)) +# else +#  define _GPGME_DEPRECATED +# endif +#else +# define _GPGME_DEPRECATED  #endif -#ifndef _GPGME_DEPRECATED -#define _GPGME_DEPRECATED -#endif  /* The macro _GPGME_DEPRECATED_OUTSIDE_GPGME suppresses warnings for     fields we must access in GPGME for ABI compatibility.  */ | 
