diff options
author | Marcus Brinkmann <mb@g10code.com> | 2003-07-06 12:26:18 +0000 |
---|---|---|
committer | Marcus Brinkmann <mb@g10code.com> | 2003-07-06 12:26:18 +0000 |
commit | cd85b95d21b50d85df43f64eb22174b56c471bbe (patch) | |
tree | 87cb28058f1478a0e5306afb68542f0fbf0f0e45 | |
parent | f1b2c76fc686088e41a28f716fca5edb48dfd12e (diff) | |
download | libgpg-error-cd85b95d21b50d85df43f64eb22174b56c471bbe.tar.gz |
2003-07-06 Marcus Brinkmann <marcus@g10code.de>
* src/gpg-error.h (GPG_ERR_INLINE): Define macro. Use it instead
of __inline__ in this file.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/gpg-error.h | 18 |
2 files changed, 17 insertions, 6 deletions
@@ -1,3 +1,8 @@ +2003-07-06 Marcus Brinkmann <marcus@g10code.de> + + * src/gpg-error.h (GPG_ERR_INLINE): Define macro. Use it instead + of __inline__ in this file. + 2003-06-30 Werner Koch <wk@gnupg.org> * src/gpg-error.h: Add WRONG_CARD. diff --git a/src/gpg-error.h b/src/gpg-error.h index c30a5d6..bbffeaf 100644 --- a/src/gpg-error.h +++ b/src/gpg-error.h @@ -21,6 +21,12 @@ #ifndef GPG_ERROR_H #define GPG_ERROR_H 1 +#ifdef __GNUC__ +#define GPG_ERR_INLINE __inline__ +#else +#define GPG_ERR_INLINE inline +#endif + /* The GnuPG project consists of many components. Error codes are exchanged between all components. The common error codes and their user-presentable descriptions are kept into a shared library to @@ -435,7 +441,7 @@ typedef unsigned int gpg_error_t; /* Construct an error value from an error code and source. Within a subsystem, use gpg_error. */ -static __inline__ gpg_error_t +static GPG_ERR_INLINE gpg_error_t gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) { return code == GPG_ERR_NO_ERROR ? GPG_ERR_NO_ERROR @@ -450,7 +456,7 @@ gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) #define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_UNKNOWN #endif -static __inline__ gpg_error_t +static GPG_ERR_INLINE gpg_error_t gpg_error (gpg_err_code_t code) { return gpg_err_make (GPG_ERR_SOURCE_DEFAULT, code); @@ -458,7 +464,7 @@ gpg_error (gpg_err_code_t code) /* Retrieve the error code from an error value. */ -static __inline__ gpg_err_code_t +static GPG_ERR_INLINE gpg_err_code_t gpg_err_code (gpg_error_t err) { return err & GPG_ERR_CODE_MASK; @@ -466,7 +472,7 @@ gpg_err_code (gpg_error_t err) /* Retrieve the error source from an error value. */ -static __inline__ gpg_err_source_t +static GPG_ERR_INLINE gpg_err_source_t gpg_err_source (gpg_error_t err) { return (err >> GPG_ERR_SOURCE_SHIFT) & GPG_ERR_SOURCE_MASK; @@ -499,14 +505,14 @@ int gpg_err_code_to_errno (gpg_err_code_t code); /* Self-documenting convenience functions. */ -static __inline__ gpg_error_t +static GPG_ERR_INLINE gpg_error_t gpg_err_make_from_errno (gpg_err_source_t source, int err) { return gpg_err_make (source, gpg_err_code_from_errno (err)); } -static __inline__ gpg_error_t +static GPG_ERR_INLINE gpg_error_t gpg_error_from_errno (int err) { return gpg_error (gpg_err_code_from_errno (err)); |