From 36e27200b71c790a841c6ecb87ee4ef9fca46302 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sun, 14 Sep 2003 00:06:22 +0000 Subject: [PATCH] 2003-09-14 Marcus Brinkmann * gpgme.h: Define macro _GPGME_INLINE depending on the compiler characteristics and use that instead __inline__. --- gpgme/ChangeLog | 3 +++ gpgme/gpgme.h | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index acd4251d..8ca7718b 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,5 +1,8 @@ 2003-09-14 Marcus Brinkmann + * gpgme.h: Define macro _GPGME_INLINE depending on the compiler + characteristics and use that instead __inline__. + * context.h (struct gpgme_context): New members lc_ctype and lc_messages. * gpgme.c: Include . diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index 849521ff..7ebb61b5 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -21,6 +21,14 @@ #ifndef GPGME_H #define GPGME_H +#ifdef __GNUC__ +#define _GPGME_INLINE __inline__ +#elif __STDC_VERSION__ >= 199901L +#define _GPGME_INLINE inline +#else +#define _GPGME_INLINE +#endif + /* Include stdio.h for the FILE type definition. */ #include @@ -85,7 +93,7 @@ typedef gpg_err_code_t gpgme_err_code_t; typedef gpg_err_source_t gpgme_err_source_t; -static __inline__ gpgme_error_t +static _GPGME_INLINE gpgme_error_t gpgme_err_make (gpgme_err_source_t source, gpgme_err_code_t code) { return gpg_err_make (source, code); @@ -98,21 +106,21 @@ gpgme_err_make (gpgme_err_source_t source, gpgme_err_code_t code) #define GPGME_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_USER_1 #endif -static __inline__ gpgme_error_t +static _GPGME_INLINE gpgme_error_t gpgme_error (gpgme_err_code_t code) { return gpgme_err_make (GPGME_ERR_SOURCE_DEFAULT, code); } -static __inline__ gpgme_err_code_t +static _GPGME_INLINE gpgme_err_code_t gpgme_err_code (gpgme_error_t err) { return gpg_err_code (err); } -static __inline__ gpgme_err_source_t +static _GPGME_INLINE gpgme_err_source_t gpgme_err_source (gpgme_error_t err) { return gpg_err_source (err);