backtrace: Inline esc() helper, making it available to all build variants
This commit is contained in:
parent
2127831cda
commit
087e02e47e
|
@ -89,6 +89,18 @@ static void println(FILE *file, char *format, ...)
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as tty_escape_get(), but for a potentially NULL FILE*
|
||||
*/
|
||||
static inline char* esc(FILE *file, tty_escape_t escape)
|
||||
{
|
||||
if (file)
|
||||
{
|
||||
return tty_escape_get(fileno(file), escape);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
#ifdef HAVE_DBGHELP
|
||||
|
||||
#include <dbghelp.h>
|
||||
|
@ -118,18 +130,6 @@ void backtrace_deinit()
|
|||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Same as tty_escape_get(), but for a potentially NULL FILE*
|
||||
*/
|
||||
static char* esc(FILE *file, tty_escape_t escape)
|
||||
{
|
||||
if (file)
|
||||
{
|
||||
return tty_escape_get(fileno(file), escape);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
#ifdef HAVE_BFD_H
|
||||
|
||||
#include <bfd.h>
|
||||
|
|
Loading…
Reference in New Issue