Support for c standard libraries other than glibc
When trying to compile cquery on Void Linux with musl libc I get the following error.
loguru.hpp:1391:11: fatal error: execinfo.h: No such file or directory
#include <execinfo.h> // for backtrace
execinfo.h is glibc specific and prevents compilation when using alternative standard libraries.
Is it possible to restructure loguru so that support doesn't depend on glibc?
I guess you'd want to add something in this piece of code to either check for glibc or for musl:
https://github.com/emilk/loguru/blob/66f5895696c3adf43642fa032b0b5592858718c9/loguru.hpp#L1417:L1435
ideas welcome!
Line 1423 in loguru.hpp should have || !defined(__GLIBC__).
Since execinfo.h is a glibc extension that is needed for stack traces, checking for glibc makes thte most sense. __GLIBC__ is defined to the major number of glibc version, __GLIBC_MINOR__ is minor number and __GNU_LIBRARY__ is the so-number. Probably testing for any of the three macros will suffice.