aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgme.h.in')
-rw-r--r--src/gpgme.h.in25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index eed9daa4..f84cd465 100644
--- a/src/gpgme.h.in
+++ b/src/gpgme.h.in
@@ -164,30 +164,41 @@ const char *gpgme_strerror (gpgme_error_t err);
beginning of the error string as fits into the buffer. */
int gpgme_strerror_r (gpg_error_t err, char *buf, size_t buflen);
-
/* Return a pointer to a string containing a description of the error
source in the error value ERR. */
const char *gpgme_strsource (gpgme_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). */
gpgme_err_code_t gpgme_err_code_from_errno (int err);
-
/* Retrieve the system error for the error code CODE. This returns 0
if CODE is not a system error code. */
int gpgme_err_code_to_errno (gpgme_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. */
+gpgme_err_code_t gpgme_err_code_from_syserror (void);
+
+/* Set the ERRNO variable. This function is the preferred way to set
+ ERRNO due to peculiarities on WindowsCE. */
+void gpgme_err_set_errno (int err);
+
/* Return an error value with the error source SOURCE and the system
- error ERR. */
+ error ERR. FIXME: Should be inline. */
gpgme_error_t gpgme_err_make_from_errno (gpgme_err_source_t source, int err);
+/* Return an error value with the system error ERR. FIXME: Should be inline. */
+gpgme_error_t gpgme_error_from_errno (int err);
+
-/* Return an error value with the system error ERR. */
-gpgme_err_code_t gpgme_error_from_errno (int err);
+static _GPGME_INLINE gpgme_error_t
+gpgme_error_from_syserror (void)
+{
+ return gpgme_error (gpgme_err_code_from_syserror ());
+}
/* The possible encoding mode of gpgme_data_t objects. */