libgpg-error 1.4 released

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

libgpg-error 1.4 released

Werner Koch
Hi,

We are pleased to announce version 1.4 of libgpg-error,
a library for common error values and messages in GnuPG components.

This is a shared library so it can be updated independently of each
individual component, while still allowing the use of new error values in
inter-process communication.

It may be found in the files

ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.4.tar.bz2 (457k)
ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.4.tar.bz2.sig

or gzip compressed

ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.4.tar.gz  (601k)
ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.4.tar.gz.sig

or as a patch to upgrade from 1.3:

ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.3-1.4.diff.bz2 (30k)

It should soon appear on the mirrors listed at:
http://www.gnupg.org/mirrors.html

Bug reports and requests for assistance should be sent to:
[hidden email]

The sha1sum checksums for this distibution are

a1f42d6b8d795d657a1f592138a14991f5aeeb85  libgpg-error-1.4.tar.gz
6e6f701541e1ecf0a8e438b5b3d26ef05f6b1ffb  libgpg-error-1.4.tar.bz2
b565cf7de380e2ade046ddebdb2c8d3a0e1cf75e  libgpg-error-1.3-1.4.diff.bz2


Noteworthy changes in version 1.4 (2006-09-14)
----------------------------------------------

 * Support for Common Lisp is included.

 * New error codes for the Assuan IPC library.

 * New error code GPG_ERR_MISSING_ERRNO to be used in cases when a
   system accidently does not set errno but a system error definitely
   occured.

 * New error source GPG_ERR_SOURCE_ANY to allow proper use of
   libgpg-error even if a specific source is not available.

 * New convenience functions gpg_err_code_from_syserror and
   gpg_error_from_syserror which make sure never to return 0.


The new gpg_error_from_syserror is robustness feature useful in cases
where you want to make sure that an error is returned even if
accidently ERRNO has not been set.  For example:

  void
  foo (size_t n)
  {
     char *p = my_malloc (n);
     if (!p)
        return gpg_error_from_errno (errno);
     bar (p, n);
     free (p);
     return 0; /* Success. */
  }

With a faulty my_malloc which does not set ERRNO on failure, this code
would falsely return success if my_malloc has failed.  Replacing the
test by:

     if (!p)
        return gpg_error_from_syserror ();

solves the problem as the new function will return
GPG_ERR_MISSING_ERRNO in this case. It has also the advantage of
avoiding the need to include errno.h.


Shalom-Salam,

   Werner


p.s.
Commercial support contracts for GnuPG and related software are
available, and they help finance continued maintenance.  g10 Code, a
Duesseldorf based company owned and headed by GnuPG's principal
author, is currently funding GnuPG development.  We are always looking
for interesting development projects.

--
Werner Koch                                      <[hidden email]>
The GnuPG Experts                                http://g10code.com
Join the Fellowship and protect your Freedom!    http://www.fsfe.org

_______________________________________________
Gnupg-announce mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-announce

attachment0 (202 bytes) Download Attachment