diff options
author | Werner Koch <[email protected]> | 2006-09-14 14:24:34 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2006-09-14 14:24:34 +0000 |
commit | 12172fa6fa5136cfaa8eca23cb83840386a3892f (patch) | |
tree | 8261c598e67f51dd708bc9b2a11f56704e2db224 /src/gpg-error.h.in | |
parent | Updated. (diff) | |
download | libgpg-error-1.4.tar.gz libgpg-error-1.4.zip |
Ready for a new releaselibgpg-error-1.4
Diffstat (limited to 'src/gpg-error.h.in')
-rw-r--r-- | src/gpg-error.h.in | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index 7c372ce..46325c5 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -212,7 +212,7 @@ const char *gpg_strsource (gpg_error_t err); /* Retrieve the error code for the system error ERR. This returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report - this). */ + this). */ gpg_err_code_t gpg_err_code_from_errno (int err); @@ -220,6 +220,14 @@ gpg_err_code_t gpg_err_code_from_errno (int err); if CODE is not a system error code. */ int gpg_err_code_to_errno (gpg_err_code_t code); + +/* Retrieve the error code directly from the ERRNO variable. This + returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped + (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */ +gpg_err_code_t gpg_err_code_from_syserror (void); + + + /* Self-documenting convenience functions. */ @@ -236,6 +244,12 @@ gpg_error_from_errno (int err) return gpg_error (gpg_err_code_from_errno (err)); } +static GPG_ERR_INLINE gpg_error_t +gpg_error_from_syserror (void) +{ + return gpg_error (gpg_err_code_from_syserror ()); +} + #ifdef __cplusplus } #endif |