From 9681a5e8596dd71329400bdf0971762463ba0b5d 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__. --- trunk/gpgme/ChangeLog | 3 +++ trunk/gpgme/gpgme.h | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index acd4251..8ca7718 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/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/trunk/gpgme/gpgme.h b/trunk/gpgme/gpgme.h index 849521f..7ebb61b 100644 --- a/trunk/gpgme/gpgme.h +++ b/trunk/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); -- 2.26.2