aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--NEWS6
-rw-r--r--TODO1
-rw-r--r--configure.ac2
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gpgme.texi12
-rw-r--r--gpgme/ChangeLog3
-rw-r--r--gpgme/error.c11
-rw-r--r--gpgme/gpgme.h8
9 files changed, 45 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e98280d..bd56d181 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2003-09-13 Marcus Brinkmann <[email protected]>
+ * configure.ac: Require libgpg-error 0.5.
+
* acinclude.m4: Remove libtool cruft, add jm_GLIBC21.
* configure.ac: Add check for getenv_r, and call jm_GLIBC21.
Define HAVE_THREAD_SAFE_GETENV if appropriate.
diff --git a/NEWS b/NEWS
index fca10c69..92e049e6 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ Noteworthy changes in version 0.4.3 (unreleased)
variables of course also include the configuration for the thread
package itself. Alternatively, use libtool.
+ * gpgme_strerror_r as a thread safe variant of gpgme_strerror was
+ added.
+
* gpgme-config doesn't support setting the prefix or exec prefix
anymore. I don't think it ever worked correctly, and it seems to
be pointless.
@@ -35,8 +38,9 @@ Noteworthy changes in version 0.4.3 (unreleased)
than an unsigned long (the old class field is preserved for
backwards compatibility).
- * Interface changes relative to the 0.4.3 release:
+ * Interface changes relative to the 0.4.2 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+gpgme_strerror_t NEW
gpgme_get_key CHANGED: Fails correctly if key ID not unique.
gpgme_key_t EXTENDED: New field can_authenticate.
gpgme_subkey_t EXTENDED: New field can_authenticate.
diff --git a/TODO b/TODO
index 28d5e23d..ff60120d 100644
--- a/TODO
+++ b/TODO
@@ -2,7 +2,6 @@ Hey Emacs, this is -*- outline -*- mode!
* Before release:
** set_locale for thread safe and env independent locale selection.
-** Add gpgme_strerror_r() when gpg_strerror_r() exists.
* ABI's to break:
** I/O and User Data could be made extensible. But this can be done
diff --git a/configure.ac b/configure.ac
index c5d2fe63..bb30f8be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,7 +173,7 @@ if test $have_getenv_r = no && test $have_thread_safe_getenv = no; then
fi
# Checking for libgpg-error.
-AM_PATH_GPG_ERROR(0.3,, AC_MSG_ERROR([libgpg-error was not found]))
+AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found]))
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
[The default error source for GPGME.])
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 16586ed4..dd2c2f02 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,9 @@
2003-09-13 Marcus Brinkmann <[email protected]>
+ * gpgme.texi (Error Strings): Add gpgme_strerror_r.
+
+2003-09-13 Marcus Brinkmann <[email protected]>
+
* gpgme.texi (Multi Threading): Update documentation.
2003-09-03 Marcus Brinkmann <[email protected]>
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 30837f9a..1e00d752 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -1232,6 +1232,18 @@ The function @code{gpgme_strerror} returns a pointer to a statically
allocated string containing a description of the error code contained
in the error value @var{err}. This string can be used to output a
diagnostic message to the user.
+
+This function is not thread safe. Use @code{gpgme_strerror_r} in
+multi-threaded programs.
+@end deftypefun
+
+
+@deftypefun {char *} gpgme_strerror_r (@w{gpgme_error_t @var{err}})
+The function @code{gpgme_strerror_r} returns a pointer to a
+dynamically allocated string containing a description of the error
+code contained in the error value @var{err}. This string can be used
+to output a diagnostic message to the user. When it is not needed
+anymore, the user must deallocate it with @code{free}.
@end deftypefun
diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog
index bc90acea..0e33c914 100644
--- a/gpgme/ChangeLog
+++ b/gpgme/ChangeLog
@@ -1,5 +1,8 @@
2003-09-13 Marcus Brinkmann <[email protected]>
+ * gpgme.h (gpgme_strerror_r): New prototype.
+ * error.c (gpgme_strerror_r): New function.
+
* get-env.c: New file.
* util.h (_gpgme_getenv): Add prototype.
* Makefile.am (libgpgme_real_la_SOURCES): Add get-env.c.
diff --git a/gpgme/error.c b/gpgme/error.c
index f3c38b1f..aac2c282 100644
--- a/gpgme/error.c
+++ b/gpgme/error.c
@@ -33,6 +33,17 @@ gpgme_strerror (gpgme_error_t err)
/* Return a pointer to a string containing a description of the error
+ code in the error value ERR. The buffer for the string is
+ allocated with malloc(), and has to be released by the user. On
+ error, NULL is returned. */
+char *
+gpgme_strerror_r (gpgme_error_t err)
+{
+ return gpg_strerror_r (err);
+}
+
+
+/* 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)
diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h
index 29708106..849521ff 100644
--- a/gpgme/gpgme.h
+++ b/gpgme/gpgme.h
@@ -120,9 +120,15 @@ gpgme_err_source (gpgme_error_t err)
/* Return a pointer to a string containing a description of the error
- code in the error value ERR. */
+ code in the error value ERR. This function is not thread safe. */
const char *gpgme_strerror (gpgme_error_t err);
+/* Return a pointer to a string containing a description of the error
+ code in the error value ERR. The buffer for the string is
+ allocated with malloc(), and has to be released by the user. On
+ error, NULL is returned. */
+char *gpgme_strerror_r (gpgme_error_t err);
+
/* Return a pointer to a string containing a description of the error
source in the error value ERR. */