Windows compile and linker fixes.
* Do not include aithreadid.h from debug.h, because the latter is included everywhere (from linden_common.h) and aithreadid.h is heavy (includes among others windows.h). * On windows, thread local members cannot be exported.
This commit is contained in:
@@ -416,12 +416,23 @@ void cwdebug_backtrace(int n)
|
||||
#elif defined(DEBUG_CURLIO)
|
||||
|
||||
#include "debug.h"
|
||||
#include "aithreadid.h"
|
||||
|
||||
namespace debug
|
||||
{
|
||||
|
||||
libcwd_do_type const libcw_do;
|
||||
CWD_TLS int Indent::S_indentation;
|
||||
ll_thread_local int Indent::S_indentation;
|
||||
|
||||
Indent::Indent(int indent) : M_indent(indent)
|
||||
{
|
||||
S_indentation += M_indent;
|
||||
}
|
||||
|
||||
Indent::~Indent()
|
||||
{
|
||||
S_indentation -= M_indent;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, Indent::print_nt)
|
||||
{
|
||||
@@ -430,6 +441,19 @@ std::ostream& operator<<(std::ostream& os, Indent::print_nt)
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, print_thread_id_t)
|
||||
{
|
||||
if (!AIThreadID::in_main_thread_inline())
|
||||
{
|
||||
#ifdef LL_DARWIN
|
||||
os << std::hex << (size_t)apr_os_thread_current() << std::dec << ' ';
|
||||
#else
|
||||
os << std::hex << (size_t)AIThreadID::getCurrentThread_inline() << std::dec << ' ';
|
||||
#endif
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, libcwd::buf2str const& b2s)
|
||||
{
|
||||
static char const c2s_tab[7] = { 'a', 'b', 't', 'n', 'v', 'f', 'r' };
|
||||
|
||||
Reference in New Issue
Block a user