           SPELL=libexplain
         VERSION=1.4
          SOURCE="$SPELL-$VERSION.tar.gz"
   SOURCE_URL[0]=http://downloads.sourceforge.net/sourceforge/project/$SPELL/$VERSION/$SOURCE
     SOURCE_HASH=sha512:c236732f57d0688fed173c27474a00a39c9ac6d5dfbd22f3b68b5d0fff7a70fb130bcedbeb174767f4fd2c012148025e92635cc8df2b958774a3cfba58e6ff2c
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
        WEB_SITE="http://libexplain.sourceforge.net/"
      LICENSE[0]="LGPLv3+"
         ENTERED=20150109
        KEYWORDS=""
           SHORT="Explain errno values returned by libc functions"
cat << EOF
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.

Coverage includes 221 system calls and 547 ioctl requests.
EOF
