Read Me(libexplain)                                        Read Me(libexplain)



NAME
       libexplain - Explain errno values returned by libc functions

DESCRIPTION
       The libexplain package provides a library which may be used to explain
       Unix and Linux system call errors.  This will make your application's
       error messages much more informative to your users.

       The library is not quite a drop-in replacement for strerror(3), but it
       comes close.  Each system call has a dedicated libexplain function, for
       example
              fd = open(path, flags, mode);
              if (fd < 0)
              {
                  fprintf(stderr, "%s\n", explain_open(path, flags, mode));
                  exit(EXIT_FAILURE);
              }
       If, for example, you were to try to open no-such-dir/some-file, you
       would see a message like
              open(pathname = "no-such-dir/some-file", flags = O_RDONLY)
              failed, No such file or directory (2, ENOENT) because there is
              no "no-such-dir" directory in the current directory

       The good new is that for each of these functions there is a wrapper
       function, in this case explain_open_or_die(3), that includes the above
       code fragment.  Adding good error reporting is as simple as using a
       different, but similarly named, function.  The library also provides
       thread safe variants of each explanation function.

HOME PAGE
       The latest version of libexplain is available on the Web from:

          URL:    http://libexplain.sourceforge.net/
          File:   index.html               # the libexplain page
          File:   libexplain.0.11.README   # Description, from the tar file
          File:   libexplain.0.11.lsm      # Description, LSM format
          File:   libexplain.0.11.tar.gz   # the complete source
          File:   libexplain.0.11.pdf      # Reference Manual

BUILDING LIBEXPLAIN
       Full instructions for building libexplain may be found in the BUILDING
       file included in this distribution.

COPYRIGHT
       libexplain version 0.11
       Copyright (C) 2008, 2009 Peter Miller

       This program is free software; you can redistribute it and/or modify it
       under the terms of the GNU Lesser General Public License as published
       by the Free Software Foundation; either version 3 of the License, or
       (at your option) any later version.

       This program is distributed in the hope that it will be useful, but
       WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       Lesser General Public License for more details.

       You should have received a copy of the GNU Lesser General Public
       License along with this program. If not, see
       <http://www.gnu.org/licenses/>.

       It should be in the LICENSE file included with this distribution.

AUTHOR
       Peter Miller   E-Mail:   pmiller@opensource.org.au
       /\/\*             WWW:   http://www.canb.auug.org.au/~millerp/































































RELEASE NOTES
       This section details the various features and bug fixes of the various
       releases.  For excruciating and complete detail, and also credits for
       those of you who have generously sent me suggestions and bug reports,
       see the etc/CHANGES.* files.

   Version 0.11 (2009-Mar-29)
       * The current directory is replaced in messages with an absolute path
       in cases where the user's idea of the current directory may differ from
       that of the current process.

   Version 0.10 (2009-Mar-24)
       * The name prefix on all of the library functions has been changed from
       "libexplain_" to just "explain_".  This was the most requested change.
       You will need to change your code and recompile.  Apologies for the
       inconvenience.

   Version 0.9 (2009-Feb-27)
       * Two false negatives in the tests have been fixed.

       * The ./configure script now explicitly looks for bison, and complains
       if it cannot be found.

       * The socket(7) address family is now decoded.

   Version 0.8 (2009-Feb-14)
       * A problem with the Debian packaging has been fixed.

       * The decoding of IPv4 sockaddr structs has been improved.

   Version 0.7 (2009-Feb-10)
       * Coverage has been extended to include getsockopt(2), getpeername(2),
       getsockname(2) and setsockopt(2).

       * Build problems on Debian Sid have been fixed.

       * More magnetic tape ioctl controls, from operating systems other than
       Linux, have been added.

   Version 0.6 (2009-Jan-16)
       * Coverage has been extended to include execvp(3), ioctl(2), malloc(3),
       pclose(3), pipe(2), popen(3) and realloc(3) system calls.

       * The coverage for ioctl(2) includes linux console controls, magnetic
       tape controls, socket controls, and terminal controls.

       * A false negative from test 31 has been fixed.

   Version 0.5 (2009-Jan-03)
       * A build problem on Debian sid has been fixed.

       * There is a new explain_system_success(3) function, that performs all
       that explain_system_success_or_die(3) performs, except that it does not
       call exit(2).

       * There is more i18n support.

       * A bug with the pkg-config(1) support has been fixed.

   Version 0.4 (2008-Dec-24)
       * Coverage now includes accept(2), bind(2), connect(2), dup2(2),
       fchown(2), fdopen(3), fpathconf(2), fputc(2), futimes(2),
       getaddrinfo(2), getcwd(2), getrlimit(2), listen(2), pathconf(2),
       putc(2), putchar(2), select(2).

       * Internationalization has been improved.

       * The thread safety of the code has been improved.

       * The code is now able to be compiled on OpenBSD.  The test suite still
       gives many false negatives, due to differences in strerror() results.

   Version 0.3 (2008-Nov-23)
       * Cover has been extended to include closedir(3), execve(2), ferror(3),
       fgetc(3), fgets(3), fork(2), fread(3), getc(3), gettimeofday(2),
       lchown(2), socket(2), system(3), utime(2), wait3(2), wait4(2), wait(2),
       waitpid(2),

       * More internationalization support has been added.

       * A bug has been fixed in the C++ insulation.

   Version 0.2 (2008-Nov-11)
       * Coverage now includes chmod(2), chown(2), dup(2), fchdir(2),
       fchmod(2), fstat(2), ftruncate(2), fwrite(3), mkdir(2), readdir(3),
       readlink(2), remove(3), rmdir(2) and truncate(2).

       * The lsof(1) command is used to obtain supplementary file information
       on those systems with limited /proc implementations.

       * The explanations now understand Linux capabilities.

   Version 0.1 (2008-Oct-26)
       First public release.



Reference Manual                  libexplain               Read Me(libexplain)
