Prior to this change, the test harness was creating a FIFO on disk using
`mkfifo`. This is really unnecessary, and we can use `pipe` instead to
create a pair of file descriptors corresponding to a FIFO in memory,
without having to go to disk at all.
This change creates the FIFO and sets it to non-blocking to emulate the
existing behavior.
Prior to this change, pinelog used __FILE__ in the backtrace call.
However, this has a limitation that if used in a build system with
sources in subdirectories and/or a separate build directory, the
relative path to the file is used, giving us a backtrace like this.
../../daemon/x52d_main.c:51
This change checks if the compiler supports the __builtin_strrchr to
compute the file basename at compile time. If the compiler does not
support it, it falls back to using __FILE__ directly. This should not be
an issue on a modern compiler like gcc or clang.
Prior to this change, pinelog relied on an autoconf generated config.h
which checked if the compiler supports __attribute__ with constructor,
destructor and format. However, most modern compilers already have
support for this, and we can use the __has_attribute special operator
instead to check for this at compile time.
By eliminating the need to create a config.h file, it simplifies
integration into other projects that may not have one.