2003-09-13 Marcus Brinkmann <marcus@g10code.de>
+ * 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.
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.
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.
* 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
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.])
+2003-09-13 Marcus Brinkmann <marcus@g10code.de>
+
+ * gpgme.texi (Error Strings): Add gpgme_strerror_r.
+
2003-09-13 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Multi Threading): Update documentation.
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
2003-09-13 Marcus Brinkmann <marcus@g10code.de>
+ * 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.
}
+/* 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 *
/* 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. */