esc() is only used if dladdr(3) is available

This commit is contained in:
Tobias Brunner 2013-03-08 16:43:07 +01:00
parent 292ee515db
commit 2b1e2434e4
1 changed files with 13 additions and 12 deletions

View File

@ -52,18 +52,6 @@ struct private_backtrace_t {
void *frames[];
};
/**
* 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 "";
}
/**
* Write a format string with arguments to a FILE line, if it is NULL to DBG
*/
@ -87,6 +75,19 @@ static void println(FILE *file, char *format, ...)
}
#ifdef HAVE_DLADDR
/**
* 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>